> > +/* Check that the core has been initied and if not, do it */ > > +static int __init ppc4xx_pciex_check_core_init(struct device_node *np) > > +{ > > + static int core_init; > > + int count = -ENODEV; > > + > > + if (core_init++) > > + return 0; > > + > > +#ifdef CONFIG_44x > > + if (of_device_is_compatible(np, "ibm,plb-pciex-440speA")) > > + ppc4xx_pciex_hwops = &ppc440speA_pcie_hwops; > > + else if (of_device_is_compatible(np, "ibm,plb-pciex-440speB")) > > + ppc4xx_pciex_hwops = &ppc440speB_pcie_hwops; > > We need some runtime detection of the 440SPe revision here. There are boards > out there (e.g. AMCC Yucca) which can be equipped with both PPC > revisions. :-(
Ah... crap ! Do you think we should put that in the boot wrapper and fixup the device-tree or should we put it in the PCIe code proper ? > > +#endif /* CONFIG_44x */ > > +#ifdef CONFIG_40x > > + if (of_device_is_compatible(np, "ibm,plb-pciex-405ex")) > > + ppc4xx_pciex_hwops = &ppc405ex_pcie_hwops; > > +#endif > > Why those #ifdef's? Just code-size reasons, since 40x and 44x will most > likely > never be built into one image? Code size... I know how keen embedded people are to keep their kernel small and as of today, you can't build 40x and 44x support in the same image, so I didn't want to be blamed for adding bloat in that case :-) Ben. _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev