[U-Boot] [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.
Signed-off-by: Weijie Gao weijie.gao@mediatek.com --- arch/arm/dts/mt7629.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/dts/mt7629.dtsi b/arch/arm/dts/mt7629.dtsi index c87115e0fe..ecbd29d7ae 100644 --- a/arch/arm/dts/mt7629.dtsi +++ b/arch/arm/dts/mt7629.dtsi @@ -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; };

This patch changes mt7629_rfb to use ARM's generic arch timer instead of MediaTek's soc timer.
Signed-off-by: Weijie Gao weijie.gao@mediatek.com --- configs/mt7629_rfb_defconfig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/configs/mt7629_rfb_defconfig b/configs/mt7629_rfb_defconfig index 0dceafdaa6..d6a7c84df3 100644 --- a/configs/mt7629_rfb_defconfig +++ b/configs/mt7629_rfb_defconfig @@ -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

On Thu, Jul 11, 2019 at 02:26:25PM +0800, Weijie Gao wrote:
This patch changes mt7629_rfb to use ARM's generic arch timer instead of MediaTek's soc timer.
Signed-off-by: Weijie Gao weijie.gao@mediatek.com
Applied to u-boot/master, thanks!

This patch removes tick-timer as all mt7629 boards should use arch timer.
Signed-off-by: Weijie Gao weijie.gao@mediatek.com --- arch/arm/dts/mt7629-rfb.dts | 1 - 1 file changed, 1 deletion(-)
diff --git a/arch/arm/dts/mt7629-rfb.dts b/arch/arm/dts/mt7629-rfb.dts index 4612218a1e..08c3b59222 100644 --- a/arch/arm/dts/mt7629-rfb.dts +++ b/arch/arm/dts/mt7629-rfb.dts @@ -18,7 +18,6 @@
chosen { stdout-path = &uart0; - tick-timer = &timer0; }; };

On Thu, Jul 11, 2019 at 02:26:26PM +0800, Weijie Gao wrote:
This patch removes tick-timer as all mt7629 boards should use arch timer.
Signed-off-by: Weijie Gao weijie.gao@mediatek.com
Applied to u-boot/master, thanks!

On Thu, Jul 11, 2019 at 02:26:24PM +0800, Weijie Gao wrote:
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.
Signed-off-by: Weijie Gao weijie.gao@mediatek.com
Applied to u-boot/master, thanks!
participants (2)
-
Tom Rini
-
Weijie Gao