Switch imx_gpio to attach at BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE.

Pretty much any other device might need to manipulate a gpio pin during its
probe or attach routines, so these devices must be available as early as
possible.

The gpio device is an interrupt controller, but I didn't choose the
INTERRUPT pass for that reason (it works fine as an interrupt controller as
long as it attaches any time before interrupts are enabled).  That just
looked like the right place in the passes to ensure that it attaches before
any type of device that might need gpio pin manipulations.
This commit is contained in:
Ian Lepore 2018-03-05 02:32:23 +00:00
parent 9363000dfe
commit 286f5b4a29
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=330440

View File

@ -868,5 +868,5 @@ static driver_t imx51_gpio_driver = {
};
static devclass_t imx51_gpio_devclass;
DRIVER_MODULE(imx51_gpio, simplebus, imx51_gpio_driver, imx51_gpio_devclass,
0, 0);
EARLY_DRIVER_MODULE(imx51_gpio, simplebus, imx51_gpio_driver,
imx51_gpio_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE);