aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include')
-rw-r--r--arch/mips/include/asm/netlogic/common.h26
-rw-r--r--arch/mips/include/asm/netlogic/xlp-hal/xlp.h7
-rw-r--r--arch/mips/include/asm/netlogic/xlr/xlr.h2
3 files changed, 27 insertions, 8 deletions
diff --git a/arch/mips/include/asm/netlogic/common.h b/arch/mips/include/asm/netlogic/common.h
index e5bdf8c529ff..fdd2f44c7b59 100644
--- a/arch/mips/include/asm/netlogic/common.h
+++ b/arch/mips/include/asm/netlogic/common.h
@@ -38,19 +38,39 @@
38/* 38/*
39 * Common SMP definitions 39 * Common SMP definitions
40 */ 40 */
41#define RESET_VEC_PHYS 0x1fc00000
42#define RESET_DATA_PHYS (RESET_VEC_PHYS + (1<<10))
43#define BOOT_THREAD_MODE 0
44#define BOOT_NMI_LOCK 4
45#define BOOT_NMI_HANDLER 8
46
47#ifndef __ASSEMBLY__
41struct irq_desc; 48struct irq_desc;
42extern struct plat_smp_ops nlm_smp_ops; 49extern struct plat_smp_ops nlm_smp_ops;
43extern char nlm_reset_entry[], nlm_reset_entry_end[]; 50extern char nlm_reset_entry[], nlm_reset_entry_end[];
44void nlm_smp_function_ipi_handler(unsigned int irq, struct irq_desc *desc); 51void nlm_smp_function_ipi_handler(unsigned int irq, struct irq_desc *desc);
45void nlm_smp_resched_ipi_handler(unsigned int irq, struct irq_desc *desc); 52void nlm_smp_resched_ipi_handler(unsigned int irq, struct irq_desc *desc);
46void nlm_smp_irq_init(void); 53void nlm_smp_irq_init(void);
47void prom_pre_boot_secondary_cpus(void); 54void nlm_boot_secondary_cpus(void);
48int nlm_wakeup_secondary_cpus(u32 wakeup_mask); 55int nlm_wakeup_secondary_cpus(u32 wakeup_mask);
49void nlm_boot_smp_nmi(void); 56void nlm_rmiboot_preboot(void);
57
58static inline void
59nlm_set_nmi_handler(void *handler)
60{
61 char *reset_data;
62
63 reset_data = (char *)CKSEG1ADDR(RESET_DATA_PHYS);
64 *(int64_t *)(reset_data + BOOT_NMI_HANDLER) = (long)handler;
65}
50 66
51/* 67/*
52 * Misc. 68 * Misc.
53 */ 69 */
70unsigned int nlm_get_cpu_frequency(void);
71
54extern unsigned long nlm_common_ebase; 72extern unsigned long nlm_common_ebase;
55unsigned int nlm_get_cpu_frequency(void); 73extern int nlm_threads_per_core;
74extern uint32_t nlm_cpumask, nlm_coremask;
75#endif
56#endif /* _NETLOGIC_COMMON_H_ */ 76#endif /* _NETLOGIC_COMMON_H_ */
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
index aae23f107412..1540588e396d 100644
--- a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
+++ b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
@@ -35,17 +35,14 @@
35#ifndef _NLM_HAL_XLP_H 35#ifndef _NLM_HAL_XLP_H
36#define _NLM_HAL_XLP_H 36#define _NLM_HAL_XLP_H
37 37
38#define RESET_VEC_PHYS 0x1fc00000
39#define RESET_DATA_PHYS (RESET_VEC_PHYS + (1<<10))
40#define BOOT_THREAD_MODE 0
41
42#define PIC_UART_0_IRQ 17 38#define PIC_UART_0_IRQ 17
43#define PIC_UART_1_IRQ 18 39#define PIC_UART_1_IRQ 18
44 40
45#ifndef __ASSEMBLY__ 41#ifndef __ASSEMBLY__
46 42
47/* SMP support functions */ 43/* SMP support functions */
48void nlm_boot_core0_siblings(void); 44void xlp_boot_core0_siblings(void);
45void xlp_wakeup_secondary_cpus(void);
49 46
50void xlp_mmu_init(void); 47void xlp_mmu_init(void);
51void nlm_hal_init(void); 48void nlm_hal_init(void);
diff --git a/arch/mips/include/asm/netlogic/xlr/xlr.h b/arch/mips/include/asm/netlogic/xlr/xlr.h
index f4d3f7cb6d65..ff4a17b0bf78 100644
--- a/arch/mips/include/asm/netlogic/xlr/xlr.h
+++ b/arch/mips/include/asm/netlogic/xlr/xlr.h
@@ -40,6 +40,8 @@ struct uart_port;
40unsigned int nlm_xlr_uart_in(struct uart_port *, int); 40unsigned int nlm_xlr_uart_in(struct uart_port *, int);
41void nlm_xlr_uart_out(struct uart_port *, int, int); 41void nlm_xlr_uart_out(struct uart_port *, int, int);
42 42
43/* SMP helpers */
44void xlr_wakeup_secondary_cpus(void);
43 45
44/* XLS B silicon "Rook" */ 46/* XLS B silicon "Rook" */
45static inline unsigned int nlm_chip_is_xls_b(void) 47static inline unsigned int nlm_chip_is_xls_b(void)