summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2018-03-20 16:15:06 +0300
committerTom Rini <trini@konsulko.com>2018-04-07 03:45:44 +0300
commit86634a93b45ab0ede95716c859b4c57edb0a7d85 (patch)
tree5f60de15f2003e586450027332954bde76ca3cd2
parente16750ff0e435bc7a41954f27607c663f27857bc (diff)
downloadu-boot-86634a93b45ab0ede95716c859b4c57edb0a7d85.tar.xz
stm32mp: handle SYSRESET
Add support of sysreset with generic driver "syscon-reboot" provided by RCC, for U-boot and for SPL. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/dts/stm32mp157-u-boot.dtsi4
-rw-r--r--arch/arm/dts/stm32mp157.dtsi7
-rw-r--r--arch/arm/mach-stm32mp/Kconfig2
-rw-r--r--arch/arm/mach-stm32mp/cpu.c4
5 files changed, 14 insertions, 4 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 777b2f01ec..190f883aa8 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1166,6 +1166,7 @@ config ARCH_STM32MP
select REGMAP
select SUPPORT_SPL
select SYSCON
+ select SYSRESET
select SYS_THUMB_BUILD
help
Support for STM32MP SoC family developed by STMicroelectronics,
diff --git a/arch/arm/dts/stm32mp157-u-boot.dtsi b/arch/arm/dts/stm32mp157-u-boot.dtsi
index 7a9a4ce73c..1eca8020f9 100644
--- a/arch/arm/dts/stm32mp157-u-boot.dtsi
+++ b/arch/arm/dts/stm32mp157-u-boot.dtsi
@@ -72,6 +72,10 @@
u-boot,dm-pre-reloc;
};
+&rcc_reboot {
+ u-boot,dm-pre-reloc;
+};
+
&pinctrl {
u-boot,dm-pre-reloc;
};
diff --git a/arch/arm/dts/stm32mp157.dtsi b/arch/arm/dts/stm32mp157.dtsi
index 77953c8e9d..b84899a1ea 100644
--- a/arch/arm/dts/stm32mp157.dtsi
+++ b/arch/arm/dts/stm32mp157.dtsi
@@ -114,6 +114,13 @@
#reset-cells = <1>;
compatible = "st,stm32mp1-rcc-rst";
};
+
+ rcc_reboot: rcc-reboot@50000000 {
+ compatible = "syscon-reboot";
+ regmap = <&rcc>;
+ offset = <0x404>;
+ mask = <0x1>;
+ };
};
pinctrl: pin-controller {
diff --git a/arch/arm/mach-stm32mp/Kconfig b/arch/arm/mach-stm32mp/Kconfig
index 9771af927a..8ca97bf0c9 100644
--- a/arch/arm/mach-stm32mp/Kconfig
+++ b/arch/arm/mach-stm32mp/Kconfig
@@ -16,6 +16,7 @@ config SPL
select SPL_RESET_SUPPORT
select SPL_SERIAL_SUPPORT
select SPL_SYSCON
+ select SPL_DRIVERS_MISC_SUPPORT
imply SPL_LIBDISK_SUPPORT
config SYS_SOC
@@ -26,6 +27,7 @@ config TARGET_STM32MP1
select CPU_V7
select PINCTRL_STM32
select STM32_RESET
+ select SYSRESET_SYSCON
help
target STMicroelectronics SOC STM32MP1 family
STMicroelectronics MPU with core ARMv7
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index 4ba2aecb7f..f9f3bf9050 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -269,7 +269,3 @@ int arch_misc_init(void)
return 0;
}
-
-void reset_cpu(ulong addr)
-{
-}