Skip to content

Commit

Permalink
MIPS: Malta: Probe CPC when supported
Browse files Browse the repository at this point in the history
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>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6363/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Paul Burton authored and Ralf Baechle committed Mar 26, 2014
1 parent 237036d commit 7dc2834
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/mips/include/asm/mips-boards/malta.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ static inline unsigned long get_msc_port_base(unsigned long reg)
#define GIC_BASE_ADDR 0x1bdc0000
#define GIC_ADDRSPACE_SZ (128 * 1024)

/*
* CPC Specific definitions
*/
#define CPC_BASE_ADDR 0x1bde0000

/*
* MSC01 BIU Specific definitions
* FIXME : These should be elsewhere ?
Expand Down
7 changes: 7 additions & 0 deletions arch/mips/mti-malta/malta-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -277,6 +283,7 @@ void __init prom_init(void)
#endif
/* Early detection of CMP support */
mips_cm_probe();
mips_cpc_probe();

if (!register_cmp_smp_ops())
return;
Expand Down

0 comments on commit 7dc2834

Please sign in to comment.