Allocating resources to isab children

Henrik Brix Andersen brix at freebsd.org
Mon Mar 14 14:42:38 UTC 2011


Hi,

On Mar 14, 2011, at 00:15, Philip Schulz wrote:
> I made my glxiic driver a child of isa(4) because I didn't know where
> else to put it. After all, the DIVIL contains a bunch of devices on
> legacy I/O addresses such as e.g. UARTs which are already managed by
> ISA device drivers. Also, I couldn't get glxiic to be a direct child
> of isab unless I added a device_add_child() to isab_attach() -
> something I didn't want to do because it would be non-generic.
> Finally, glxiic can't be a PCI device driver because on my system, the
> entire DIVIL announces itself as one single PCI function (15.0, seems
> to be the same on your system). If glxiic attached to that function,
> isab wouldn't be able to attach anymore and I'd lose all of the other
> ISA devices. Of course, I could have added the ISA bridge logic to
> glxiic as well, but then I'd have glxiic+isab merged in one driver.

Right. I use DEVICE_IDENTIFY(9) to check the PCI device ID of the isab device and add a glxiic(4) child upon match.
This way, glxiic(4) becomes a child of isab.

Regards,
Brix
-- 
Henrik Brix Andersen <brix at FreeBSD.org>



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-drivers/attachments/20110314/d455144f/PGP.pgp


More information about the freebsd-drivers mailing list