From: Marco Felsch <m.felsch@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH v3 10/10] ARM: boards: mx6-sabrelite: add deep-probe support
Date: Wed, 21 Oct 2020 13:58:13 +0200 [thread overview]
Message-ID: <20201021115813.31645-11-m.felsch@pengutronix.de> (raw)
In-Reply-To: <20201021115813.31645-1-m.felsch@pengutronix.de>
Explicit request the required gpio resources instead of relying on their
existence based on the initcall level.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
Changelog:
v2:
- convert to new macro name
- convert to new api
v3:
- convert to new BAREBOX_DEEP_PROBE_ENABLE macro
---
.../boards/freescale-mx6-sabrelite/board.c | 24 ++++++++++++-------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/arch/arm/boards/freescale-mx6-sabrelite/board.c b/arch/arm/boards/freescale-mx6-sabrelite/board.c
index 1b39ef82c6..0a2df391e9 100644
--- a/arch/arm/boards/freescale-mx6-sabrelite/board.c
+++ b/arch/arm/boards/freescale-mx6-sabrelite/board.c
@@ -13,7 +13,9 @@
#include <mach/bbu.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
+#include <of.h>
#include <partition.h>
+#include <deep-probe.h>
#include <linux/phy.h>
#include <asm/io.h>
#include <asm/mmu.h>
@@ -98,10 +100,6 @@ static int sabrelite_ksz9021rn_setup(void)
{
int ret;
- if (!of_machine_is_compatible("fsl,imx6q-sabrelite") &&
- !of_machine_is_compatible("fsl,imx6dl-sabrelite"))
- return 0;
-
mxc_iomux_v3_setup_multiple_pads(sabrelite_enet_gpio_pads,
ARRAY_SIZE(sabrelite_enet_gpio_pads));
@@ -118,11 +116,6 @@ static int sabrelite_ksz9021rn_setup(void)
return 0;
}
-/*
- * Do this before the fec initializes but after our
- * gpios are available.
- */
-fs_initcall(sabrelite_ksz9021rn_setup);
static void sabrelite_ehci_init(void)
{
@@ -134,10 +127,20 @@ static void sabrelite_ehci_init(void)
static int sabrelite_devices_init(void)
{
+ int ret;
+
if (!of_machine_is_compatible("fsl,imx6q-sabrelite") &&
!of_machine_is_compatible("fsl,imx6dl-sabrelite"))
return 0;
+ ret = of_devices_ensure_probed_by_property("gpio-controller");
+ if (ret)
+ return ret;
+
+ ret = sabrelite_ksz9021rn_setup();
+ if (ret)
+ return ret;
+
sabrelite_ehci_init();
armlinux_set_architecture(3769);
@@ -163,3 +166,6 @@ static int sabrelite_coredevices_init(void)
return 0;
}
coredevice_initcall(sabrelite_coredevices_init);
+
+BAREBOX_DEEP_PROBE_ENABLE("fsl,imx6q-sabrelite");
+BAREBOX_DEEP_PROBE_ENABLE("fsl,imx6dl-sabrelite");
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2020-10-21 11:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-21 11:58 [PATCH v3 00/10] Barebox Deep-Probe Marco Felsch
2020-10-21 11:58 ` [PATCH v3 01/10] imx53: remove unused imx53_add_nand Marco Felsch
2020-10-21 11:58 ` [PATCH v3 02/10] of: platform: remove check of already added devices Marco Felsch
2020-10-21 11:58 ` [PATCH v3 03/10] of: platform: Keep track of populated platform devices Marco Felsch
2020-10-21 11:58 ` [PATCH v3 04/10] of: base: move memory init from DT to initcall Marco Felsch
2020-10-21 11:58 ` [PATCH v3 05/10] of: base: move clock init from of_probe() to barebox_register_of() Marco Felsch
2020-10-21 11:58 ` [PATCH v3 06/10] initcall: add of_populate_initcall Marco Felsch
2020-10-21 11:58 ` [PATCH v3 07/10] common: add initial barebox deep-probe support Marco Felsch
2020-10-22 7:23 ` Sascha Hauer
2020-10-22 7:43 ` Sascha Hauer
2020-10-21 11:58 ` [PATCH v3 08/10] ARM: i.MX: esdctl: add " Marco Felsch
2020-10-21 11:58 ` [PATCH v3 09/10] ARM: stm32mp: ddrctrl: " Marco Felsch
2020-10-21 11:58 ` Marco Felsch [this message]
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=20201021115813.31645-11-m.felsch@pengutronix.de \
--to=m.felsch@pengutronix.de \
--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