Date: Thu, 13 Feb 2014 16:50:08 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261841 - head/sys/arm/at91 Message-ID: <201402131650.s1DGo8xg055763@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402131650.s1DGo8xg055763>