Allocating resources to isab children

John Baldwin jhb at freebsd.org
Mon Mar 14 15:44:34 UTC 2011


On Monday, March 14, 2011 10:42:33 am Henrik Brix Andersen wrote:
> 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.

We could probably use this to replace a similar hack in place for one of the 
smbus(4) controller drivers (I think viapro or some such?)

-- 
John Baldwin


More information about the freebsd-drivers mailing list