From owner-freebsd-mobile Mon Apr 12 11:48:22 1999 Delivered-To: freebsd-mobile@freebsd.org Received: from spinner.netplex.com.au (spinner.netplex.com.au [202.12.86.3]) by hub.freebsd.org (Postfix) with ESMTP id 198B5155B8 for ; Mon, 12 Apr 1999 11:48:17 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by spinner.netplex.com.au (Postfix) with ESMTP id 2CB331F4F; Tue, 13 Apr 1999 02:45:56 +0800 (WST) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.0.2 2/24/98 To: Doug Rabson Cc: Tomoaki NISHIYAMA , y-nakaga@nwsl.mesh.ad.jp, mike@smith.net.au, dcs@newsguy.com, nate@mt.sri.com, faber@ISI.EDU, nsayer@quack.kfu.com, freebsd-mobile@FreeBSD.ORG Subject: Re: Any success with CirrusLogic 6729/6730??? In-reply-to: Your message of "Mon, 12 Apr 1999 19:20:54 +0100." Date: Tue, 13 Apr 1999 02:45:56 +0800 From: Peter Wemm Message-Id: <19990412184558.2CB331F4F@spinner.netplex.com.au> Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Doug Rabson wrote: > On Mon, 12 Apr 1999, Tomoaki NISHIYAMA wrote: > > dfr> This is not correct. A driver can be trivially split up into attachme nt > > dfr> points and implementations. The interface definition system can actua lly > > dfr> make this easier (IMHO of course). The mcclock driver in FreeBSD/alph a > > dfr> (derived from the NetBSD driver) does this. > > More precicely, is the split driver *dynamically* loadable? > > The bus independent part, mcclock.c seemes to be linked statically, > > putting aside whethere there is any merit to load the clock dynamically. > > A split driver can be dynamically loaded by using the dependancy mechanism > on the KLD modules. Imagine a device foo which support pci and isa > attachments. One could build three modules: > > foo.ko containing the core driver functionality > foo_isa.ko probe/attach for isa bus > foo_pci.ko probe/attach for pci bus > > The two bus-specific modules would depend on the foo.ko module ensuring > that it is loaded automatically if either bus-specific module is used. Of course, it can go in one module or component as well, for example: /* * ISA can be attached to a PCI-ISA bridge or directly to the nexus. */ DRIVER_MODULE(isa, isab, isa_driver, isa_devclass, 0, 0); DRIVER_MODULE(isa, nexus, isa_driver, isa_devclass, 0, 0); Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message