linux-mips
[Top] [All Lists]

[PATCH 10/15] MIPS: Malta: probe CPC when supported

To: <linux-mips@linux-mips.org>
Subject: [PATCH 10/15] MIPS: Malta: probe CPC when supported
From: Paul Burton <paul.burton@imgtec.com>
Date: Wed, 15 Jan 2014 10:31:55 +0000
Cc: Paul Burton <paul.burton@imgtec.com>
In-reply-to: <1389781920-31151-1-git-send-email-paul.burton@imgtec.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1389781920-31151-1-git-send-email-paul.burton@imgtec.com>
Sender: linux-mips-bounce@linux-mips.org
When CPC support is compiled into the kernel (ie. CONFIG_MIPS_CPC=y),
probe the CPC on boot for Malta in order to allow any users of the CPC
to detect its presence & function correctly.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
---
 arch/mips/include/asm/mips-boards/malta.h | 5 +++++
 arch/mips/mti-malta/malta-init.c          | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/arch/mips/include/asm/mips-boards/malta.h 
b/arch/mips/include/asm/mips-boards/malta.h
index 722bc88..fd97742 100644
--- a/arch/mips/include/asm/mips-boards/malta.h
+++ b/arch/mips/include/asm/mips-boards/malta.h
@@ -64,6 +64,11 @@ static inline unsigned long get_msc_port_base(unsigned long 
reg)
 #define GIC_ADDRSPACE_SZ               (128 * 1024)
 
 /*
+ * CPC Specific definitions
+ */
+#define CPC_BASE_ADDR                  0x1bde0000
+
+/*
  * MSC01 BIU Specific definitions
  * FIXME : These should be elsewhere ?
  */
diff --git a/arch/mips/mti-malta/malta-init.c b/arch/mips/mti-malta/malta-init.c
index 85a62b0..1381365 100644
--- a/arch/mips/mti-malta/malta-init.c
+++ b/arch/mips/mti-malta/malta-init.c
@@ -21,6 +21,7 @@
 #include <asm/traps.h>
 #include <asm/fw/fw.h>
 #include <asm/mips-cm.h>
+#include <asm/mips-cpc.h>
 #include <asm/mips-boards/generic.h>
 #include <asm/mips-boards/malta.h>
 
@@ -110,6 +111,11 @@ static void __init mips_ejtag_setup(void)
        flush_icache_range((unsigned long)base, (unsigned long)base + 0x80);
 }
 
+phys_t mips_cpc_default_phys_base(void)
+{
+       return CPC_BASE_ADDR;
+}
+
 extern struct plat_smp_ops msmtc_smp_ops;
 
 void __init prom_init(void)
@@ -277,6 +283,7 @@ mips_pci_controller:
 #endif
        /* Early detection of CMP support */
        mips_cm_probe();
+       mips_cpc_probe();
 
        if (!register_cmp_smp_ops())
                return;
-- 
1.8.4.2



<Prev in Thread] Current Thread [Next in Thread>