[PATCH] of/flattree: use callback to setup initrd from /chosen
Michael Ellerman
michael at ellerman.id.au
Wed Dec 23 00:17:36 EST 2009
On Tue, 2009-12-22 at 18:54 +0800, Jeremy Kerr wrote:
> Hi Michael,
>
> > > void early_init_dt_setup_initrd_arch(unsigned long start,
> > > unsigned long end);
> >
> > arch_early_init_dt_setup_initrd() makes more sense to me, but ..
>
> <foo>_arch has been the general convention for arch-specific hooks in
> drivers/of/.
Yuck, doh, guess I should have read those patches before they went in :)
> > > +#ifdef CONFIG_BLK_DEV_INITRD
> > > +void __init early_init_dt_setup_initrd_arch(unsigned long start,
> > > + unsigned long end)
> > > +{
> > > + initrd_start = (unsigned long)__va(start);
> > > + initrd_end = (unsigned long)__va(end);
> > > + initrd_below_start_ok = 1;
> > > +}
> > > +#endif
> >
> > Given you have two identical implementations why not make that the
> > default and make it weak, and let ARM override it.
>
> Yeah, that would be good too; just been avoiding weak as a potential source of
> magic voodoo complexity. Grant - up to you on this one.
Yeah, depends on what toolchains you're supporting, modern ones should
be OK but it can be troublesome.
cheers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20091223/1fe23e46/attachment.pgp>
More information about the devicetree-discuss
mailing list