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 1kMwTX-0001iu-5J for barebox@lists.infradead.org; Mon, 28 Sep 2020 16:58:08 +0000 References: <20200928155041.32649-1-m.felsch@pengutronix.de> <20200928155041.32649-19-m.felsch@pengutronix.de> From: Ahmad Fatoum Message-ID: <9fbedd69-d3d9-8123-f065-4a3dd4e3b1f2@pengutronix.de> Date: Mon, 28 Sep 2020 18:58:06 +0200 MIME-Version: 1.0 In-Reply-To: <20200928155041.32649-19-m.felsch@pengutronix.de> Content-Language: en-US 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: Re: [PATCH 18/18] ARM: boards: mx6-sabrelite: add deep-probe support To: Marco Felsch , barebox@lists.infradead.org On 9/28/20 5:50 PM, Marco Felsch wrote: > Explicit request the required gpio resources instead of relying on their > existence based on the initcall level. > > Signed-off-by: Marco Felsch > --- > .../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..7fc3d4dc3f 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_create_on_demand_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); > + > +deep_probe_enable(imx6q_sabrelite, "fsl,imx6q-sabrelite"); > +deep_probe_enable(imx6dl_sabrelite, "fsl,imx6dl-sabrelite"); You can use __UNIQUE_ID and drop the first argument > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox