From owner-svn-src-all@FreeBSD.ORG Fri May 15 03:46:53 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BA711065676; Fri, 15 May 2009 03:46:53 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 006B08FC1F; Fri, 15 May 2009 03:46:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n4F3iI2B046705; Thu, 14 May 2009 21:44:18 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 14 May 2009 21:44:26 -0600 (MDT) Message-Id: <20090514.214426.446350911.imp@bsdimp.com> To: stas@freebsd.org From: "M. Warner Losh" In-Reply-To: <20090514002555.f56ba38b.stas@FreeBSD.org> References: <200905131842.n4DIgnnu064429@svn.freebsd.org> <20090514002555.f56ba38b.stas@FreeBSD.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, gonzo@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r192059 - in head/sys: arm/at91 dev/spibus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2009 03:46:54 -0000 In message: <20090514002555.f56ba38b.stas@FreeBSD.org> Stanislav Sedov writes: : On Wed, 13 May 2009 18:42:49 +0000 (UTC) : Oleksandr Tymoshenko mentioned: : : > Author: gonzo : > Date: Wed May 13 18:42:49 2009 : > New Revision: 192059 : > URL: http://svn.freebsd.org/changeset/base/192059 : > : > Log: : > - Make SPI bus bridge be non-arch dependent by using more generic : > name : > : > Reviewed by: imp : > : > Modified: : > head/sys/arm/at91/at91_spi.c : > head/sys/dev/spibus/spibus.c : > : > Modified: head/sys/arm/at91/at91_spi.c : > ============================================================================== : > --- head/sys/arm/at91/at91_spi.c Wed May 13 18:31:28 2009 (r192058) : > +++ head/sys/arm/at91/at91_spi.c Wed May 13 18:42:49 2009 (r192059) : > @@ -297,7 +297,7 @@ static device_method_t at91_spi_methods[ : > }; : > : > static driver_t at91_spi_driver = { : > - "at91_spi", : > + "spi", : > at91_spi_methods, : > sizeof(struct at91_spi_softc), : > }; : > : > Modified: head/sys/dev/spibus/spibus.c : > ============================================================================== : > --- head/sys/dev/spibus/spibus.c Wed May 13 18:31:28 2009 (r192058) : > +++ head/sys/dev/spibus/spibus.c Wed May 13 18:42:49 2009 (r192059) : > @@ -194,5 +194,5 @@ static driver_t spibus_driver = { : > : > devclass_t spibus_devclass; : > : > -DRIVER_MODULE(spibus, at91_spi, spibus_driver, spibus_devclass, 0, 0); : > +DRIVER_MODULE(spibus, spi, spibus_driver, spibus_devclass, 0, 0); : > MODULE_VERSION(spibus, 1); : > : : On the other hand this driver appears to be machine-specific. What if one : would like to have a kernel with several SPI bus drivers included for devices : that doesn't support enumeration? In this case it will be impossible to : diffirentiate these drivers in the hints file. The driver is machine specific. However, there's almost certainly only ever going to be one of these drivers that attaches to a given bus. It is little different from the variety pci bridge drivers we have, for example, that all have the same name. Unlike the i2c case we had recently (which is about devices that attach to i2c), this driver is a controller for the spi bus. Warner