Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Mar 2011 23:00:46 +0100
From:      Henrik Brix Andersen <brix@freebsd.org>
To:        Philip Schulz <philip.s.schulz@googlemail.com>
Cc:        freebsd-drivers@freebsd.org
Subject:   Re: Allocating resources to isab children
Message-ID:  <D1A07777-B5CF-4E24-B0A8-57B57B66D9EF@freebsd.org>
In-Reply-To: <AANLkTin627pE_%2B6o3LvRhCzPYpw%2BTdWEEsw%2BkjA5PT-J@mail.gmail.com>
References:  <3550EA55-ADDE-40AC-9C22-1FAC441A0BC8@freebsd.org> <0A707516-C7D1-4441-B17B-1273B6C256B0@FreeBSD.org> <A5AEBC94-8E50-49E0-A72E-9B9E8A73E7F6@FreeBSD.org> <AANLkTin627pE_%2B6o3LvRhCzPYpw%2BTdWEEsw%2BkjA5PT-J@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--Apple-Mail-4--376100012
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=us-ascii

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
--=20
Henrik Brix Andersen <brix@FreeBSD.org>




--Apple-Mail-4--376100012
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAk19Po8ACgkQv+Q4flTiePiaYQCeKW1gMkpzdaXlbmlg+j0JwB9O
Kz4An1zbplF2yXEFsb3mYCkhkt+TC4zM
=kCfT
-----END PGP SIGNATURE-----

--Apple-Mail-4--376100012--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D1A07777-B5CF-4E24-B0A8-57B57B66D9EF>