From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6] ARM: vexpress: determine active tile site before reading tile ID
Date: Mon, 8 Aug 2011 18:10:19 +0100 [thread overview]
Message-ID: <1312823424-9654-2-git-send-email-will.deacon@arm.com> (raw)
In-Reply-To: <1312823424-9654-1-git-send-email-will.deacon@arm.com>
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(-)
diff --git a/arch/arm/mach-vexpress/include/mach/motherboard.h b/arch/arm/mach-vexpress/include/mach/motherboard.h
index 0a3a375..163a22c 100644
--- a/arch/arm/mach-vexpress/include/mach/motherboard.h
+++ b/arch/arm/mach-vexpress/include/mach/motherboard.h
@@ -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
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 9e6b93b..dbb182c 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -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)
--
1.7.0.4
next prev parent reply other threads:[~2011-08-08 17:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-08 17:10 [PATCH 0/6] Miscellaneous patches for 3.1 and 3.2 Will Deacon
2011-08-08 17:10 ` Will Deacon [this message]
2011-08-08 17:10 ` [PATCH 2/6] ARM: realview: ensure visibility of writes during reset Will Deacon
2011-08-08 21:16 ` Rob Herring
2011-08-09 8:32 ` Will Deacon
2011-08-08 17:10 ` [PATCH 3/6] ARM: twd: register clockevents device before enabling PPI Will Deacon
2011-08-08 18:19 ` Marc Zyngier
2011-08-08 17:10 ` [PATCH 4/6] ARM: smp: set thread_info->cpu to hardware CPU number for boot thread Will Deacon
2011-08-08 17:33 ` Stephen Boyd
2011-08-08 18:14 ` Will Deacon
2011-08-08 20:02 ` Russell King - ARM Linux
2011-08-08 20:25 ` Will Deacon
2011-08-09 11:48 ` Sergei Shtylyov
2011-08-09 12:13 ` Will Deacon
2011-08-08 17:10 ` [PATCH 5/6] ARM: cache: detect VIPT aliasing I-cache on ARMv6 Will Deacon
2011-08-08 17:10 ` [PATCH 6/6] ARM: cache: detect PIPT I-cache using CTR Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1312823424-9654-2-git-send-email-will.deacon@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).