aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm
diff options
context:
space:
mode:
authorDaniel Hellstrom <daniel@gaisler.com>2011-01-03 20:41:30 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-04 14:16:36 -0500
commite2305e37d4c82ef55be54e9edc8a7e2250739b4f (patch)
treee3db48384802210c241ea3450841a78b82620afd /arch/sparc/include/asm
parent53aea7caf2e27108912b9b9dbc5bfe18dbbaec9d (diff)
SPARC/LEON: added support for IRQAMP IRQ Controller
Needed for LEON AMP systems where different CPUs are routed to different IRQ controllers. This patch selects the IRQ Controller which has been routed to the boot CPU, it is up to the boot loader to configure the IRQ controller. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm')
-rw-r--r--arch/sparc/include/asm/leon.h12
-rw-r--r--arch/sparc/include/asm/leon_amba.h6
2 files changed, 15 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/leon.h b/arch/sparc/include/asm/leon.h
index 3ea5964c43b4..8580d1764f90 100644
--- a/arch/sparc/include/asm/leon.h
+++ b/arch/sparc/include/asm/leon.h
@@ -224,6 +224,18 @@ static inline void sparc_leon3_disable_cache(void)
224 "sta %%l2, [%%g0] 2\n\t" : : : "l1", "l2"); 224 "sta %%l2, [%%g0] 2\n\t" : : : "l1", "l2");
225}; 225};
226 226
227static inline unsigned long sparc_leon3_asr17(void)
228{
229 u32 asr17;
230 __asm__ __volatile__ ("rd %%asr17, %0\n\t" : "=r"(asr17));
231 return asr17;
232};
233
234static inline int sparc_leon3_cpuid(void)
235{
236 return sparc_leon3_asr17() >> 28;
237}
238
227#endif /*!__ASSEMBLY__*/ 239#endif /*!__ASSEMBLY__*/
228 240
229#ifdef CONFIG_SMP 241#ifdef CONFIG_SMP
diff --git a/arch/sparc/include/asm/leon_amba.h b/arch/sparc/include/asm/leon_amba.h
index 618e88821795..263c719e96f5 100644
--- a/arch/sparc/include/asm/leon_amba.h
+++ b/arch/sparc/include/asm/leon_amba.h
@@ -100,9 +100,8 @@ struct leon3_irqctrl_regs_map {
100 u32 mpbroadcast; 100 u32 mpbroadcast;
101 u32 notused02; 101 u32 notused02;
102 u32 notused03; 102 u32 notused03;
103 u32 notused10; 103 u32 ampctrl;
104 u32 notused11; 104 u32 icsel[2];
105 u32 notused12;
106 u32 notused13; 105 u32 notused13;
107 u32 notused20; 106 u32 notused20;
108 u32 notused21; 107 u32 notused21;
@@ -112,6 +111,7 @@ struct leon3_irqctrl_regs_map {
112 u32 force[16]; 111 u32 force[16];
113 /* Extended IRQ registers */ 112 /* Extended IRQ registers */
114 u32 intid[16]; /* 0xc0 */ 113 u32 intid[16]; /* 0xc0 */
114 u32 unused[(0x1000-0x100)/4];
115}; 115};
116 116
117struct leon3_apbuart_regs_map { 117struct leon3_apbuart_regs_map {