diff options
Diffstat (limited to 'arch/m32r')
28 files changed, 1285 insertions, 176 deletions
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 4d100f3886e1..a3dcc3fab4b7 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -12,10 +12,6 @@ config M32R | |||
12 | config SBUS | 12 | config SBUS |
13 | bool | 13 | bool |
14 | 14 | ||
15 | config UID16 | ||
16 | bool | ||
17 | default n | ||
18 | |||
19 | config GENERIC_ISA_DMA | 15 | config GENERIC_ISA_DMA |
20 | bool | 16 | bool |
21 | default y | 17 | default y |
@@ -81,6 +77,12 @@ config PLAT_MAPPI2 | |||
81 | config PLAT_MAPPI3 | 77 | config PLAT_MAPPI3 |
82 | bool "Mappi-III(M3A-2170)" | 78 | bool "Mappi-III(M3A-2170)" |
83 | 79 | ||
80 | config PLAT_M32104UT | ||
81 | bool "M32104UT" | ||
82 | help | ||
83 | The M3T-M32104UT is an reference board based on uT-Engine | ||
84 | specification. This board has a M32104 chip. | ||
85 | |||
84 | endchoice | 86 | endchoice |
85 | 87 | ||
86 | choice | 88 | choice |
@@ -93,6 +95,10 @@ config CHIP_M32700 | |||
93 | config CHIP_M32102 | 95 | config CHIP_M32102 |
94 | bool "M32102" | 96 | bool "M32102" |
95 | 97 | ||
98 | config CHIP_M32104 | ||
99 | bool "M32104" | ||
100 | depends on PLAT_M32104UT | ||
101 | |||
96 | config CHIP_VDEC2 | 102 | config CHIP_VDEC2 |
97 | bool "VDEC2" | 103 | bool "VDEC2" |
98 | 104 | ||
@@ -115,7 +121,7 @@ config TLB_ENTRIES | |||
115 | 121 | ||
116 | config ISA_M32R | 122 | config ISA_M32R |
117 | bool | 123 | bool |
118 | depends on CHIP_M32102 | 124 | depends on CHIP_M32102 || CHIP_M32104 |
119 | default y | 125 | default y |
120 | 126 | ||
121 | config ISA_M32R2 | 127 | config ISA_M32R2 |
@@ -140,6 +146,7 @@ config BUS_CLOCK | |||
140 | default "50000000" if PLAT_MAPPI3 | 146 | default "50000000" if PLAT_MAPPI3 |
141 | default "50000000" if PLAT_M32700UT | 147 | default "50000000" if PLAT_M32700UT |
142 | default "50000000" if PLAT_OPSPUT | 148 | default "50000000" if PLAT_OPSPUT |
149 | default "54000000" if PLAT_M32104UT | ||
143 | default "33333333" if PLAT_OAKS32R | 150 | default "33333333" if PLAT_OAKS32R |
144 | default "20000000" if PLAT_MAPPI2 | 151 | default "20000000" if PLAT_MAPPI2 |
145 | 152 | ||
@@ -157,6 +164,7 @@ config MEMORY_START | |||
157 | default "08000000" if PLAT_USRV | 164 | default "08000000" if PLAT_USRV |
158 | default "08000000" if PLAT_M32700UT | 165 | default "08000000" if PLAT_M32700UT |
159 | default "08000000" if PLAT_OPSPUT | 166 | default "08000000" if PLAT_OPSPUT |
167 | default "04000000" if PLAT_M32104UT | ||
160 | default "01000000" if PLAT_OAKS32R | 168 | default "01000000" if PLAT_OAKS32R |
161 | 169 | ||
162 | config MEMORY_SIZE | 170 | config MEMORY_SIZE |
@@ -166,6 +174,7 @@ config MEMORY_SIZE | |||
166 | default "02000000" if PLAT_USRV | 174 | default "02000000" if PLAT_USRV |
167 | default "01000000" if PLAT_M32700UT | 175 | default "01000000" if PLAT_M32700UT |
168 | default "01000000" if PLAT_OPSPUT | 176 | default "01000000" if PLAT_OPSPUT |
177 | default "01000000" if PLAT_M32104UT | ||
169 | default "00800000" if PLAT_OAKS32R | 178 | default "00800000" if PLAT_OAKS32R |
170 | 179 | ||
171 | config NOHIGHMEM | 180 | config NOHIGHMEM |
@@ -174,21 +183,22 @@ config NOHIGHMEM | |||
174 | 183 | ||
175 | config ARCH_DISCONTIGMEM_ENABLE | 184 | config ARCH_DISCONTIGMEM_ENABLE |
176 | bool "Internal RAM Support" | 185 | bool "Internal RAM Support" |
177 | depends on CHIP_M32700 || CHIP_M32102 || CHIP_VDEC2 || CHIP_OPSP | 186 | depends on CHIP_M32700 || CHIP_M32102 || CHIP_VDEC2 || CHIP_OPSP || CHIP_M32104 |
178 | default y | 187 | default y |
179 | 188 | ||
180 | source "mm/Kconfig" | 189 | source "mm/Kconfig" |
181 | 190 | ||
182 | config IRAM_START | 191 | config IRAM_START |
183 | hex "Internal memory start address (hex)" | 192 | hex "Internal memory start address (hex)" |
184 | default "00f00000" | 193 | default "00f00000" if !CHIP_M32104 |
185 | depends on (CHIP_M32700 || CHIP_M32102 || CHIP_VDEC2 || CHIP_OPSP) && DISCONTIGMEM | 194 | default "00700000" if CHIP_M32104 |
195 | depends on (CHIP_M32700 || CHIP_M32102 || CHIP_VDEC2 || CHIP_OPSP || CHIP_M32104) && DISCONTIGMEM | ||
186 | 196 | ||
187 | config IRAM_SIZE | 197 | config IRAM_SIZE |
188 | hex "Internal memory size (hex)" | 198 | hex "Internal memory size (hex)" |
189 | depends on (CHIP_M32700 || CHIP_M32102 || CHIP_VDEC2 || CHIP_OPSP) && DISCONTIGMEM | 199 | depends on (CHIP_M32700 || CHIP_M32102 || CHIP_VDEC2 || CHIP_OPSP || CHIP_M32104) && DISCONTIGMEM |
190 | default "00080000" if CHIP_M32700 | 200 | default "00080000" if CHIP_M32700 |
191 | default "00010000" if CHIP_M32102 || CHIP_OPSP | 201 | default "00010000" if CHIP_M32102 || CHIP_OPSP || CHIP_M32104 |
192 | default "00008000" if CHIP_VDEC2 | 202 | default "00008000" if CHIP_VDEC2 |
193 | 203 | ||
194 | # | 204 | # |
diff --git a/arch/m32r/boot/compressed/head.S b/arch/m32r/boot/compressed/head.S index 07cfd6ad1ae4..234d8b1e0ac1 100644 --- a/arch/m32r/boot/compressed/head.S +++ b/arch/m32r/boot/compressed/head.S | |||
@@ -143,6 +143,11 @@ startup: | |||
143 | ldi r0, -2 | 143 | ldi r0, -2 |
144 | ldi r1, 0x0100 ; invalidate | 144 | ldi r1, 0x0100 ; invalidate |
145 | stb r1, @r0 | 145 | stb r1, @r0 |
146 | #elif defined(CONFIG_CHIP_M32104) | ||
147 | /* Cache flush */ | ||
148 | ldi r0, -2 | ||
149 | ldi r1, 0x0700 ; invalidate i-cache, copy back d-cache | ||
150 | sth r1, @r0 | ||
146 | #else | 151 | #else |
147 | #error "put your cache flush function, please" | 152 | #error "put your cache flush function, please" |
148 | #endif | 153 | #endif |
diff --git a/arch/m32r/boot/setup.S b/arch/m32r/boot/setup.S index 5d256434b4ad..398542507d84 100644 --- a/arch/m32r/boot/setup.S +++ b/arch/m32r/boot/setup.S | |||
@@ -1,11 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/m32r/boot/setup.S -- A setup code. | 2 | * linux/arch/m32r/boot/setup.S -- A setup code. |
3 | * | 3 | * |
4 | * Copyright (C) 2001, 2002 Hiroyuki Kondo, Hirokazu Takata, | 4 | * Copyright (C) 2001-2005 Hiroyuki Kondo, Hirokazu Takata, |
5 | * and Hitoshi Yamamoto | 5 | * Hitoshi Yamamoto, Hayato Fujiwara |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /* $Id$ */ | ||
9 | 8 | ||
10 | #include <linux/linkage.h> | 9 | #include <linux/linkage.h> |
11 | #include <asm/segment.h> | 10 | #include <asm/segment.h> |
@@ -80,6 +79,20 @@ ENTRY(boot) | |||
80 | ldi r1, #0x101 ; cache on (with invalidation) | 79 | ldi r1, #0x101 ; cache on (with invalidation) |
81 | ; ldi r1, #0x00 ; cache off | 80 | ; ldi r1, #0x00 ; cache off |
82 | st r1, @r0 | 81 | st r1, @r0 |
82 | #elif defined(CONFIG_CHIP_M32104) | ||
83 | ldi r0, #-96 ; DNCR0 | ||
84 | seth r1, #0x0060 ; from 0x00600000 | ||
85 | or3 r1, r1, #0x0005 ; size 2MB | ||
86 | st r1, @r0 | ||
87 | seth r1, #0x0100 ; from 0x01000000 | ||
88 | or3 r1, r1, #0x0003 ; size 16MB | ||
89 | st r1, @+r0 | ||
90 | seth r1, #0x0200 ; from 0x02000000 | ||
91 | or3 r1, r1, #0x0002 ; size 32MB | ||
92 | st r1, @+r0 | ||
93 | ldi r0, #-4 ;LDIMM (r0, M32R_MCCR) | ||
94 | ldi r1, #0x703 ; cache on (with invalidation) | ||
95 | st r1, @r0 | ||
83 | #else | 96 | #else |
84 | #error unknown chip configuration | 97 | #error unknown chip configuration |
85 | #endif | 98 | #endif |
@@ -115,10 +128,15 @@ mmu_on: | |||
115 | st r1, @(MATM_offset,r0) ; Set MATM (T bit ON) | 128 | st r1, @(MATM_offset,r0) ; Set MATM (T bit ON) |
116 | ld r0, @(MATM_offset,r0) ; Check | 129 | ld r0, @(MATM_offset,r0) ; Check |
117 | #else | 130 | #else |
131 | #if defined(CONFIG_CHIP_M32700) | ||
118 | seth r0,#high(M32R_MCDCAR) | 132 | seth r0,#high(M32R_MCDCAR) |
119 | or3 r0,r0,#low(M32R_MCDCAR) | 133 | or3 r0,r0,#low(M32R_MCDCAR) |
120 | ld24 r1,#0x8080 | 134 | ld24 r1,#0x8080 |
121 | st r1,@r0 | 135 | st r1,@r0 |
136 | #elif defined(CONFIG_CHIP_M32104) | ||
137 | LDIMM (r2, eit_vector) ; set EVB(cr5) | ||
138 | mvtc r2, cr5 | ||
139 | #endif | ||
122 | #endif /* CONFIG_MMU */ | 140 | #endif /* CONFIG_MMU */ |
123 | jmp r13 | 141 | jmp r13 |
124 | nop | 142 | nop |
diff --git a/arch/m32r/kernel/Makefile b/arch/m32r/kernel/Makefile index 6c6b6c376638..5a2fa886906f 100644 --- a/arch/m32r/kernel/Makefile +++ b/arch/m32r/kernel/Makefile | |||
@@ -16,5 +16,6 @@ obj-$(CONFIG_PLAT_M32700UT) += setup_m32700ut.o io_m32700ut.o | |||
16 | obj-$(CONFIG_PLAT_OPSPUT) += setup_opsput.o io_opsput.o | 16 | obj-$(CONFIG_PLAT_OPSPUT) += setup_opsput.o io_opsput.o |
17 | obj-$(CONFIG_MODULES) += module.o | 17 | obj-$(CONFIG_MODULES) += module.o |
18 | obj-$(CONFIG_PLAT_OAKS32R) += setup_oaks32r.o io_oaks32r.o | 18 | obj-$(CONFIG_PLAT_OAKS32R) += setup_oaks32r.o io_oaks32r.o |
19 | obj-$(CONFIG_PLAT_M32104UT) += setup_m32104ut.o io_m32104ut.o | ||
19 | 20 | ||
20 | EXTRA_AFLAGS := -traditional | 21 | EXTRA_AFLAGS := -traditional |
diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S index 396c94218cc2..3871b65f0c82 100644 --- a/arch/m32r/kernel/entry.S +++ b/arch/m32r/kernel/entry.S | |||
@@ -315,7 +315,7 @@ ENTRY(ei_handler) | |||
315 | mv r1, sp ; arg1(regs) | 315 | mv r1, sp ; arg1(regs) |
316 | #if defined(CONFIG_CHIP_VDEC2) || defined(CONFIG_CHIP_XNUX2) \ | 316 | #if defined(CONFIG_CHIP_VDEC2) || defined(CONFIG_CHIP_XNUX2) \ |
317 | || defined(CONFIG_CHIP_M32700) || defined(CONFIG_CHIP_M32102) \ | 317 | || defined(CONFIG_CHIP_M32700) || defined(CONFIG_CHIP_M32102) \ |
318 | || defined(CONFIG_CHIP_OPSP) | 318 | || defined(CONFIG_CHIP_OPSP) || defined(CONFIG_CHIP_M32104) |
319 | 319 | ||
320 | ; GET_ICU_STATUS; | 320 | ; GET_ICU_STATUS; |
321 | seth r0, #shigh(M32R_ICU_ISTS_ADDR) | 321 | seth r0, #shigh(M32R_ICU_ISTS_ADDR) |
@@ -541,7 +541,20 @@ check_int2: | |||
541 | bra check_end | 541 | bra check_end |
542 | .fillinsn | 542 | .fillinsn |
543 | check_end: | 543 | check_end: |
544 | #endif /* CONFIG_PLAT_OPSPUT */ | 544 | #elif defined(CONFIG_PLAT_M32104UT) |
545 | add3 r2, r0, #-(M32R_IRQ_INT1) ; INT1# interrupt | ||
546 | bnez r2, check_end | ||
547 | ; read ICU status register of PLD | ||
548 | seth r0, #high(PLD_ICUISTS) | ||
549 | or3 r0, r0, #low(PLD_ICUISTS) | ||
550 | lduh r0, @r0 | ||
551 | slli r0, #21 | ||
552 | srli r0, #27 ; ISN | ||
553 | addi r0, #(M32104UT_PLD_IRQ_BASE) | ||
554 | bra check_end | ||
555 | .fillinsn | ||
556 | check_end: | ||
557 | #endif /* CONFIG_PLAT_M32104UT */ | ||
545 | bl do_IRQ | 558 | bl do_IRQ |
546 | #endif /* CONFIG_SMP */ | 559 | #endif /* CONFIG_SMP */ |
547 | ld r14, @sp+ | 560 | ld r14, @sp+ |
@@ -651,8 +664,6 @@ ENTRY(rie_handler) | |||
651 | /* void rie_handler(int error_code) */ | 664 | /* void rie_handler(int error_code) */ |
652 | SWITCH_TO_KERNEL_STACK | 665 | SWITCH_TO_KERNEL_STACK |
653 | SAVE_ALL | 666 | SAVE_ALL |
654 | mvfc r0, bpc | ||
655 | ld r1, @r0 | ||
656 | ldi r1, #0x20 ; error_code | 667 | ldi r1, #0x20 ; error_code |
657 | mv r0, sp ; pt_regs | 668 | mv r0, sp ; pt_regs |
658 | bl do_rie_handler | 669 | bl do_rie_handler |
diff --git a/arch/m32r/kernel/io_m32104ut.c b/arch/m32r/kernel/io_m32104ut.c new file mode 100644 index 000000000000..d26adab9586c --- /dev/null +++ b/arch/m32r/kernel/io_m32104ut.c | |||
@@ -0,0 +1,298 @@ | |||
1 | /* | ||
2 | * linux/arch/m32r/kernel/io_m32104ut.c | ||
3 | * | ||
4 | * Typical I/O routines for M32104UT board. | ||
5 | * | ||
6 | * Copyright (c) 2001-2005 Hiroyuki Kondo, Hirokazu Takata, | ||
7 | * Hitoshi Yamamoto, Mamoru Sakugawa, | ||
8 | * Naoto Sugai, Hayato Fujiwara | ||
9 | */ | ||
10 | |||
11 | #include <linux/config.h> | ||
12 | #include <asm/m32r.h> | ||
13 | #include <asm/page.h> | ||
14 | #include <asm/io.h> | ||
15 | #include <asm/byteorder.h> | ||
16 | |||
17 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
18 | #include <linux/types.h> | ||
19 | |||
20 | #define M32R_PCC_IOMAP_SIZE 0x1000 | ||
21 | |||
22 | #define M32R_PCC_IOSTART0 0x1000 | ||
23 | #define M32R_PCC_IOEND0 (M32R_PCC_IOSTART0 + M32R_PCC_IOMAP_SIZE - 1) | ||
24 | |||
25 | extern void pcc_ioread_byte(int, unsigned long, void *, size_t, size_t, int); | ||
26 | extern void pcc_ioread_word(int, unsigned long, void *, size_t, size_t, int); | ||
27 | extern void pcc_iowrite_byte(int, unsigned long, void *, size_t, size_t, int); | ||
28 | extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); | ||
29 | #endif /* CONFIG_PCMCIA && CONFIG_M32R_CFC */ | ||
30 | |||
31 | #define PORT2ADDR(port) _port2addr(port) | ||
32 | |||
33 | static inline void *_port2addr(unsigned long port) | ||
34 | { | ||
35 | return (void *)(port | NONCACHE_OFFSET); | ||
36 | } | ||
37 | |||
38 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
39 | static inline void *__port2addr_ata(unsigned long port) | ||
40 | { | ||
41 | static int dummy_reg; | ||
42 | |||
43 | switch (port) { | ||
44 | case 0x1f0: return (void *)(0x0c002000 | NONCACHE_OFFSET); | ||
45 | case 0x1f1: return (void *)(0x0c012800 | NONCACHE_OFFSET); | ||
46 | case 0x1f2: return (void *)(0x0c012002 | NONCACHE_OFFSET); | ||
47 | case 0x1f3: return (void *)(0x0c012802 | NONCACHE_OFFSET); | ||
48 | case 0x1f4: return (void *)(0x0c012004 | NONCACHE_OFFSET); | ||
49 | case 0x1f5: return (void *)(0x0c012804 | NONCACHE_OFFSET); | ||
50 | case 0x1f6: return (void *)(0x0c012006 | NONCACHE_OFFSET); | ||
51 | case 0x1f7: return (void *)(0x0c012806 | NONCACHE_OFFSET); | ||
52 | case 0x3f6: return (void *)(0x0c01200e | NONCACHE_OFFSET); | ||
53 | default: return (void *)&dummy_reg; | ||
54 | } | ||
55 | } | ||
56 | #endif | ||
57 | |||
58 | /* | ||
59 | * M32104T-LAN is located in the extended bus space | ||
60 | * from 0x01000000 to 0x01ffffff on physical address. | ||
61 | * The base address of LAN controller(LAN91C111) is 0x300. | ||
62 | */ | ||
63 | #define LAN_IOSTART (0x300 | NONCACHE_OFFSET) | ||
64 | #define LAN_IOEND (0x320 | NONCACHE_OFFSET) | ||
65 | static inline void *_port2addr_ne(unsigned long port) | ||
66 | { | ||
67 | return (void *)(port + NONCACHE_OFFSET + 0x01000000); | ||
68 | } | ||
69 | |||
70 | static inline void delay(void) | ||
71 | { | ||
72 | __asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory"); | ||
73 | } | ||
74 | |||
75 | /* | ||
76 | * NIC I/O function | ||
77 | */ | ||
78 | |||
79 | #define PORT2ADDR_NE(port) _port2addr_ne(port) | ||
80 | |||
81 | static inline unsigned char _ne_inb(void *portp) | ||
82 | { | ||
83 | return *(volatile unsigned char *)portp; | ||
84 | } | ||
85 | |||
86 | static inline unsigned short _ne_inw(void *portp) | ||
87 | { | ||
88 | return (unsigned short)le16_to_cpu(*(volatile unsigned short *)portp); | ||
89 | } | ||
90 | |||
91 | static inline void _ne_insb(void *portp, void *addr, unsigned long count) | ||
92 | { | ||
93 | unsigned char *buf = (unsigned char *)addr; | ||
94 | |||
95 | while (count--) | ||
96 | *buf++ = _ne_inb(portp); | ||
97 | } | ||
98 | |||
99 | static inline void _ne_outb(unsigned char b, void *portp) | ||
100 | { | ||
101 | *(volatile unsigned char *)portp = b; | ||
102 | } | ||
103 | |||
104 | static inline void _ne_outw(unsigned short w, void *portp) | ||
105 | { | ||
106 | *(volatile unsigned short *)portp = cpu_to_le16(w); | ||
107 | } | ||
108 | |||
109 | unsigned char _inb(unsigned long port) | ||
110 | { | ||
111 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
112 | return _ne_inb(PORT2ADDR_NE(port)); | ||
113 | |||
114 | return *(volatile unsigned char *)PORT2ADDR(port); | ||
115 | } | ||
116 | |||
117 | unsigned short _inw(unsigned long port) | ||
118 | { | ||
119 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
120 | return _ne_inw(PORT2ADDR_NE(port)); | ||
121 | |||
122 | return *(volatile unsigned short *)PORT2ADDR(port); | ||
123 | } | ||
124 | |||
125 | unsigned long _inl(unsigned long port) | ||
126 | { | ||
127 | return *(volatile unsigned long *)PORT2ADDR(port); | ||
128 | } | ||
129 | |||
130 | unsigned char _inb_p(unsigned long port) | ||
131 | { | ||
132 | unsigned char v = _inb(port); | ||
133 | delay(); | ||
134 | return (v); | ||
135 | } | ||
136 | |||
137 | unsigned short _inw_p(unsigned long port) | ||
138 | { | ||
139 | unsigned short v = _inw(port); | ||
140 | delay(); | ||
141 | return (v); | ||
142 | } | ||
143 | |||
144 | unsigned long _inl_p(unsigned long port) | ||
145 | { | ||
146 | unsigned long v = _inl(port); | ||
147 | delay(); | ||
148 | return (v); | ||
149 | } | ||
150 | |||
151 | void _outb(unsigned char b, unsigned long port) | ||
152 | { | ||
153 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
154 | _ne_outb(b, PORT2ADDR_NE(port)); | ||
155 | else | ||
156 | *(volatile unsigned char *)PORT2ADDR(port) = b; | ||
157 | } | ||
158 | |||
159 | void _outw(unsigned short w, unsigned long port) | ||
160 | { | ||
161 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
162 | _ne_outw(w, PORT2ADDR_NE(port)); | ||
163 | else | ||
164 | *(volatile unsigned short *)PORT2ADDR(port) = w; | ||
165 | } | ||
166 | |||
167 | void _outl(unsigned long l, unsigned long port) | ||
168 | { | ||
169 | *(volatile unsigned long *)PORT2ADDR(port) = l; | ||
170 | } | ||
171 | |||
172 | void _outb_p(unsigned char b, unsigned long port) | ||
173 | { | ||
174 | _outb(b, port); | ||
175 | delay(); | ||
176 | } | ||
177 | |||
178 | void _outw_p(unsigned short w, unsigned long port) | ||
179 | { | ||
180 | _outw(w, port); | ||
181 | delay(); | ||
182 | } | ||
183 | |||
184 | void _outl_p(unsigned long l, unsigned long port) | ||
185 | { | ||
186 | _outl(l, port); | ||
187 | delay(); | ||
188 | } | ||
189 | |||
190 | void _insb(unsigned int port, void *addr, unsigned long count) | ||
191 | { | ||
192 | if (port >= LAN_IOSTART && port < LAN_IOEND) | ||
193 | _ne_insb(PORT2ADDR_NE(port), addr, count); | ||
194 | else { | ||
195 | unsigned char *buf = addr; | ||
196 | unsigned char *portp = PORT2ADDR(port); | ||
197 | while (count--) | ||
198 | *buf++ = *(volatile unsigned char *)portp; | ||
199 | } | ||
200 | } | ||
201 | |||
202 | void _insw(unsigned int port, void *addr, unsigned long count) | ||
203 | { | ||
204 | unsigned short *buf = addr; | ||
205 | unsigned short *portp; | ||
206 | |||
207 | if (port >= LAN_IOSTART && port < LAN_IOEND) { | ||
208 | /* | ||
209 | * This portion is only used by smc91111.c to read data | ||
210 | * from the DATA_REG. Do not swap the data. | ||
211 | */ | ||
212 | portp = PORT2ADDR_NE(port); | ||
213 | while (count--) | ||
214 | *buf++ = *(volatile unsigned short *)portp; | ||
215 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
216 | } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
217 | pcc_ioread_word(9, port, (void *)addr, sizeof(unsigned short), | ||
218 | count, 1); | ||
219 | #endif | ||
220 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
221 | } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
222 | portp = __port2addr_ata(port); | ||
223 | while (count--) | ||
224 | *buf++ = *(volatile unsigned short *)portp; | ||
225 | #endif | ||
226 | } else { | ||
227 | portp = PORT2ADDR(port); | ||
228 | while (count--) | ||
229 | *buf++ = *(volatile unsigned short *)portp; | ||
230 | } | ||
231 | } | ||
232 | |||
233 | void _insl(unsigned int port, void *addr, unsigned long count) | ||
234 | { | ||
235 | unsigned long *buf = addr; | ||
236 | unsigned long *portp; | ||
237 | |||
238 | portp = PORT2ADDR(port); | ||
239 | while (count--) | ||
240 | *buf++ = *(volatile unsigned long *)portp; | ||
241 | } | ||
242 | |||
243 | void _outsb(unsigned int port, const void *addr, unsigned long count) | ||
244 | { | ||
245 | const unsigned char *buf = addr; | ||
246 | unsigned char *portp; | ||
247 | |||
248 | if (port >= LAN_IOSTART && port < LAN_IOEND) { | ||
249 | portp = PORT2ADDR_NE(port); | ||
250 | while (count--) | ||
251 | _ne_outb(*buf++, portp); | ||
252 | } else { | ||
253 | portp = PORT2ADDR(port); | ||
254 | while (count--) | ||
255 | *(volatile unsigned char *)portp = *buf++; | ||
256 | } | ||
257 | } | ||
258 | |||
259 | void _outsw(unsigned int port, const void *addr, unsigned long count) | ||
260 | { | ||
261 | const unsigned short *buf = addr; | ||
262 | unsigned short *portp; | ||
263 | |||
264 | if (port >= LAN_IOSTART && port < LAN_IOEND) { | ||
265 | /* | ||
266 | * This portion is only used by smc91111.c to write data | ||
267 | * into the DATA_REG. Do not swap the data. | ||
268 | */ | ||
269 | portp = PORT2ADDR_NE(port); | ||
270 | while (count--) | ||
271 | *(volatile unsigned short *)portp = *buf++; | ||
272 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | ||
273 | } else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) { | ||
274 | portp = __port2addr_ata(port); | ||
275 | while (count--) | ||
276 | *(volatile unsigned short *)portp = *buf++; | ||
277 | #endif | ||
278 | #if defined(CONFIG_PCMCIA) && defined(CONFIG_M32R_CFC) | ||
279 | } else if (port >= M32R_PCC_IOSTART0 && port <= M32R_PCC_IOEND0) { | ||
280 | pcc_iowrite_word(9, port, (void *)addr, sizeof(unsigned short), | ||
281 | count, 1); | ||
282 | #endif | ||
283 | } else { | ||
284 | portp = PORT2ADDR(port); | ||
285 | while (count--) | ||
286 | *(volatile unsigned short *)portp = *buf++; | ||
287 | } | ||
288 | } | ||
289 | |||
290 | void _outsl(unsigned int port, const void *addr, unsigned long count) | ||
291 | { | ||
292 | const unsigned long *buf = addr; | ||
293 | unsigned char *portp; | ||
294 | |||
295 | portp = PORT2ADDR(port); | ||
296 | while (count--) | ||
297 | *(volatile unsigned long *)portp = *buf++; | ||
298 | } | ||
diff --git a/arch/m32r/kernel/io_m32700ut.c b/arch/m32r/kernel/io_m32700ut.c index eda9f963c1eb..939932d6cc00 100644 --- a/arch/m32r/kernel/io_m32700ut.c +++ b/arch/m32r/kernel/io_m32700ut.c | |||
@@ -36,7 +36,7 @@ extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); | |||
36 | 36 | ||
37 | static inline void *_port2addr(unsigned long port) | 37 | static inline void *_port2addr(unsigned long port) |
38 | { | 38 | { |
39 | return (void *)(port + NONCACHE_OFFSET); | 39 | return (void *)(port | NONCACHE_OFFSET); |
40 | } | 40 | } |
41 | 41 | ||
42 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | 42 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) |
@@ -45,15 +45,15 @@ static inline void *__port2addr_ata(unsigned long port) | |||
45 | static int dummy_reg; | 45 | static int dummy_reg; |
46 | 46 | ||
47 | switch (port) { | 47 | switch (port) { |
48 | case 0x1f0: return (void *)0xac002000; | 48 | case 0x1f0: return (void *)(0x0c002000 | NONCACHE_OFFSET); |
49 | case 0x1f1: return (void *)0xac012800; | 49 | case 0x1f1: return (void *)(0x0c012800 | NONCACHE_OFFSET); |
50 | case 0x1f2: return (void *)0xac012002; | 50 | case 0x1f2: return (void *)(0x0c012002 | NONCACHE_OFFSET); |
51 | case 0x1f3: return (void *)0xac012802; | 51 | case 0x1f3: return (void *)(0x0c012802 | NONCACHE_OFFSET); |
52 | case 0x1f4: return (void *)0xac012004; | 52 | case 0x1f4: return (void *)(0x0c012004 | NONCACHE_OFFSET); |
53 | case 0x1f5: return (void *)0xac012804; | 53 | case 0x1f5: return (void *)(0x0c012804 | NONCACHE_OFFSET); |
54 | case 0x1f6: return (void *)0xac012006; | 54 | case 0x1f6: return (void *)(0x0c012006 | NONCACHE_OFFSET); |
55 | case 0x1f7: return (void *)0xac012806; | 55 | case 0x1f7: return (void *)(0x0c012806 | NONCACHE_OFFSET); |
56 | case 0x3f6: return (void *)0xac01200e; | 56 | case 0x3f6: return (void *)(0x0c01200e | NONCACHE_OFFSET); |
57 | default: return (void *)&dummy_reg; | 57 | default: return (void *)&dummy_reg; |
58 | } | 58 | } |
59 | } | 59 | } |
@@ -64,8 +64,8 @@ static inline void *__port2addr_ata(unsigned long port) | |||
64 | * from 0x10000000 to 0x13ffffff on physical address. | 64 | * from 0x10000000 to 0x13ffffff on physical address. |
65 | * The base address of LAN controller(LAN91C111) is 0x300. | 65 | * The base address of LAN controller(LAN91C111) is 0x300. |
66 | */ | 66 | */ |
67 | #define LAN_IOSTART 0xa0000300 | 67 | #define LAN_IOSTART (0x300 | NONCACHE_OFFSET) |
68 | #define LAN_IOEND 0xa0000320 | 68 | #define LAN_IOEND (0x320 | NONCACHE_OFFSET) |
69 | static inline void *_port2addr_ne(unsigned long port) | 69 | static inline void *_port2addr_ne(unsigned long port) |
70 | { | 70 | { |
71 | return (void *)(port + 0x10000000); | 71 | return (void *)(port + 0x10000000); |
diff --git a/arch/m32r/kernel/io_mappi.c b/arch/m32r/kernel/io_mappi.c index 3c3da042fbd1..a662b537c5ba 100644 --- a/arch/m32r/kernel/io_mappi.c +++ b/arch/m32r/kernel/io_mappi.c | |||
@@ -31,7 +31,7 @@ extern void pcc_iowrite(int, unsigned long, void *, size_t, size_t, int); | |||
31 | 31 | ||
32 | static inline void *_port2addr(unsigned long port) | 32 | static inline void *_port2addr(unsigned long port) |
33 | { | 33 | { |
34 | return (void *)(port | (NONCACHE_OFFSET)); | 34 | return (void *)(port | NONCACHE_OFFSET); |
35 | } | 35 | } |
36 | 36 | ||
37 | static inline void *_port2addr_ne(unsigned long port) | 37 | static inline void *_port2addr_ne(unsigned long port) |
diff --git a/arch/m32r/kernel/io_mappi2.c b/arch/m32r/kernel/io_mappi2.c index df3c729cb3e0..e72d725606af 100644 --- a/arch/m32r/kernel/io_mappi2.c +++ b/arch/m32r/kernel/io_mappi2.c | |||
@@ -33,7 +33,7 @@ extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); | |||
33 | 33 | ||
34 | static inline void *_port2addr(unsigned long port) | 34 | static inline void *_port2addr(unsigned long port) |
35 | { | 35 | { |
36 | return (void *)(port | (NONCACHE_OFFSET)); | 36 | return (void *)(port | NONCACHE_OFFSET); |
37 | } | 37 | } |
38 | 38 | ||
39 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) | 39 | #if defined(CONFIG_IDE) && !defined(CONFIG_M32R_CFC) |
@@ -42,22 +42,22 @@ static inline void *__port2addr_ata(unsigned long port) | |||
42 | static int dummy_reg; | 42 | static int dummy_reg; |
43 | 43 | ||
44 | switch (port) { | 44 | switch (port) { |
45 | case 0x1f0: return (void *)0xac002000; | 45 | case 0x1f0: return (void *)(0x0c002000 | NONCACHE_OFFSET); |
46 | case 0x1f1: return (void *)0xac012800; | 46 | case 0x1f1: return (void *)(0x0c012800 | NONCACHE_OFFSET); |
47 | case 0x1f2: return (void *)0xac012002; | 47 | case 0x1f2: return (void *)(0x0c012002 | NONCACHE_OFFSET); |
48 | case 0x1f3: return (void *)0xac012802; | 48 | case 0x1f3: return (void *)(0x0c012802 | NONCACHE_OFFSET); |
49 | case 0x1f4: return (void *)0xac012004; | 49 | case 0x1f4: return (void *)(0x0c012004 | NONCACHE_OFFSET); |
50 | case 0x1f5: return (void *)0xac012804; | 50 | case 0x1f5: return (void *)(0x0c012804 | NONCACHE_OFFSET); |
51 | case 0x1f6: return (void *)0xac012006; | 51 | case 0x1f6: return (void *)(0x0c012006 | NONCACHE_OFFSET); |
52 | case 0x1f7: return (void *)0xac012806; | 52 | case 0x1f7: return (void *)(0x0c012806 | NONCACHE_OFFSET); |
53 | case 0x3f6: return (void *)0xac01200e; | 53 | case 0x3f6: return (void *)(0x0c01200e | NONCACHE_OFFSET); |
54 | default: return (void *)&dummy_reg; | 54 | default: return (void *)&dummy_reg; |
55 | } | 55 | } |
56 | } | 56 | } |
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | #define LAN_IOSTART 0xa0000300 | 59 | #define LAN_IOSTART (0x300 | NONCACHE_OFFSET) |
60 | #define LAN_IOEND 0xa0000320 | 60 | #define LAN_IOEND (0x320 | NONCACHE_OFFSET) |
61 | #ifdef CONFIG_CHIP_OPSP | 61 | #ifdef CONFIG_CHIP_OPSP |
62 | static inline void *_port2addr_ne(unsigned long port) | 62 | static inline void *_port2addr_ne(unsigned long port) |
63 | { | 63 | { |
diff --git a/arch/m32r/kernel/io_mappi3.c b/arch/m32r/kernel/io_mappi3.c index f80321a58764..ed6da930bc64 100644 --- a/arch/m32r/kernel/io_mappi3.c +++ b/arch/m32r/kernel/io_mappi3.c | |||
@@ -33,7 +33,7 @@ extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); | |||
33 | 33 | ||
34 | static inline void *_port2addr(unsigned long port) | 34 | static inline void *_port2addr(unsigned long port) |
35 | { | 35 | { |
36 | return (void *)(port + NONCACHE_OFFSET); | 36 | return (void *)(port | NONCACHE_OFFSET); |
37 | } | 37 | } |
38 | 38 | ||
39 | #if defined(CONFIG_IDE) | 39 | #if defined(CONFIG_IDE) |
@@ -43,33 +43,42 @@ static inline void *__port2addr_ata(unsigned long port) | |||
43 | 43 | ||
44 | switch (port) { | 44 | switch (port) { |
45 | /* IDE0 CF */ | 45 | /* IDE0 CF */ |
46 | case 0x1f0: return (void *)0xb4002000; | 46 | case 0x1f0: return (void *)(0x14002000 | NONCACHE_OFFSET); |
47 | case 0x1f1: return (void *)0xb4012800; | 47 | case 0x1f1: return (void *)(0x14012800 | NONCACHE_OFFSET); |
48 | case 0x1f2: return (void *)0xb4012002; | 48 | case 0x1f2: return (void *)(0x14012002 | NONCACHE_OFFSET); |
49 | case 0x1f3: return (void *)0xb4012802; | 49 | case 0x1f3: return (void *)(0x14012802 | NONCACHE_OFFSET); |
50 | case 0x1f4: return (void *)0xb4012004; | 50 | case 0x1f4: return (void *)(0x14012004 | NONCACHE_OFFSET); |
51 | case 0x1f5: return (void *)0xb4012804; | 51 | case 0x1f5: return (void *)(0x14012804 | NONCACHE_OFFSET); |
52 | case 0x1f6: return (void *)0xb4012006; | 52 | case 0x1f6: return (void *)(0x14012006 | NONCACHE_OFFSET); |
53 | case 0x1f7: return (void *)0xb4012806; | 53 | case 0x1f7: return (void *)(0x14012806 | NONCACHE_OFFSET); |
54 | case 0x3f6: return (void *)0xb401200e; | 54 | case 0x3f6: return (void *)(0x1401200e | NONCACHE_OFFSET); |
55 | /* IDE1 IDE */ | 55 | /* IDE1 IDE */ |
56 | case 0x170: return (void *)0xb4810000; /* Data 16bit */ | 56 | case 0x170: /* Data 16bit */ |
57 | case 0x171: return (void *)0xb4810002; /* Features / Error */ | 57 | return (void *)(0x14810000 | NONCACHE_OFFSET); |
58 | case 0x172: return (void *)0xb4810004; /* Sector count */ | 58 | case 0x171: /* Features / Error */ |
59 | case 0x173: return (void *)0xb4810006; /* Sector number */ | 59 | return (void *)(0x14810002 | NONCACHE_OFFSET); |
60 | case 0x174: return (void *)0xb4810008; /* Cylinder low */ | 60 | case 0x172: /* Sector count */ |
61 | case 0x175: return (void *)0xb481000a; /* Cylinder high */ | 61 | return (void *)(0x14810004 | NONCACHE_OFFSET); |
62 | case 0x176: return (void *)0xb481000c; /* Device head */ | 62 | case 0x173: /* Sector number */ |
63 | case 0x177: return (void *)0xb481000e; /* Command */ | 63 | return (void *)(0x14810006 | NONCACHE_OFFSET); |
64 | case 0x376: return (void *)0xb480800c; /* Device control / Alt status */ | 64 | case 0x174: /* Cylinder low */ |
65 | return (void *)(0x14810008 | NONCACHE_OFFSET); | ||
66 | case 0x175: /* Cylinder high */ | ||
67 | return (void *)(0x1481000a | NONCACHE_OFFSET); | ||
68 | case 0x176: /* Device head */ | ||
69 | return (void *)(0x1481000c | NONCACHE_OFFSET); | ||
70 | case 0x177: /* Command */ | ||
71 | return (void *)(0x1481000e | NONCACHE_OFFSET); | ||
72 | case 0x376: /* Device control / Alt status */ | ||
73 | return (void *)(0x1480800c | NONCACHE_OFFSET); | ||
65 | 74 | ||
66 | default: return (void *)&dummy_reg; | 75 | default: return (void *)&dummy_reg; |
67 | } | 76 | } |
68 | } | 77 | } |
69 | #endif | 78 | #endif |
70 | 79 | ||
71 | #define LAN_IOSTART 0xa0000300 | 80 | #define LAN_IOSTART (0x300 | NONCACHE_OFFSET) |
72 | #define LAN_IOEND 0xa0000320 | 81 | #define LAN_IOEND (0x320 | NONCACHE_OFFSET) |
73 | static inline void *_port2addr_ne(unsigned long port) | 82 | static inline void *_port2addr_ne(unsigned long port) |
74 | { | 83 | { |
75 | return (void *)(port + 0x10000000); | 84 | return (void *)(port + 0x10000000); |
diff --git a/arch/m32r/kernel/io_oaks32r.c b/arch/m32r/kernel/io_oaks32r.c index 8be323931e4a..910dd131c227 100644 --- a/arch/m32r/kernel/io_oaks32r.c +++ b/arch/m32r/kernel/io_oaks32r.c | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | static inline void *_port2addr(unsigned long port) | 17 | static inline void *_port2addr(unsigned long port) |
18 | { | 18 | { |
19 | return (void *)(port | (NONCACHE_OFFSET)); | 19 | return (void *)(port | NONCACHE_OFFSET); |
20 | } | 20 | } |
21 | 21 | ||
22 | static inline void *_port2addr_ne(unsigned long port) | 22 | static inline void *_port2addr_ne(unsigned long port) |
diff --git a/arch/m32r/kernel/io_opsput.c b/arch/m32r/kernel/io_opsput.c index 4793bd18e115..bec69297db3c 100644 --- a/arch/m32r/kernel/io_opsput.c +++ b/arch/m32r/kernel/io_opsput.c | |||
@@ -36,7 +36,7 @@ extern void pcc_iowrite_word(int, unsigned long, void *, size_t, size_t, int); | |||
36 | 36 | ||
37 | static inline void *_port2addr(unsigned long port) | 37 | static inline void *_port2addr(unsigned long port) |
38 | { | 38 | { |
39 | return (void *)(port | (NONCACHE_OFFSET)); | 39 | return (void *)(port | NONCACHE_OFFSET); |
40 | } | 40 | } |
41 | 41 | ||
42 | /* | 42 | /* |
@@ -44,8 +44,8 @@ static inline void *_port2addr(unsigned long port) | |||
44 | * from 0x10000000 to 0x13ffffff on physical address. | 44 | * from 0x10000000 to 0x13ffffff on physical address. |
45 | * The base address of LAN controller(LAN91C111) is 0x300. | 45 | * The base address of LAN controller(LAN91C111) is 0x300. |
46 | */ | 46 | */ |
47 | #define LAN_IOSTART 0xa0000300 | 47 | #define LAN_IOSTART (0x300 | NONCACHE_OFFSET) |
48 | #define LAN_IOEND 0xa0000320 | 48 | #define LAN_IOEND (0x320 | NONCACHE_OFFSET) |
49 | static inline void *_port2addr_ne(unsigned long port) | 49 | static inline void *_port2addr_ne(unsigned long port) |
50 | { | 50 | { |
51 | return (void *)(port + 0x10000000); | 51 | return (void *)(port + 0x10000000); |
diff --git a/arch/m32r/kernel/m32r_ksyms.c b/arch/m32r/kernel/m32r_ksyms.c index e5ec134d81d9..dbc8a392105f 100644 --- a/arch/m32r/kernel/m32r_ksyms.c +++ b/arch/m32r/kernel/m32r_ksyms.c | |||
@@ -18,8 +18,6 @@ | |||
18 | #include <asm/irq.h> | 18 | #include <asm/irq.h> |
19 | #include <asm/tlbflush.h> | 19 | #include <asm/tlbflush.h> |
20 | 20 | ||
21 | extern void dump_thread(struct pt_regs *, struct user *); | ||
22 | |||
23 | #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE) | 21 | #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE) |
24 | extern struct drive_info_struct drive_info; | 22 | extern struct drive_info_struct drive_info; |
25 | EXPORT_SYMBOL(drive_info); | 23 | EXPORT_SYMBOL(drive_info); |
@@ -27,7 +25,6 @@ EXPORT_SYMBOL(drive_info); | |||
27 | 25 | ||
28 | /* platform dependent support */ | 26 | /* platform dependent support */ |
29 | EXPORT_SYMBOL(boot_cpu_data); | 27 | EXPORT_SYMBOL(boot_cpu_data); |
30 | EXPORT_SYMBOL(dump_thread); | ||
31 | EXPORT_SYMBOL(dump_fpu); | 28 | EXPORT_SYMBOL(dump_fpu); |
32 | EXPORT_SYMBOL(__ioremap); | 29 | EXPORT_SYMBOL(__ioremap); |
33 | EXPORT_SYMBOL(iounmap); | 30 | EXPORT_SYMBOL(iounmap); |
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c index cc4b571e5db7..5dfc7ea45cf7 100644 --- a/arch/m32r/kernel/process.c +++ b/arch/m32r/kernel/process.c | |||
@@ -50,6 +50,10 @@ unsigned long thread_saved_pc(struct task_struct *tsk) | |||
50 | * Powermanagement idle function, if any.. | 50 | * Powermanagement idle function, if any.. |
51 | */ | 51 | */ |
52 | void (*pm_idle)(void) = NULL; | 52 | void (*pm_idle)(void) = NULL; |
53 | EXPORT_SYMBOL(pm_idle); | ||
54 | |||
55 | void (*pm_power_off)(void) = NULL; | ||
56 | EXPORT_SYMBOL(pm_power_off); | ||
53 | 57 | ||
54 | void disable_hlt(void) | 58 | void disable_hlt(void) |
55 | { | 59 | { |
@@ -238,13 +242,10 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu) | |||
238 | int copy_thread(int nr, unsigned long clone_flags, unsigned long spu, | 242 | int copy_thread(int nr, unsigned long clone_flags, unsigned long spu, |
239 | unsigned long unused, struct task_struct *tsk, struct pt_regs *regs) | 243 | unsigned long unused, struct task_struct *tsk, struct pt_regs *regs) |
240 | { | 244 | { |
241 | struct pt_regs *childregs; | 245 | struct pt_regs *childregs = task_pt_regs(tsk); |
242 | unsigned long sp = (unsigned long)tsk->thread_info + THREAD_SIZE; | ||
243 | extern void ret_from_fork(void); | 246 | extern void ret_from_fork(void); |
244 | 247 | ||
245 | /* Copy registers */ | 248 | /* Copy registers */ |
246 | sp -= sizeof (struct pt_regs); | ||
247 | childregs = (struct pt_regs *)sp; | ||
248 | *childregs = *regs; | 249 | *childregs = *regs; |
249 | 250 | ||
250 | childregs->spu = spu; | 251 | childregs->spu = spu; |
@@ -257,14 +258,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long spu, | |||
257 | } | 258 | } |
258 | 259 | ||
259 | /* | 260 | /* |
260 | * fill in the user structure for a core dump.. | ||
261 | */ | ||
262 | void dump_thread(struct pt_regs * regs, struct user * dump) | ||
263 | { | ||
264 | /* M32R_FIXME */ | ||
265 | } | ||
266 | |||
267 | /* | ||
268 | * Capture the user space registers if the task is not running (in user space) | 261 | * Capture the user space registers if the task is not running (in user space) |
269 | */ | 262 | */ |
270 | int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) | 263 | int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) |
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c index 078d2a0e71c2..340a3bf59b88 100644 --- a/arch/m32r/kernel/ptrace.c +++ b/arch/m32r/kernel/ptrace.c | |||
@@ -35,23 +35,6 @@ | |||
35 | #include <asm/mmu_context.h> | 35 | #include <asm/mmu_context.h> |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * Get the address of the live pt_regs for the specified task. | ||
39 | * These are saved onto the top kernel stack when the process | ||
40 | * is not running. | ||
41 | * | ||
42 | * Note: if a user thread is execve'd from kernel space, the | ||
43 | * kernel stack will not be empty on entry to the kernel, so | ||
44 | * ptracing these tasks will fail. | ||
45 | */ | ||
46 | static inline struct pt_regs * | ||
47 | get_user_regs(struct task_struct *task) | ||
48 | { | ||
49 | return (struct pt_regs *) | ||
50 | ((unsigned long)task->thread_info + THREAD_SIZE | ||
51 | - sizeof(struct pt_regs)); | ||
52 | } | ||
53 | |||
54 | /* | ||
55 | * This routine will get a word off of the process kernel stack. | 38 | * This routine will get a word off of the process kernel stack. |
56 | */ | 39 | */ |
57 | static inline unsigned long int | 40 | static inline unsigned long int |
@@ -59,7 +42,7 @@ get_stack_long(struct task_struct *task, int offset) | |||
59 | { | 42 | { |
60 | unsigned long *stack; | 43 | unsigned long *stack; |
61 | 44 | ||
62 | stack = (unsigned long *)get_user_regs(task); | 45 | stack = (unsigned long *)task_pt_regs(task); |
63 | 46 | ||
64 | return stack[offset]; | 47 | return stack[offset]; |
65 | } | 48 | } |
@@ -72,7 +55,7 @@ put_stack_long(struct task_struct *task, int offset, unsigned long data) | |||
72 | { | 55 | { |
73 | unsigned long *stack; | 56 | unsigned long *stack; |
74 | 57 | ||
75 | stack = (unsigned long *)get_user_regs(task); | 58 | stack = (unsigned long *)task_pt_regs(task); |
76 | stack[offset] = data; | 59 | stack[offset] = data; |
77 | 60 | ||
78 | return 0; | 61 | return 0; |
@@ -208,7 +191,7 @@ static int ptrace_write_user(struct task_struct *tsk, unsigned long off, | |||
208 | */ | 191 | */ |
209 | static int ptrace_getregs(struct task_struct *tsk, void __user *uregs) | 192 | static int ptrace_getregs(struct task_struct *tsk, void __user *uregs) |
210 | { | 193 | { |
211 | struct pt_regs *regs = get_user_regs(tsk); | 194 | struct pt_regs *regs = task_pt_regs(tsk); |
212 | 195 | ||
213 | return copy_to_user(uregs, regs, sizeof(struct pt_regs)) ? -EFAULT : 0; | 196 | return copy_to_user(uregs, regs, sizeof(struct pt_regs)) ? -EFAULT : 0; |
214 | } | 197 | } |
@@ -223,7 +206,7 @@ static int ptrace_setregs(struct task_struct *tsk, void __user *uregs) | |||
223 | 206 | ||
224 | ret = -EFAULT; | 207 | ret = -EFAULT; |
225 | if (copy_from_user(&newregs, uregs, sizeof(struct pt_regs)) == 0) { | 208 | if (copy_from_user(&newregs, uregs, sizeof(struct pt_regs)) == 0) { |
226 | struct pt_regs *regs = get_user_regs(tsk); | 209 | struct pt_regs *regs = task_pt_regs(tsk); |
227 | *regs = newregs; | 210 | *regs = newregs; |
228 | ret = 0; | 211 | ret = 0; |
229 | } | 212 | } |
@@ -762,28 +745,16 @@ asmlinkage long sys_ptrace(long request, long pid, long addr, long data) | |||
762 | int ret; | 745 | int ret; |
763 | 746 | ||
764 | lock_kernel(); | 747 | lock_kernel(); |
765 | ret = -EPERM; | ||
766 | if (request == PTRACE_TRACEME) { | 748 | if (request == PTRACE_TRACEME) { |
767 | /* are we already being traced? */ | 749 | ret = ptrace_traceme(); |
768 | if (current->ptrace & PT_PTRACED) | ||
769 | goto out; | ||
770 | /* set the ptrace bit in the process flags. */ | ||
771 | current->ptrace |= PT_PTRACED; | ||
772 | ret = 0; | ||
773 | goto out; | 750 | goto out; |
774 | } | 751 | } |
775 | ret = -ESRCH; | ||
776 | read_lock(&tasklist_lock); | ||
777 | child = find_task_by_pid(pid); | ||
778 | if (child) | ||
779 | get_task_struct(child); | ||
780 | read_unlock(&tasklist_lock); | ||
781 | if (!child) | ||
782 | goto out; | ||
783 | 752 | ||
784 | ret = -EPERM; | 753 | child = ptrace_get_task_struct(pid); |
785 | if (pid == 1) /* you may not mess with init */ | 754 | if (IS_ERR(child)) { |
755 | ret = PTR_ERR(child); | ||
786 | goto out; | 756 | goto out; |
757 | } | ||
787 | 758 | ||
788 | if (request == PTRACE_ATTACH) { | 759 | if (request == PTRACE_ATTACH) { |
789 | ret = ptrace_attach(child); | 760 | ret = ptrace_attach(child); |
diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c index f722ec8eb021..c2e4dccf0112 100644 --- a/arch/m32r/kernel/setup.c +++ b/arch/m32r/kernel/setup.c | |||
@@ -320,6 +320,9 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
320 | #elif defined(CONFIG_CHIP_MP) | 320 | #elif defined(CONFIG_CHIP_MP) |
321 | seq_printf(m, "cpu family\t: M32R-MP\n" | 321 | seq_printf(m, "cpu family\t: M32R-MP\n" |
322 | "cache size\t: I-xxKB/D-xxKB\n"); | 322 | "cache size\t: I-xxKB/D-xxKB\n"); |
323 | #elif defined(CONFIG_CHIP_M32104) | ||
324 | seq_printf(m,"cpu family\t: M32104\n" | ||
325 | "cache size\t: I-8KB/D-8KB\n"); | ||
323 | #else | 326 | #else |
324 | seq_printf(m, "cpu family\t: Unknown\n"); | 327 | seq_printf(m, "cpu family\t: Unknown\n"); |
325 | #endif | 328 | #endif |
@@ -340,6 +343,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
340 | seq_printf(m, "Machine\t\t: uServer\n"); | 343 | seq_printf(m, "Machine\t\t: uServer\n"); |
341 | #elif defined(CONFIG_PLAT_OAKS32R) | 344 | #elif defined(CONFIG_PLAT_OAKS32R) |
342 | seq_printf(m, "Machine\t\t: OAKS32R\n"); | 345 | seq_printf(m, "Machine\t\t: OAKS32R\n"); |
346 | #elif defined(CONFIG_PLAT_M32104UT) | ||
347 | seq_printf(m, "Machine\t\t: M3T-M32104UT uT Engine board\n"); | ||
343 | #else | 348 | #else |
344 | seq_printf(m, "Machine\t\t: Unknown\n"); | 349 | seq_printf(m, "Machine\t\t: Unknown\n"); |
345 | #endif | 350 | #endif |
@@ -389,7 +394,7 @@ unsigned long cpu_initialized __initdata = 0; | |||
389 | */ | 394 | */ |
390 | #if defined(CONFIG_CHIP_VDEC2) || defined(CONFIG_CHIP_XNUX2) \ | 395 | #if defined(CONFIG_CHIP_VDEC2) || defined(CONFIG_CHIP_XNUX2) \ |
391 | || defined(CONFIG_CHIP_M32700) || defined(CONFIG_CHIP_M32102) \ | 396 | || defined(CONFIG_CHIP_M32700) || defined(CONFIG_CHIP_M32102) \ |
392 | || defined(CONFIG_CHIP_OPSP) | 397 | || defined(CONFIG_CHIP_OPSP) || defined(CONFIG_CHIP_M32104) |
393 | void __init cpu_init (void) | 398 | void __init cpu_init (void) |
394 | { | 399 | { |
395 | int cpu_id = smp_processor_id(); | 400 | int cpu_id = smp_processor_id(); |
diff --git a/arch/m32r/kernel/setup_m32104ut.c b/arch/m32r/kernel/setup_m32104ut.c new file mode 100644 index 000000000000..6328e1357a80 --- /dev/null +++ b/arch/m32r/kernel/setup_m32104ut.c | |||
@@ -0,0 +1,156 @@ | |||
1 | /* | ||
2 | * linux/arch/m32r/kernel/setup_m32104ut.c | ||
3 | * | ||
4 | * Setup routines for M32104UT Board | ||
5 | * | ||
6 | * Copyright (c) 2002-2005 Hiroyuki Kondo, Hirokazu Takata, | ||
7 | * Hitoshi Yamamoto, Mamoru Sakugawa, | ||
8 | * Naoto Sugai, Hayato Fujiwara | ||
9 | */ | ||
10 | |||
11 | #include <linux/config.h> | ||
12 | #include <linux/irq.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/device.h> | ||
16 | |||
17 | #include <asm/system.h> | ||
18 | #include <asm/m32r.h> | ||
19 | #include <asm/io.h> | ||
20 | |||
21 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) | ||
22 | |||
23 | icu_data_t icu_data[NR_IRQS]; | ||
24 | |||
25 | static void disable_m32104ut_irq(unsigned int irq) | ||
26 | { | ||
27 | unsigned long port, data; | ||
28 | |||
29 | port = irq2port(irq); | ||
30 | data = icu_data[irq].icucr|M32R_ICUCR_ILEVEL7; | ||
31 | outl(data, port); | ||
32 | } | ||
33 | |||
34 | static void enable_m32104ut_irq(unsigned int irq) | ||
35 | { | ||
36 | unsigned long port, data; | ||
37 | |||
38 | port = irq2port(irq); | ||
39 | data = icu_data[irq].icucr|M32R_ICUCR_IEN|M32R_ICUCR_ILEVEL6; | ||
40 | outl(data, port); | ||
41 | } | ||
42 | |||
43 | static void mask_and_ack_m32104ut(unsigned int irq) | ||
44 | { | ||
45 | disable_m32104ut_irq(irq); | ||
46 | } | ||
47 | |||
48 | static void end_m32104ut_irq(unsigned int irq) | ||
49 | { | ||
50 | enable_m32104ut_irq(irq); | ||
51 | } | ||
52 | |||
53 | static unsigned int startup_m32104ut_irq(unsigned int irq) | ||
54 | { | ||
55 | enable_m32104ut_irq(irq); | ||
56 | return (0); | ||
57 | } | ||
58 | |||
59 | static void shutdown_m32104ut_irq(unsigned int irq) | ||
60 | { | ||
61 | unsigned long port; | ||
62 | |||
63 | port = irq2port(irq); | ||
64 | outl(M32R_ICUCR_ILEVEL7, port); | ||
65 | } | ||
66 | |||
67 | static struct hw_interrupt_type m32104ut_irq_type = | ||
68 | { | ||
69 | .typename = "M32104UT-IRQ", | ||
70 | .startup = startup_m32104ut_irq, | ||
71 | .shutdown = shutdown_m32104ut_irq, | ||
72 | .enable = enable_m32104ut_irq, | ||
73 | .disable = disable_m32104ut_irq, | ||
74 | .ack = mask_and_ack_m32104ut, | ||
75 | .end = end_m32104ut_irq | ||
76 | }; | ||
77 | |||
78 | void __init init_IRQ(void) | ||
79 | { | ||
80 | static int once = 0; | ||
81 | |||
82 | if (once) | ||
83 | return; | ||
84 | else | ||
85 | once++; | ||
86 | |||
87 | #if defined(CONFIG_SMC91X) | ||
88 | /* INT#0: LAN controller on M32104UT-LAN (SMC91C111)*/ | ||
89 | irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; | ||
90 | irq_desc[M32R_IRQ_INT0].handler = &m32104ut_irq_type; | ||
91 | irq_desc[M32R_IRQ_INT0].action = 0; | ||
92 | irq_desc[M32R_IRQ_INT0].depth = 1; | ||
93 | icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD11; /* "H" level sense */ | ||
94 | disable_m32104ut_irq(M32R_IRQ_INT0); | ||
95 | #endif /* CONFIG_SMC91X */ | ||
96 | |||
97 | /* MFT2 : system timer */ | ||
98 | irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; | ||
99 | irq_desc[M32R_IRQ_MFT2].handler = &m32104ut_irq_type; | ||
100 | irq_desc[M32R_IRQ_MFT2].action = 0; | ||
101 | irq_desc[M32R_IRQ_MFT2].depth = 1; | ||
102 | icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; | ||
103 | disable_m32104ut_irq(M32R_IRQ_MFT2); | ||
104 | |||
105 | #ifdef CONFIG_SERIAL_M32R_SIO | ||
106 | /* SIO0_R : uart receive data */ | ||
107 | irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; | ||
108 | irq_desc[M32R_IRQ_SIO0_R].handler = &m32104ut_irq_type; | ||
109 | irq_desc[M32R_IRQ_SIO0_R].action = 0; | ||
110 | irq_desc[M32R_IRQ_SIO0_R].depth = 1; | ||
111 | icu_data[M32R_IRQ_SIO0_R].icucr = M32R_ICUCR_IEN; | ||
112 | disable_m32104ut_irq(M32R_IRQ_SIO0_R); | ||
113 | |||
114 | /* SIO0_S : uart send data */ | ||
115 | irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; | ||
116 | irq_desc[M32R_IRQ_SIO0_S].handler = &m32104ut_irq_type; | ||
117 | irq_desc[M32R_IRQ_SIO0_S].action = 0; | ||
118 | irq_desc[M32R_IRQ_SIO0_S].depth = 1; | ||
119 | icu_data[M32R_IRQ_SIO0_S].icucr = M32R_ICUCR_IEN; | ||
120 | disable_m32104ut_irq(M32R_IRQ_SIO0_S); | ||
121 | #endif /* CONFIG_SERIAL_M32R_SIO */ | ||
122 | } | ||
123 | |||
124 | #if defined(CONFIG_SMC91X) | ||
125 | |||
126 | #define LAN_IOSTART 0x300 | ||
127 | #define LAN_IOEND 0x320 | ||
128 | static struct resource smc91x_resources[] = { | ||
129 | [0] = { | ||
130 | .start = (LAN_IOSTART), | ||
131 | .end = (LAN_IOEND), | ||
132 | .flags = IORESOURCE_MEM, | ||
133 | }, | ||
134 | [1] = { | ||
135 | .start = M32R_IRQ_INT0, | ||
136 | .end = M32R_IRQ_INT0, | ||
137 | .flags = IORESOURCE_IRQ, | ||
138 | } | ||
139 | }; | ||
140 | |||
141 | static struct platform_device smc91x_device = { | ||
142 | .name = "smc91x", | ||
143 | .id = 0, | ||
144 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
145 | .resource = smc91x_resources, | ||
146 | }; | ||
147 | #endif | ||
148 | |||
149 | static int __init platform_init(void) | ||
150 | { | ||
151 | #if defined(CONFIG_SMC91X) | ||
152 | platform_device_register(&smc91x_device); | ||
153 | #endif | ||
154 | return 0; | ||
155 | } | ||
156 | arch_initcall(platform_init); | ||
diff --git a/arch/m32r/kernel/setup_m32700ut.c b/arch/m32r/kernel/setup_m32700ut.c index cb76916b014d..fad1fc99bb27 100644 --- a/arch/m32r/kernel/setup_m32700ut.c +++ b/arch/m32r/kernel/setup_m32700ut.c | |||
@@ -26,15 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) | 27 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) |
28 | 28 | ||
29 | #ifndef CONFIG_SMP | ||
30 | typedef struct { | ||
31 | unsigned long icucr; /* ICU Control Register */ | ||
32 | } icu_data_t; | ||
33 | static icu_data_t icu_data[M32700UT_NUM_CPU_IRQ]; | ||
34 | #else | ||
35 | icu_data_t icu_data[M32700UT_NUM_CPU_IRQ]; | 29 | icu_data_t icu_data[M32700UT_NUM_CPU_IRQ]; |
36 | #endif /* CONFIG_SMP */ | ||
37 | |||
38 | 30 | ||
39 | static void disable_m32700ut_irq(unsigned int irq) | 31 | static void disable_m32700ut_irq(unsigned int irq) |
40 | { | 32 | { |
diff --git a/arch/m32r/kernel/setup_mappi.c b/arch/m32r/kernel/setup_mappi.c index 501d798cf050..00f253209cb3 100644 --- a/arch/m32r/kernel/setup_mappi.c +++ b/arch/m32r/kernel/setup_mappi.c | |||
@@ -19,12 +19,6 @@ | |||
19 | 19 | ||
20 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) | 20 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) |
21 | 21 | ||
22 | #ifndef CONFIG_SMP | ||
23 | typedef struct { | ||
24 | unsigned long icucr; /* ICU Control Register */ | ||
25 | } icu_data_t; | ||
26 | #endif /* CONFIG_SMP */ | ||
27 | |||
28 | icu_data_t icu_data[NR_IRQS]; | 22 | icu_data_t icu_data[NR_IRQS]; |
29 | 23 | ||
30 | static void disable_mappi_irq(unsigned int irq) | 24 | static void disable_mappi_irq(unsigned int irq) |
diff --git a/arch/m32r/kernel/setup_mappi2.c b/arch/m32r/kernel/setup_mappi2.c index 7f2db5bfd626..eebc9d8b4e72 100644 --- a/arch/m32r/kernel/setup_mappi2.c +++ b/arch/m32r/kernel/setup_mappi2.c | |||
@@ -19,12 +19,6 @@ | |||
19 | 19 | ||
20 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) | 20 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) |
21 | 21 | ||
22 | #ifndef CONFIG_SMP | ||
23 | typedef struct { | ||
24 | unsigned long icucr; /* ICU Control Register */ | ||
25 | } icu_data_t; | ||
26 | #endif /* CONFIG_SMP */ | ||
27 | |||
28 | icu_data_t icu_data[NR_IRQS]; | 22 | icu_data_t icu_data[NR_IRQS]; |
29 | 23 | ||
30 | static void disable_mappi2_irq(unsigned int irq) | 24 | static void disable_mappi2_irq(unsigned int irq) |
diff --git a/arch/m32r/kernel/setup_mappi3.c b/arch/m32r/kernel/setup_mappi3.c index f6ecdf7f555c..d2ff021e2d3d 100644 --- a/arch/m32r/kernel/setup_mappi3.c +++ b/arch/m32r/kernel/setup_mappi3.c | |||
@@ -19,12 +19,6 @@ | |||
19 | 19 | ||
20 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) | 20 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) |
21 | 21 | ||
22 | #ifndef CONFIG_SMP | ||
23 | typedef struct { | ||
24 | unsigned long icucr; /* ICU Control Register */ | ||
25 | } icu_data_t; | ||
26 | #endif /* CONFIG_SMP */ | ||
27 | |||
28 | icu_data_t icu_data[NR_IRQS]; | 22 | icu_data_t icu_data[NR_IRQS]; |
29 | 23 | ||
30 | static void disable_mappi3_irq(unsigned int irq) | 24 | static void disable_mappi3_irq(unsigned int irq) |
diff --git a/arch/m32r/kernel/setup_oaks32r.c b/arch/m32r/kernel/setup_oaks32r.c index 45add5b76f19..0e9e63538c0f 100644 --- a/arch/m32r/kernel/setup_oaks32r.c +++ b/arch/m32r/kernel/setup_oaks32r.c | |||
@@ -18,12 +18,6 @@ | |||
18 | 18 | ||
19 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) | 19 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) |
20 | 20 | ||
21 | #ifndef CONFIG_SMP | ||
22 | typedef struct { | ||
23 | unsigned long icucr; /* ICU Control Register */ | ||
24 | } icu_data_t; | ||
25 | #endif /* CONFIG_SMP */ | ||
26 | |||
27 | icu_data_t icu_data[NR_IRQS]; | 21 | icu_data_t icu_data[NR_IRQS]; |
28 | 22 | ||
29 | static void disable_oaks32r_irq(unsigned int irq) | 23 | static void disable_oaks32r_irq(unsigned int irq) |
diff --git a/arch/m32r/kernel/setup_opsput.c b/arch/m32r/kernel/setup_opsput.c index 1fbb140854e7..548e8fc7949b 100644 --- a/arch/m32r/kernel/setup_opsput.c +++ b/arch/m32r/kernel/setup_opsput.c | |||
@@ -27,15 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) | 28 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) |
29 | 29 | ||
30 | #ifndef CONFIG_SMP | ||
31 | typedef struct { | ||
32 | unsigned long icucr; /* ICU Control Register */ | ||
33 | } icu_data_t; | ||
34 | static icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ]; | ||
35 | #else | ||
36 | icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ]; | 30 | icu_data_t icu_data[OPSPUT_NUM_CPU_IRQ]; |
37 | #endif /* CONFIG_SMP */ | ||
38 | |||
39 | 31 | ||
40 | static void disable_opsput_irq(unsigned int irq) | 32 | static void disable_opsput_irq(unsigned int irq) |
41 | { | 33 | { |
diff --git a/arch/m32r/kernel/setup_usrv.c b/arch/m32r/kernel/setup_usrv.c index 634741bf9d35..64be659a23e7 100644 --- a/arch/m32r/kernel/setup_usrv.c +++ b/arch/m32r/kernel/setup_usrv.c | |||
@@ -18,12 +18,6 @@ | |||
18 | 18 | ||
19 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) | 19 | #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long))) |
20 | 20 | ||
21 | #if !defined(CONFIG_SMP) | ||
22 | typedef struct { | ||
23 | unsigned long icucr; /* ICU Control Register */ | ||
24 | } icu_data_t; | ||
25 | #endif /* CONFIG_SMP */ | ||
26 | |||
27 | icu_data_t icu_data[M32700UT_NUM_CPU_IRQ]; | 21 | icu_data_t icu_data[M32700UT_NUM_CPU_IRQ]; |
28 | 22 | ||
29 | static void disable_mappi_irq(unsigned int irq) | 23 | static void disable_mappi_irq(unsigned int irq) |
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index b90c54169fa5..d7ec16e7fb25 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c | |||
@@ -286,7 +286,7 @@ static void __init do_boot_cpu(int phys_id) | |||
286 | /* So we see what's up */ | 286 | /* So we see what's up */ |
287 | printk("Booting processor %d/%d\n", phys_id, cpu_id); | 287 | printk("Booting processor %d/%d\n", phys_id, cpu_id); |
288 | stack_start.spi = (void *)idle->thread.sp; | 288 | stack_start.spi = (void *)idle->thread.sp; |
289 | idle->thread_info->cpu = cpu_id; | 289 | task_thread_info(idle)->cpu = cpu_id; |
290 | 290 | ||
291 | /* | 291 | /* |
292 | * Send Startup IPI | 292 | * Send Startup IPI |
diff --git a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c index 2ebce2063fea..b8e68b542302 100644 --- a/arch/m32r/kernel/time.c +++ b/arch/m32r/kernel/time.c | |||
@@ -57,7 +57,7 @@ static unsigned long do_gettimeoffset(void) | |||
57 | 57 | ||
58 | #if defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_XNUX2) \ | 58 | #if defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_XNUX2) \ |
59 | || defined(CONFIG_CHIP_VDEC2) || defined(CONFIG_CHIP_M32700) \ | 59 | || defined(CONFIG_CHIP_VDEC2) || defined(CONFIG_CHIP_M32700) \ |
60 | || defined(CONFIG_CHIP_OPSP) | 60 | || defined(CONFIG_CHIP_OPSP) || defined(CONFIG_CHIP_M32104) |
61 | #ifndef CONFIG_SMP | 61 | #ifndef CONFIG_SMP |
62 | 62 | ||
63 | unsigned long count; | 63 | unsigned long count; |
@@ -268,7 +268,7 @@ void __init time_init(void) | |||
268 | 268 | ||
269 | #if defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_XNUX2) \ | 269 | #if defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_XNUX2) \ |
270 | || defined(CONFIG_CHIP_VDEC2) || defined(CONFIG_CHIP_M32700) \ | 270 | || defined(CONFIG_CHIP_VDEC2) || defined(CONFIG_CHIP_M32700) \ |
271 | || defined(CONFIG_CHIP_OPSP) | 271 | || defined(CONFIG_CHIP_OPSP) || defined(CONFIG_CHIP_M32104) |
272 | 272 | ||
273 | /* M32102 MFT setup */ | 273 | /* M32102 MFT setup */ |
274 | setup_irq(M32R_IRQ_MFT2, &irq0); | 274 | setup_irq(M32R_IRQ_MFT2, &irq0); |
diff --git a/arch/m32r/m32104ut/defconfig.m32104ut b/arch/m32r/m32104ut/defconfig.m32104ut new file mode 100644 index 000000000000..454de336803a --- /dev/null +++ b/arch/m32r/m32104ut/defconfig.m32104ut | |||
@@ -0,0 +1,657 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.14 | ||
4 | # Wed Nov 9 16:04:51 2005 | ||
5 | # | ||
6 | CONFIG_M32R=y | ||
7 | # CONFIG_UID16 is not set | ||
8 | CONFIG_GENERIC_ISA_DMA=y | ||
9 | CONFIG_GENERIC_HARDIRQS=y | ||
10 | CONFIG_GENERIC_IRQ_PROBE=y | ||
11 | |||
12 | # | ||
13 | # Code maturity level options | ||
14 | # | ||
15 | CONFIG_EXPERIMENTAL=y | ||
16 | CONFIG_CLEAN_COMPILE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | ||
18 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
19 | |||
20 | # | ||
21 | # General setup | ||
22 | # | ||
23 | CONFIG_LOCALVERSION="" | ||
24 | CONFIG_LOCALVERSION_AUTO=y | ||
25 | # CONFIG_POSIX_MQUEUE is not set | ||
26 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
27 | CONFIG_SYSCTL=y | ||
28 | # CONFIG_AUDIT is not set | ||
29 | CONFIG_HOTPLUG=y | ||
30 | # CONFIG_KOBJECT_UEVENT is not set | ||
31 | # CONFIG_IKCONFIG is not set | ||
32 | CONFIG_INITRAMFS_SOURCE="" | ||
33 | CONFIG_EMBEDDED=y | ||
34 | # CONFIG_KALLSYMS is not set | ||
35 | CONFIG_PRINTK=y | ||
36 | CONFIG_BUG=y | ||
37 | CONFIG_BASE_FULL=y | ||
38 | # CONFIG_FUTEX is not set | ||
39 | # CONFIG_EPOLL is not set | ||
40 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
41 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
42 | CONFIG_CC_ALIGN_LABELS=0 | ||
43 | CONFIG_CC_ALIGN_LOOPS=0 | ||
44 | CONFIG_CC_ALIGN_JUMPS=0 | ||
45 | CONFIG_TINY_SHMEM=y | ||
46 | CONFIG_BASE_SMALL=0 | ||
47 | |||
48 | # | ||
49 | # Loadable module support | ||
50 | # | ||
51 | # CONFIG_MODULES is not set | ||
52 | |||
53 | # | ||
54 | # Processor type and features | ||
55 | # | ||
56 | # CONFIG_PLAT_MAPPI is not set | ||
57 | # CONFIG_PLAT_USRV is not set | ||
58 | # CONFIG_PLAT_M32700UT is not set | ||
59 | # CONFIG_PLAT_OPSPUT is not set | ||
60 | # CONFIG_PLAT_OAKS32R is not set | ||
61 | # CONFIG_PLAT_MAPPI2 is not set | ||
62 | # CONFIG_PLAT_MAPPI3 is not set | ||
63 | CONFIG_PLAT_M32104UT=y | ||
64 | # CONFIG_CHIP_M32700 is not set | ||
65 | # CONFIG_CHIP_M32102 is not set | ||
66 | CONFIG_CHIP_M32104=y | ||
67 | # CONFIG_CHIP_VDEC2 is not set | ||
68 | # CONFIG_CHIP_OPSP is not set | ||
69 | CONFIG_ISA_M32R=y | ||
70 | CONFIG_BUS_CLOCK=54000000 | ||
71 | CONFIG_TIMER_DIVIDE=128 | ||
72 | # CONFIG_CPU_LITTLE_ENDIAN is not set | ||
73 | CONFIG_MEMORY_START=04000000 | ||
74 | CONFIG_MEMORY_SIZE=01000000 | ||
75 | CONFIG_NOHIGHMEM=y | ||
76 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
77 | CONFIG_SELECT_MEMORY_MODEL=y | ||
78 | CONFIG_FLATMEM_MANUAL=y | ||
79 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
80 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
81 | CONFIG_FLATMEM=y | ||
82 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
83 | # CONFIG_SPARSEMEM_STATIC is not set | ||
84 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
85 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | ||
86 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
87 | # CONFIG_PREEMPT is not set | ||
88 | # CONFIG_SMP is not set | ||
89 | |||
90 | # | ||
91 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | ||
92 | # | ||
93 | # CONFIG_ISA is not set | ||
94 | |||
95 | # | ||
96 | # PCCARD (PCMCIA/CardBus) support | ||
97 | # | ||
98 | CONFIG_PCCARD=y | ||
99 | # CONFIG_PCMCIA_DEBUG is not set | ||
100 | CONFIG_PCMCIA=y | ||
101 | CONFIG_PCMCIA_LOAD_CIS=y | ||
102 | CONFIG_PCMCIA_IOCTL=y | ||
103 | |||
104 | # | ||
105 | # PC-card bridges | ||
106 | # | ||
107 | |||
108 | # | ||
109 | # PCI Hotplug Support | ||
110 | # | ||
111 | |||
112 | # | ||
113 | # Executable file formats | ||
114 | # | ||
115 | CONFIG_BINFMT_FLAT=y | ||
116 | # CONFIG_BINFMT_ZFLAT is not set | ||
117 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
118 | # CONFIG_BINFMT_MISC is not set | ||
119 | |||
120 | # | ||
121 | # Networking | ||
122 | # | ||
123 | CONFIG_NET=y | ||
124 | |||
125 | # | ||
126 | # Networking options | ||
127 | # | ||
128 | # CONFIG_PACKET is not set | ||
129 | CONFIG_UNIX=y | ||
130 | # CONFIG_NET_KEY is not set | ||
131 | CONFIG_INET=y | ||
132 | # CONFIG_IP_MULTICAST is not set | ||
133 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
134 | CONFIG_IP_FIB_HASH=y | ||
135 | CONFIG_IP_PNP=y | ||
136 | CONFIG_IP_PNP_DHCP=y | ||
137 | # CONFIG_IP_PNP_BOOTP is not set | ||
138 | # CONFIG_IP_PNP_RARP is not set | ||
139 | # CONFIG_NET_IPIP is not set | ||
140 | # CONFIG_NET_IPGRE is not set | ||
141 | # CONFIG_ARPD is not set | ||
142 | # CONFIG_SYN_COOKIES is not set | ||
143 | # CONFIG_INET_AH is not set | ||
144 | # CONFIG_INET_ESP is not set | ||
145 | # CONFIG_INET_IPCOMP is not set | ||
146 | # CONFIG_INET_TUNNEL is not set | ||
147 | CONFIG_INET_DIAG=y | ||
148 | CONFIG_INET_TCP_DIAG=y | ||
149 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
150 | CONFIG_TCP_CONG_BIC=y | ||
151 | # CONFIG_IPV6 is not set | ||
152 | # CONFIG_NETFILTER is not set | ||
153 | |||
154 | # | ||
155 | # DCCP Configuration (EXPERIMENTAL) | ||
156 | # | ||
157 | # CONFIG_IP_DCCP is not set | ||
158 | |||
159 | # | ||
160 | # SCTP Configuration (EXPERIMENTAL) | ||
161 | # | ||
162 | # CONFIG_IP_SCTP is not set | ||
163 | # CONFIG_ATM is not set | ||
164 | # CONFIG_BRIDGE is not set | ||
165 | # CONFIG_VLAN_8021Q is not set | ||
166 | # CONFIG_DECNET is not set | ||
167 | # CONFIG_LLC2 is not set | ||
168 | # CONFIG_IPX is not set | ||
169 | # CONFIG_ATALK is not set | ||
170 | # CONFIG_X25 is not set | ||
171 | # CONFIG_LAPB is not set | ||
172 | # CONFIG_NET_DIVERT is not set | ||
173 | # CONFIG_ECONET is not set | ||
174 | # CONFIG_WAN_ROUTER is not set | ||
175 | # CONFIG_NET_SCHED is not set | ||
176 | # CONFIG_NET_CLS_ROUTE is not set | ||
177 | |||
178 | # | ||
179 | # Network testing | ||
180 | # | ||
181 | # CONFIG_NET_PKTGEN is not set | ||
182 | # CONFIG_HAMRADIO is not set | ||
183 | # CONFIG_IRDA is not set | ||
184 | # CONFIG_BT is not set | ||
185 | # CONFIG_IEEE80211 is not set | ||
186 | |||
187 | # | ||
188 | # Device Drivers | ||
189 | # | ||
190 | |||
191 | # | ||
192 | # Generic Driver Options | ||
193 | # | ||
194 | CONFIG_STANDALONE=y | ||
195 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
196 | CONFIG_FW_LOADER=y | ||
197 | # CONFIG_DEBUG_DRIVER is not set | ||
198 | |||
199 | # | ||
200 | # Connector - unified userspace <-> kernelspace linker | ||
201 | # | ||
202 | # CONFIG_CONNECTOR is not set | ||
203 | |||
204 | # | ||
205 | # Memory Technology Devices (MTD) | ||
206 | # | ||
207 | # CONFIG_MTD is not set | ||
208 | |||
209 | # | ||
210 | # Parallel port support | ||
211 | # | ||
212 | # CONFIG_PARPORT is not set | ||
213 | |||
214 | # | ||
215 | # Plug and Play support | ||
216 | # | ||
217 | |||
218 | # | ||
219 | # Block devices | ||
220 | # | ||
221 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
222 | CONFIG_BLK_DEV_LOOP=y | ||
223 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
224 | CONFIG_BLK_DEV_NBD=y | ||
225 | CONFIG_BLK_DEV_RAM=y | ||
226 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
227 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
228 | CONFIG_BLK_DEV_INITRD=y | ||
229 | # CONFIG_CDROM_PKTCDVD is not set | ||
230 | |||
231 | # | ||
232 | # IO Schedulers | ||
233 | # | ||
234 | CONFIG_IOSCHED_NOOP=y | ||
235 | # CONFIG_IOSCHED_AS is not set | ||
236 | # CONFIG_IOSCHED_DEADLINE is not set | ||
237 | # CONFIG_IOSCHED_CFQ is not set | ||
238 | # CONFIG_ATA_OVER_ETH is not set | ||
239 | |||
240 | # | ||
241 | # ATA/ATAPI/MFM/RLL support | ||
242 | # | ||
243 | # CONFIG_IDE is not set | ||
244 | |||
245 | # | ||
246 | # SCSI device support | ||
247 | # | ||
248 | # CONFIG_RAID_ATTRS is not set | ||
249 | # CONFIG_SCSI is not set | ||
250 | |||
251 | # | ||
252 | # Multi-device support (RAID and LVM) | ||
253 | # | ||
254 | # CONFIG_MD is not set | ||
255 | |||
256 | # | ||
257 | # Fusion MPT device support | ||
258 | # | ||
259 | # CONFIG_FUSION is not set | ||
260 | |||
261 | # | ||
262 | # IEEE 1394 (FireWire) support | ||
263 | # | ||
264 | |||
265 | # | ||
266 | # I2O device support | ||
267 | # | ||
268 | |||
269 | # | ||
270 | # Network device support | ||
271 | # | ||
272 | CONFIG_NETDEVICES=y | ||
273 | CONFIG_DUMMY=y | ||
274 | # CONFIG_BONDING is not set | ||
275 | # CONFIG_EQUALIZER is not set | ||
276 | # CONFIG_TUN is not set | ||
277 | |||
278 | # | ||
279 | # PHY device support | ||
280 | # | ||
281 | # CONFIG_PHYLIB is not set | ||
282 | |||
283 | # | ||
284 | # Ethernet (10 or 100Mbit) | ||
285 | # | ||
286 | CONFIG_NET_ETHERNET=y | ||
287 | CONFIG_MII=y | ||
288 | CONFIG_SMC91X=y | ||
289 | # CONFIG_NE2000 is not set | ||
290 | |||
291 | # | ||
292 | # Ethernet (1000 Mbit) | ||
293 | # | ||
294 | |||
295 | # | ||
296 | # Ethernet (10000 Mbit) | ||
297 | # | ||
298 | |||
299 | # | ||
300 | # Token Ring devices | ||
301 | # | ||
302 | |||
303 | # | ||
304 | # Wireless LAN (non-hamradio) | ||
305 | # | ||
306 | # CONFIG_NET_RADIO is not set | ||
307 | |||
308 | # | ||
309 | # PCMCIA network device support | ||
310 | # | ||
311 | # CONFIG_NET_PCMCIA is not set | ||
312 | |||
313 | # | ||
314 | # Wan interfaces | ||
315 | # | ||
316 | # CONFIG_WAN is not set | ||
317 | # CONFIG_PPP is not set | ||
318 | # CONFIG_SLIP is not set | ||
319 | # CONFIG_SHAPER is not set | ||
320 | # CONFIG_NETCONSOLE is not set | ||
321 | # CONFIG_NETPOLL is not set | ||
322 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
323 | |||
324 | # | ||
325 | # ISDN subsystem | ||
326 | # | ||
327 | # CONFIG_ISDN is not set | ||
328 | |||
329 | # | ||
330 | # Telephony Support | ||
331 | # | ||
332 | # CONFIG_PHONE is not set | ||
333 | |||
334 | # | ||
335 | # Input device support | ||
336 | # | ||
337 | # CONFIG_INPUT is not set | ||
338 | |||
339 | # | ||
340 | # Hardware I/O ports | ||
341 | # | ||
342 | # CONFIG_SERIO is not set | ||
343 | # CONFIG_GAMEPORT is not set | ||
344 | |||
345 | # | ||
346 | # Character devices | ||
347 | # | ||
348 | # CONFIG_VT is not set | ||
349 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
350 | |||
351 | # | ||
352 | # Serial drivers | ||
353 | # | ||
354 | # CONFIG_SERIAL_8250 is not set | ||
355 | |||
356 | # | ||
357 | # Non-8250 serial port support | ||
358 | # | ||
359 | CONFIG_SERIAL_CORE=y | ||
360 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
361 | CONFIG_SERIAL_M32R_SIO=y | ||
362 | CONFIG_SERIAL_M32R_SIO_CONSOLE=y | ||
363 | CONFIG_UNIX98_PTYS=y | ||
364 | CONFIG_LEGACY_PTYS=y | ||
365 | CONFIG_LEGACY_PTY_COUNT=256 | ||
366 | |||
367 | # | ||
368 | # IPMI | ||
369 | # | ||
370 | # CONFIG_IPMI_HANDLER is not set | ||
371 | |||
372 | # | ||
373 | # Watchdog Cards | ||
374 | # | ||
375 | CONFIG_WATCHDOG=y | ||
376 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
377 | |||
378 | # | ||
379 | # Watchdog Device Drivers | ||
380 | # | ||
381 | CONFIG_SOFT_WATCHDOG=y | ||
382 | # CONFIG_RTC is not set | ||
383 | # CONFIG_DTLK is not set | ||
384 | # CONFIG_R3964 is not set | ||
385 | |||
386 | # | ||
387 | # Ftape, the floppy tape device driver | ||
388 | # | ||
389 | |||
390 | # | ||
391 | # PCMCIA character devices | ||
392 | # | ||
393 | # CONFIG_SYNCLINK_CS is not set | ||
394 | # CONFIG_RAW_DRIVER is not set | ||
395 | |||
396 | # | ||
397 | # TPM devices | ||
398 | # | ||
399 | |||
400 | # | ||
401 | # I2C support | ||
402 | # | ||
403 | # CONFIG_I2C is not set | ||
404 | |||
405 | # | ||
406 | # Dallas's 1-wire bus | ||
407 | # | ||
408 | # CONFIG_W1 is not set | ||
409 | |||
410 | # | ||
411 | # Hardware Monitoring support | ||
412 | # | ||
413 | # CONFIG_HWMON is not set | ||
414 | # CONFIG_HWMON_VID is not set | ||
415 | |||
416 | # | ||
417 | # Misc devices | ||
418 | # | ||
419 | |||
420 | # | ||
421 | # Multimedia Capabilities Port drivers | ||
422 | # | ||
423 | |||
424 | # | ||
425 | # Multimedia devices | ||
426 | # | ||
427 | # CONFIG_VIDEO_DEV is not set | ||
428 | |||
429 | # | ||
430 | # Digital Video Broadcasting Devices | ||
431 | # | ||
432 | # CONFIG_DVB is not set | ||
433 | |||
434 | # | ||
435 | # Graphics support | ||
436 | # | ||
437 | # CONFIG_FB is not set | ||
438 | |||
439 | # | ||
440 | # Sound | ||
441 | # | ||
442 | # CONFIG_SOUND is not set | ||
443 | |||
444 | # | ||
445 | # USB support | ||
446 | # | ||
447 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
448 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
449 | |||
450 | # | ||
451 | # USB Gadget Support | ||
452 | # | ||
453 | # CONFIG_USB_GADGET is not set | ||
454 | |||
455 | # | ||
456 | # MMC/SD Card support | ||
457 | # | ||
458 | # CONFIG_MMC is not set | ||
459 | |||
460 | # | ||
461 | # InfiniBand support | ||
462 | # | ||
463 | |||
464 | # | ||
465 | # SN Devices | ||
466 | # | ||
467 | |||
468 | # | ||
469 | # File systems | ||
470 | # | ||
471 | CONFIG_EXT2_FS=y | ||
472 | # CONFIG_EXT2_FS_XATTR is not set | ||
473 | # CONFIG_EXT2_FS_XIP is not set | ||
474 | CONFIG_EXT3_FS=y | ||
475 | CONFIG_EXT3_FS_XATTR=y | ||
476 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
477 | # CONFIG_EXT3_FS_SECURITY is not set | ||
478 | CONFIG_JBD=y | ||
479 | # CONFIG_JBD_DEBUG is not set | ||
480 | CONFIG_FS_MBCACHE=y | ||
481 | # CONFIG_REISERFS_FS is not set | ||
482 | # CONFIG_JFS_FS is not set | ||
483 | CONFIG_FS_POSIX_ACL=y | ||
484 | # CONFIG_XFS_FS is not set | ||
485 | # CONFIG_MINIX_FS is not set | ||
486 | # CONFIG_ROMFS_FS is not set | ||
487 | # CONFIG_INOTIFY is not set | ||
488 | # CONFIG_QUOTA is not set | ||
489 | CONFIG_DNOTIFY=y | ||
490 | # CONFIG_AUTOFS_FS is not set | ||
491 | # CONFIG_AUTOFS4_FS is not set | ||
492 | # CONFIG_FUSE_FS is not set | ||
493 | |||
494 | # | ||
495 | # CD-ROM/DVD Filesystems | ||
496 | # | ||
497 | # CONFIG_ISO9660_FS is not set | ||
498 | # CONFIG_UDF_FS is not set | ||
499 | |||
500 | # | ||
501 | # DOS/FAT/NT Filesystems | ||
502 | # | ||
503 | CONFIG_FAT_FS=y | ||
504 | CONFIG_MSDOS_FS=y | ||
505 | CONFIG_VFAT_FS=y | ||
506 | CONFIG_FAT_DEFAULT_CODEPAGE=932 | ||
507 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
508 | # CONFIG_NTFS_FS is not set | ||
509 | |||
510 | # | ||
511 | # Pseudo filesystems | ||
512 | # | ||
513 | CONFIG_PROC_FS=y | ||
514 | CONFIG_SYSFS=y | ||
515 | CONFIG_TMPFS=y | ||
516 | # CONFIG_HUGETLB_PAGE is not set | ||
517 | CONFIG_RAMFS=y | ||
518 | # CONFIG_RELAYFS_FS is not set | ||
519 | |||
520 | # | ||
521 | # Miscellaneous filesystems | ||
522 | # | ||
523 | # CONFIG_ADFS_FS is not set | ||
524 | # CONFIG_AFFS_FS is not set | ||
525 | # CONFIG_HFS_FS is not set | ||
526 | # CONFIG_HFSPLUS_FS is not set | ||
527 | # CONFIG_BEFS_FS is not set | ||
528 | # CONFIG_BFS_FS is not set | ||
529 | # CONFIG_EFS_FS is not set | ||
530 | CONFIG_CRAMFS=y | ||
531 | # CONFIG_VXFS_FS is not set | ||
532 | # CONFIG_HPFS_FS is not set | ||
533 | # CONFIG_QNX4FS_FS is not set | ||
534 | # CONFIG_SYSV_FS is not set | ||
535 | # CONFIG_UFS_FS is not set | ||
536 | |||
537 | # | ||
538 | # Network File Systems | ||
539 | # | ||
540 | CONFIG_NFS_FS=y | ||
541 | CONFIG_NFS_V3=y | ||
542 | # CONFIG_NFS_V3_ACL is not set | ||
543 | # CONFIG_NFS_V4 is not set | ||
544 | # CONFIG_NFS_DIRECTIO is not set | ||
545 | # CONFIG_NFSD is not set | ||
546 | CONFIG_ROOT_NFS=y | ||
547 | CONFIG_LOCKD=y | ||
548 | CONFIG_LOCKD_V4=y | ||
549 | CONFIG_NFS_COMMON=y | ||
550 | CONFIG_SUNRPC=y | ||
551 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
552 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
553 | # CONFIG_SMB_FS is not set | ||
554 | # CONFIG_CIFS is not set | ||
555 | # CONFIG_NCP_FS is not set | ||
556 | # CONFIG_CODA_FS is not set | ||
557 | # CONFIG_AFS_FS is not set | ||
558 | # CONFIG_9P_FS is not set | ||
559 | |||
560 | # | ||
561 | # Partition Types | ||
562 | # | ||
563 | # CONFIG_PARTITION_ADVANCED is not set | ||
564 | CONFIG_MSDOS_PARTITION=y | ||
565 | |||
566 | # | ||
567 | # Native Language Support | ||
568 | # | ||
569 | CONFIG_NLS=y | ||
570 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
571 | CONFIG_NLS_CODEPAGE_437=y | ||
572 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
573 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
574 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
575 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
576 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
577 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
578 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
579 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
580 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
581 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
582 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
583 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
584 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
585 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
586 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
587 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
588 | CONFIG_NLS_CODEPAGE_932=y | ||
589 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
590 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
591 | # CONFIG_NLS_ISO8859_8 is not set | ||
592 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
593 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
594 | # CONFIG_NLS_ASCII is not set | ||
595 | # CONFIG_NLS_ISO8859_1 is not set | ||
596 | # CONFIG_NLS_ISO8859_2 is not set | ||
597 | # CONFIG_NLS_ISO8859_3 is not set | ||
598 | # CONFIG_NLS_ISO8859_4 is not set | ||
599 | # CONFIG_NLS_ISO8859_5 is not set | ||
600 | # CONFIG_NLS_ISO8859_6 is not set | ||
601 | # CONFIG_NLS_ISO8859_7 is not set | ||
602 | # CONFIG_NLS_ISO8859_9 is not set | ||
603 | # CONFIG_NLS_ISO8859_13 is not set | ||
604 | # CONFIG_NLS_ISO8859_14 is not set | ||
605 | # CONFIG_NLS_ISO8859_15 is not set | ||
606 | # CONFIG_NLS_KOI8_R is not set | ||
607 | # CONFIG_NLS_KOI8_U is not set | ||
608 | CONFIG_NLS_UTF8=y | ||
609 | |||
610 | # | ||
611 | # Profiling support | ||
612 | # | ||
613 | # CONFIG_PROFILING is not set | ||
614 | |||
615 | # | ||
616 | # Kernel hacking | ||
617 | # | ||
618 | # CONFIG_PRINTK_TIME is not set | ||
619 | CONFIG_DEBUG_KERNEL=y | ||
620 | CONFIG_MAGIC_SYSRQ=y | ||
621 | CONFIG_LOG_BUF_SHIFT=14 | ||
622 | CONFIG_DETECT_SOFTLOCKUP=y | ||
623 | # CONFIG_SCHEDSTATS is not set | ||
624 | # CONFIG_DEBUG_SLAB is not set | ||
625 | # CONFIG_DEBUG_SPINLOCK is not set | ||
626 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
627 | # CONFIG_DEBUG_KOBJECT is not set | ||
628 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
629 | CONFIG_DEBUG_INFO=y | ||
630 | # CONFIG_DEBUG_FS is not set | ||
631 | # CONFIG_FRAME_POINTER is not set | ||
632 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
633 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
634 | |||
635 | # | ||
636 | # Security options | ||
637 | # | ||
638 | # CONFIG_KEYS is not set | ||
639 | # CONFIG_SECURITY is not set | ||
640 | |||
641 | # | ||
642 | # Cryptographic options | ||
643 | # | ||
644 | # CONFIG_CRYPTO is not set | ||
645 | |||
646 | # | ||
647 | # Hardware crypto devices | ||
648 | # | ||
649 | |||
650 | # | ||
651 | # Library routines | ||
652 | # | ||
653 | # CONFIG_CRC_CCITT is not set | ||
654 | # CONFIG_CRC16 is not set | ||
655 | CONFIG_CRC32=y | ||
656 | CONFIG_LIBCRC32C=y | ||
657 | CONFIG_ZLIB_INFLATE=y | ||
diff --git a/arch/m32r/mm/cache.c b/arch/m32r/mm/cache.c index 31b0789c1992..9f54dd937013 100644 --- a/arch/m32r/mm/cache.c +++ b/arch/m32r/mm/cache.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/m32r/mm/cache.c | 2 | * linux/arch/m32r/mm/cache.c |
3 | * | 3 | * |
4 | * Copyright (C) 2002 Hirokazu Takata | 4 | * Copyright (C) 2002-2005 Hirokazu Takata, Hayato Fujiwara |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <linux/config.h> | 7 | #include <linux/config.h> |
@@ -9,7 +9,8 @@ | |||
9 | 9 | ||
10 | #undef MCCR | 10 | #undef MCCR |
11 | 11 | ||
12 | #if defined(CONFIG_CHIP_XNUX2) || defined(CONFIG_CHIP_M32700) || defined(CONFIG_CHIP_VDEC2) || defined(CONFIG_CHIP_OPSP) | 12 | #if defined(CONFIG_CHIP_XNUX2) || defined(CONFIG_CHIP_M32700) \ |
13 | || defined(CONFIG_CHIP_VDEC2) || defined(CONFIG_CHIP_OPSP) | ||
13 | /* Cache Control Register */ | 14 | /* Cache Control Register */ |
14 | #define MCCR ((volatile unsigned long*)0xfffffffc) | 15 | #define MCCR ((volatile unsigned long*)0xfffffffc) |
15 | #define MCCR_CC (1UL << 7) /* Cache mode modify bit */ | 16 | #define MCCR_CC (1UL << 7) /* Cache mode modify bit */ |
@@ -26,7 +27,17 @@ | |||
26 | #define MCCR ((volatile unsigned char*)0xfffffffe) | 27 | #define MCCR ((volatile unsigned char*)0xfffffffe) |
27 | #define MCCR_IIV (1UL << 0) /* I-cache invalidate */ | 28 | #define MCCR_IIV (1UL << 0) /* I-cache invalidate */ |
28 | #define MCCR_ICACHE_INV MCCR_IIV | 29 | #define MCCR_ICACHE_INV MCCR_IIV |
29 | #endif /* CONFIG_CHIP_XNUX2 || CONFIG_CHIP_M32700 */ | 30 | #elif defined(CONFIG_CHIP_M32104) |
31 | #define MCCR ((volatile unsigned short*)0xfffffffe) | ||
32 | #define MCCR_IIV (1UL << 8) /* I-cache invalidate */ | ||
33 | #define MCCR_DIV (1UL << 9) /* D-cache invalidate */ | ||
34 | #define MCCR_DCB (1UL << 10) /* D-cache copy back */ | ||
35 | #define MCCR_ICM (1UL << 0) /* I-cache mode [0:off,1:on] */ | ||
36 | #define MCCR_DCM (1UL << 1) /* D-cache mode [0:off,1:on] */ | ||
37 | #define MCCR_ICACHE_INV MCCR_IIV | ||
38 | #define MCCR_DCACHE_CB MCCR_DCB | ||
39 | #define MCCR_DCACHE_CBINV (MCCR_DIV|MCCR_DCB) | ||
40 | #endif | ||
30 | 41 | ||
31 | #ifndef MCCR | 42 | #ifndef MCCR |
32 | #error Unknown cache type. | 43 | #error Unknown cache type. |
@@ -37,29 +48,42 @@ | |||
37 | void _flush_cache_all(void) | 48 | void _flush_cache_all(void) |
38 | { | 49 | { |
39 | #if defined(CONFIG_CHIP_M32102) | 50 | #if defined(CONFIG_CHIP_M32102) |
51 | unsigned char mccr; | ||
40 | *MCCR = MCCR_ICACHE_INV; | 52 | *MCCR = MCCR_ICACHE_INV; |
53 | #elif defined(CONFIG_CHIP_M32104) | ||
54 | unsigned short mccr; | ||
55 | |||
56 | /* Copyback and invalidate D-cache */ | ||
57 | /* Invalidate I-cache */ | ||
58 | *MCCR |= (MCCR_ICACHE_INV | MCCR_DCACHE_CBINV); | ||
41 | #else | 59 | #else |
42 | unsigned long mccr; | 60 | unsigned long mccr; |
43 | 61 | ||
44 | /* Copyback and invalidate D-cache */ | 62 | /* Copyback and invalidate D-cache */ |
45 | /* Invalidate I-cache */ | 63 | /* Invalidate I-cache */ |
46 | *MCCR = MCCR_ICACHE_INV | MCCR_DCACHE_CBINV; | 64 | *MCCR = MCCR_ICACHE_INV | MCCR_DCACHE_CBINV; |
47 | while ((mccr = *MCCR) & MCCR_IIV); /* loop while invalidating... */ | ||
48 | #endif | 65 | #endif |
66 | while ((mccr = *MCCR) & MCCR_IIV); /* loop while invalidating... */ | ||
49 | } | 67 | } |
50 | 68 | ||
51 | /* Copy back D-cache and invalidate I-cache all */ | 69 | /* Copy back D-cache and invalidate I-cache all */ |
52 | void _flush_cache_copyback_all(void) | 70 | void _flush_cache_copyback_all(void) |
53 | { | 71 | { |
54 | #if defined(CONFIG_CHIP_M32102) | 72 | #if defined(CONFIG_CHIP_M32102) |
73 | unsigned char mccr; | ||
55 | *MCCR = MCCR_ICACHE_INV; | 74 | *MCCR = MCCR_ICACHE_INV; |
75 | #elif defined(CONFIG_CHIP_M32104) | ||
76 | unsigned short mccr; | ||
77 | |||
78 | /* Copyback and invalidate D-cache */ | ||
79 | /* Invalidate I-cache */ | ||
80 | *MCCR |= (MCCR_ICACHE_INV | MCCR_DCACHE_CB); | ||
56 | #else | 81 | #else |
57 | unsigned long mccr; | 82 | unsigned long mccr; |
58 | 83 | ||
59 | /* Copyback D-cache */ | 84 | /* Copyback D-cache */ |
60 | /* Invalidate I-cache */ | 85 | /* Invalidate I-cache */ |
61 | *MCCR = MCCR_ICACHE_INV | MCCR_DCACHE_CB; | 86 | *MCCR = MCCR_ICACHE_INV | MCCR_DCACHE_CB; |
62 | while ((mccr = *MCCR) & MCCR_IIV); /* loop while invalidating... */ | ||
63 | |||
64 | #endif | 87 | #endif |
88 | while ((mccr = *MCCR) & MCCR_IIV); /* loop while invalidating... */ | ||
65 | } | 89 | } |