aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/netlogic
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-17 15:50:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-17 15:50:54 -0400
commitbfaf245022b4b8661af2e35f467cf0e91943c24c (patch)
treeb5a6ee49a047557a791eb897c8c9545a155e36b7 /arch/mips/include/asm/netlogic
parent96d928ed75c4ba4253e82910a697ec7b06ace8b4 (diff)
parent3e20a26b02bd4f24945c87407df51948dd488620 (diff)
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle: "This is the main pull request for MIPS for Linux 4.1. Most noteworthy: - Add more Octeon-optimized crypto functions - Octeon crypto preemption and locking fixes - Little endian support for Octeon - Use correct CSR to soft reset Octeons - Support LEDs on the Octeon-based DSR-1000N - Fix PCI interrupt mapping for the Octeon-based DSR-1000N - Mark prom_free_prom_memory() as __init for a number of systems - Support for Imagination's Pistachio SOC. This includes arch and CLK bits. I'd like to merge pinctrl bits later - Improve parallelism of csum_partial for certain pipelines - Organize DTB files in subdirs like other architectures - Implement read_sched_clock for all MIPS platforms other than Octeon - Massive series of 38 fixes and cleanups for the FPU emulator / kernel - Further FPU remulator work to support new features. This sits on a separate branch which also has been pulled into the 4.1 KVM branch - Clean up and fixes for the SEAD3 eval board; remove unused file - Various updates for Netlogic platforms - A number of small updates for Loongson 3 platforms - Increase the memory limit for ATH79 platforms to 256MB - A fair number of fixes and updates for BCM47xx platforms - Finish the implementation of XPA support - MIPS FDC support. No, not floppy controller but Fast Debug Channel :) - Detect the R16000 used in SGI legacy platforms - Fix Kconfig dependencies for the SSB bus support" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (265 commits) MIPS: Makefile: Fix MIPS ASE detection code MIPS: asm: elf: Set O32 default FPU flags MIPS: BCM47XX: Fix detecting Microsoft MN-700 & Asus WL500G MIPS: Kconfig: Disable SMP/CPS for 64-bit MIPS: Hibernate: flush TLB entries earlier MIPS: smp-cps: cpu_set FPU mask if FPU present MIPS: lose_fpu(): Disable FPU when MSA enabled MIPS: ralink: add missing symbol for RALINK_ILL_ACC MIPS: ralink: Fix bad config symbol in PCI makefile. SSB: fix Kconfig dependencies MIPS: Malta: Detect and fix bad memsize values Revert "MIPS: Avoid pipeline stalls on some MIPS32R2 cores." MIPS: Octeon: Delete override of cpu_has_mips_r2_exec_hazard. MIPS: Fix cpu_has_mips_r2_exec_hazard. MIPS: kernel: entry.S: Set correct ISA level for mips_ihb MIPS: asm: spinlock: Fix addiu instruction for R10000_LLSC_WAR case MIPS: r4kcache: Use correct base register for MIPS R6 cache flushes MIPS: Kconfig: Fix typo for the r2-to-r6 emulator kernel parameter MIPS: unaligned: Fix regular load/store instruction emulation for EVA MIPS: unaligned: Surround load/store macros in do {} while statements ...
Diffstat (limited to 'arch/mips/include/asm/netlogic')
-rw-r--r--arch/mips/include/asm/netlogic/common.h21
-rw-r--r--arch/mips/include/asm/netlogic/mips-extns.h8
-rw-r--r--arch/mips/include/asm/netlogic/xlp-hal/cpucontrol.h2
-rw-r--r--arch/mips/include/asm/netlogic/xlp-hal/sys.h3
-rw-r--r--arch/mips/include/asm/netlogic/xlp-hal/xlp.h3
5 files changed, 34 insertions, 3 deletions
diff --git a/arch/mips/include/asm/netlogic/common.h b/arch/mips/include/asm/netlogic/common.h
index c281f03eb312..2a4c128277e4 100644
--- a/arch/mips/include/asm/netlogic/common.h
+++ b/arch/mips/include/asm/netlogic/common.h
@@ -111,6 +111,25 @@ static inline int nlm_irq_to_xirq(int node, int irq)
111 return node * NR_IRQS / NLM_NR_NODES + irq; 111 return node * NR_IRQS / NLM_NR_NODES + irq;
112} 112}
113 113
114extern int nlm_cpu_ready[]; 114#ifdef CONFIG_CPU_XLR
115#define nlm_cores_per_node() 8
116#else
117static inline int nlm_cores_per_node(void)
118{
119 return ((read_c0_prid() & PRID_IMP_MASK)
120 == PRID_IMP_NETLOGIC_XLP9XX) ? 32 : 8;
121}
115#endif 122#endif
123static inline int nlm_threads_per_node(void)
124{
125 return nlm_cores_per_node() * NLM_THREADS_PER_CORE;
126}
127
128static inline int nlm_hwtid_to_node(int hwtid)
129{
130 return hwtid / nlm_threads_per_node();
131}
132
133extern int nlm_cpu_ready[];
134#endif /* __ASSEMBLY__ */
116#endif /* _NETLOGIC_COMMON_H_ */ 135#endif /* _NETLOGIC_COMMON_H_ */
diff --git a/arch/mips/include/asm/netlogic/mips-extns.h b/arch/mips/include/asm/netlogic/mips-extns.h
index 06f1f75bfa9b..788baf399e69 100644
--- a/arch/mips/include/asm/netlogic/mips-extns.h
+++ b/arch/mips/include/asm/netlogic/mips-extns.h
@@ -157,7 +157,13 @@ static inline int nlm_nodeid(void)
157 157
158static inline unsigned int nlm_core_id(void) 158static inline unsigned int nlm_core_id(void)
159{ 159{
160 return (read_c0_ebase() & 0x1c) >> 2; 160 uint32_t prid = read_c0_prid() & PRID_IMP_MASK;
161
162 if ((prid == PRID_IMP_NETLOGIC_XLP9XX) ||
163 (prid == PRID_IMP_NETLOGIC_XLP5XX))
164 return (read_c0_ebase() & 0x7c) >> 2;
165 else
166 return (read_c0_ebase() & 0x1c) >> 2;
161} 167}
162 168
163static inline unsigned int nlm_thread_id(void) 169static inline unsigned int nlm_thread_id(void)
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/cpucontrol.h b/arch/mips/include/asm/netlogic/xlp-hal/cpucontrol.h
index 6d2e58a9a542..a06b59292153 100644
--- a/arch/mips/include/asm/netlogic/xlp-hal/cpucontrol.h
+++ b/arch/mips/include/asm/netlogic/xlp-hal/cpucontrol.h
@@ -46,6 +46,8 @@
46#define CPU_BLOCKID_FPU 9 46#define CPU_BLOCKID_FPU 9
47#define CPU_BLOCKID_MAP 10 47#define CPU_BLOCKID_MAP 10
48 48
49#define IFU_BRUB_RESERVE 0x007
50
49#define ICU_DEFEATURE 0x100 51#define ICU_DEFEATURE 0x100
50 52
51#define LSU_DEFEATURE 0x304 53#define LSU_DEFEATURE 0x304
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/sys.h b/arch/mips/include/asm/netlogic/xlp-hal/sys.h
index bc7bddf25be9..6bcf3952e556 100644
--- a/arch/mips/include/asm/netlogic/xlp-hal/sys.h
+++ b/arch/mips/include/asm/netlogic/xlp-hal/sys.h
@@ -177,6 +177,9 @@
177#define SYS_9XX_CLK_DEV_DIV 0x18d 177#define SYS_9XX_CLK_DEV_DIV 0x18d
178#define SYS_9XX_CLK_DEV_CHG 0x18f 178#define SYS_9XX_CLK_DEV_CHG 0x18f
179 179
180#define SYS_9XX_CLK_DEV_SEL_REG 0x1a4
181#define SYS_9XX_CLK_DEV_DIV_REG 0x1a6
182
180/* Registers changed on 9XX */ 183/* Registers changed on 9XX */
181#define SYS_9XX_POWER_ON_RESET_CFG 0x00 184#define SYS_9XX_POWER_ON_RESET_CFG 0x00
182#define SYS_9XX_CHIP_RESET 0x01 185#define SYS_9XX_CHIP_RESET 0x01
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
index a862b93223cc..feb6ed807ec6 100644
--- a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
+++ b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
@@ -52,6 +52,7 @@
52#define PIC_2XX_XHCI_2_IRQ 25 52#define PIC_2XX_XHCI_2_IRQ 25
53#define PIC_9XX_XHCI_0_IRQ 23 53#define PIC_9XX_XHCI_0_IRQ 23
54#define PIC_9XX_XHCI_1_IRQ 24 54#define PIC_9XX_XHCI_1_IRQ 24
55#define PIC_9XX_XHCI_2_IRQ 25
55 56
56#define PIC_MMC_IRQ 29 57#define PIC_MMC_IRQ 29
57#define PIC_I2C_0_IRQ 30 58#define PIC_I2C_0_IRQ 30
@@ -89,7 +90,7 @@ void xlp_wakeup_secondary_cpus(void);
89 90
90void xlp_mmu_init(void); 91void xlp_mmu_init(void);
91void nlm_hal_init(void); 92void nlm_hal_init(void);
92int xlp_get_dram_map(int n, uint64_t *dram_map); 93int nlm_get_dram_map(int node, uint64_t *dram_map, int nentries);
93 94
94struct pci_dev; 95struct pci_dev;
95int xlp_socdev_to_node(const struct pci_dev *dev); 96int xlp_socdev_to_node(const struct pci_dev *dev);