Author: imp Date: Thu Feb 13 16:50:08 2014 New Revision: 261841 URL: http://svnweb.freebsd.org/changeset/base/261841
Log: Honor the disabled status by only grabbing resources and returning when running under FDT. Modified: head/sys/arm/at91/at91_spi.c head/sys/arm/at91/at91_twi.c Modified: head/sys/arm/at91/at91_spi.c ============================================================================== --- head/sys/arm/at91/at91_spi.c Thu Feb 13 16:38:00 2014 (r261840) +++ head/sys/arm/at91/at91_spi.c Thu Feb 13 16:50:08 2014 (r261841) @@ -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. */ Modified: head/sys/arm/at91/at91_twi.c ============================================================================== --- head/sys/arm/at91/at91_twi.c Thu Feb 13 16:38:00 2014 (r261840) +++ head/sys/arm/at91/at91_twi.c Thu Feb 13 16:50:08 2014 (r261841) @@ -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 */ _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"