On Wed, 23 Dec 2015 17:35:51 +0100 Alexander Aring <alex.aring@xxxxxxxxx> wrote: > On Wed, Dec 23, 2015 at 07:10:58PM +0300, Peter Mamonov wrote: > > Dear All, > > > > I've ported an UHCI driver from the u-boot to the barebox (WIP). To > > interoperate with the EHCI driver, the UHCI driver should be probed > > ater the EHCI driver. Both drivers are binded via the device tree > > mechanism. How can i achieve the correct probe order? > > > > Normally this should done by returning "-EPROBE_DEFER" inside the > probe function. There was some RFC last years for supporting > EPROBE_DEFER [0] and it seems these are mainline. > > However you need some bool which indicates that the EHCI driver is > probed. Thanks, Alex. As i understand, this is the linux-way solution. Sasha, is it ok to add a global variable to indicate the EHCI presence? Or should we follow the way proposed by the mentioned RFCs, i.e. introduce dependencies between drivers? > > int uhci_probe(foobar) { > > if (!indicate_ehci_is_probed(foobar) > return -EPROBE_DEFER; > } > > - Alex > > [0] > http://barebox.infradead.narkive.com/ZWIXXU0R/patch-v2-0-6-introduce-deferred-probing _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox