mirror of
https://github.com/opnsense/src.git
synced 2026-04-15 14:29:58 -04:00
Honor the disabled status by only grabbing resources and returning
when running under FDT.
This commit is contained in:
parent
e71fe4d932
commit
fd420f84dd
2 changed files with 18 additions and 0 deletions
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue