From mboxrd@z Thu Jan 1 00:00:00 1970 From: ryan@bluewatersys.com (Ryan Mallon) Date: Mon, 14 Jun 2010 22:17:59 +1200 Subject: [PATCH 2/5] SPEAR3xx: Rename register/irq defines to remove naming conflicts In-Reply-To: <4C15C22A.7070408@st.com> References: <1275717955-14545-1-git-send-email-ryan@bluewatersys.com> <1275717955-14545-3-git-send-email-ryan@bluewatersys.com> <4C15BB99.4060108@st.com> <4C15BFDC.70809@bluewatersys.com> <4C15C22A.7070408@st.com> Message-ID: <4C1601D7.1080404@bluewatersys.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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