Skip to contentSkip to conversation

arm: dts: MediaTek: fix clock order for timer0 node of mt7629.dtsi

PATCH New Weijie Gao 2 participants 6 messages Jul 11, 2019 – Jul 19, 2019

Subsystems (2)
lore
Share & tools
lore

Weijie Gao

author
#0 lore raw

PATCH 1/3 arm: dts: MediaTek: fix clock order for timer0 node of mt7629.dtsi

The timer0 node has its two clocks written in reversed order. The timer0 is used as the tick timer which causes a problem that the time a delay function used is 4 times longer.

This patch reverses these two clocks to solve this issue.

---
 arch/arm/dts/mt7629.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/dts/mt7629.dtsi +2 -2
index c87115e0fe..ecbd29d7ae 100644
@@ -82,8 +82,8 @@
 		compatible = "mediatek,timer";
 		reg = <0x10004000 0x80>;
 		interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_LOW>;
-		clocks = <&topckgen CLK_TOP_10M_SEL>,
-			 <&topckgen CLK_TOP_CLKXTAL_D4>;
+		clocks = <&topckgen CLK_TOP_CLKXTAL_D4>,
+			 <&topckgen CLK_TOP_10M_SEL>;
 		clock-names = "mux", "src";
 		u-boot,dm-pre-reloc;
 	};
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/3 configs: mt7629_rfb: use arm arch timer instead of mtk timer

This patch changes mt7629_rfb to use ARM's generic arch timer instead of MediaTek's soc timer.

---
 configs/mt7629_rfb_defconfig | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
configs/mt7629_rfb_defconfig +1 -3
index 0dceafdaa6..d6a7c84df3 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_ARCH_TIMER=y
 CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MEDIATEK=y
 CONFIG_SYS_TEXT_BASE=0x41e00000
@@ -67,9 +68,6 @@ CONFIG_MTK_QSPI=y
 CONFIG_SYSRESET=y
 CONFIG_SPL_SYSRESET=y
 CONFIG_SYSRESET_WATCHDOG=y
-CONFIG_TIMER=y
-CONFIG_SPL_TIMER=y
-CONFIG_MTK_TIMER=y
 CONFIG_WDT_MTK=y
 CONFIG_LZMA=y
 # CONFIG_EFI_LOADER is not set
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/3 configs: mt7629_rfb: use arm arch timer instead of mtk timer

Quoted 4 lines · Weijie Gao

This patch changes mt7629_rfb to use ARM's generic arch timer instead of MediaTek's soc timer.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190718/de1e7cef/attachment.sig>
author
#3 lore raw

PATCH 3/3 arm: dts: MediaTek: remove tick-timer from mt7629.dtsi

In reply to Weijie Gao

This patch removes tick-timer as all mt7629 boards should use arch timer.

---
 arch/arm/dts/mt7629-rfb.dts | 1 -
 1 file changed, 1 deletion(-)
arch/arm/dts/mt7629-rfb.dts +0 -1
index 4612218a1e..08c3b59222 100644
@@ -18,7 +18,6 @@
 
 	chosen {
 		stdout-path = &uart0;
-		tick-timer = &timer0;
 	};
 };
 
Signature · 1 line
2.17.1
#4 lore raw

PATCH 3/3 arm: dts: MediaTek: remove tick-timer from mt7629.dtsi

Quoted 3 lines · Weijie Gao

This patch removes tick-timer as all mt7629 boards should use arch timer.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190718/69bddbb9/attachment.sig>
#5 lore raw

PATCH 1/3 arm: dts: MediaTek: fix clock order for timer0 node of mt7629.dtsi

In reply to Weijie Gao
Quoted 7 lines · Weijie Gao

The timer0 node has its two clocks written in reversed order. The timer0 is used as the tick timer which causes a problem that the time a delay function used is 4 times longer.

This patch reverses these two clocks to solve this issue.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190718/e32a9980/attachment.sig>