diff options
author | Jayachandran C <jayachandranc@netlogicmicro.com> | 2011-11-16 00:21:28 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-12-07 22:04:56 +0000 |
commit | 65040e224e5b214a93fa0c790add5d69b054ecae (patch) | |
tree | 3d6b02575e61c04ad48535662398eae195f26ee1 /arch/mips/netlogic/common | |
parent | a3d4fb2d2a4c52b22cde90049a78e323cde187e5 (diff) | |
download | blackbird-op-linux-65040e224e5b214a93fa0c790add5d69b054ecae.tar.gz blackbird-op-linux-65040e224e5b214a93fa0c790add5d69b054ecae.zip |
MIPS: Netlogic: Add XLP platform files for XLP SoC
- Update common files to support XLP.
- Add arch/mips/include/asm/netlogic/xlp-hal for register definitions
and access macros
- Add arch/mips/netlogic/xlp/ for XLP specific files.
Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2967/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/netlogic/common')
-rw-r--r-- | arch/mips/netlogic/common/earlycons.c | 9 | ||||
-rw-r--r-- | arch/mips/netlogic/common/irq.c | 8 | ||||
-rw-r--r-- | arch/mips/netlogic/common/smp.c | 16 |
3 files changed, 29 insertions, 4 deletions
diff --git a/arch/mips/netlogic/common/earlycons.c b/arch/mips/netlogic/common/earlycons.c index 28c8fa7a8503..f193f7b3bd81 100644 --- a/arch/mips/netlogic/common/earlycons.c +++ b/arch/mips/netlogic/common/earlycons.c @@ -38,13 +38,22 @@ #include <asm/mipsregs.h> #include <asm/netlogic/haldefs.h> +#if defined(CONFIG_CPU_XLP) +#include <asm/netlogic/xlp-hal/iomap.h> +#include <asm/netlogic/xlp-hal/uart.h> +#elif defined(CONFIG_CPU_XLR) #include <asm/netlogic/xlr/iomap.h> +#endif void prom_putchar(char c) { uint64_t uartbase; +#if defined(CONFIG_CPU_XLP) + uartbase = nlm_get_uart_regbase(0, 0); +#elif defined(CONFIG_CPU_XLR) uartbase = nlm_mmio_base(NETLOGIC_IO_UART_0_OFFSET); +#endif while (nlm_read_reg(uartbase, UART_LSR) == 0) ; nlm_write_reg(uartbase, UART_TX, c); diff --git a/arch/mips/netlogic/common/irq.c b/arch/mips/netlogic/common/irq.c index dd0dd626cc8f..49a4f6cf71e5 100644 --- a/arch/mips/netlogic/common/irq.c +++ b/arch/mips/netlogic/common/irq.c @@ -53,8 +53,16 @@ #include <asm/netlogic/haldefs.h> #include <asm/netlogic/common.h> +#if defined(CONFIG_CPU_XLP) +#include <asm/netlogic/xlp-hal/iomap.h> +#include <asm/netlogic/xlp-hal/xlp.h> +#include <asm/netlogic/xlp-hal/pic.h> +#elif defined(CONFIG_CPU_XLR) #include <asm/netlogic/xlr/iomap.h> #include <asm/netlogic/xlr/pic.h> +#else +#error "Unknown CPU" +#endif /* * These are the routines that handle all the low level interrupt stuff. * Actions handled here are: initialization of the interrupt map, requesting of diff --git a/arch/mips/netlogic/common/smp.c b/arch/mips/netlogic/common/smp.c index 3b32c834d14c..c1960439f7e1 100644 --- a/arch/mips/netlogic/common/smp.c +++ b/arch/mips/netlogic/common/smp.c @@ -45,8 +45,15 @@ #include <asm/netlogic/haldefs.h> #include <asm/netlogic/common.h> +#if defined(CONFIG_CPU_XLP) +#include <asm/netlogic/xlp-hal/iomap.h> +#include <asm/netlogic/xlp-hal/pic.h> +#elif defined(CONFIG_CPU_XLR) #include <asm/netlogic/xlr/iomap.h> #include <asm/netlogic/xlr/pic.h> +#else +#error "Unknown CPU" +#endif void nlm_send_ipi_single(int logical_cpu, unsigned int action) { @@ -70,15 +77,15 @@ void nlm_send_ipi_mask(const struct cpumask *mask, unsigned int action) /* IRQ_IPI_SMP_FUNCTION Handler */ void nlm_smp_function_ipi_handler(unsigned int irq, struct irq_desc *desc) { - smp_call_function_interrupt(); write_c0_eirr(1ull << irq); + smp_call_function_interrupt(); } /* IRQ_IPI_SMP_RESCHEDULE handler */ void nlm_smp_resched_ipi_handler(unsigned int irq, struct irq_desc *desc) { - scheduler_ipi(); write_c0_eirr(1ull << irq); + scheduler_ipi(); } /* @@ -86,9 +93,10 @@ void nlm_smp_resched_ipi_handler(unsigned int irq, struct irq_desc *desc) */ void nlm_early_init_secondary(int cpu) { + change_c0_config(CONF_CM_CMASK, 0x3); write_c0_ebase((uint32_t)nlm_common_ebase); -#ifdef NLM_XLP - if (cpu % 4 == 0) +#ifdef CONFIG_CPU_XLP + if (hard_smp_processor_id() % 4 == 0) xlp_mmu_init(); #endif } |