[PATCH 08/11] ARM: i.MX6 realq7: prepare multiboard support
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Fri Jun 28 03:40:40 EDT 2013
On 20:32 Thu 27 Jun , Sascha Hauer wrote:
> On Thu, Jun 27, 2013 at 09:03:26AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 10:00 Wed 26 Jun , Sascha Hauer wrote:
> > > return 0;
> > > }
> > > -core_initcall(realq7_console_init);
> > > +postcore_initcall(realq7_console_init);
> >
> > I really don't like those if (!of_mac......
>
> As discussed on IRQ I don't like it either...
IRQ ;)
>
> >
> > can we have a struct os is the kernel?
>
> ...but my experiments with a struct also were not very promising.
>
> I'm open for patches. For now I think the compatible matching is
> good enough, but it should be worked on before we have hundreds
> of initcalls like this.
as discuss on IRC I do prefer the struct like we have today on ARM Kernel
with something like this
struct machine {
const char *of_compatible;
u32 machine_id;
int (*pure)(void);
int (*mem)(void);
int (*console)(void);
int (*device)(void);
int (*late)(void);
};
I did it on at91 soc it's clean and speed the boot vs if xxx
I do agree this will requiere some work but this will have the advantage to not be only of related
so arch or board that are not OF can still use it
Best Regards,
J.
More information about the barebox
mailing list