diff mbox series

[v1,3/4] ARM: dts: stm32: Fix timer initialization for stm32 MCU's board

Message ID 20201106071200.6933-4-patrice.chotard@st.com
State Accepted
Commit 183362947c4d538c9377dfeac7934c234b2b6a01
Delegated to: Patrick Delaunay
Headers show
Series ARM: dts: STM32: MCU's DT update | expand

Commit Message

Patrice CHOTARD Nov. 6, 2020, 7:11 a.m. UTC
Commit 4b2be78ab66c ("time: Fix get_ticks being non-monotonic")
puts in evidence that get_ticks is called before timer initialization.
Fix it by initializing timer before relocation.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
---

 arch/arm/dts/stm32429i-eval-u-boot.dtsi  |  4 ++++
 arch/arm/dts/stm32f429-disco-u-boot.dtsi |  4 ++++
 arch/arm/dts/stm32f469-disco-u-boot.dtsi | 20 ++++++++++++--------
 arch/arm/dts/stm32f746-disco-u-boot.dtsi |  4 ----
 arch/arm/dts/stm32h7-u-boot.dtsi         |  4 ++++
 5 files changed, 24 insertions(+), 12 deletions(-)

Comments

Patrick DELAUNAY Nov. 25, 2020, 9:16 a.m. UTC | #1
Hi Patrice

> From: Patrice CHOTARD <patrice.chotard@st.com>
> Sent: vendredi 6 novembre 2020 08:12
> 
> Commit 4b2be78ab66c ("time: Fix get_ticks being non-monotonic") puts in
> evidence that get_ticks is called before timer initialization.
> Fix it by initializing timer before relocation.
> 
> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
> ---
> 
>  arch/arm/dts/stm32429i-eval-u-boot.dtsi  |  4 ++++  arch/arm/dts/stm32f429-
> disco-u-boot.dtsi |  4 ++++  arch/arm/dts/stm32f469-disco-u-boot.dtsi | 20
> ++++++++++++--------  arch/arm/dts/stm32f746-disco-u-boot.dtsi |  4 ----
>  arch/arm/dts/stm32h7-u-boot.dtsi         |  4 ++++
>  5 files changed, 24 insertions(+), 12 deletions(-)
> 

Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>

Applied to u-boot-stm/master, thanks!

Thanks

Patrick
diff mbox series

Patch

diff --git a/arch/arm/dts/stm32429i-eval-u-boot.dtsi b/arch/arm/dts/stm32429i-eval-u-boot.dtsi
index 1e7429b2c6..e75cf99f8f 100644
--- a/arch/arm/dts/stm32429i-eval-u-boot.dtsi
+++ b/arch/arm/dts/stm32429i-eval-u-boot.dtsi
@@ -217,3 +217,7 @@ 
 		};
 	};
 };
+
+&timer5 {
+	u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/stm32f429-disco-u-boot.dtsi b/arch/arm/dts/stm32f429-disco-u-boot.dtsi
index 77d5ea07bb..df99e01393 100644
--- a/arch/arm/dts/stm32f429-disco-u-boot.dtsi
+++ b/arch/arm/dts/stm32f429-disco-u-boot.dtsi
@@ -192,3 +192,7 @@ 
 &rcc {
 	u-boot,dm-pre-reloc;
 };
+
+&timer5 {
+	u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/stm32f469-disco-u-boot.dtsi b/arch/arm/dts/stm32f469-disco-u-boot.dtsi
index 3cf3a6aa6f..7223ba4a60 100644
--- a/arch/arm/dts/stm32f469-disco-u-boot.dtsi
+++ b/arch/arm/dts/stm32f469-disco-u-boot.dtsi
@@ -235,14 +235,6 @@ 
 	u-boot,dm-pre-reloc;
 };
 
-&rcc {
-	u-boot,dm-pre-reloc;
-};
-
-&syscfg {
-	u-boot,dm-pre-reloc;
-};
-
 &qspi {
 	reg = <0xA0001000 0x1000>, <0x90000000 0x1000000>;
 	flash0: n25q128a@0 {
@@ -255,3 +247,15 @@ 
 		reg = <0>;
 	};
 };
+
+&rcc {
+	u-boot,dm-pre-reloc;
+};
+
+&syscfg {
+	u-boot,dm-pre-reloc;
+};
+
+&timer5 {
+	u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/stm32f746-disco-u-boot.dtsi b/arch/arm/dts/stm32f746-disco-u-boot.dtsi
index 860dd77668..4f34fc9a8c 100644
--- a/arch/arm/dts/stm32f746-disco-u-boot.dtsi
+++ b/arch/arm/dts/stm32f746-disco-u-boot.dtsi
@@ -239,7 +239,3 @@ 
 		reg = <0>;
 	};
 };
-
-&timer5 {
-	u-boot,dm-pre-reloc;
-};
diff --git a/arch/arm/dts/stm32h7-u-boot.dtsi b/arch/arm/dts/stm32h7-u-boot.dtsi
index 361c8e5d80..7182533cc9 100644
--- a/arch/arm/dts/stm32h7-u-boot.dtsi
+++ b/arch/arm/dts/stm32h7-u-boot.dtsi
@@ -218,3 +218,7 @@ 
 &sdmmc1 {
 	compatible = "st,stm32-sdmmc2", "arm,pl18x", "arm,primecell";
 };
+
+&timer5 {
+	u-boot,dm-pre-reloc;
+};