RE: PLEASE REVIEW: Adding a pci_if method to facilitate specialized PCI bus drivers
From: John Baldwin (jhb_at_FreeBSD.org)
Date: 06/27/03
- Previous message: M. Warner Losh: "Re: replacing sendmail with qmail"
- In reply to: Thomas Moestl: "PLEASE REVIEW: Adding a pci_if method to facilitate specialized PCI bus drivers"
- Next in thread: Thomas Moestl: "Re: PLEASE REVIEW: Adding a pci_if method to facilitate specialized PCI bus drivers"
- Reply: Thomas Moestl: "Re: PLEASE REVIEW: Adding a pci_if method to facilitate specialized PCI bus drivers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 27 Jun 2003 13:37:00 -0400 (EDT) To: Thomas Moestl <t.moestl@tu-bs.de>
On 13-Jun-2003 Thomas Moestl wrote:
> Hi,
>
> I've attached a patch that adds a new pci_if method,
> assign_interrupt, and makes the PCI code implement and use
> it. This is private to the PCI bus and is only used internally (to
> find an interrupt of a child device); it is a method so that derived
> PCI bus drivers can override it.
>
> This is very useful for the sparc64 OFW PCI bus driver which I will
> commit soon, hopefully. On sparc64, there are some on-board devices
> which have special interrupt lines. To route their interrupts, we need
> not only know the device to route for, but also an interrupt index
> which is stored in the firmware for this device, and which is used to
> route on bridges instead of the intpin (in other cases, there's even
> the complete interrupt number stored there; for devices in PCI slots,
> we (usually) can use the intpin).
>
> This requires us to get this firmware property in the OFW PCI bus
> driver before routing the interrupt; that can't be done in the pcib
> route_interrupt method, since we don't know whether we are routing for
> another bridge (where we use whichever index we get passed) or for a
> child device (in which case we would need to look at the firmware
> property).
Actually, can't you tell this by doing:
if (device_get_parent(device_get_parent(dev)) == pcib)
/* Routing direct child. */
else
/* Routing descedent of a child bridge. */
-- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: M. Warner Losh: "Re: replacing sendmail with qmail"
- In reply to: Thomas Moestl: "PLEASE REVIEW: Adding a pci_if method to facilitate specialized PCI bus drivers"
- Next in thread: Thomas Moestl: "Re: PLEASE REVIEW: Adding a pci_if method to facilitate specialized PCI bus drivers"
- Reply: Thomas Moestl: "Re: PLEASE REVIEW: Adding a pci_if method to facilitate specialized PCI bus drivers"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|