[PATCH 4/5] arm: at91: enable CPU specific init with OF

Sam Ravnborg sam at ravnborg.org
Wed Dec 27 13:18:38 PST 2017


This drops the panic in the case where no
at91_boot_soc.init() is specified, as this
is with DT support added now optional.

Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
---
 arch/arm/mach-at91/generic.h | 4 ++++
 arch/arm/mach-at91/setup.c   | 6 ------
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h
index a47bcb2c5..c99dce533 100644
--- a/arch/arm/mach-at91/generic.h
+++ b/arch/arm/mach-at91/generic.h
@@ -9,7 +9,11 @@
  */
 
  /* Clocks */
+#ifdef CONFIG_COMMON_CLK_OF_PROVIDER
+static inline int __init at91_clock_init(void) { return 0; }
+#else
 extern int __init at91_clock_init(void);
+#endif
 
 static inline struct device_d *at91_add_rm9200_gpio(int id, resource_size_t start)
 {
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
index 8f32af043..c8c6e2ba4 100644
--- a/arch/arm/mach-at91/setup.c
+++ b/arch/arm/mach-at91/setup.c
@@ -283,12 +283,6 @@ static int at91_detect(void)
 	pr_info("AT91: Detected soc subtype: %s\n",
 		at91_get_soc_subtype(&at91_soc_initdata));
 
-	if (IS_ENABLED(CONFIG_COMMON_CLK_OF_PROVIDER))
-		return 0;
-
-	if (!at91_soc_is_enabled())
-		panic("AT91: Soc not enabled");
-
 	/* Init clock subsystem */
 	at91_clock_init();
 
-- 
2.12.0




More information about the barebox mailing list