[PATCH] linkstation / kurobox support

Benjamin Herrenschmidt benh at kernel.crashing.org
Sat Dec 2 22:19:51 EST 2006


On Sat, 2006-12-02 at 11:56 +0100, Arnd Bergmann wrote:
> > +
> > +       /* Interpret the "ranges" property */
> > +       /* This also maps the I/O region and sets isa_io/mem_base */
> > +       pci_process_bridge_OF_ranges(hose, dev, 1);
> > +
> > +       return 0;
> > +}
> 
> Can't you use the new PCI probing from arch/powerpc/kernel/of_platform
> for this?

I wouldnt recomment it for 32 bits just yet ...

> > +#ifdef CONFIG_BLK_DEV_INITRD
> > +       if (initrd_start)
> > +               ROOT_DEV = Root_RAM0;
> > +       else
> > +#endif
> > +#ifdef CONFIG_ROOT_NFS
> > +               ROOT_DEV = Root_NFS;
> > +#else
> > +               ROOT_DEV = Root_HDA1;
> > +#endif
> > +
> 
> This looks wrong. Didn't the same code come up recently in a review for
> another platform? What was the conclusion?

It's a copy paste that we inhertit from the big bang...  Should probably
go...

Note that PowerMac does have a proper root autodetect feature though
it's not fascionable to have such a thing nowadays and the only reason
it's still in is because it mostly stays under the radar :-)

So basically... yeah, the #ifdef sucks, but I don't mind that much...

Ben




More information about the Linuxppc-dev mailing list