Allocating resources to isab children
Henrik Brix Andersen
brix at freebsd.org
Sun Mar 13 22:00:51 UTC 2011
Hi,
On Mar 13, 2011, at 20:45, Philip Schulz wrote:
> I'm currently working on a driver for the exact same device, except
> I'm going for the I2C engine. Naturally, I'm facing some similar
> issues ;-)
I am also writing a driver for the SMBus controller present in the CS5536 chip... What a coincidence :)
> I created a new isab driver that attaches specifically to the
> relevant function in the CS5536 chip, mainly because I didn't want to
> modify the existing generic PCI-ISA bridge driver.
Interesting! However, I am not sure that is the best approach. The idea of enabling direct children of the PCI-ISA bridge driver to allocate BARs from the parent PCI bus would also benefit other drivers currently present in FreeBSD, e.g. the sys/i386/i386/geode.c driver and ichwd(4) - and it would imho make a for a cleaner, more generic solution.
> On my system, the resource list obtained from the PCI bus does not
> contain any interrupts. If I read the PCI bus code correctly, that's
> because the "Interrupt Pin" and "Interrupt Line" fields in the
> device's PCI config space are not set up. I didn't find any code that
> sets up those fields which leads me to believe that the fields should
> have been set up by the BIOS. As a result, my isab driver cannot
> request any interrupts from the PCI bus driver.
As far as I can tell, this can be set up by using pci_write_config(9)? See intpm(4) for an example.
> However, that's not a problem because my I2C device driver ("glxiic")
> is a child of isa, not isab. So the tree is something like glxiix -
> isa - isab - pci - ... - nexus - root. If the glxiic driver request an
> interrupt resource, the request passes the isab driver at one point.
> Because the interrupt resource is not in the list mentioned above, the
> request is passed onto the parent, which is the PCI bus. The PCI bus
> will only handle those requests that come from direct children, so the
> request is again passed up. Eventually, the nexus device handles the
> request and the interrupt is allocated.
Hmm, but wouldn't that go against the design of the CS5536? The DIVIL function block found in the CS5536 is not hooked up to the ISA bus.
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/20110313/7055c40c/PGP.pgp
More information about the freebsd-drivers
mailing list