mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Barebox List <barebox@lists.infradead.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH 4/5] arm: at91: enable CPU specific init with OF
Date: Wed, 27 Dec 2017 22:18:38 +0100	[thread overview]
Message-ID: <20171227211839.2359-4-sam@ravnborg.org> (raw)
In-Reply-To: <20171227211743.GA1084@ravnborg.org>

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@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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2017-12-27 21:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-27 21:17 [PATCH 0/5] Enable DT support for AT91SAM9263EK Sam Ravnborg
2017-12-27 21:18 ` [PATCH 1/5] at91sam9263ek: enable multi-image build Sam Ravnborg
2017-12-27 21:18 ` [PATCH 2/5] at91sam9263ek: add DT file from Linux kernel v4.14-rc4 Sam Ravnborg
2017-12-30  2:13   ` Andrey Smirnov
2017-12-27 21:18 ` [PATCH 3/5] at91sam9263ek: fix SD card in DT Sam Ravnborg
2017-12-27 21:18 ` Sam Ravnborg [this message]
2017-12-27 21:18 ` [PATCH 5/5] at91sam9263ek: enable devicetree Sam Ravnborg
2017-12-30  2:02   ` Andrey Smirnov
2017-12-30 21:24     ` Sam Ravnborg
2017-12-30 22:58       ` [RFC PATCH 1/2] arm: at91: move irq_fixup to header file Sam Ravnborg
2017-12-30 22:59       ` [RFC PATCH 2/2] arm: at91: simplify soc setup Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171227211839.2359-4-sam@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox