| To: | linux-mips@linux-mips.org |
|---|---|
| Subject: | [PATCH 3/3] Avoid accessing GCMP registers when they are not present |
| From: | Raghu Gandham <raghu@mips.com> |
| Date: | Fri, 10 Jul 2009 01:54:25 -0700 |
| Cc: | raghu@mips.com, chris@mips.com |
| In-reply-to: | <20090710085338.25918.37597.stgit@linux-raghu> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <20090710085338.25918.37597.stgit@linux-raghu> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | StGIT/0.14.3 |
From: Jaidev Patwardhan <jaidev@mips.com>
Signed-off-by: Chris Dearman <chris@mips.com>
---
arch/mips/mti-malta/malta-int.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c
index 377a925..4c3fca1 100644
--- a/arch/mips/mti-malta/malta-int.c
+++ b/arch/mips/mti-malta/malta-int.c
@@ -411,6 +411,11 @@ static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS] = {
*/
int __init gcmp_probe(unsigned long addr, unsigned long size)
{
+ if (mips_revision_sconid != MIPS_REVISION_SCON_ROCIT) {
+ gcmp_present = 0;
+ return gcmp_present;
+ }
+
if (gcmp_present >= 0)
return gcmp_present;
@@ -479,9 +484,14 @@ void __init arch_init_irq(void)
GCMPGCB(GICBA) = GIC_BASE_ADDR | GCMP_GCB_GICBA_EN_MSK;
gic_present = 1;
} else {
- _msc01_biu_base = (unsigned long)
ioremap_nocache(MSC01_BIU_REG_BASE, MSC01_BIU_ADDRSPACE_SZ);
- gic_present = (REG(_msc01_biu_base, MSC01_SC_CFG) &
- MSC01_SC_CFG_GICPRES_MSK) >> MSC01_SC_CFG_GICPRES_SHF;
+ if (mips_revision_sconid == MIPS_REVISION_SCON_ROCIT) {
+ _msc01_biu_base = (unsigned long)
+ ioremap_nocache(MSC01_BIU_REG_BASE,
+ MSC01_BIU_ADDRSPACE_SZ);
+ gic_present = (REG(_msc01_biu_base, MSC01_SC_CFG) &
+ MSC01_SC_CFG_GICPRES_MSK) >>
+ MSC01_SC_CFG_GICPRES_SHF;
+ }
}
if (gic_present)
pr_debug("GIC present\n");
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 2/3] Port of GIC related changes from MTI branch., Raghu Gandham |
|---|---|
| Next by Date: | [PATCH] [MTI] MIPS secondary cache supports 64 byte line size., Raghu Gandham |
| Previous by Thread: | [PATCH 2/3] Port of GIC related changes from MTI branch., Raghu Gandham |
| Next by Thread: | [PATCH] [MTI] MIPS secondary cache supports 64 byte line size., Raghu Gandham |
| Indexes: | [Date] [Thread] [Top] [All Lists] |