public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] ARM: at91: armv7: sama7g5 uses CCF clock driver
@ 2020-11-11 11:15 Eugen Hristev
  2020-11-26  8:19 ` Eugen.Hristev at microchip.com
  0 siblings, 1 reply; 2+ messages in thread
From: Eugen Hristev @ 2020-11-11 11:15 UTC (permalink / raw)
  To: u-boot

From: Nicolas Ferre <nicolas.ferre@microchip.com>

SAMA7G5 uses CCF driver under drivers/clk/at91/ and not the custom older
at91 clock.c driver. Remove it from the compilation list and adapt cpu.c
arch_cpu_init() to avoid calling at91_clock_init() which is wrong
anyway.

Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 arch/arm/mach-at91/armv7/Makefile | 7 +++----
 arch/arm/mach-at91/armv7/cpu.c    | 4 ++++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-at91/armv7/Makefile b/arch/arm/mach-at91/armv7/Makefile
index 55477560a8..b46b90b28e 100644
--- a/arch/arm/mach-at91/armv7/Makefile
+++ b/arch/arm/mach-at91/armv7/Makefile
@@ -6,11 +6,10 @@
 # (C) Copyright 2013
 # Bo Shen <voice.shen@atmel.com>
 
-obj-$(CONFIG_SAMA5D2)	+= sama5d2_devices.o
-obj-$(CONFIG_SAMA5D3)	+= sama5d3_devices.o
-obj-$(CONFIG_SAMA5D4)	+= sama5d4_devices.o
+obj-$(CONFIG_SAMA5D2)	+= sama5d2_devices.o clock.o
+obj-$(CONFIG_SAMA5D3)	+= sama5d3_devices.o clock.o
+obj-$(CONFIG_SAMA5D4)	+= sama5d4_devices.o clock.o
 obj-$(CONFIG_SAMA7G5)	+= sama7g5_devices.o
-obj-y += clock.o
 obj-y += cpu.o
 obj-y += reset.o
 ifeq ($(CONFIG_ATMEL_PIT_TIMER),)
diff --git a/arch/arm/mach-at91/armv7/cpu.c b/arch/arm/mach-at91/armv7/cpu.c
index 8b7355042b..9b3753491e 100644
--- a/arch/arm/mach-at91/armv7/cpu.c
+++ b/arch/arm/mach-at91/armv7/cpu.c
@@ -24,7 +24,11 @@
 
 int arch_cpu_init(void)
 {
+#if defined(CONFIG_CLK_CCF)
+	return 0;
+#else
 	return at91_clock_init(CONFIG_SYS_AT91_MAIN_CLOCK);
+#endif
 }
 
 void arch_preboot_os(void)
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] ARM: at91: armv7: sama7g5 uses CCF clock driver
  2020-11-11 11:15 [PATCH] ARM: at91: armv7: sama7g5 uses CCF clock driver Eugen Hristev
@ 2020-11-26  8:19 ` Eugen.Hristev at microchip.com
  0 siblings, 0 replies; 2+ messages in thread
From: Eugen.Hristev at microchip.com @ 2020-11-26  8:19 UTC (permalink / raw)
  To: u-boot

On 11.11.2020 13:15, Eugen Hristev wrote:
> From: Nicolas Ferre <nicolas.ferre@microchip.com>
> 
> SAMA7G5 uses CCF driver under drivers/clk/at91/ and not the custom older
> at91 clock.c driver. Remove it from the compilation list and adapt cpu.c
> arch_cpu_init() to avoid calling at91_clock_init() which is wrong
> anyway.
> 
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-26  8:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-11 11:15 [PATCH] ARM: at91: armv7: sama7g5 uses CCF clock driver Eugen Hristev
2020-11-26  8:19 ` Eugen.Hristev at microchip.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox