diff options
author | Markos Chandras <markos.chandras@imgtec.com> | 2015-07-09 11:40:43 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-08-26 15:23:11 +0200 |
commit | c014d164f21dbdbe721a4ec7e5147591c4eed545 (patch) | |
tree | 99389898aa1936b53495dd32cffa5fef0ea99c18 /arch/mips/kernel/mips-cm.c | |
parent | MIPS: CM3: Add support for CM3 L2 cache. (diff) | |
download | linux-c014d164f21dbdbe721a4ec7e5147591c4eed545.tar.xz linux-c014d164f21dbdbe721a4ec7e5147591c4eed545.zip |
MIPS: Add platform callback before initializing the L2 cache
Allow platforms to perform platform-specific steps before configuring
the L2 cache. This is necessary for platforms with CM3 since the L2
parameters no longer live in the Config2 register.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10642/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/mips-cm.c')
-rw-r--r-- | arch/mips/kernel/mips-cm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c index 85bbe9b96759..42602f30949f 100644 --- a/arch/mips/kernel/mips-cm.c +++ b/arch/mips/kernel/mips-cm.c @@ -81,6 +81,13 @@ int mips_cm_probe(void) phys_addr_t addr; u32 base_reg; + /* + * No need to probe again if we have already been + * here before. + */ + if (mips_cm_base) + return 0; + addr = mips_cm_phys_base(); BUG_ON((addr & CM_GCR_BASE_GCRBASE_MSK) != addr); if (!addr) |