@@ -119,6 +119,11 @@ int v2m_cfg_write(u32 devfn, u32 data);
int v2m_cfg_read(u32 devfn, u32 *data);
/*
+ * Miscellaneous
+ */
+#define SYS_MISC_MASTERSITE (1 << 14)
+
+/*
* Core tile IDs
*/
#define V2M_CT_ID_CA9 0x0c000191
@@ -389,10 +389,12 @@ static struct ct_desc *ct_descs[] __initdata = {
static void __init v2m_populate_ct_desc(void)
{
int i;
- u32 current_tile_id;
+ u32 procid_reg, current_tile_id;
ct_desc = NULL;
- current_tile_id = readl(MMIO_P2V(V2M_SYS_PROCID0)) & V2M_CT_ID_MASK;
+ procid_reg = readl(MMIO_P2V(V2M_SYS_MISC)) & SYS_MISC_MASTERSITE ?
+ V2M_SYS_PROCID1 : V2M_SYS_PROCID0;
+ current_tile_id = readl(MMIO_P2V(procid_reg)) & V2M_CT_ID_MASK;
for (i = 0; i < ARRAY_SIZE(ct_descs) && !ct_desc; ++i)
if (ct_descs[i]->id == current_tile_id)
The Versatile Express platform features two tile sites and communicates the active tile site via the SYS_MISC register on the motherboard. This patch updates the tile detection code to read the ID for the currently active tile during boot. Signed-off-by: Will Deacon <will.deacon@arm.com> --- arch/arm/mach-vexpress/include/mach/motherboard.h | 5 +++++ arch/arm/mach-vexpress/v2m.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-)