diff options
author | Akira Takeuchi <takeuchi.akr@jp.panasonic.com> | 2010-10-27 12:28:55 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2010-10-27 12:28:55 -0400 |
commit | 368dd5acd154b09c043cc4392a74da01599b37d5 (patch) | |
tree | dd94ae3d044f6e774dec2437613515bd6b46dacb /arch/mn10300/proc-mn103e010 | |
parent | 04157a6e7df99fd5ed64955233d6e00ab6613614 (diff) |
MN10300: And Panasonic AM34 subarch and implement SMP
Implement the Panasonic MN10300 AM34 CPU subarch and implement SMP support for
MN10300. Also implement support for the MN2WS0060 processor and the ASB2364
evaluation board which are AM34 based.
Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com>
Signed-off-by: Kiyoshi Owada <owada.kiyoshi@jp.panasonic.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch/mn10300/proc-mn103e010')
-rw-r--r-- | arch/mn10300/proc-mn103e010/include/proc/clock.h | 2 | ||||
-rw-r--r-- | arch/mn10300/proc-mn103e010/include/proc/intctl-regs.h | 29 | ||||
-rw-r--r-- | arch/mn10300/proc-mn103e010/proc-init.c | 35 |
3 files changed, 64 insertions, 2 deletions
diff --git a/arch/mn10300/proc-mn103e010/include/proc/clock.h b/arch/mn10300/proc-mn103e010/include/proc/clock.h index aa23e147d620..704a819f1f4b 100644 --- a/arch/mn10300/proc-mn103e010/include/proc/clock.h +++ b/arch/mn10300/proc-mn103e010/include/proc/clock.h | |||
@@ -13,6 +13,4 @@ | |||
13 | 13 | ||
14 | #include <unit/clock.h> | 14 | #include <unit/clock.h> |
15 | 15 | ||
16 | #define MN10300_WDCLK MN10300_IOCLK | ||
17 | |||
18 | #endif /* _ASM_PROC_CLOCK_H */ | 16 | #endif /* _ASM_PROC_CLOCK_H */ |
diff --git a/arch/mn10300/proc-mn103e010/include/proc/intctl-regs.h b/arch/mn10300/proc-mn103e010/include/proc/intctl-regs.h new file mode 100644 index 000000000000..f537801a44ba --- /dev/null +++ b/arch/mn10300/proc-mn103e010/include/proc/intctl-regs.h | |||
@@ -0,0 +1,29 @@ | |||
1 | #ifndef _ASM_PROC_INTCTL_REGS_H | ||
2 | #define _ASM_PROC_INTCTL_REGS_H | ||
3 | |||
4 | #ifndef _ASM_INTCTL_REGS_H | ||
5 | # error "please don't include this file directly" | ||
6 | #endif | ||
7 | |||
8 | /* intr acceptance group reg */ | ||
9 | #define IAGR __SYSREG(0xd4000100, u16) | ||
10 | |||
11 | /* group number register */ | ||
12 | #define IAGR_GN 0x00fc | ||
13 | |||
14 | #define __GET_XIRQ_TRIGGER(X, Z) (((Z) >> ((X) * 2)) & 3) | ||
15 | |||
16 | #define __SET_XIRQ_TRIGGER(X, Y, Z) \ | ||
17 | ({ \ | ||
18 | typeof(Z) x = (Z); \ | ||
19 | x &= ~(3 << ((X) * 2)); \ | ||
20 | x |= ((Y) & 3) << ((X) * 2); \ | ||
21 | (Z) = x; \ | ||
22 | }) | ||
23 | |||
24 | /* external pin intr spec reg */ | ||
25 | #define EXTMD __SYSREG(0xd4000200, u16) | ||
26 | #define GET_XIRQ_TRIGGER(X) __GET_XIRQ_TRIGGER(X, EXTMD) | ||
27 | #define SET_XIRQ_TRIGGER(X, Y) __SET_XIRQ_TRIGGER(X, Y, EXTMD) | ||
28 | |||
29 | #endif /* _ASM_PROC_INTCTL_REGS_H */ | ||
diff --git a/arch/mn10300/proc-mn103e010/proc-init.c b/arch/mn10300/proc-mn103e010/proc-init.c index 0cee7878bee9..27b97980dca4 100644 --- a/arch/mn10300/proc-mn103e010/proc-init.c +++ b/arch/mn10300/proc-mn103e010/proc-init.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <asm/fpu.h> | 12 | #include <asm/fpu.h> |
13 | #include <asm/rtc.h> | 13 | #include <asm/rtc.h> |
14 | #include <asm/busctl-regs.h> | ||
14 | 15 | ||
15 | /* | 16 | /* |
16 | * initialise the on-silicon processor peripherals | 17 | * initialise the on-silicon processor peripherals |
@@ -75,3 +76,37 @@ asmlinkage void __init processor_init(void) | |||
75 | 76 | ||
76 | calibrate_clock(); | 77 | calibrate_clock(); |
77 | } | 78 | } |
79 | |||
80 | /* | ||
81 | * determine the memory size and base from the memory controller regs | ||
82 | */ | ||
83 | void __init get_mem_info(unsigned long *mem_base, unsigned long *mem_size) | ||
84 | { | ||
85 | unsigned long base, size; | ||
86 | |||
87 | *mem_base = 0; | ||
88 | *mem_size = 0; | ||
89 | |||
90 | base = SDBASE(0); | ||
91 | if (base & SDBASE_CE) { | ||
92 | size = (base & SDBASE_CBAM) << SDBASE_CBAM_SHIFT; | ||
93 | size = ~size + 1; | ||
94 | base &= SDBASE_CBA; | ||
95 | |||
96 | printk(KERN_INFO "SDRAM[0]: %luMb @%08lx\n", size >> 20, base); | ||
97 | *mem_size += size; | ||
98 | *mem_base = base; | ||
99 | } | ||
100 | |||
101 | base = SDBASE(1); | ||
102 | if (base & SDBASE_CE) { | ||
103 | size = (base & SDBASE_CBAM) << SDBASE_CBAM_SHIFT; | ||
104 | size = ~size + 1; | ||
105 | base &= SDBASE_CBA; | ||
106 | |||
107 | printk(KERN_INFO "SDRAM[1]: %luMb @%08lx\n", size >> 20, base); | ||
108 | *mem_size += size; | ||
109 | if (*mem_base == 0) | ||
110 | *mem_base = base; | ||
111 | } | ||
112 | } | ||