Honor the disabled status by only grabbing resources and returning

when running under FDT.
This commit is contained in:
Warner Losh 2014-02-13 16:50:08 +00:00
parent e71fe4d932
commit fd420f84dd
2 changed files with 18 additions and 0 deletions

View file

@ -131,6 +131,15 @@ at91_spi_attach(device_t dev)
if (err)
goto out;
#ifdef FDT
/*
* Disable devices need to hold their resources, so return now and not attach
* the spibus, setup interrupt handlers, etc.
*/
if (!ofw_bus_status_okay(dev))
return 0;
#endif
/*
* Set up the hardware.
*/

View file

@ -134,6 +134,15 @@ at91_twi_attach(device_t dev)
AT91_TWI_LOCK_INIT(sc);
#ifdef FDT
/*
* Disable devices need to hold their resources, so return now and not attach
* the iicbus, setup interrupt handlers, etc.
*/
if (!ofw_bus_status_okay(dev))
return 0;
#endif
/*
* Activate the interrupt
*/