sysreset: Add Atmel/Microchip sysreset driver
cover sysreset: Add Atmel/Microchip sysreset driver
This patch series implements the Atmel/Microchip sysreset driver. It also adds the missing RSTC node to the SAM9X60 and SAMA7G5 SoC files and removes the older default reset driver from armv7. The Makefile for arm926ejs has also been updated to ignore the default reset driver if SYSRESET is chosen. What is more, Atmel/Microchip defconfigs now enable sysreset by default.
Sergiu Moga (5):
ARM: dts: at91: Add RSTC node
sysreset: Add Atmel/Microchip sysreset driver
configs: at91: Enable SYSRESET for Atmel/Microchip's platforms
ARM: mach-at91: arm926ejs: Add SYSRESET conditional
ARM: mach-at91: armv7: Remove default reset driver
arch/arm/dts/sam9x60.dtsi | 6 ++ arch/arm/dts/sama7g5.dtsi | 7 ++ arch/arm/mach-at91/arm926ejs/Makefile | 2 + arch/arm/mach-at91/armv7/Makefile | 3 - arch/arm/mach-at91/armv7/reset.c | 31 -------- configs/sam9x60ek_mmc_defconfig | 3 + configs/sam9x60ek_nandflash_defconfig | 3 + configs/sam9x60ek_qspiflash_defconfig | 3 + configs/sama5d27_giantboard_defconfig | 4 ++ configs/sama5d27_som1_ek_mmc1_defconfig | 4 ++ configs/sama5d27_som1_ek_mmc_defconfig | 4 ++ configs/sama5d27_som1_ek_qspiflash_defconfig | 4 ++ configs/sama5d27_wlsom1_ek_mmc_defconfig | 4 ++ .../sama5d27_wlsom1_ek_qspiflash_defconfig | 4 ++ configs/sama5d2_icp_mmc_defconfig | 4 ++ configs/sama5d2_icp_qspiflash_defconfig | 3 + configs/sama5d2_ptc_ek_mmc_defconfig | 3 + configs/sama5d2_ptc_ek_nandflash_defconfig | 3 + configs/sama5d2_xplained_emmc_defconfig | 4 ++ configs/sama5d2_xplained_mmc_defconfig | 4 ++ configs/sama5d2_xplained_qspiflash_defconfig | 4 ++ configs/sama5d2_xplained_spiflash_defconfig | 4 ++ configs/sama5d36ek_cmp_mmc_defconfig | 3 + configs/sama5d36ek_cmp_nandflash_defconfig | 3 + configs/sama5d36ek_cmp_spiflash_defconfig | 3 + configs/sama5d3_xplained_mmc_defconfig | 4 ++ configs/sama5d3_xplained_nandflash_defconfig | 4 ++ configs/sama5d3xek_mmc_defconfig | 4 ++ configs/sama5d3xek_nandflash_defconfig | 4 ++ configs/sama5d3xek_spiflash_defconfig | 4 ++ configs/sama5d4_xplained_mmc_defconfig | 4 ++ configs/sama5d4_xplained_nandflash_defconfig | 4 ++ configs/sama5d4_xplained_spiflash_defconfig | 4 ++ configs/sama5d4ek_mmc_defconfig | 4 ++ configs/sama5d4ek_nandflash_defconfig | 4 ++ configs/sama5d4ek_spiflash_defconfig | 4 ++ configs/sama7g5ek_mmc1_defconfig | 3 + configs/sama7g5ek_mmc_defconfig | 3 + configs/vinco_defconfig | 3 + drivers/sysreset/Kconfig | 15 ++++ drivers/sysreset/Makefile | 1 + drivers/sysreset/sysreset_at91.c | 71 +++++++++++++++++++ 42 files changed, 226 insertions(+), 34 deletions(-) delete mode 100644 arch/arm/mach-at91/armv7/reset.c create mode 100644 drivers/sysreset/sysreset_at91.c
Signature · 1 line
2.25.1
PATCH 1/5 ARM: dts: at91: Add RSTC node
Add node for RSTC.
--- arch/arm/dts/sam9x60.dtsi | 6 ++++++ arch/arm/dts/sama7g5.dtsi | 7 +++++++ 2 files changed, 13 insertions(+)
arch/arm/dts/sam9x60.dtsi +6 -0
@@ -223,6 +223,12 @@ status = "okay"; }; + reset_controller: rstc@fffffe00 { + compatible = "microchip,sam9x60-rstc"; + reg = <0xfffffe00 0x10>; + clocks = <&clk32 0>; + }; + pit: timer@fffffe40 { compatible = "atmel,at91sam9260-pit"; reg = <0xfffffe40 0x10>;
arch/arm/dts/sama7g5.dtsi +7 -0
@@ -232,6 +232,13 @@ clocks = <&clk32k 0>; }; + reset_controller: rstc@e001d000 { + compatible = "microchip,sama7g5-rstc", "microchip,sam9x60-rstc"; + reg = <0xe001d000 0xc>, <0xe001d0e4 0x4>; + #reset-cells = <1>; + clocks = <&clk32k 0>; + }; + clk32k: clock-controller@e001d050 { compatible = "microchip,sama7g5-sckc", "microchip,sam9x60-sckc"; reg = <0xe001d050 0x4>;
Signature · 1 line
2.25.1
PATCH 2/5 sysreset: Add Atmel/Microchip sysreset driver
In reply to Sergiu MogaThis patch adds a sysreset driver for Atmel/Microchip platforms.
--- drivers/sysreset/Kconfig | 15 +++++++ drivers/sysreset/Makefile | 1 + drivers/sysreset/sysreset_at91.c | 71 ++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 drivers/sysreset/sysreset_at91.c
drivers/sysreset/Kconfig +15 -0
@@ -77,6 +77,21 @@ config SYSRESET_OCTEON This enables the system reset driver support for Marvell Octeon SoCs. +config SYSRESET_AT91 + bool "Enable support for Microchip/Atmel reset driver" + depends on ARCH_AT91 + select SYSRESET_SPL_AT91 if SPL && SPL_SYSRESET + help + This enables the system reset driver support for Microchip/Atmel + SoCs. + +config SYSRESET_SPL_AT91 + bool "Enable support for Microchip/Atmel reset driver in SPL" + depends on ARCH_AT91 + help + This enables the system reset driver support for Microchip/Atmel + SoCs in SPL. + config SYSRESET_PSCI bool "Enable support for PSCI System Reset" depends on ARM_PSCI_FW
drivers/sysreset/Makefile +1 -0
@@ -20,5 +20,6 @@ obj-$(CONFIG_SYSRESET_TI_SCI) += sysreset-ti-sci.o obj-$(CONFIG_SYSRESET_SYSCON) += sysreset_syscon.o obj-$(CONFIG_SYSRESET_WATCHDOG) += sysreset_watchdog.o obj-$(CONFIG_SYSRESET_RESETCTL) += sysreset_resetctl.o +obj-$(CONFIG_SYSRESET_$(SPL_TPL_)AT91) += sysreset_at91.o obj-$(CONFIG_$(SPL_TPL_)SYSRESET_X86) += sysreset_x86.o obj-$(CONFIG_TARGET_XTFPGA) += sysreset_xtfpga.o
drivers/sysreset/sysreset_at91.c new file +71 -0
71 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 3/5 configs: at91: Enable SYSRESET for Atmel/Microchip's platforms
In reply to Sergiu MogaThis commit enables SYSRESET in the defconfigs for the Atmel/Microchip platforms.
--- configs/sam9x60ek_mmc_defconfig | 3 +++ configs/sam9x60ek_nandflash_defconfig | 3 +++ configs/sam9x60ek_qspiflash_defconfig | 3 +++ configs/sama5d27_giantboard_defconfig | 4 ++++ configs/sama5d27_som1_ek_mmc1_defconfig | 4 ++++ configs/sama5d27_som1_ek_mmc_defconfig | 4 ++++ configs/sama5d27_som1_ek_qspiflash_defconfig | 4 ++++ configs/sama5d27_wlsom1_ek_mmc_defconfig | 4 ++++ configs/sama5d27_wlsom1_ek_qspiflash_defconfig | 4 ++++ configs/sama5d2_icp_mmc_defconfig | 4 ++++ configs/sama5d2_icp_qspiflash_defconfig | 3 +++ configs/sama5d2_ptc_ek_mmc_defconfig | 3 +++ configs/sama5d2_ptc_ek_nandflash_defconfig | 3 +++ configs/sama5d2_xplained_emmc_defconfig | 4 ++++ configs/sama5d2_xplained_mmc_defconfig | 4 ++++ configs/sama5d2_xplained_qspiflash_defconfig | 4 ++++ configs/sama5d2_xplained_spiflash_defconfig | 4 ++++ configs/sama5d36ek_cmp_mmc_defconfig | 3 +++ configs/sama5d36ek_cmp_nandflash_defconfig | 3 +++ configs/sama5d36ek_cmp_spiflash_defconfig | 3 +++ configs/sama5d3_xplained_mmc_defconfig | 4 ++++ configs/sama5d3_xplained_nandflash_defconfig | 4 ++++ configs/sama5d3xek_mmc_defconfig | 4 ++++ configs/sama5d3xek_nandflash_defconfig | 4 ++++ configs/sama5d3xek_spiflash_defconfig | 4 ++++ configs/sama5d4_xplained_mmc_defconfig | 4 ++++ configs/sama5d4_xplained_nandflash_defconfig | 4 ++++ configs/sama5d4_xplained_spiflash_defconfig | 4 ++++ configs/sama5d4ek_mmc_defconfig | 4 ++++ configs/sama5d4ek_nandflash_defconfig | 4 ++++ configs/sama5d4ek_spiflash_defconfig | 4 ++++ configs/sama7g5ek_mmc1_defconfig | 3 +++ configs/sama7g5ek_mmc_defconfig | 3 +++ configs/vinco_defconfig | 3 +++ 34 files changed, 124 insertions(+)
configs/sam9x60ek_mmc_defconfig +3 -0
@@ -76,6 +76,9 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_W1=y CONFIG_W1_GPIO=y
configs/sam9x60ek_nandflash_defconfig +3 -0
@@ -78,6 +78,9 @@ CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y
configs/sam9x60ek_qspiflash_defconfig +3 -0
@@ -90,6 +90,9 @@ CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y CONFIG_ATMEL_PIT_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y
configs/sama5d27_giantboard_defconfig +4 -0
@@ -84,3 +84,7 @@ CONFIG_USB_STORAGE=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y
configs/sama5d27_som1_ek_mmc1_defconfig +4 -0
@@ -90,6 +90,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d27_som1_ek_mmc_defconfig +4 -0
@@ -90,6 +90,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d27_som1_ek_qspiflash_defconfig +4 -0
@@ -89,6 +89,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d27_wlsom1_ek_mmc_defconfig +4 -0
@@ -95,6 +95,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d27_wlsom1_ek_qspiflash_defconfig +4 -0
@@ -99,6 +99,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d2_icp_mmc_defconfig +4 -0
@@ -81,6 +81,10 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_OF_LIBFDT_OVERLAY=y
configs/sama5d2_icp_qspiflash_defconfig +3 -0
@@ -88,6 +88,9 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y
configs/sama5d2_ptc_ek_mmc_defconfig +3 -0
@@ -71,6 +71,9 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y
configs/sama5d2_ptc_ek_nandflash_defconfig +3 -0
@@ -71,6 +71,9 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y
configs/sama5d2_xplained_emmc_defconfig +4 -0
@@ -90,6 +90,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d2_xplained_mmc_defconfig +4 -0
@@ -92,6 +92,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d2_xplained_qspiflash_defconfig +4 -0
@@ -91,6 +91,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d2_xplained_spiflash_defconfig +4 -0
@@ -95,6 +95,10 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d36ek_cmp_mmc_defconfig +3 -0
@@ -66,6 +66,9 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_DM_VIDEO=y # CONFIG_VIDEO_BPP8 is not set
configs/sama5d36ek_cmp_nandflash_defconfig +3 -0
@@ -68,6 +68,9 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_DM_VIDEO=y # CONFIG_VIDEO_BPP8 is not set
configs/sama5d36ek_cmp_spiflash_defconfig +3 -0
@@ -68,6 +68,9 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_DM_VIDEO=y # CONFIG_VIDEO_BPP8 is not set
configs/sama5d3_xplained_mmc_defconfig +4 -0
@@ -85,6 +85,10 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d3_xplained_nandflash_defconfig +4 -0
@@ -88,6 +88,10 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d3xek_mmc_defconfig +4 -0
@@ -93,6 +93,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d3xek_nandflash_defconfig +4 -0
@@ -95,6 +95,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d3xek_spiflash_defconfig +4 -0
@@ -94,6 +94,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d4_xplained_mmc_defconfig +4 -0
@@ -86,6 +86,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d4_xplained_nandflash_defconfig +4 -0
@@ -90,6 +90,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d4_xplained_spiflash_defconfig +4 -0
@@ -92,6 +92,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d4ek_mmc_defconfig +4 -0
@@ -84,6 +84,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d4ek_nandflash_defconfig +4 -0
@@ -88,6 +88,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama5d4ek_spiflash_defconfig +4 -0
@@ -87,6 +87,10 @@ CONFIG_ATMEL_USART=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_USB=y
configs/sama7g5ek_mmc1_defconfig +3 -0
@@ -71,6 +71,9 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_MCHP_PIT64B_TIMER=y CONFIG_OF_LIBFDT_OVERLAY=y # CONFIG_EFI_LOADER_HII is not set
configs/sama7g5ek_mmc_defconfig +3 -0
@@ -71,6 +71,9 @@ CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_TIMER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y CONFIG_MCHP_PIT64B_TIMER=y CONFIG_OF_LIBFDT_OVERLAY=y # CONFIG_EFI_LOADER_HII is not set
configs/vinco_defconfig +3 -0
@@ -55,3 +55,6 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="L+G VInCo" CONFIG_USB_GADGET_ATMEL_USBA=y CONFIG_USB_ETHER=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_CMD_RESET=y +CONFIG_SYSRESET_AT91=y
Signature · 1 line
2.25.1
PATCH 4/5 ARM: mach-at91: arm926ejs: Add SYSRESET conditional
In reply to Sergiu MogaThis commit adds a condition to the Makefile so that whenever the SYSRESET option is chosen in the configuration, the default reset driver is ignored.
--- arch/arm/mach-at91/arm926ejs/Makefile | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-at91/arm926ejs/Makefile +2 -0
@@ -19,7 +19,9 @@ obj-$(CONFIG_AT91_EFLASH) += eflash.o obj-$(CONFIG_AT91_LED) += led.o obj-y += clock.o obj-y += cpu.o +ifndef CONFIG_$(SPL_TPL_)SYSRESET obj-y += reset.o +endif ifneq ($(CONFIG_ATMEL_PIT_TIMER),y) ifneq ($(CONFIG_MCHP_PIT64B_TIMER),y) # old non-DM timer driver
Signature · 1 line
2.25.1
PATCH 5/5 ARM: mach-at91: armv7: Remove default reset driver
In reply to Sergiu MogaThis commit removes the default reset driver for armv7, since it is no longer needed due to the presence of the SYSRESET driver.
--- arch/arm/mach-at91/armv7/Makefile | 3 --- arch/arm/mach-at91/armv7/reset.c | 31 ------------------------------- 2 files changed, 34 deletions(-) delete mode 100644 arch/arm/mach-at91/armv7/reset.c
arch/arm/mach-at91/armv7/Makefile +0 -3
@@ -11,9 +11,6 @@ obj-$(CONFIG_SAMA5D3) += sama5d3_devices.o clock.o obj-$(CONFIG_SAMA5D4) += sama5d4_devices.o clock.o obj-$(CONFIG_SAMA7G5) += sama7g5_devices.o obj-y += cpu.o -ifndef CONFIG_$(SPL_TPL_)SYSRESET -obj-y += reset.o -endif ifneq ($(CONFIG_ATMEL_PIT_TIMER),y) ifneq ($(CONFIG_MCHP_PIT64B_TIMER),y) # old non-DM timer driver
arch/arm/mach-at91/armv7/reset.c deleted +0 -31
@@ -1,31 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* -* (C) Copyright 2007-2008 -* Stelian Pop <[email protected]> -* Lead Tech Design <www.leadtechdesign.com> -* -* (C) Copyright 2013 -* Bo Shen <[email protected]> -*/ - -#include <common.h> -#include <cpu_func.h> -#include <asm/io.h> -#include <asm/arch/hardware.h> -#include <asm/arch/at91_rstc.h> - -/* Reset the cpu by telling the reset controller to do so */ -void reset_cpu (void ) -{ -at91_rstc_t *rstc = (at91_rstc_t *)ATMEL_BASE_RSTC ; - -writel (AT91_RSTC_KEY - |AT91_RSTC_CR_PROCRST /* Processor Reset */ - |AT91_RSTC_CR_PERRST /* Peripheral Reset */ -#ifdef CONFIG_AT91RESET_EXTRST - |AT91_RSTC_CR_EXTRST /* External Reset (assert nRST pin) */ -#endif - , &rstc->cr); -/* never reached */ -do { }while (1 ); -}
Signature · 1 line
2.25.1
Quoted 56 lines · Sergiu Moga
This patch series implements the Atmel/Microchip sysreset driver. It also adds the missing RSTC node to the SAM9X60 and SAMA7G5 SoC files and removes the older default reset driver from armv7. The
Makefilefor arm926ejs has also been updated to ignore the default reset driver if SYSRESET is chosen. What is more, Atmel/Microchip defconfigs now enable sysreset by default.Sergiu Moga (5):
ARM: dts: at91: Add RSTC node
sysreset: Add Atmel/Microchip sysreset driver
configs: at91: Enable SYSRESET for Atmel/Microchip's platforms
ARM: mach-at91: arm926ejs: Add SYSRESET conditional
ARM: mach-at91: armv7: Remove default reset driverarch/arm/dts/sam9x60.dtsi | 6 ++ arch/arm/dts/sama7g5.dtsi | 7 ++ arch/arm/mach-at91/arm926ejs/Makefile | 2 + arch/arm/mach-at91/armv7/Makefile | 3 - arch/arm/mach-at91/armv7/reset.c | 31 -------- configs/sam9x60ek_mmc_defconfig | 3 + configs/sam9x60ek_nandflash_defconfig | 3 + configs/sam9x60ek_qspiflash_defconfig | 3 + configs/sama5d27_giantboard_defconfig | 4 ++ configs/sama5d27_som1_ek_mmc1_defconfig | 4 ++ configs/sama5d27_som1_ek_mmc_defconfig | 4 ++ configs/sama5d27_som1_ek_qspiflash_defconfig | 4 ++ configs/sama5d27_wlsom1_ek_mmc_defconfig | 4 ++ .../sama5d27_wlsom1_ek_qspiflash_defconfig | 4 ++ configs/sama5d2_icp_mmc_defconfig | 4 ++ configs/sama5d2_icp_qspiflash_defconfig | 3 + configs/sama5d2_ptc_ek_mmc_defconfig | 3 + configs/sama5d2_ptc_ek_nandflash_defconfig | 3 + configs/sama5d2_xplained_emmc_defconfig | 4 ++ configs/sama5d2_xplained_mmc_defconfig | 4 ++ configs/sama5d2_xplained_qspiflash_defconfig | 4 ++ configs/sama5d2_xplained_spiflash_defconfig | 4 ++ configs/sama5d36ek_cmp_mmc_defconfig | 3 + configs/sama5d36ek_cmp_nandflash_defconfig | 3 + configs/sama5d36ek_cmp_spiflash_defconfig | 3 + configs/sama5d3_xplained_mmc_defconfig | 4 ++ configs/sama5d3_xplained_nandflash_defconfig | 4 ++ configs/sama5d3xek_mmc_defconfig | 4 ++ configs/sama5d3xek_nandflash_defconfig | 4 ++ configs/sama5d3xek_spiflash_defconfig | 4 ++ configs/sama5d4_xplained_mmc_defconfig | 4 ++ configs/sama5d4_xplained_nandflash_defconfig | 4 ++ configs/sama5d4_xplained_spiflash_defconfig | 4 ++ configs/sama5d4ek_mmc_defconfig | 4 ++ configs/sama5d4ek_nandflash_defconfig | 4 ++ configs/sama5d4ek_spiflash_defconfig | 4 ++ configs/sama7g5ek_mmc1_defconfig | 3 + configs/sama7g5ek_mmc_defconfig | 3 + configs/vinco_defconfig | 3 + drivers/sysreset/Kconfig | 15 ++++ drivers/sysreset/Makefile | 1 + drivers/sysreset/sysreset_at91.c | 71 +++++++++++++++++++ 42 files changed, 226 insertions(+), 34 deletions(-)
Quoted 3 lines
delete mode 100644
arch/arm/mach-at91/armv7/reset.ccreate mode 100644drivers/sysreset/sysreset_at91.c
Applied to u-boot-at91/master , thanks !