Subject: [PATCH 2/5] SPEAR3xx: Rename register/irq defines to remove naming conflicts

From: [email-masked] (Ryan Mallon)
Date: Mon, 14 Jun 2010 22:17:59 +1200

Viresh KUMAR wrote:
> On 6/14/2010 11:06 AM, Ryan Mallon wrote:
>> The goal of the patch series is to allow all a single kernel to have
>> support for all of the spear platforms, ie CONFIG_MACH_SPEAR300,
>> CONFIG_MACH_SPEAR310 and CONFIG_MACH_SPEAR320 can all be set.
>>
>> The current code has duplicate defines in
>> arch/arm/mach-spear3xx/include/mach/spear3[012]0.h which means that
>> these three files cannot be included at once (they are included from
>> arch/arm/mach-spear3xx/include/mach/spear.h).
> 
> I understood what you did, but i am not sure how will it actually work.
> I tried to look into kernel source but couldn't find much.
> 
> Suppose all three machines/boards are selected and we got one kernel.
> Then how should we tell the kernel which machines init routine to be called.
> I suppose through uboot only, but not sure how it internally works.
> 
> Can you please help me understand that?

The machine id is passed in register r1 by the boot loader, which
matches the id in the MACHINE_START descriptors in the board files. Many
of the other arm sub-architectures already allow multiple
boards/implementations to be compiled into a single kernel and selected
at runtime.

~Ryan