Booting Imac G5 : success !
J. Mayer
l_indien at magic.fr
Sat Nov 13 13:02:48 EST 2004
On Sat, 2004-11-13 at 02:14, Benjamin Herrenschmidt wrote:
> > OK, you're right. The problem is that in the PCI configuration space of
> > the SATA root, there's no IRQ line defined. I can see we're in the same
> > case for the IDE controller, and I saw this code:
> > drivers/ide/ppc/pmac.c:pmac_ide_pci_attach
> > np = pci_device_to_OF_node(pdev);
> > ...
> > if (np->n_intrs == 0)
> > pmif->irq = pdev->irq;
> > else
> > pmif->irq = np->intrs[0].line;
> > Then I did the same in the sata driver and I got it working. Do you
> > think this is an acceptable fix ?
>
> Wait wait, what is the problem exactly ? is the device lacking the
> INTERRUPT_PIN in the config space ? or is pci_device_to_OF_node()
> returning NULL or is node->n_intrs == 0 ?
>
> In the 2 later cases, that means there is something wrong with the
> parsing of the OF interrupt tree in prom.c and that has to be fixed.
As I said, we're lacking an IRQ pin in the PCI configuration space of
the SATA controler, not in the OF tree (as you can see in the dump I
previously sent).
So, pci_read_irq_line returns 0 at the first test:
if (intpin == 0) {
PPCDBG(PPCDBG_BUSWALK,"\tDevice: %s No Interrupt used by device.\n",
pci_name(pci_dev));
return 0;
}
So, taking it from the OF tree instead of PCI space, the same way it's
done for IDE, solves the problem.
> Once you have booted with your hack fix, can you send me a tarball
> of /proc/device-tree please ?
Here you are... I also join a tarball of /proc/bus/pci so you can see
all PCI devices configuration space dumps.
--
J. Mayer <l_indien at magic.fr>
Never organized
-------------- next part --------------
A non-text attachment was scrubbed...
Name: device-tree.tgz
Type: application/x-compressed-tar
Size: 38978 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20041113/307b798c/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pci_bus.tgz
Type: application/x-compressed-tar
Size: 1835 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20041113/307b798c/attachment-0001.bin
More information about the Linuxppc64-dev
mailing list