Re: [PATCH] SB600 for the Nemo board has non-zero devices on non-root bus
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-12-22 11:19:58
Also in:
linux-pci
Christian Zigotzky [off-list ref] writes:
Hi Bjorn, Sorry I'm bothering you again. Is this small out of tree init routine in=
=20
the Nemo patch? I haven't get an answer from Darren yet and I didn't=20
found the small out of tree init routine in the Nemo patch. Please find=20
attached the Nemo patch. Maybe you can find this small out of tree init=20
routine.
What do you think of this following code?
if (sb600_bus =3D=3D -1)
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 {
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0==C2=A0=C2=A0 busp =3D pci_find_bus(0, 0);
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 pa_pxp_read_config(busp, PCI_DEVFN(17,0),=20
PCI_SECONDARY_BUS, 1, &val); + +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 sb600_bus =3D val;
+ +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0 printk(KERN_CRIT "NEMO SB600 on bus %d.\n",sb600_bus);
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }
I suspect Darren was referring to all of sb600_set_flag().
What we'd really like is to be able to do something like:
void __init pas_pci_init(void)
{
...
if (of_find_compatible_node(NULL, NULL, "nemo-something"))
pci_set_flag(PCI_SCAN_ALL_PCIE_DEVS).
But I don't know if there's anything in the NEMO device tree that we can
use to uniquely identify those machines? ie. the "nemo-something" string.
Can you attach the output of `lsprop /proc/device-tree` ?
cheers