From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVClE-0007UT-1A for barebox@lists.infradead.org; Wed, 21 Oct 2020 11:58:36 +0000 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVClC-0007DZ-Uo for barebox@lists.infradead.org; Wed, 21 Oct 2020 13:58:30 +0200 Received: from mfe by dude02.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1kVClC-0000do-Dc for barebox@lists.infradead.org; Wed, 21 Oct 2020 13:58:30 +0200 From: Marco Felsch Date: Wed, 21 Oct 2020 13:58:13 +0200 Message-Id: <20201021115813.31645-11-m.felsch@pengutronix.de> In-Reply-To: <20201021115813.31645-1-m.felsch@pengutronix.de> References: <20201021115813.31645-1-m.felsch@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v3 10/10] ARM: boards: mx6-sabrelite: add deep-probe support To: barebox@lists.infradead.org Explicit request the required gpio resources instead of relying on their existence based on the initcall level. Signed-off-by: Marco Felsch --- 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 #include #include +#include #include +#include #include #include #include @@ -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