diff options
Diffstat (limited to 'arch/arm')
176 files changed, 7343 insertions, 1266 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 8e6672acb9c9..b0c3c0d89e05 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -18,6 +18,8 @@ config ARM | |||
18 | select HAVE_KRETPROBES if (HAVE_KPROBES) | 18 | select HAVE_KRETPROBES if (HAVE_KPROBES) |
19 | select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) | 19 | select HAVE_FUNCTION_TRACER if (!XIP_KERNEL) |
20 | select HAVE_GENERIC_DMA_COHERENT | 20 | select HAVE_GENERIC_DMA_COHERENT |
21 | select HAVE_KERNEL_GZIP | ||
22 | select HAVE_KERNEL_LZO | ||
21 | help | 23 | help |
22 | The ARM series is a line of low-power-consumption RISC chip designs | 24 | The ARM series is a line of low-power-consumption RISC chip designs |
23 | licensed by ARM Ltd and targeted at embedded applications and | 25 | licensed by ARM Ltd and targeted at embedded applications and |
@@ -697,6 +699,7 @@ config ARCH_DAVINCI | |||
697 | select HAVE_IDE | 699 | select HAVE_IDE |
698 | select COMMON_CLKDEV | 700 | select COMMON_CLKDEV |
699 | select GENERIC_ALLOCATOR | 701 | select GENERIC_ALLOCATOR |
702 | select ARCH_HAS_HOLES_MEMORYMODEL | ||
700 | help | 703 | help |
701 | Support for TI's DaVinci platform. | 704 | Support for TI's DaVinci platform. |
702 | 705 | ||
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index ce39dc540085..2d4d88ba73bf 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -63,8 +63,12 @@ endif | |||
63 | 63 | ||
64 | SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ | 64 | SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ |
65 | 65 | ||
66 | targets := vmlinux vmlinux.lds piggy.gz piggy.o font.o font.c \ | 66 | suffix_$(CONFIG_KERNEL_GZIP) = gzip |
67 | head.o misc.o $(OBJS) | 67 | suffix_$(CONFIG_KERNEL_LZO) = lzo |
68 | |||
69 | targets := vmlinux vmlinux.lds \ | ||
70 | piggy.$(suffix_y) piggy.$(suffix_y).o \ | ||
71 | font.o font.c head.o misc.o $(OBJS) | ||
68 | 72 | ||
69 | ifeq ($(CONFIG_FUNCTION_TRACER),y) | 73 | ifeq ($(CONFIG_FUNCTION_TRACER),y) |
70 | ORIG_CFLAGS := $(KBUILD_CFLAGS) | 74 | ORIG_CFLAGS := $(KBUILD_CFLAGS) |
@@ -87,22 +91,34 @@ endif | |||
87 | ifneq ($(PARAMS_PHYS),) | 91 | ifneq ($(PARAMS_PHYS),) |
88 | LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) | 92 | LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) |
89 | endif | 93 | endif |
90 | LDFLAGS_vmlinux += -p --no-undefined -X \ | 94 | # ? |
91 | $(shell $(CC) $(KBUILD_CFLAGS) --print-libgcc-file-name) -T | 95 | LDFLAGS_vmlinux += -p |
96 | # Report unresolved symbol references | ||
97 | LDFLAGS_vmlinux += --no-undefined | ||
98 | # Delete all temporary local symbols | ||
99 | LDFLAGS_vmlinux += -X | ||
100 | # Next argument is a linker script | ||
101 | LDFLAGS_vmlinux += -T | ||
102 | |||
103 | # For __aeabi_uidivmod | ||
104 | lib1funcs = $(obj)/lib1funcs.o | ||
105 | |||
106 | $(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S FORCE | ||
107 | $(call cmd,shipped) | ||
92 | 108 | ||
93 | # Don't allow any static data in misc.o, which | 109 | # Don't allow any static data in misc.o, which |
94 | # would otherwise mess up our GOT table | 110 | # would otherwise mess up our GOT table |
95 | CFLAGS_misc.o := -Dstatic= | 111 | CFLAGS_misc.o := -Dstatic= |
96 | 112 | ||
97 | $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \ | 113 | $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \ |
98 | $(addprefix $(obj)/, $(OBJS)) FORCE | 114 | $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) FORCE |
99 | $(call if_changed,ld) | 115 | $(call if_changed,ld) |
100 | @: | 116 | @: |
101 | 117 | ||
102 | $(obj)/piggy.gz: $(obj)/../Image FORCE | 118 | $(obj)/piggy.$(suffix_y): $(obj)/../Image FORCE |
103 | $(call if_changed,gzip) | 119 | $(call if_changed,$(suffix_y)) |
104 | 120 | ||
105 | $(obj)/piggy.o: $(obj)/piggy.gz FORCE | 121 | $(obj)/piggy.$(suffix_y).o: $(obj)/piggy.$(suffix_y) FORCE |
106 | 122 | ||
107 | CFLAGS_font.o := -Dstatic= | 123 | CFLAGS_font.o := -Dstatic= |
108 | 124 | ||
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 17153b54613b..7e0fe4d42c7b 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
@@ -18,10 +18,15 @@ | |||
18 | 18 | ||
19 | unsigned int __machine_arch_type; | 19 | unsigned int __machine_arch_type; |
20 | 20 | ||
21 | #define _LINUX_STRING_H_ | ||
22 | |||
21 | #include <linux/compiler.h> /* for inline */ | 23 | #include <linux/compiler.h> /* for inline */ |
22 | #include <linux/types.h> /* for size_t */ | 24 | #include <linux/types.h> /* for size_t */ |
23 | #include <linux/stddef.h> /* for NULL */ | 25 | #include <linux/stddef.h> /* for NULL */ |
24 | #include <asm/string.h> | 26 | #include <asm/string.h> |
27 | #include <linux/linkage.h> | ||
28 | |||
29 | #include <asm/unaligned.h> | ||
25 | 30 | ||
26 | #ifdef STANDALONE_DEBUG | 31 | #ifdef STANDALONE_DEBUG |
27 | #define putstr printf | 32 | #define putstr printf |
@@ -188,34 +193,8 @@ static inline __ptr_t memcpy(__ptr_t __dest, __const __ptr_t __src, | |||
188 | /* | 193 | /* |
189 | * gzip delarations | 194 | * gzip delarations |
190 | */ | 195 | */ |
191 | #define OF(args) args | ||
192 | #define STATIC static | 196 | #define STATIC static |
193 | 197 | ||
194 | typedef unsigned char uch; | ||
195 | typedef unsigned short ush; | ||
196 | typedef unsigned long ulg; | ||
197 | |||
198 | #define WSIZE 0x8000 /* Window size must be at least 32k, */ | ||
199 | /* and a power of two */ | ||
200 | |||
201 | static uch *inbuf; /* input buffer */ | ||
202 | static uch window[WSIZE]; /* Sliding window buffer */ | ||
203 | |||
204 | static unsigned insize; /* valid bytes in inbuf */ | ||
205 | static unsigned inptr; /* index of next byte to be processed in inbuf */ | ||
206 | static unsigned outcnt; /* bytes in output buffer */ | ||
207 | |||
208 | /* gzip flag byte */ | ||
209 | #define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ | ||
210 | #define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */ | ||
211 | #define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ | ||
212 | #define ORIG_NAME 0x08 /* bit 3 set: original file name present */ | ||
213 | #define COMMENT 0x10 /* bit 4 set: file comment present */ | ||
214 | #define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */ | ||
215 | #define RESERVED 0xC0 /* bit 6,7: reserved */ | ||
216 | |||
217 | #define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf()) | ||
218 | |||
219 | /* Diagnostic functions */ | 198 | /* Diagnostic functions */ |
220 | #ifdef DEBUG | 199 | #ifdef DEBUG |
221 | # define Assert(cond,msg) {if(!(cond)) error(msg);} | 200 | # define Assert(cond,msg) {if(!(cond)) error(msg);} |
@@ -233,24 +212,20 @@ static unsigned outcnt; /* bytes in output buffer */ | |||
233 | # define Tracecv(c,x) | 212 | # define Tracecv(c,x) |
234 | #endif | 213 | #endif |
235 | 214 | ||
236 | static int fill_inbuf(void); | ||
237 | static void flush_window(void); | ||
238 | static void error(char *m); | 215 | static void error(char *m); |
239 | 216 | ||
240 | extern char input_data[]; | 217 | extern char input_data[]; |
241 | extern char input_data_end[]; | 218 | extern char input_data_end[]; |
242 | 219 | ||
243 | static uch *output_data; | 220 | static unsigned char *output_data; |
244 | static ulg output_ptr; | 221 | static unsigned long output_ptr; |
245 | static ulg bytes_out; | ||
246 | 222 | ||
247 | static void error(char *m); | 223 | static void error(char *m); |
248 | 224 | ||
249 | static void putstr(const char *); | 225 | static void putstr(const char *); |
250 | 226 | ||
251 | extern int end; | 227 | static unsigned long free_mem_ptr; |
252 | static ulg free_mem_ptr; | 228 | static unsigned long free_mem_end_ptr; |
253 | static ulg free_mem_end_ptr; | ||
254 | 229 | ||
255 | #ifdef STANDALONE_DEBUG | 230 | #ifdef STANDALONE_DEBUG |
256 | #define NO_INFLATE_MALLOC | 231 | #define NO_INFLATE_MALLOC |
@@ -258,46 +233,13 @@ static ulg free_mem_end_ptr; | |||
258 | 233 | ||
259 | #define ARCH_HAS_DECOMP_WDOG | 234 | #define ARCH_HAS_DECOMP_WDOG |
260 | 235 | ||
261 | #include "../../../../lib/inflate.c" | 236 | #ifdef CONFIG_KERNEL_GZIP |
262 | 237 | #include "../../../../lib/decompress_inflate.c" | |
263 | /* =========================================================================== | 238 | #endif |
264 | * Fill the input buffer. This is called only when the buffer is empty | ||
265 | * and at least one byte is really needed. | ||
266 | */ | ||
267 | int fill_inbuf(void) | ||
268 | { | ||
269 | if (insize != 0) | ||
270 | error("ran out of input data"); | ||
271 | |||
272 | inbuf = input_data; | ||
273 | insize = &input_data_end[0] - &input_data[0]; | ||
274 | |||
275 | inptr = 1; | ||
276 | return inbuf[0]; | ||
277 | } | ||
278 | 239 | ||
279 | /* =========================================================================== | 240 | #ifdef CONFIG_KERNEL_LZO |
280 | * Write the output window window[0..outcnt-1] and update crc and bytes_out. | 241 | #include "../../../../lib/decompress_unlzo.c" |
281 | * (Used for the decompressed data only.) | 242 | #endif |
282 | */ | ||
283 | void flush_window(void) | ||
284 | { | ||
285 | ulg c = crc; | ||
286 | unsigned n; | ||
287 | uch *in, *out, ch; | ||
288 | |||
289 | in = window; | ||
290 | out = &output_data[output_ptr]; | ||
291 | for (n = 0; n < outcnt; n++) { | ||
292 | ch = *out++ = *in++; | ||
293 | c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8); | ||
294 | } | ||
295 | crc = c; | ||
296 | bytes_out += (ulg)outcnt; | ||
297 | output_ptr += (ulg)outcnt; | ||
298 | outcnt = 0; | ||
299 | putstr("."); | ||
300 | } | ||
301 | 243 | ||
302 | #ifndef arch_error | 244 | #ifndef arch_error |
303 | #define arch_error(x) | 245 | #define arch_error(x) |
@@ -314,22 +256,33 @@ static void error(char *x) | |||
314 | while(1); /* Halt */ | 256 | while(1); /* Halt */ |
315 | } | 257 | } |
316 | 258 | ||
259 | asmlinkage void __div0(void) | ||
260 | { | ||
261 | error("Attempting division by 0!"); | ||
262 | } | ||
263 | |||
317 | #ifndef STANDALONE_DEBUG | 264 | #ifndef STANDALONE_DEBUG |
318 | 265 | ||
319 | ulg | 266 | unsigned long |
320 | decompress_kernel(ulg output_start, ulg free_mem_ptr_p, ulg free_mem_ptr_end_p, | 267 | decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p, |
321 | int arch_id) | 268 | unsigned long free_mem_ptr_end_p, |
269 | int arch_id) | ||
322 | { | 270 | { |
323 | output_data = (uch *)output_start; /* Points to kernel start */ | 271 | unsigned char *tmp; |
272 | |||
273 | output_data = (unsigned char *)output_start; | ||
324 | free_mem_ptr = free_mem_ptr_p; | 274 | free_mem_ptr = free_mem_ptr_p; |
325 | free_mem_end_ptr = free_mem_ptr_end_p; | 275 | free_mem_end_ptr = free_mem_ptr_end_p; |
326 | __machine_arch_type = arch_id; | 276 | __machine_arch_type = arch_id; |
327 | 277 | ||
328 | arch_decomp_setup(); | 278 | arch_decomp_setup(); |
329 | 279 | ||
330 | makecrc(); | 280 | tmp = (unsigned char *) (((unsigned long)input_data_end) - 4); |
281 | output_ptr = get_unaligned_le32(tmp); | ||
282 | |||
331 | putstr("Uncompressing Linux..."); | 283 | putstr("Uncompressing Linux..."); |
332 | gunzip(); | 284 | decompress(input_data, input_data_end - input_data, |
285 | NULL, NULL, output_data, NULL, error); | ||
333 | putstr(" done, booting the kernel.\n"); | 286 | putstr(" done, booting the kernel.\n"); |
334 | return output_ptr; | 287 | return output_ptr; |
335 | } | 288 | } |
@@ -341,11 +294,10 @@ int main() | |||
341 | { | 294 | { |
342 | output_data = output_buffer; | 295 | output_data = output_buffer; |
343 | 296 | ||
344 | makecrc(); | ||
345 | putstr("Uncompressing Linux..."); | 297 | putstr("Uncompressing Linux..."); |
346 | gunzip(); | 298 | decompress(input_data, input_data_end - input_data, |
299 | NULL, NULL, output_data, NULL, error); | ||
347 | putstr("done.\n"); | 300 | putstr("done.\n"); |
348 | return 0; | 301 | return 0; |
349 | } | 302 | } |
350 | #endif | 303 | #endif |
351 | |||
diff --git a/arch/arm/boot/compressed/piggy.gzip.S b/arch/arm/boot/compressed/piggy.gzip.S new file mode 100644 index 000000000000..a68adf91a165 --- /dev/null +++ b/arch/arm/boot/compressed/piggy.gzip.S | |||
@@ -0,0 +1,6 @@ | |||
1 | .section .piggydata,#alloc | ||
2 | .globl input_data | ||
3 | input_data: | ||
4 | .incbin "arch/arm/boot/compressed/piggy.gzip" | ||
5 | .globl input_data_end | ||
6 | input_data_end: | ||
diff --git a/arch/arm/boot/compressed/piggy.S b/arch/arm/boot/compressed/piggy.lzo.S index 54c951800ebd..a425ad95959a 100644 --- a/arch/arm/boot/compressed/piggy.S +++ b/arch/arm/boot/compressed/piggy.lzo.S | |||
@@ -1,6 +1,6 @@ | |||
1 | .section .piggydata,#alloc | 1 | .section .piggydata,#alloc |
2 | .globl input_data | 2 | .globl input_data |
3 | input_data: | 3 | input_data: |
4 | .incbin "arch/arm/boot/compressed/piggy.gz" | 4 | .incbin "arch/arm/boot/compressed/piggy.lzo" |
5 | .globl input_data_end | 5 | .globl input_data_end |
6 | input_data_end: | 6 | input_data_end: |
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index cc32c1e54a59..cc0a932bbea9 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c | |||
@@ -277,7 +277,7 @@ static inline dma_addr_t map_single(struct device *dev, void *ptr, size_t size, | |||
277 | * We don't need to sync the DMA buffer since | 277 | * We don't need to sync the DMA buffer since |
278 | * it was allocated via the coherent allocators. | 278 | * it was allocated via the coherent allocators. |
279 | */ | 279 | */ |
280 | dma_cache_maint(ptr, size, dir); | 280 | __dma_single_cpu_to_dev(ptr, size, dir); |
281 | } | 281 | } |
282 | 282 | ||
283 | return dma_addr; | 283 | return dma_addr; |
@@ -315,6 +315,8 @@ static inline void unmap_single(struct device *dev, dma_addr_t dma_addr, | |||
315 | __cpuc_flush_dcache_area(ptr, size); | 315 | __cpuc_flush_dcache_area(ptr, size); |
316 | } | 316 | } |
317 | free_safe_buffer(dev->archdata.dmabounce, buf); | 317 | free_safe_buffer(dev->archdata.dmabounce, buf); |
318 | } else { | ||
319 | __dma_single_dev_to_cpu(dma_to_virt(dev, dma_addr), size, dir); | ||
318 | } | 320 | } |
319 | } | 321 | } |
320 | 322 | ||
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index f232941de8ab..1cf999ade4bc 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * along with this program; if not, write to the Free Software | 18 | * along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | |||
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
22 | #include <linux/list.h> | 23 | #include <linux/list.h> |
23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
@@ -28,48 +29,6 @@ | |||
28 | #include <asm/mach/irq.h> | 29 | #include <asm/mach/irq.h> |
29 | #include <asm/hardware/vic.h> | 30 | #include <asm/hardware/vic.h> |
30 | 31 | ||
31 | static void vic_ack_irq(unsigned int irq) | ||
32 | { | ||
33 | void __iomem *base = get_irq_chip_data(irq); | ||
34 | irq &= 31; | ||
35 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); | ||
36 | /* moreover, clear the soft-triggered, in case it was the reason */ | ||
37 | writel(1 << irq, base + VIC_INT_SOFT_CLEAR); | ||
38 | } | ||
39 | |||
40 | static void vic_mask_irq(unsigned int irq) | ||
41 | { | ||
42 | void __iomem *base = get_irq_chip_data(irq); | ||
43 | irq &= 31; | ||
44 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); | ||
45 | } | ||
46 | |||
47 | static void vic_unmask_irq(unsigned int irq) | ||
48 | { | ||
49 | void __iomem *base = get_irq_chip_data(irq); | ||
50 | irq &= 31; | ||
51 | writel(1 << irq, base + VIC_INT_ENABLE); | ||
52 | } | ||
53 | |||
54 | /** | ||
55 | * vic_init2 - common initialisation code | ||
56 | * @base: Base of the VIC. | ||
57 | * | ||
58 | * Common initialisation code for registeration | ||
59 | * and resume. | ||
60 | */ | ||
61 | static void vic_init2(void __iomem *base) | ||
62 | { | ||
63 | int i; | ||
64 | |||
65 | for (i = 0; i < 16; i++) { | ||
66 | void __iomem *reg = base + VIC_VECT_CNTL0 + (i * 4); | ||
67 | writel(VIC_VECT_CNTL_ENABLE | i, reg); | ||
68 | } | ||
69 | |||
70 | writel(32, base + VIC_PL190_DEF_VECT_ADDR); | ||
71 | } | ||
72 | |||
73 | #if defined(CONFIG_PM) | 32 | #if defined(CONFIG_PM) |
74 | /** | 33 | /** |
75 | * struct vic_device - VIC PM device | 34 | * struct vic_device - VIC PM device |
@@ -99,13 +58,34 @@ struct vic_device { | |||
99 | /* we cannot allocate memory when VICs are initially registered */ | 58 | /* we cannot allocate memory when VICs are initially registered */ |
100 | static struct vic_device vic_devices[CONFIG_ARM_VIC_NR]; | 59 | static struct vic_device vic_devices[CONFIG_ARM_VIC_NR]; |
101 | 60 | ||
61 | static int vic_id; | ||
62 | |||
102 | static inline struct vic_device *to_vic(struct sys_device *sys) | 63 | static inline struct vic_device *to_vic(struct sys_device *sys) |
103 | { | 64 | { |
104 | return container_of(sys, struct vic_device, sysdev); | 65 | return container_of(sys, struct vic_device, sysdev); |
105 | } | 66 | } |
67 | #endif /* CONFIG_PM */ | ||
106 | 68 | ||
107 | static int vic_id; | 69 | /** |
70 | * vic_init2 - common initialisation code | ||
71 | * @base: Base of the VIC. | ||
72 | * | ||
73 | * Common initialisation code for registeration | ||
74 | * and resume. | ||
75 | */ | ||
76 | static void vic_init2(void __iomem *base) | ||
77 | { | ||
78 | int i; | ||
79 | |||
80 | for (i = 0; i < 16; i++) { | ||
81 | void __iomem *reg = base + VIC_VECT_CNTL0 + (i * 4); | ||
82 | writel(VIC_VECT_CNTL_ENABLE | i, reg); | ||
83 | } | ||
84 | |||
85 | writel(32, base + VIC_PL190_DEF_VECT_ADDR); | ||
86 | } | ||
108 | 87 | ||
88 | #if defined(CONFIG_PM) | ||
109 | static int vic_class_resume(struct sys_device *dev) | 89 | static int vic_class_resume(struct sys_device *dev) |
110 | { | 90 | { |
111 | struct vic_device *vic = to_vic(dev); | 91 | struct vic_device *vic = to_vic(dev); |
@@ -159,31 +139,6 @@ struct sysdev_class vic_class = { | |||
159 | }; | 139 | }; |
160 | 140 | ||
161 | /** | 141 | /** |
162 | * vic_pm_register - Register a VIC for later power management control | ||
163 | * @base: The base address of the VIC. | ||
164 | * @irq: The base IRQ for the VIC. | ||
165 | * @resume_sources: bitmask of interrupts allowed for resume sources. | ||
166 | * | ||
167 | * Register the VIC with the system device tree so that it can be notified | ||
168 | * of suspend and resume requests and ensure that the correct actions are | ||
169 | * taken to re-instate the settings on resume. | ||
170 | */ | ||
171 | static void __init vic_pm_register(void __iomem *base, unsigned int irq, u32 resume_sources) | ||
172 | { | ||
173 | struct vic_device *v; | ||
174 | |||
175 | if (vic_id >= ARRAY_SIZE(vic_devices)) | ||
176 | printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__); | ||
177 | else { | ||
178 | v = &vic_devices[vic_id]; | ||
179 | v->base = base; | ||
180 | v->resume_sources = resume_sources; | ||
181 | v->irq = irq; | ||
182 | vic_id++; | ||
183 | } | ||
184 | } | ||
185 | |||
186 | /** | ||
187 | * vic_pm_init - initicall to register VIC pm | 142 | * vic_pm_init - initicall to register VIC pm |
188 | * | 143 | * |
189 | * This is called via late_initcall() to register | 144 | * This is called via late_initcall() to register |
@@ -219,9 +174,60 @@ static int __init vic_pm_init(void) | |||
219 | 174 | ||
220 | return 0; | 175 | return 0; |
221 | } | 176 | } |
222 | |||
223 | late_initcall(vic_pm_init); | 177 | late_initcall(vic_pm_init); |
224 | 178 | ||
179 | /** | ||
180 | * vic_pm_register - Register a VIC for later power management control | ||
181 | * @base: The base address of the VIC. | ||
182 | * @irq: The base IRQ for the VIC. | ||
183 | * @resume_sources: bitmask of interrupts allowed for resume sources. | ||
184 | * | ||
185 | * Register the VIC with the system device tree so that it can be notified | ||
186 | * of suspend and resume requests and ensure that the correct actions are | ||
187 | * taken to re-instate the settings on resume. | ||
188 | */ | ||
189 | static void __init vic_pm_register(void __iomem *base, unsigned int irq, u32 resume_sources) | ||
190 | { | ||
191 | struct vic_device *v; | ||
192 | |||
193 | if (vic_id >= ARRAY_SIZE(vic_devices)) | ||
194 | printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__); | ||
195 | else { | ||
196 | v = &vic_devices[vic_id]; | ||
197 | v->base = base; | ||
198 | v->resume_sources = resume_sources; | ||
199 | v->irq = irq; | ||
200 | vic_id++; | ||
201 | } | ||
202 | } | ||
203 | #else | ||
204 | static inline void vic_pm_register(void __iomem *base, unsigned int irq, u32 arg1) { } | ||
205 | #endif /* CONFIG_PM */ | ||
206 | |||
207 | static void vic_ack_irq(unsigned int irq) | ||
208 | { | ||
209 | void __iomem *base = get_irq_chip_data(irq); | ||
210 | irq &= 31; | ||
211 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); | ||
212 | /* moreover, clear the soft-triggered, in case it was the reason */ | ||
213 | writel(1 << irq, base + VIC_INT_SOFT_CLEAR); | ||
214 | } | ||
215 | |||
216 | static void vic_mask_irq(unsigned int irq) | ||
217 | { | ||
218 | void __iomem *base = get_irq_chip_data(irq); | ||
219 | irq &= 31; | ||
220 | writel(1 << irq, base + VIC_INT_ENABLE_CLEAR); | ||
221 | } | ||
222 | |||
223 | static void vic_unmask_irq(unsigned int irq) | ||
224 | { | ||
225 | void __iomem *base = get_irq_chip_data(irq); | ||
226 | irq &= 31; | ||
227 | writel(1 << irq, base + VIC_INT_ENABLE); | ||
228 | } | ||
229 | |||
230 | #if defined(CONFIG_PM) | ||
225 | static struct vic_device *vic_from_irq(unsigned int irq) | 231 | static struct vic_device *vic_from_irq(unsigned int irq) |
226 | { | 232 | { |
227 | struct vic_device *v = vic_devices; | 233 | struct vic_device *v = vic_devices; |
@@ -255,10 +261,7 @@ static int vic_set_wake(unsigned int irq, unsigned int on) | |||
255 | 261 | ||
256 | return 0; | 262 | return 0; |
257 | } | 263 | } |
258 | |||
259 | #else | 264 | #else |
260 | static inline void vic_pm_register(void __iomem *base, unsigned int irq, u32 arg1) { } | ||
261 | |||
262 | #define vic_set_wake NULL | 265 | #define vic_set_wake NULL |
263 | #endif /* CONFIG_PM */ | 266 | #endif /* CONFIG_PM */ |
264 | 267 | ||
@@ -270,9 +273,62 @@ static struct irq_chip vic_chip = { | |||
270 | .set_wake = vic_set_wake, | 273 | .set_wake = vic_set_wake, |
271 | }; | 274 | }; |
272 | 275 | ||
273 | /* The PL190 cell from ARM has been modified by ST, so handle both here */ | 276 | /* |
274 | static void vik_init_st(void __iomem *base, unsigned int irq_start, | 277 | * The PL190 cell from ARM has been modified by ST to handle 64 interrupts. |
275 | u32 vic_sources); | 278 | * The original cell has 32 interrupts, while the modified one has 64, |
279 | * replocating two blocks 0x00..0x1f in 0x20..0x3f. In that case | ||
280 | * the probe function is called twice, with base set to offset 000 | ||
281 | * and 020 within the page. We call this "second block". | ||
282 | */ | ||
283 | static void __init vic_init_st(void __iomem *base, unsigned int irq_start, | ||
284 | u32 vic_sources) | ||
285 | { | ||
286 | unsigned int i; | ||
287 | int vic_2nd_block = ((unsigned long)base & ~PAGE_MASK) != 0; | ||
288 | |||
289 | /* Disable all interrupts initially. */ | ||
290 | |||
291 | writel(0, base + VIC_INT_SELECT); | ||
292 | writel(0, base + VIC_INT_ENABLE); | ||
293 | writel(~0, base + VIC_INT_ENABLE_CLEAR); | ||
294 | writel(0, base + VIC_IRQ_STATUS); | ||
295 | writel(0, base + VIC_ITCR); | ||
296 | writel(~0, base + VIC_INT_SOFT_CLEAR); | ||
297 | |||
298 | /* | ||
299 | * Make sure we clear all existing interrupts. The vector registers | ||
300 | * in this cell are after the second block of general registers, | ||
301 | * so we can address them using standard offsets, but only from | ||
302 | * the second base address, which is 0x20 in the page | ||
303 | */ | ||
304 | if (vic_2nd_block) { | ||
305 | writel(0, base + VIC_PL190_VECT_ADDR); | ||
306 | for (i = 0; i < 19; i++) { | ||
307 | unsigned int value; | ||
308 | |||
309 | value = readl(base + VIC_PL190_VECT_ADDR); | ||
310 | writel(value, base + VIC_PL190_VECT_ADDR); | ||
311 | } | ||
312 | /* ST has 16 vectors as well, but we don't enable them by now */ | ||
313 | for (i = 0; i < 16; i++) { | ||
314 | void __iomem *reg = base + VIC_VECT_CNTL0 + (i * 4); | ||
315 | writel(0, reg); | ||
316 | } | ||
317 | |||
318 | writel(32, base + VIC_PL190_DEF_VECT_ADDR); | ||
319 | } | ||
320 | |||
321 | for (i = 0; i < 32; i++) { | ||
322 | if (vic_sources & (1 << i)) { | ||
323 | unsigned int irq = irq_start + i; | ||
324 | |||
325 | set_irq_chip(irq, &vic_chip); | ||
326 | set_irq_chip_data(irq, base); | ||
327 | set_irq_handler(irq, handle_level_irq); | ||
328 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
329 | } | ||
330 | } | ||
331 | } | ||
276 | 332 | ||
277 | /** | 333 | /** |
278 | * vic_init - initialise a vectored interrupt controller | 334 | * vic_init - initialise a vectored interrupt controller |
@@ -299,7 +355,7 @@ void __init vic_init(void __iomem *base, unsigned int irq_start, | |||
299 | 355 | ||
300 | switch(vendor) { | 356 | switch(vendor) { |
301 | case AMBA_VENDOR_ST: | 357 | case AMBA_VENDOR_ST: |
302 | vik_init_st(base, irq_start, vic_sources); | 358 | vic_init_st(base, irq_start, vic_sources); |
303 | return; | 359 | return; |
304 | default: | 360 | default: |
305 | printk(KERN_WARNING "VIC: unknown vendor, continuing anyways\n"); | 361 | printk(KERN_WARNING "VIC: unknown vendor, continuing anyways\n"); |
@@ -343,60 +399,3 @@ void __init vic_init(void __iomem *base, unsigned int irq_start, | |||
343 | 399 | ||
344 | vic_pm_register(base, irq_start, resume_sources); | 400 | vic_pm_register(base, irq_start, resume_sources); |
345 | } | 401 | } |
346 | |||
347 | /* | ||
348 | * The PL190 cell from ARM has been modified by ST to handle 64 interrupts. | ||
349 | * The original cell has 32 interrupts, while the modified one has 64, | ||
350 | * replocating two blocks 0x00..0x1f in 0x20..0x3f. In that case | ||
351 | * the probe function is called twice, with base set to offset 000 | ||
352 | * and 020 within the page. We call this "second block". | ||
353 | */ | ||
354 | static void __init vik_init_st(void __iomem *base, unsigned int irq_start, | ||
355 | u32 vic_sources) | ||
356 | { | ||
357 | unsigned int i; | ||
358 | int vic_2nd_block = ((unsigned long)base & ~PAGE_MASK) != 0; | ||
359 | |||
360 | /* Disable all interrupts initially. */ | ||
361 | |||
362 | writel(0, base + VIC_INT_SELECT); | ||
363 | writel(0, base + VIC_INT_ENABLE); | ||
364 | writel(~0, base + VIC_INT_ENABLE_CLEAR); | ||
365 | writel(0, base + VIC_IRQ_STATUS); | ||
366 | writel(0, base + VIC_ITCR); | ||
367 | writel(~0, base + VIC_INT_SOFT_CLEAR); | ||
368 | |||
369 | /* | ||
370 | * Make sure we clear all existing interrupts. The vector registers | ||
371 | * in this cell are after the second block of general registers, | ||
372 | * so we can address them using standard offsets, but only from | ||
373 | * the second base address, which is 0x20 in the page | ||
374 | */ | ||
375 | if (vic_2nd_block) { | ||
376 | writel(0, base + VIC_PL190_VECT_ADDR); | ||
377 | for (i = 0; i < 19; i++) { | ||
378 | unsigned int value; | ||
379 | |||
380 | value = readl(base + VIC_PL190_VECT_ADDR); | ||
381 | writel(value, base + VIC_PL190_VECT_ADDR); | ||
382 | } | ||
383 | /* ST has 16 vectors as well, but we don't enable them by now */ | ||
384 | for (i = 0; i < 16; i++) { | ||
385 | void __iomem *reg = base + VIC_VECT_CNTL0 + (i * 4); | ||
386 | writel(0, reg); | ||
387 | } | ||
388 | |||
389 | writel(32, base + VIC_PL190_DEF_VECT_ADDR); | ||
390 | } | ||
391 | |||
392 | for (i = 0; i < 32; i++) { | ||
393 | if (vic_sources & (1 << i)) { | ||
394 | unsigned int irq = irq_start + i; | ||
395 | |||
396 | set_irq_chip(irq, &vic_chip); | ||
397 | set_irq_chip_data(irq, base); | ||
398 | set_irq_handler(irq, handle_level_irq); | ||
399 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
400 | } | ||
401 | } | ||
402 | } | ||
diff --git a/arch/arm/configs/at572d940hfek_defconfig b/arch/arm/configs/at572d940hfek_defconfig new file mode 100644 index 000000000000..76d724b8041a --- /dev/null +++ b/arch/arm/configs/at572d940hfek_defconfig | |||
@@ -0,0 +1,1640 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.28-rc7 | ||
4 | # Fri Dec 5 10:58:47 2008 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | CONFIG_GENERIC_GPIO=y | ||
9 | CONFIG_GENERIC_TIME=y | ||
10 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
11 | CONFIG_MMU=y | ||
12 | # CONFIG_NO_IOPORT is not set | ||
13 | CONFIG_GENERIC_HARDIRQS=y | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
16 | CONFIG_LOCKDEP_SUPPORT=y | ||
17 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
18 | CONFIG_HARDIRQS_SW_RESEND=y | ||
19 | CONFIG_GENERIC_IRQ_PROBE=y | ||
20 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
21 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
23 | CONFIG_GENERIC_HWEIGHT=y | ||
24 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
25 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
26 | CONFIG_VECTORS_BASE=0xffff0000 | ||
27 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
28 | |||
29 | # | ||
30 | # General setup | ||
31 | # | ||
32 | CONFIG_EXPERIMENTAL=y | ||
33 | CONFIG_BROKEN_ON_SMP=y | ||
34 | CONFIG_LOCK_KERNEL=y | ||
35 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
36 | CONFIG_LOCALVERSION="-AT572D940HF" | ||
37 | # CONFIG_LOCALVERSION_AUTO is not set | ||
38 | CONFIG_SWAP=y | ||
39 | CONFIG_SYSVIPC=y | ||
40 | CONFIG_SYSVIPC_SYSCTL=y | ||
41 | CONFIG_POSIX_MQUEUE=y | ||
42 | CONFIG_BSD_PROCESS_ACCT=y | ||
43 | CONFIG_BSD_PROCESS_ACCT_V3=y | ||
44 | CONFIG_TASKSTATS=y | ||
45 | # CONFIG_TASK_DELAY_ACCT is not set | ||
46 | CONFIG_TASK_XACCT=y | ||
47 | CONFIG_TASK_IO_ACCOUNTING=y | ||
48 | CONFIG_AUDIT=y | ||
49 | # CONFIG_IKCONFIG is not set | ||
50 | CONFIG_LOG_BUF_SHIFT=17 | ||
51 | CONFIG_CGROUPS=y | ||
52 | # CONFIG_CGROUP_DEBUG is not set | ||
53 | # CONFIG_CGROUP_NS is not set | ||
54 | # CONFIG_CGROUP_FREEZER is not set | ||
55 | # CONFIG_CGROUP_DEVICE is not set | ||
56 | CONFIG_GROUP_SCHED=y | ||
57 | CONFIG_FAIR_GROUP_SCHED=y | ||
58 | CONFIG_RT_GROUP_SCHED=y | ||
59 | # CONFIG_USER_SCHED is not set | ||
60 | CONFIG_CGROUP_SCHED=y | ||
61 | CONFIG_CGROUP_CPUACCT=y | ||
62 | # CONFIG_RESOURCE_COUNTERS is not set | ||
63 | CONFIG_SYSFS_DEPRECATED=y | ||
64 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
65 | CONFIG_RELAY=y | ||
66 | # CONFIG_NAMESPACES is not set | ||
67 | CONFIG_BLK_DEV_INITRD=y | ||
68 | CONFIG_INITRAMFS_SOURCE="" | ||
69 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
70 | CONFIG_SYSCTL=y | ||
71 | CONFIG_EMBEDDED=y | ||
72 | CONFIG_UID16=y | ||
73 | CONFIG_SYSCTL_SYSCALL=y | ||
74 | CONFIG_KALLSYMS=y | ||
75 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
76 | CONFIG_HOTPLUG=y | ||
77 | CONFIG_PRINTK=y | ||
78 | CONFIG_BUG=y | ||
79 | CONFIG_ELF_CORE=y | ||
80 | CONFIG_COMPAT_BRK=y | ||
81 | CONFIG_BASE_FULL=y | ||
82 | CONFIG_FUTEX=y | ||
83 | CONFIG_ANON_INODES=y | ||
84 | CONFIG_EPOLL=y | ||
85 | CONFIG_SIGNALFD=y | ||
86 | CONFIG_TIMERFD=y | ||
87 | CONFIG_EVENTFD=y | ||
88 | CONFIG_SHMEM=y | ||
89 | CONFIG_AIO=y | ||
90 | CONFIG_VM_EVENT_COUNTERS=y | ||
91 | CONFIG_SLAB=y | ||
92 | # CONFIG_SLUB is not set | ||
93 | # CONFIG_SLOB is not set | ||
94 | CONFIG_PROFILING=y | ||
95 | CONFIG_MARKERS=y | ||
96 | CONFIG_OPROFILE=m | ||
97 | CONFIG_HAVE_OPROFILE=y | ||
98 | CONFIG_KPROBES=y | ||
99 | CONFIG_KRETPROBES=y | ||
100 | CONFIG_HAVE_KPROBES=y | ||
101 | CONFIG_HAVE_KRETPROBES=y | ||
102 | CONFIG_HAVE_CLK=y | ||
103 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
104 | CONFIG_SLABINFO=y | ||
105 | CONFIG_RT_MUTEXES=y | ||
106 | # CONFIG_TINY_SHMEM is not set | ||
107 | CONFIG_BASE_SMALL=0 | ||
108 | CONFIG_MODULES=y | ||
109 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
110 | CONFIG_MODULE_UNLOAD=y | ||
111 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
112 | CONFIG_MODVERSIONS=y | ||
113 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
114 | CONFIG_KMOD=y | ||
115 | CONFIG_BLOCK=y | ||
116 | # CONFIG_LBD is not set | ||
117 | CONFIG_BLK_DEV_IO_TRACE=y | ||
118 | # CONFIG_LSF is not set | ||
119 | # CONFIG_BLK_DEV_BSG is not set | ||
120 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
121 | |||
122 | # | ||
123 | # IO Schedulers | ||
124 | # | ||
125 | CONFIG_IOSCHED_NOOP=y | ||
126 | CONFIG_IOSCHED_AS=y | ||
127 | CONFIG_IOSCHED_DEADLINE=y | ||
128 | CONFIG_IOSCHED_CFQ=y | ||
129 | # CONFIG_DEFAULT_AS is not set | ||
130 | # CONFIG_DEFAULT_DEADLINE is not set | ||
131 | CONFIG_DEFAULT_CFQ=y | ||
132 | # CONFIG_DEFAULT_NOOP is not set | ||
133 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
134 | CONFIG_CLASSIC_RCU=y | ||
135 | # CONFIG_FREEZER is not set | ||
136 | |||
137 | # | ||
138 | # System Type | ||
139 | # | ||
140 | # CONFIG_ARCH_AAEC2000 is not set | ||
141 | # CONFIG_ARCH_INTEGRATOR is not set | ||
142 | # CONFIG_ARCH_REALVIEW is not set | ||
143 | # CONFIG_ARCH_VERSATILE is not set | ||
144 | CONFIG_ARCH_AT91=y | ||
145 | # CONFIG_ARCH_CLPS7500 is not set | ||
146 | # CONFIG_ARCH_CLPS711X is not set | ||
147 | # CONFIG_ARCH_EBSA110 is not set | ||
148 | # CONFIG_ARCH_EP93XX is not set | ||
149 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
150 | # CONFIG_ARCH_NETX is not set | ||
151 | # CONFIG_ARCH_H720X is not set | ||
152 | # CONFIG_ARCH_IMX is not set | ||
153 | # CONFIG_ARCH_IOP13XX is not set | ||
154 | # CONFIG_ARCH_IOP32X is not set | ||
155 | # CONFIG_ARCH_IOP33X is not set | ||
156 | # CONFIG_ARCH_IXP23XX is not set | ||
157 | # CONFIG_ARCH_IXP2000 is not set | ||
158 | # CONFIG_ARCH_IXP4XX is not set | ||
159 | # CONFIG_ARCH_L7200 is not set | ||
160 | # CONFIG_ARCH_KIRKWOOD is not set | ||
161 | # CONFIG_ARCH_KS8695 is not set | ||
162 | # CONFIG_ARCH_NS9XXX is not set | ||
163 | # CONFIG_ARCH_LOKI is not set | ||
164 | # CONFIG_ARCH_MV78XX0 is not set | ||
165 | # CONFIG_ARCH_MXC is not set | ||
166 | # CONFIG_ARCH_ORION5X is not set | ||
167 | # CONFIG_ARCH_PNX4008 is not set | ||
168 | # CONFIG_ARCH_PXA is not set | ||
169 | # CONFIG_ARCH_RPC is not set | ||
170 | # CONFIG_ARCH_SA1100 is not set | ||
171 | # CONFIG_ARCH_S3C2410 is not set | ||
172 | # CONFIG_ARCH_SHARK is not set | ||
173 | # CONFIG_ARCH_LH7A40X is not set | ||
174 | # CONFIG_ARCH_DAVINCI is not set | ||
175 | # CONFIG_ARCH_OMAP is not set | ||
176 | # CONFIG_ARCH_MSM is not set | ||
177 | |||
178 | # | ||
179 | # Boot options | ||
180 | # | ||
181 | |||
182 | # | ||
183 | # Power management | ||
184 | # | ||
185 | |||
186 | # | ||
187 | # Atmel AT91 System-on-Chip | ||
188 | # | ||
189 | # CONFIG_ARCH_AT91RM9200 is not set | ||
190 | # CONFIG_ARCH_AT91SAM9260 is not set | ||
191 | # CONFIG_ARCH_AT91SAM9261 is not set | ||
192 | # CONFIG_ARCH_AT91SAM9263 is not set | ||
193 | # CONFIG_ARCH_AT91SAM9RL is not set | ||
194 | # CONFIG_ARCH_AT91SAM9G20 is not set | ||
195 | # CONFIG_ARCH_AT91CAP9 is not set | ||
196 | # CONFIG_ARCH_AT91X40 is not set | ||
197 | CONFIG_ARCH_AT572D940HF=y | ||
198 | CONFIG_AT91_PMC_UNIT=y | ||
199 | |||
200 | # | ||
201 | # AT572D940HF Board Type | ||
202 | # | ||
203 | CONFIG_MACH_AT572D940HFEB=y | ||
204 | |||
205 | # | ||
206 | # AT91 Board Options | ||
207 | # | ||
208 | # CONFIG_MTD_AT91_DATAFLASH_CARD is not set | ||
209 | # CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16 is not set | ||
210 | CONFIG_NUM_SERIAL=3 | ||
211 | |||
212 | # | ||
213 | # AT91 Feature Selections | ||
214 | # | ||
215 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y | ||
216 | CONFIG_AT91_TIMER_HZ=100 | ||
217 | CONFIG_AT91_EARLY_DBGU=y | ||
218 | # CONFIG_AT91_EARLY_USART0 is not set | ||
219 | # CONFIG_AT91_EARLY_USART1 is not set | ||
220 | # CONFIG_AT91_EARLY_USART2 is not set | ||
221 | # CONFIG_AT91_EARLY_USART3 is not set | ||
222 | # CONFIG_AT91_EARLY_USART4 is not set | ||
223 | # CONFIG_AT91_EARLY_USART5 is not set | ||
224 | |||
225 | # | ||
226 | # Processor Type | ||
227 | # | ||
228 | CONFIG_CPU_32=y | ||
229 | CONFIG_CPU_ARM926T=y | ||
230 | CONFIG_CPU_32v5=y | ||
231 | CONFIG_CPU_ABRT_EV5TJ=y | ||
232 | CONFIG_CPU_PABRT_NOIFAR=y | ||
233 | CONFIG_CPU_CACHE_VIVT=y | ||
234 | CONFIG_CPU_COPY_V4WB=y | ||
235 | CONFIG_CPU_TLB_V4WBI=y | ||
236 | CONFIG_CPU_CP15=y | ||
237 | CONFIG_CPU_CP15_MMU=y | ||
238 | |||
239 | # | ||
240 | # Processor Features | ||
241 | # | ||
242 | CONFIG_ARM_THUMB=y | ||
243 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
244 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
245 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
246 | # CONFIG_CPU_CACHE_ROUND_ROBIN is not set | ||
247 | # CONFIG_OUTER_CACHE is not set | ||
248 | |||
249 | # | ||
250 | # Bus support | ||
251 | # | ||
252 | # CONFIG_PCI_SYSCALL is not set | ||
253 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
254 | # CONFIG_PCCARD is not set | ||
255 | |||
256 | # | ||
257 | # Kernel Features | ||
258 | # | ||
259 | CONFIG_TICK_ONESHOT=y | ||
260 | CONFIG_NO_HZ=y | ||
261 | CONFIG_HIGH_RES_TIMERS=y | ||
262 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
263 | CONFIG_VMSPLIT_3G=y | ||
264 | # CONFIG_VMSPLIT_2G is not set | ||
265 | # CONFIG_VMSPLIT_1G is not set | ||
266 | CONFIG_PAGE_OFFSET=0xC0000000 | ||
267 | CONFIG_PREEMPT=y | ||
268 | CONFIG_HZ=100 | ||
269 | # CONFIG_AEABI is not set | ||
270 | CONFIG_ARCH_FLATMEM_HAS_HOLES=y | ||
271 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set | ||
272 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set | ||
273 | CONFIG_SELECT_MEMORY_MODEL=y | ||
274 | CONFIG_FLATMEM_MANUAL=y | ||
275 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
276 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
277 | CONFIG_FLATMEM=y | ||
278 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
279 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
280 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
281 | CONFIG_RESOURCES_64BIT=y | ||
282 | # CONFIG_PHYS_ADDR_T_64BIT is not set | ||
283 | CONFIG_ZONE_DMA_FLAG=0 | ||
284 | CONFIG_VIRT_TO_BUS=y | ||
285 | CONFIG_UNEVICTABLE_LRU=y | ||
286 | # CONFIG_LEDS is not set | ||
287 | CONFIG_ALIGNMENT_TRAP=y | ||
288 | |||
289 | # | ||
290 | # Boot options | ||
291 | # | ||
292 | CONFIG_ZBOOT_ROM_TEXT=0 | ||
293 | CONFIG_ZBOOT_ROM_BSS=0 | ||
294 | CONFIG_CMDLINE="mem=48M console=ttyS0 initrd=0x21100000,3145728 root=/dev/ram0 rw ip=172.16.1.181" | ||
295 | # CONFIG_XIP_KERNEL is not set | ||
296 | CONFIG_KEXEC=y | ||
297 | CONFIG_ATAGS_PROC=y | ||
298 | |||
299 | # | ||
300 | # CPU Power Management | ||
301 | # | ||
302 | # CONFIG_CPU_IDLE is not set | ||
303 | |||
304 | # | ||
305 | # Floating point emulation | ||
306 | # | ||
307 | |||
308 | # | ||
309 | # At least one emulation must be selected | ||
310 | # | ||
311 | CONFIG_FPE_NWFPE=y | ||
312 | CONFIG_FPE_NWFPE_XP=y | ||
313 | # CONFIG_FPE_FASTFPE is not set | ||
314 | # CONFIG_VFP is not set | ||
315 | |||
316 | # | ||
317 | # Userspace binary formats | ||
318 | # | ||
319 | CONFIG_BINFMT_ELF=y | ||
320 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
321 | CONFIG_HAVE_AOUT=y | ||
322 | # CONFIG_BINFMT_AOUT is not set | ||
323 | # CONFIG_BINFMT_MISC is not set | ||
324 | # CONFIG_ARTHUR is not set | ||
325 | |||
326 | # | ||
327 | # Power management options | ||
328 | # | ||
329 | # CONFIG_PM is not set | ||
330 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
331 | CONFIG_NET=y | ||
332 | |||
333 | # | ||
334 | # Networking options | ||
335 | # | ||
336 | CONFIG_PACKET=m | ||
337 | CONFIG_PACKET_MMAP=y | ||
338 | CONFIG_UNIX=y | ||
339 | # CONFIG_NET_KEY is not set | ||
340 | CONFIG_INET=y | ||
341 | # CONFIG_IP_MULTICAST is not set | ||
342 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
343 | CONFIG_IP_FIB_HASH=y | ||
344 | # CONFIG_IP_PNP is not set | ||
345 | # CONFIG_NET_IPIP is not set | ||
346 | # CONFIG_NET_IPGRE is not set | ||
347 | # CONFIG_ARPD is not set | ||
348 | # CONFIG_SYN_COOKIES is not set | ||
349 | # CONFIG_INET_AH is not set | ||
350 | # CONFIG_INET_ESP is not set | ||
351 | # CONFIG_INET_IPCOMP is not set | ||
352 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
353 | # CONFIG_INET_TUNNEL is not set | ||
354 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
355 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
356 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
357 | # CONFIG_INET_LRO is not set | ||
358 | # CONFIG_INET_DIAG is not set | ||
359 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
360 | CONFIG_TCP_CONG_CUBIC=y | ||
361 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
362 | # CONFIG_TCP_MD5SIG is not set | ||
363 | # CONFIG_IPV6 is not set | ||
364 | # CONFIG_NETWORK_SECMARK is not set | ||
365 | # CONFIG_NETFILTER is not set | ||
366 | # CONFIG_IP_DCCP is not set | ||
367 | CONFIG_IP_SCTP=m | ||
368 | # CONFIG_SCTP_DBG_MSG is not set | ||
369 | # CONFIG_SCTP_DBG_OBJCNT is not set | ||
370 | # CONFIG_SCTP_HMAC_NONE is not set | ||
371 | # CONFIG_SCTP_HMAC_SHA1 is not set | ||
372 | CONFIG_SCTP_HMAC_MD5=y | ||
373 | # CONFIG_TIPC is not set | ||
374 | # CONFIG_ATM is not set | ||
375 | # CONFIG_BRIDGE is not set | ||
376 | # CONFIG_NET_DSA is not set | ||
377 | # CONFIG_VLAN_8021Q is not set | ||
378 | # CONFIG_DECNET is not set | ||
379 | # CONFIG_LLC2 is not set | ||
380 | # CONFIG_IPX is not set | ||
381 | # CONFIG_ATALK is not set | ||
382 | # CONFIG_X25 is not set | ||
383 | # CONFIG_LAPB is not set | ||
384 | # CONFIG_ECONET is not set | ||
385 | # CONFIG_WAN_ROUTER is not set | ||
386 | # CONFIG_NET_SCHED is not set | ||
387 | |||
388 | # | ||
389 | # Network testing | ||
390 | # | ||
391 | CONFIG_NET_PKTGEN=m | ||
392 | CONFIG_NET_TCPPROBE=m | ||
393 | # CONFIG_HAMRADIO is not set | ||
394 | CONFIG_CAN=m | ||
395 | CONFIG_CAN_RAW=m | ||
396 | CONFIG_CAN_BCM=m | ||
397 | |||
398 | # | ||
399 | # CAN Device Drivers | ||
400 | # | ||
401 | CONFIG_CAN_VCAN=m | ||
402 | CONFIG_CAN_DEBUG_DEVICES=y | ||
403 | # CONFIG_IRDA is not set | ||
404 | # CONFIG_BT is not set | ||
405 | # CONFIG_AF_RXRPC is not set | ||
406 | # CONFIG_PHONET is not set | ||
407 | CONFIG_WIRELESS=y | ||
408 | # CONFIG_CFG80211 is not set | ||
409 | CONFIG_WIRELESS_OLD_REGULATORY=y | ||
410 | CONFIG_WIRELESS_EXT=y | ||
411 | CONFIG_WIRELESS_EXT_SYSFS=y | ||
412 | # CONFIG_MAC80211 is not set | ||
413 | CONFIG_IEEE80211=m | ||
414 | # CONFIG_IEEE80211_DEBUG is not set | ||
415 | CONFIG_IEEE80211_CRYPT_WEP=m | ||
416 | # CONFIG_IEEE80211_CRYPT_CCMP is not set | ||
417 | # CONFIG_IEEE80211_CRYPT_TKIP is not set | ||
418 | # CONFIG_RFKILL is not set | ||
419 | # CONFIG_NET_9P is not set | ||
420 | |||
421 | # | ||
422 | # Device Drivers | ||
423 | # | ||
424 | |||
425 | # | ||
426 | # Generic Driver Options | ||
427 | # | ||
428 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
429 | CONFIG_STANDALONE=y | ||
430 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
431 | CONFIG_FW_LOADER=y | ||
432 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
433 | CONFIG_EXTRA_FIRMWARE="" | ||
434 | # CONFIG_SYS_HYPERVISOR is not set | ||
435 | CONFIG_CONNECTOR=m | ||
436 | CONFIG_MTD=m | ||
437 | CONFIG_MTD_DEBUG=y | ||
438 | CONFIG_MTD_DEBUG_VERBOSE=1 | ||
439 | CONFIG_MTD_CONCAT=m | ||
440 | CONFIG_MTD_PARTITIONS=y | ||
441 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
442 | # CONFIG_MTD_AFS_PARTS is not set | ||
443 | # CONFIG_MTD_AR7_PARTS is not set | ||
444 | |||
445 | # | ||
446 | # User Modules And Translation Layers | ||
447 | # | ||
448 | CONFIG_MTD_CHAR=m | ||
449 | CONFIG_MTD_BLKDEVS=m | ||
450 | CONFIG_MTD_BLOCK=m | ||
451 | CONFIG_MTD_BLOCK_RO=m | ||
452 | CONFIG_FTL=m | ||
453 | CONFIG_NFTL=m | ||
454 | CONFIG_NFTL_RW=y | ||
455 | CONFIG_INFTL=m | ||
456 | CONFIG_RFD_FTL=m | ||
457 | CONFIG_SSFDC=m | ||
458 | CONFIG_MTD_OOPS=m | ||
459 | |||
460 | # | ||
461 | # RAM/ROM/Flash chip drivers | ||
462 | # | ||
463 | CONFIG_MTD_CFI=m | ||
464 | CONFIG_MTD_JEDECPROBE=m | ||
465 | CONFIG_MTD_GEN_PROBE=m | ||
466 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
467 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
468 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
469 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
470 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
471 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
472 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
473 | CONFIG_MTD_CFI_I1=y | ||
474 | CONFIG_MTD_CFI_I2=y | ||
475 | # CONFIG_MTD_CFI_I4 is not set | ||
476 | # CONFIG_MTD_CFI_I8 is not set | ||
477 | CONFIG_MTD_CFI_INTELEXT=m | ||
478 | CONFIG_MTD_CFI_AMDSTD=m | ||
479 | CONFIG_MTD_CFI_STAA=m | ||
480 | CONFIG_MTD_CFI_UTIL=m | ||
481 | CONFIG_MTD_RAM=m | ||
482 | CONFIG_MTD_ROM=m | ||
483 | CONFIG_MTD_ABSENT=m | ||
484 | |||
485 | # | ||
486 | # Mapping drivers for chip access | ||
487 | # | ||
488 | CONFIG_MTD_COMPLEX_MAPPINGS=y | ||
489 | CONFIG_MTD_PHYSMAP=m | ||
490 | CONFIG_MTD_PHYSMAP_START=0x8000000 | ||
491 | CONFIG_MTD_PHYSMAP_LEN=0x4000000 | ||
492 | CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | ||
493 | # CONFIG_MTD_ARM_INTEGRATOR is not set | ||
494 | # CONFIG_MTD_IMPA7 is not set | ||
495 | CONFIG_MTD_PLATRAM=m | ||
496 | |||
497 | # | ||
498 | # Self-contained MTD device drivers | ||
499 | # | ||
500 | CONFIG_MTD_DATAFLASH=m | ||
501 | # CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set | ||
502 | # CONFIG_MTD_DATAFLASH_OTP is not set | ||
503 | CONFIG_MTD_M25P80=m | ||
504 | CONFIG_M25PXX_USE_FAST_READ=y | ||
505 | CONFIG_MTD_SLRAM=m | ||
506 | CONFIG_MTD_PHRAM=m | ||
507 | CONFIG_MTD_MTDRAM=m | ||
508 | CONFIG_MTDRAM_TOTAL_SIZE=4096 | ||
509 | CONFIG_MTDRAM_ERASE_SIZE=128 | ||
510 | CONFIG_MTD_BLOCK2MTD=m | ||
511 | |||
512 | # | ||
513 | # Disk-On-Chip Device Drivers | ||
514 | # | ||
515 | # CONFIG_MTD_DOC2000 is not set | ||
516 | # CONFIG_MTD_DOC2001 is not set | ||
517 | # CONFIG_MTD_DOC2001PLUS is not set | ||
518 | CONFIG_MTD_NAND=m | ||
519 | CONFIG_MTD_NAND_VERIFY_WRITE=y | ||
520 | # CONFIG_MTD_NAND_ECC_SMC is not set | ||
521 | # CONFIG_MTD_NAND_MUSEUM_IDS is not set | ||
522 | # CONFIG_MTD_NAND_GPIO is not set | ||
523 | CONFIG_MTD_NAND_IDS=m | ||
524 | CONFIG_MTD_NAND_DISKONCHIP=m | ||
525 | # CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set | ||
526 | CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0 | ||
527 | # CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set | ||
528 | # CONFIG_MTD_NAND_ATMEL is not set | ||
529 | CONFIG_MTD_NAND_NANDSIM=m | ||
530 | CONFIG_MTD_NAND_PLATFORM=m | ||
531 | CONFIG_MTD_ALAUDA=m | ||
532 | # CONFIG_MTD_ONENAND is not set | ||
533 | |||
534 | # | ||
535 | # UBI - Unsorted block images | ||
536 | # | ||
537 | CONFIG_MTD_UBI=m | ||
538 | CONFIG_MTD_UBI_WL_THRESHOLD=4096 | ||
539 | CONFIG_MTD_UBI_BEB_RESERVE=1 | ||
540 | CONFIG_MTD_UBI_GLUEBI=y | ||
541 | |||
542 | # | ||
543 | # UBI debugging options | ||
544 | # | ||
545 | # CONFIG_MTD_UBI_DEBUG is not set | ||
546 | # CONFIG_PARPORT is not set | ||
547 | CONFIG_BLK_DEV=y | ||
548 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
549 | CONFIG_BLK_DEV_LOOP=y | ||
550 | CONFIG_BLK_DEV_CRYPTOLOOP=m | ||
551 | CONFIG_BLK_DEV_NBD=m | ||
552 | # CONFIG_BLK_DEV_UB is not set | ||
553 | CONFIG_BLK_DEV_RAM=y | ||
554 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
555 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
556 | # CONFIG_BLK_DEV_XIP is not set | ||
557 | # CONFIG_CDROM_PKTCDVD is not set | ||
558 | # CONFIG_ATA_OVER_ETH is not set | ||
559 | CONFIG_MISC_DEVICES=y | ||
560 | CONFIG_ATMEL_TCLIB=y | ||
561 | CONFIG_ATMEL_TCB_CLKSRC=y | ||
562 | CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0 | ||
563 | # CONFIG_EEPROM_93CX6 is not set | ||
564 | # CONFIG_ICS932S401 is not set | ||
565 | CONFIG_ATMEL_SSC=m | ||
566 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
567 | # CONFIG_C2PORT is not set | ||
568 | CONFIG_HAVE_IDE=y | ||
569 | # CONFIG_IDE is not set | ||
570 | |||
571 | # | ||
572 | # SCSI device support | ||
573 | # | ||
574 | CONFIG_RAID_ATTRS=m | ||
575 | CONFIG_SCSI=m | ||
576 | CONFIG_SCSI_DMA=y | ||
577 | CONFIG_SCSI_TGT=m | ||
578 | # CONFIG_SCSI_NETLINK is not set | ||
579 | # CONFIG_SCSI_PROC_FS is not set | ||
580 | |||
581 | # | ||
582 | # SCSI support type (disk, tape, CD-ROM) | ||
583 | # | ||
584 | CONFIG_BLK_DEV_SD=m | ||
585 | # CONFIG_CHR_DEV_ST is not set | ||
586 | # CONFIG_CHR_DEV_OSST is not set | ||
587 | CONFIG_BLK_DEV_SR=m | ||
588 | # CONFIG_BLK_DEV_SR_VENDOR is not set | ||
589 | CONFIG_CHR_DEV_SG=m | ||
590 | CONFIG_CHR_DEV_SCH=m | ||
591 | |||
592 | # | ||
593 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
594 | # | ||
595 | CONFIG_SCSI_MULTI_LUN=y | ||
596 | CONFIG_SCSI_CONSTANTS=y | ||
597 | CONFIG_SCSI_LOGGING=y | ||
598 | CONFIG_SCSI_SCAN_ASYNC=y | ||
599 | CONFIG_SCSI_WAIT_SCAN=m | ||
600 | |||
601 | # | ||
602 | # SCSI Transports | ||
603 | # | ||
604 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
605 | # CONFIG_SCSI_FC_ATTRS is not set | ||
606 | CONFIG_SCSI_ISCSI_ATTRS=m | ||
607 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
608 | # CONFIG_SCSI_SRP_ATTRS is not set | ||
609 | CONFIG_SCSI_LOWLEVEL=y | ||
610 | # CONFIG_ISCSI_TCP is not set | ||
611 | # CONFIG_SCSI_DEBUG is not set | ||
612 | # CONFIG_SCSI_DH is not set | ||
613 | # CONFIG_ATA is not set | ||
614 | # CONFIG_MD is not set | ||
615 | CONFIG_NETDEVICES=y | ||
616 | CONFIG_DUMMY=m | ||
617 | CONFIG_BONDING=m | ||
618 | CONFIG_MACVLAN=m | ||
619 | CONFIG_EQUALIZER=m | ||
620 | CONFIG_TUN=m | ||
621 | CONFIG_VETH=m | ||
622 | CONFIG_PHYLIB=y | ||
623 | |||
624 | # | ||
625 | # MII PHY device drivers | ||
626 | # | ||
627 | CONFIG_MARVELL_PHY=m | ||
628 | CONFIG_DAVICOM_PHY=m | ||
629 | CONFIG_QSEMI_PHY=m | ||
630 | CONFIG_LXT_PHY=m | ||
631 | CONFIG_CICADA_PHY=m | ||
632 | CONFIG_VITESSE_PHY=m | ||
633 | CONFIG_SMSC_PHY=m | ||
634 | CONFIG_BROADCOM_PHY=m | ||
635 | CONFIG_ICPLUS_PHY=m | ||
636 | # CONFIG_REALTEK_PHY is not set | ||
637 | # CONFIG_FIXED_PHY is not set | ||
638 | CONFIG_MDIO_BITBANG=m | ||
639 | CONFIG_NET_ETHERNET=y | ||
640 | CONFIG_MII=m | ||
641 | CONFIG_MACB=y | ||
642 | # CONFIG_AX88796 is not set | ||
643 | # CONFIG_SMC91X is not set | ||
644 | # CONFIG_DM9000 is not set | ||
645 | # CONFIG_ENC28J60 is not set | ||
646 | # CONFIG_SMC911X is not set | ||
647 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
648 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
649 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
650 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
651 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | ||
652 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | ||
653 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | ||
654 | # CONFIG_B44 is not set | ||
655 | # CONFIG_NETDEV_1000 is not set | ||
656 | # CONFIG_NETDEV_10000 is not set | ||
657 | |||
658 | # | ||
659 | # Wireless LAN | ||
660 | # | ||
661 | CONFIG_WLAN_PRE80211=y | ||
662 | CONFIG_STRIP=m | ||
663 | CONFIG_WLAN_80211=y | ||
664 | CONFIG_LIBERTAS=m | ||
665 | CONFIG_LIBERTAS_USB=m | ||
666 | CONFIG_LIBERTAS_SDIO=m | ||
667 | # CONFIG_LIBERTAS_DEBUG is not set | ||
668 | CONFIG_USB_ZD1201=m | ||
669 | # CONFIG_USB_NET_RNDIS_WLAN is not set | ||
670 | # CONFIG_IWLWIFI_LEDS is not set | ||
671 | CONFIG_HOSTAP=m | ||
672 | CONFIG_HOSTAP_FIRMWARE=y | ||
673 | CONFIG_HOSTAP_FIRMWARE_NVRAM=y | ||
674 | |||
675 | # | ||
676 | # USB Network Adapters | ||
677 | # | ||
678 | CONFIG_USB_CATC=m | ||
679 | CONFIG_USB_KAWETH=m | ||
680 | CONFIG_USB_PEGASUS=m | ||
681 | CONFIG_USB_RTL8150=m | ||
682 | CONFIG_USB_USBNET=m | ||
683 | CONFIG_USB_NET_AX8817X=m | ||
684 | CONFIG_USB_NET_CDCETHER=m | ||
685 | CONFIG_USB_NET_DM9601=m | ||
686 | # CONFIG_USB_NET_SMSC95XX is not set | ||
687 | CONFIG_USB_NET_GL620A=m | ||
688 | CONFIG_USB_NET_NET1080=m | ||
689 | CONFIG_USB_NET_PLUSB=m | ||
690 | CONFIG_USB_NET_MCS7830=m | ||
691 | CONFIG_USB_NET_RNDIS_HOST=m | ||
692 | CONFIG_USB_NET_CDC_SUBSET=m | ||
693 | CONFIG_USB_ALI_M5632=y | ||
694 | CONFIG_USB_AN2720=y | ||
695 | CONFIG_USB_BELKIN=y | ||
696 | CONFIG_USB_ARMLINUX=y | ||
697 | CONFIG_USB_EPSON2888=y | ||
698 | CONFIG_USB_KC2190=y | ||
699 | # CONFIG_USB_NET_ZAURUS is not set | ||
700 | # CONFIG_WAN is not set | ||
701 | # CONFIG_PPP is not set | ||
702 | # CONFIG_SLIP is not set | ||
703 | # CONFIG_NETCONSOLE is not set | ||
704 | # CONFIG_NETPOLL is not set | ||
705 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
706 | # CONFIG_ISDN is not set | ||
707 | |||
708 | # | ||
709 | # Input device support | ||
710 | # | ||
711 | CONFIG_INPUT=y | ||
712 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
713 | CONFIG_INPUT_POLLDEV=m | ||
714 | |||
715 | # | ||
716 | # Userland interfaces | ||
717 | # | ||
718 | CONFIG_INPUT_MOUSEDEV=m | ||
719 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
720 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
721 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
722 | # CONFIG_INPUT_JOYDEV is not set | ||
723 | CONFIG_INPUT_EVDEV=m | ||
724 | CONFIG_INPUT_EVBUG=m | ||
725 | |||
726 | # | ||
727 | # Input Device Drivers | ||
728 | # | ||
729 | CONFIG_INPUT_KEYBOARD=y | ||
730 | CONFIG_KEYBOARD_ATKBD=y | ||
731 | CONFIG_KEYBOARD_SUNKBD=m | ||
732 | CONFIG_KEYBOARD_LKKBD=m | ||
733 | CONFIG_KEYBOARD_XTKBD=m | ||
734 | CONFIG_KEYBOARD_NEWTON=m | ||
735 | CONFIG_KEYBOARD_STOWAWAY=m | ||
736 | CONFIG_KEYBOARD_GPIO=m | ||
737 | CONFIG_INPUT_MOUSE=y | ||
738 | CONFIG_MOUSE_PS2=m | ||
739 | CONFIG_MOUSE_PS2_ALPS=y | ||
740 | CONFIG_MOUSE_PS2_LOGIPS2PP=y | ||
741 | CONFIG_MOUSE_PS2_SYNAPTICS=y | ||
742 | CONFIG_MOUSE_PS2_LIFEBOOK=y | ||
743 | CONFIG_MOUSE_PS2_TRACKPOINT=y | ||
744 | # CONFIG_MOUSE_PS2_ELANTECH is not set | ||
745 | # CONFIG_MOUSE_PS2_TOUCHKIT is not set | ||
746 | CONFIG_MOUSE_SERIAL=m | ||
747 | CONFIG_MOUSE_APPLETOUCH=m | ||
748 | # CONFIG_MOUSE_BCM5974 is not set | ||
749 | CONFIG_MOUSE_VSXXXAA=m | ||
750 | CONFIG_MOUSE_GPIO=m | ||
751 | # CONFIG_INPUT_JOYSTICK is not set | ||
752 | # CONFIG_INPUT_TABLET is not set | ||
753 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
754 | CONFIG_INPUT_MISC=y | ||
755 | # CONFIG_INPUT_ATI_REMOTE is not set | ||
756 | # CONFIG_INPUT_ATI_REMOTE2 is not set | ||
757 | # CONFIG_INPUT_KEYSPAN_REMOTE is not set | ||
758 | # CONFIG_INPUT_POWERMATE is not set | ||
759 | # CONFIG_INPUT_YEALINK is not set | ||
760 | # CONFIG_INPUT_CM109 is not set | ||
761 | CONFIG_INPUT_UINPUT=m | ||
762 | |||
763 | # | ||
764 | # Hardware I/O ports | ||
765 | # | ||
766 | CONFIG_SERIO=y | ||
767 | CONFIG_SERIO_SERPORT=m | ||
768 | CONFIG_SERIO_LIBPS2=y | ||
769 | CONFIG_SERIO_RAW=m | ||
770 | # CONFIG_GAMEPORT is not set | ||
771 | |||
772 | # | ||
773 | # Character devices | ||
774 | # | ||
775 | CONFIG_VT=y | ||
776 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
777 | CONFIG_VT_CONSOLE=y | ||
778 | CONFIG_HW_CONSOLE=y | ||
779 | CONFIG_VT_HW_CONSOLE_BINDING=y | ||
780 | CONFIG_DEVKMEM=y | ||
781 | CONFIG_SERIAL_NONSTANDARD=y | ||
782 | CONFIG_N_HDLC=m | ||
783 | # CONFIG_RISCOM8 is not set | ||
784 | CONFIG_SPECIALIX=m | ||
785 | CONFIG_RIO=m | ||
786 | # CONFIG_RIO_OLDPCI is not set | ||
787 | CONFIG_STALDRV=y | ||
788 | |||
789 | # | ||
790 | # Serial drivers | ||
791 | # | ||
792 | # CONFIG_SERIAL_8250 is not set | ||
793 | |||
794 | # | ||
795 | # Non-8250 serial port support | ||
796 | # | ||
797 | CONFIG_SERIAL_ATMEL=y | ||
798 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
799 | CONFIG_SERIAL_ATMEL_PDC=y | ||
800 | # CONFIG_SERIAL_ATMEL_TTYAT is not set | ||
801 | CONFIG_SERIAL_CORE=y | ||
802 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
803 | CONFIG_UNIX98_PTYS=y | ||
804 | CONFIG_LEGACY_PTYS=y | ||
805 | CONFIG_LEGACY_PTY_COUNT=256 | ||
806 | CONFIG_IPMI_HANDLER=m | ||
807 | # CONFIG_IPMI_PANIC_EVENT is not set | ||
808 | CONFIG_IPMI_DEVICE_INTERFACE=m | ||
809 | CONFIG_IPMI_SI=m | ||
810 | CONFIG_IPMI_WATCHDOG=m | ||
811 | CONFIG_IPMI_POWEROFF=m | ||
812 | CONFIG_HW_RANDOM=y | ||
813 | CONFIG_NVRAM=m | ||
814 | CONFIG_R3964=m | ||
815 | CONFIG_RAW_DRIVER=m | ||
816 | CONFIG_MAX_RAW_DEVS=256 | ||
817 | CONFIG_TCG_TPM=m | ||
818 | CONFIG_TCG_NSC=m | ||
819 | CONFIG_TCG_ATMEL=m | ||
820 | CONFIG_I2C=m | ||
821 | CONFIG_I2C_BOARDINFO=y | ||
822 | CONFIG_I2C_CHARDEV=m | ||
823 | CONFIG_I2C_HELPER_AUTO=y | ||
824 | |||
825 | # | ||
826 | # I2C Hardware Bus support | ||
827 | # | ||
828 | |||
829 | # | ||
830 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
831 | # | ||
832 | # CONFIG_I2C_GPIO is not set | ||
833 | # CONFIG_I2C_OCORES is not set | ||
834 | # CONFIG_I2C_SIMTEC is not set | ||
835 | |||
836 | # | ||
837 | # External I2C/SMBus adapter drivers | ||
838 | # | ||
839 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
840 | # CONFIG_I2C_TAOS_EVM is not set | ||
841 | # CONFIG_I2C_TINY_USB is not set | ||
842 | |||
843 | # | ||
844 | # Other I2C/SMBus bus drivers | ||
845 | # | ||
846 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
847 | # CONFIG_I2C_STUB is not set | ||
848 | |||
849 | # | ||
850 | # Miscellaneous I2C Chip support | ||
851 | # | ||
852 | CONFIG_DS1682=m | ||
853 | # CONFIG_AT24 is not set | ||
854 | CONFIG_SENSORS_EEPROM=m | ||
855 | CONFIG_SENSORS_PCF8574=m | ||
856 | # CONFIG_PCF8575 is not set | ||
857 | # CONFIG_SENSORS_PCA9539 is not set | ||
858 | CONFIG_SENSORS_PCF8591=m | ||
859 | CONFIG_SENSORS_MAX6875=m | ||
860 | CONFIG_SENSORS_TSL2550=m | ||
861 | # CONFIG_I2C_DEBUG_CORE is not set | ||
862 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
863 | # CONFIG_I2C_DEBUG_BUS is not set | ||
864 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
865 | CONFIG_SPI=y | ||
866 | CONFIG_SPI_MASTER=y | ||
867 | |||
868 | # | ||
869 | # SPI Master Controller Drivers | ||
870 | # | ||
871 | CONFIG_SPI_ATMEL=y | ||
872 | CONFIG_SPI_BITBANG=m | ||
873 | |||
874 | # | ||
875 | # SPI Protocol Masters | ||
876 | # | ||
877 | CONFIG_SPI_AT25=m | ||
878 | CONFIG_SPI_SPIDEV=m | ||
879 | # CONFIG_SPI_TLE62X0 is not set | ||
880 | # CONFIG_W1 is not set | ||
881 | # CONFIG_POWER_SUPPLY is not set | ||
882 | # CONFIG_HWMON is not set | ||
883 | # CONFIG_THERMAL is not set | ||
884 | # CONFIG_THERMAL_HWMON is not set | ||
885 | # CONFIG_WATCHDOG is not set | ||
886 | CONFIG_SSB_POSSIBLE=y | ||
887 | |||
888 | # | ||
889 | # Sonics Silicon Backplane | ||
890 | # | ||
891 | # CONFIG_SSB is not set | ||
892 | |||
893 | # | ||
894 | # Multifunction device drivers | ||
895 | # | ||
896 | # CONFIG_MFD_CORE is not set | ||
897 | # CONFIG_MFD_SM501 is not set | ||
898 | # CONFIG_HTC_PASIC3 is not set | ||
899 | # CONFIG_MFD_TMIO is not set | ||
900 | # CONFIG_MFD_T7L66XB is not set | ||
901 | # CONFIG_MFD_TC6387XB is not set | ||
902 | # CONFIG_MFD_WM8400 is not set | ||
903 | # CONFIG_MFD_WM8350_I2C is not set | ||
904 | |||
905 | # | ||
906 | # Multimedia devices | ||
907 | # | ||
908 | |||
909 | # | ||
910 | # Multimedia core support | ||
911 | # | ||
912 | # CONFIG_VIDEO_DEV is not set | ||
913 | # CONFIG_DVB_CORE is not set | ||
914 | # CONFIG_VIDEO_MEDIA is not set | ||
915 | |||
916 | # | ||
917 | # Multimedia drivers | ||
918 | # | ||
919 | # CONFIG_DAB is not set | ||
920 | |||
921 | # | ||
922 | # Graphics support | ||
923 | # | ||
924 | # CONFIG_VGASTATE is not set | ||
925 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
926 | # CONFIG_FB is not set | ||
927 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
928 | |||
929 | # | ||
930 | # Display device support | ||
931 | # | ||
932 | # CONFIG_DISPLAY_SUPPORT is not set | ||
933 | |||
934 | # | ||
935 | # Console display driver support | ||
936 | # | ||
937 | # CONFIG_VGA_CONSOLE is not set | ||
938 | CONFIG_DUMMY_CONSOLE=y | ||
939 | CONFIG_SOUND=m | ||
940 | CONFIG_SOUND_OSS_CORE=y | ||
941 | CONFIG_SND=m | ||
942 | CONFIG_SND_TIMER=m | ||
943 | CONFIG_SND_PCM=m | ||
944 | CONFIG_SND_HWDEP=m | ||
945 | CONFIG_SND_RAWMIDI=m | ||
946 | CONFIG_SND_SEQUENCER=m | ||
947 | CONFIG_SND_SEQ_DUMMY=m | ||
948 | CONFIG_SND_OSSEMUL=y | ||
949 | CONFIG_SND_MIXER_OSS=m | ||
950 | CONFIG_SND_PCM_OSS=m | ||
951 | # CONFIG_SND_PCM_OSS_PLUGINS is not set | ||
952 | CONFIG_SND_SEQUENCER_OSS=y | ||
953 | CONFIG_SND_DYNAMIC_MINORS=y | ||
954 | CONFIG_SND_SUPPORT_OLD_API=y | ||
955 | # CONFIG_SND_VERBOSE_PROCFS is not set | ||
956 | # CONFIG_SND_VERBOSE_PRINTK is not set | ||
957 | # CONFIG_SND_DEBUG is not set | ||
958 | CONFIG_SND_DRIVERS=y | ||
959 | CONFIG_SND_DUMMY=m | ||
960 | CONFIG_SND_VIRMIDI=m | ||
961 | # CONFIG_SND_MTPAV is not set | ||
962 | # CONFIG_SND_SERIAL_U16550 is not set | ||
963 | # CONFIG_SND_MPU401 is not set | ||
964 | CONFIG_SND_ARM=y | ||
965 | CONFIG_SND_SPI=y | ||
966 | # CONFIG_SND_AT73C213 is not set | ||
967 | CONFIG_SND_USB=y | ||
968 | CONFIG_SND_USB_AUDIO=m | ||
969 | CONFIG_SND_USB_CAIAQ=m | ||
970 | CONFIG_SND_USB_CAIAQ_INPUT=y | ||
971 | # CONFIG_SND_SOC is not set | ||
972 | # CONFIG_SOUND_PRIME is not set | ||
973 | CONFIG_HID_SUPPORT=y | ||
974 | CONFIG_HID=m | ||
975 | # CONFIG_HID_DEBUG is not set | ||
976 | CONFIG_HIDRAW=y | ||
977 | |||
978 | # | ||
979 | # USB Input Devices | ||
980 | # | ||
981 | CONFIG_USB_HID=m | ||
982 | # CONFIG_HID_PID is not set | ||
983 | CONFIG_USB_HIDDEV=y | ||
984 | |||
985 | # | ||
986 | # USB HID Boot Protocol drivers | ||
987 | # | ||
988 | CONFIG_USB_KBD=m | ||
989 | CONFIG_USB_MOUSE=m | ||
990 | |||
991 | # | ||
992 | # Special HID drivers | ||
993 | # | ||
994 | CONFIG_HID_COMPAT=y | ||
995 | CONFIG_HID_A4TECH=m | ||
996 | CONFIG_HID_APPLE=m | ||
997 | CONFIG_HID_BELKIN=m | ||
998 | CONFIG_HID_BRIGHT=m | ||
999 | CONFIG_HID_CHERRY=m | ||
1000 | CONFIG_HID_CHICONY=m | ||
1001 | CONFIG_HID_CYPRESS=m | ||
1002 | CONFIG_HID_DELL=m | ||
1003 | CONFIG_HID_EZKEY=m | ||
1004 | CONFIG_HID_GYRATION=m | ||
1005 | CONFIG_HID_LOGITECH=m | ||
1006 | # CONFIG_LOGITECH_FF is not set | ||
1007 | # CONFIG_LOGIRUMBLEPAD2_FF is not set | ||
1008 | CONFIG_HID_MICROSOFT=m | ||
1009 | CONFIG_HID_MONTEREY=m | ||
1010 | CONFIG_HID_PANTHERLORD=m | ||
1011 | # CONFIG_PANTHERLORD_FF is not set | ||
1012 | CONFIG_HID_PETALYNX=m | ||
1013 | CONFIG_HID_SAMSUNG=m | ||
1014 | CONFIG_HID_SONY=m | ||
1015 | CONFIG_HID_SUNPLUS=m | ||
1016 | # CONFIG_THRUSTMASTER_FF is not set | ||
1017 | # CONFIG_ZEROPLUS_FF is not set | ||
1018 | CONFIG_USB_SUPPORT=y | ||
1019 | CONFIG_USB_ARCH_HAS_HCD=y | ||
1020 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
1021 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
1022 | CONFIG_USB=y | ||
1023 | # CONFIG_USB_DEBUG is not set | ||
1024 | # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set | ||
1025 | |||
1026 | # | ||
1027 | # Miscellaneous USB options | ||
1028 | # | ||
1029 | CONFIG_USB_DEVICEFS=y | ||
1030 | # CONFIG_USB_DEVICE_CLASS is not set | ||
1031 | CONFIG_USB_DYNAMIC_MINORS=y | ||
1032 | # CONFIG_USB_OTG is not set | ||
1033 | # CONFIG_USB_OTG_WHITELIST is not set | ||
1034 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
1035 | CONFIG_USB_MON=y | ||
1036 | # CONFIG_USB_WUSB is not set | ||
1037 | # CONFIG_USB_WUSB_CBAF is not set | ||
1038 | |||
1039 | # | ||
1040 | # USB Host Controller Drivers | ||
1041 | # | ||
1042 | # CONFIG_USB_C67X00_HCD is not set | ||
1043 | # CONFIG_USB_ISP116X_HCD is not set | ||
1044 | CONFIG_USB_OHCI_HCD=y | ||
1045 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set | ||
1046 | # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set | ||
1047 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
1048 | # CONFIG_USB_SL811_HCD is not set | ||
1049 | # CONFIG_USB_R8A66597_HCD is not set | ||
1050 | # CONFIG_USB_HWA_HCD is not set | ||
1051 | # CONFIG_USB_MUSB_HDRC is not set | ||
1052 | # CONFIG_USB_GADGET_MUSB_HDRC is not set | ||
1053 | |||
1054 | # | ||
1055 | # USB Device Class drivers | ||
1056 | # | ||
1057 | # CONFIG_USB_ACM is not set | ||
1058 | # CONFIG_USB_PRINTER is not set | ||
1059 | # CONFIG_USB_WDM is not set | ||
1060 | # CONFIG_USB_TMC is not set | ||
1061 | |||
1062 | # | ||
1063 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; | ||
1064 | # | ||
1065 | |||
1066 | # | ||
1067 | # see USB_STORAGE Help for more information | ||
1068 | # | ||
1069 | CONFIG_USB_STORAGE=m | ||
1070 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
1071 | CONFIG_USB_STORAGE_DATAFAB=y | ||
1072 | CONFIG_USB_STORAGE_FREECOM=y | ||
1073 | CONFIG_USB_STORAGE_ISD200=y | ||
1074 | CONFIG_USB_STORAGE_DPCM=y | ||
1075 | CONFIG_USB_STORAGE_USBAT=y | ||
1076 | CONFIG_USB_STORAGE_SDDR09=y | ||
1077 | CONFIG_USB_STORAGE_SDDR55=y | ||
1078 | CONFIG_USB_STORAGE_JUMPSHOT=y | ||
1079 | CONFIG_USB_STORAGE_ALAUDA=y | ||
1080 | # CONFIG_USB_STORAGE_ONETOUCH is not set | ||
1081 | CONFIG_USB_STORAGE_KARMA=y | ||
1082 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
1083 | CONFIG_USB_LIBUSUAL=y | ||
1084 | |||
1085 | # | ||
1086 | # USB Imaging devices | ||
1087 | # | ||
1088 | # CONFIG_USB_MDC800 is not set | ||
1089 | # CONFIG_USB_MICROTEK is not set | ||
1090 | |||
1091 | # | ||
1092 | # USB port drivers | ||
1093 | # | ||
1094 | CONFIG_USB_SERIAL=m | ||
1095 | CONFIG_USB_EZUSB=y | ||
1096 | CONFIG_USB_SERIAL_GENERIC=y | ||
1097 | # CONFIG_USB_SERIAL_AIRCABLE is not set | ||
1098 | # CONFIG_USB_SERIAL_ARK3116 is not set | ||
1099 | # CONFIG_USB_SERIAL_BELKIN is not set | ||
1100 | # CONFIG_USB_SERIAL_CH341 is not set | ||
1101 | # CONFIG_USB_SERIAL_WHITEHEAT is not set | ||
1102 | # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set | ||
1103 | # CONFIG_USB_SERIAL_CP2101 is not set | ||
1104 | # CONFIG_USB_SERIAL_CYPRESS_M8 is not set | ||
1105 | # CONFIG_USB_SERIAL_EMPEG is not set | ||
1106 | # CONFIG_USB_SERIAL_FTDI_SIO is not set | ||
1107 | # CONFIG_USB_SERIAL_FUNSOFT is not set | ||
1108 | # CONFIG_USB_SERIAL_VISOR is not set | ||
1109 | # CONFIG_USB_SERIAL_IPAQ is not set | ||
1110 | # CONFIG_USB_SERIAL_IR is not set | ||
1111 | # CONFIG_USB_SERIAL_EDGEPORT is not set | ||
1112 | # CONFIG_USB_SERIAL_EDGEPORT_TI is not set | ||
1113 | # CONFIG_USB_SERIAL_GARMIN is not set | ||
1114 | # CONFIG_USB_SERIAL_IPW is not set | ||
1115 | # CONFIG_USB_SERIAL_IUU is not set | ||
1116 | # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set | ||
1117 | # CONFIG_USB_SERIAL_KEYSPAN is not set | ||
1118 | # CONFIG_USB_SERIAL_KLSI is not set | ||
1119 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set | ||
1120 | # CONFIG_USB_SERIAL_MCT_U232 is not set | ||
1121 | # CONFIG_USB_SERIAL_MOS7720 is not set | ||
1122 | # CONFIG_USB_SERIAL_MOS7840 is not set | ||
1123 | # CONFIG_USB_SERIAL_MOTOROLA is not set | ||
1124 | # CONFIG_USB_SERIAL_NAVMAN is not set | ||
1125 | CONFIG_USB_SERIAL_PL2303=m | ||
1126 | # CONFIG_USB_SERIAL_OTI6858 is not set | ||
1127 | CONFIG_USB_SERIAL_SPCP8X5=m | ||
1128 | # CONFIG_USB_SERIAL_HP4X is not set | ||
1129 | # CONFIG_USB_SERIAL_SAFE is not set | ||
1130 | # CONFIG_USB_SERIAL_SIERRAWIRELESS is not set | ||
1131 | # CONFIG_USB_SERIAL_TI is not set | ||
1132 | # CONFIG_USB_SERIAL_CYBERJACK is not set | ||
1133 | # CONFIG_USB_SERIAL_XIRCOM is not set | ||
1134 | # CONFIG_USB_SERIAL_OPTION is not set | ||
1135 | # CONFIG_USB_SERIAL_OMNINET is not set | ||
1136 | CONFIG_USB_SERIAL_DEBUG=m | ||
1137 | |||
1138 | # | ||
1139 | # USB Miscellaneous drivers | ||
1140 | # | ||
1141 | CONFIG_USB_EMI62=m | ||
1142 | CONFIG_USB_EMI26=m | ||
1143 | CONFIG_USB_ADUTUX=m | ||
1144 | # CONFIG_USB_SEVSEG is not set | ||
1145 | # CONFIG_USB_RIO500 is not set | ||
1146 | # CONFIG_USB_LEGOTOWER is not set | ||
1147 | # CONFIG_USB_LCD is not set | ||
1148 | # CONFIG_USB_BERRY_CHARGE is not set | ||
1149 | # CONFIG_USB_LED is not set | ||
1150 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
1151 | # CONFIG_USB_CYTHERM is not set | ||
1152 | # CONFIG_USB_PHIDGET is not set | ||
1153 | # CONFIG_USB_IDMOUSE is not set | ||
1154 | # CONFIG_USB_FTDI_ELAN is not set | ||
1155 | # CONFIG_USB_APPLEDISPLAY is not set | ||
1156 | # CONFIG_USB_LD is not set | ||
1157 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1158 | # CONFIG_USB_IOWARRIOR is not set | ||
1159 | CONFIG_USB_TEST=m | ||
1160 | # CONFIG_USB_ISIGHTFW is not set | ||
1161 | # CONFIG_USB_VST is not set | ||
1162 | CONFIG_USB_GADGET=m | ||
1163 | CONFIG_USB_GADGET_DEBUG_FILES=y | ||
1164 | CONFIG_USB_GADGET_DEBUG_FS=y | ||
1165 | CONFIG_USB_GADGET_VBUS_DRAW=2 | ||
1166 | CONFIG_USB_GADGET_SELECTED=y | ||
1167 | CONFIG_USB_GADGET_AT91=y | ||
1168 | CONFIG_USB_AT91=m | ||
1169 | # CONFIG_USB_GADGET_ATMEL_USBA is not set | ||
1170 | # CONFIG_USB_GADGET_FSL_USB2 is not set | ||
1171 | # CONFIG_USB_GADGET_LH7A40X is not set | ||
1172 | # CONFIG_USB_GADGET_OMAP is not set | ||
1173 | # CONFIG_USB_GADGET_PXA25X is not set | ||
1174 | # CONFIG_USB_GADGET_PXA27X is not set | ||
1175 | # CONFIG_USB_GADGET_S3C2410 is not set | ||
1176 | # CONFIG_USB_GADGET_M66592 is not set | ||
1177 | # CONFIG_USB_GADGET_AMD5536UDC is not set | ||
1178 | # CONFIG_USB_GADGET_FSL_QE is not set | ||
1179 | # CONFIG_USB_GADGET_NET2280 is not set | ||
1180 | # CONFIG_USB_GADGET_GOKU is not set | ||
1181 | # CONFIG_USB_GADGET_DUMMY_HCD is not set | ||
1182 | # CONFIG_USB_GADGET_DUALSPEED is not set | ||
1183 | CONFIG_USB_ZERO=m | ||
1184 | CONFIG_USB_ETH=m | ||
1185 | CONFIG_USB_ETH_RNDIS=y | ||
1186 | CONFIG_USB_GADGETFS=m | ||
1187 | CONFIG_USB_FILE_STORAGE=m | ||
1188 | # CONFIG_USB_FILE_STORAGE_TEST is not set | ||
1189 | CONFIG_USB_G_SERIAL=m | ||
1190 | CONFIG_USB_MIDI_GADGET=m | ||
1191 | # CONFIG_USB_G_PRINTER is not set | ||
1192 | # CONFIG_USB_CDC_COMPOSITE is not set | ||
1193 | CONFIG_MMC=y | ||
1194 | # CONFIG_MMC_DEBUG is not set | ||
1195 | # CONFIG_MMC_UNSAFE_RESUME is not set | ||
1196 | |||
1197 | # | ||
1198 | # MMC/SD/SDIO Card Drivers | ||
1199 | # | ||
1200 | CONFIG_MMC_BLOCK=y | ||
1201 | CONFIG_MMC_BLOCK_BOUNCE=y | ||
1202 | CONFIG_SDIO_UART=m | ||
1203 | # CONFIG_MMC_TEST is not set | ||
1204 | |||
1205 | # | ||
1206 | # MMC/SD/SDIO Host Controller Drivers | ||
1207 | # | ||
1208 | # CONFIG_MMC_SDHCI is not set | ||
1209 | CONFIG_MMC_AT91=y | ||
1210 | CONFIG_MMC_SPI=m | ||
1211 | # CONFIG_MEMSTICK is not set | ||
1212 | # CONFIG_ACCESSIBILITY is not set | ||
1213 | CONFIG_NEW_LEDS=y | ||
1214 | CONFIG_LEDS_CLASS=m | ||
1215 | |||
1216 | # | ||
1217 | # LED drivers | ||
1218 | # | ||
1219 | # CONFIG_LEDS_PCA9532 is not set | ||
1220 | CONFIG_LEDS_GPIO=m | ||
1221 | # CONFIG_LEDS_PCA955X is not set | ||
1222 | |||
1223 | # | ||
1224 | # LED Triggers | ||
1225 | # | ||
1226 | CONFIG_LEDS_TRIGGERS=y | ||
1227 | CONFIG_LEDS_TRIGGER_TIMER=m | ||
1228 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m | ||
1229 | # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set | ||
1230 | # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set | ||
1231 | CONFIG_RTC_LIB=y | ||
1232 | CONFIG_RTC_CLASS=y | ||
1233 | CONFIG_RTC_HCTOSYS=y | ||
1234 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
1235 | # CONFIG_RTC_DEBUG is not set | ||
1236 | |||
1237 | # | ||
1238 | # RTC interfaces | ||
1239 | # | ||
1240 | CONFIG_RTC_INTF_SYSFS=y | ||
1241 | CONFIG_RTC_INTF_PROC=y | ||
1242 | CONFIG_RTC_INTF_DEV=y | ||
1243 | CONFIG_RTC_INTF_DEV_UIE_EMUL=y | ||
1244 | # CONFIG_RTC_DRV_TEST is not set | ||
1245 | |||
1246 | # | ||
1247 | # I2C RTC drivers | ||
1248 | # | ||
1249 | CONFIG_RTC_DRV_DS1307=m | ||
1250 | # CONFIG_RTC_DRV_DS1374 is not set | ||
1251 | # CONFIG_RTC_DRV_DS1672 is not set | ||
1252 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
1253 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
1254 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
1255 | # CONFIG_RTC_DRV_X1205 is not set | ||
1256 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
1257 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
1258 | # CONFIG_RTC_DRV_M41T80 is not set | ||
1259 | # CONFIG_RTC_DRV_S35390A is not set | ||
1260 | # CONFIG_RTC_DRV_FM3130 is not set | ||
1261 | # CONFIG_RTC_DRV_RX8581 is not set | ||
1262 | |||
1263 | # | ||
1264 | # SPI RTC drivers | ||
1265 | # | ||
1266 | # CONFIG_RTC_DRV_M41T94 is not set | ||
1267 | CONFIG_RTC_DRV_DS1305=y | ||
1268 | # CONFIG_RTC_DRV_DS1390 is not set | ||
1269 | # CONFIG_RTC_DRV_MAX6902 is not set | ||
1270 | # CONFIG_RTC_DRV_R9701 is not set | ||
1271 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
1272 | # CONFIG_RTC_DRV_DS3234 is not set | ||
1273 | |||
1274 | # | ||
1275 | # Platform RTC drivers | ||
1276 | # | ||
1277 | # CONFIG_RTC_DRV_CMOS is not set | ||
1278 | # CONFIG_RTC_DRV_DS1286 is not set | ||
1279 | # CONFIG_RTC_DRV_DS1511 is not set | ||
1280 | # CONFIG_RTC_DRV_DS1553 is not set | ||
1281 | # CONFIG_RTC_DRV_DS1742 is not set | ||
1282 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
1283 | # CONFIG_RTC_DRV_M48T86 is not set | ||
1284 | # CONFIG_RTC_DRV_M48T35 is not set | ||
1285 | # CONFIG_RTC_DRV_M48T59 is not set | ||
1286 | # CONFIG_RTC_DRV_BQ4802 is not set | ||
1287 | # CONFIG_RTC_DRV_V3020 is not set | ||
1288 | |||
1289 | # | ||
1290 | # on-CPU RTC drivers | ||
1291 | # | ||
1292 | # CONFIG_RTC_DRV_AT91SAM9 is not set | ||
1293 | # CONFIG_DMADEVICES is not set | ||
1294 | # CONFIG_REGULATOR is not set | ||
1295 | # CONFIG_UIO is not set | ||
1296 | |||
1297 | # | ||
1298 | # File systems | ||
1299 | # | ||
1300 | CONFIG_EXT2_FS=y | ||
1301 | CONFIG_EXT2_FS_XATTR=y | ||
1302 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
1303 | CONFIG_EXT2_FS_SECURITY=y | ||
1304 | # CONFIG_EXT2_FS_XIP is not set | ||
1305 | CONFIG_EXT3_FS=y | ||
1306 | CONFIG_EXT3_FS_XATTR=y | ||
1307 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
1308 | CONFIG_EXT3_FS_SECURITY=y | ||
1309 | # CONFIG_EXT4_FS is not set | ||
1310 | CONFIG_JBD=y | ||
1311 | CONFIG_JBD_DEBUG=y | ||
1312 | CONFIG_FS_MBCACHE=y | ||
1313 | CONFIG_REISERFS_FS=m | ||
1314 | CONFIG_REISERFS_CHECK=y | ||
1315 | CONFIG_REISERFS_PROC_INFO=y | ||
1316 | CONFIG_REISERFS_FS_XATTR=y | ||
1317 | CONFIG_REISERFS_FS_POSIX_ACL=y | ||
1318 | CONFIG_REISERFS_FS_SECURITY=y | ||
1319 | # CONFIG_JFS_FS is not set | ||
1320 | CONFIG_FS_POSIX_ACL=y | ||
1321 | CONFIG_FILE_LOCKING=y | ||
1322 | # CONFIG_XFS_FS is not set | ||
1323 | # CONFIG_OCFS2_FS is not set | ||
1324 | CONFIG_DNOTIFY=y | ||
1325 | CONFIG_INOTIFY=y | ||
1326 | CONFIG_INOTIFY_USER=y | ||
1327 | # CONFIG_QUOTA is not set | ||
1328 | # CONFIG_AUTOFS_FS is not set | ||
1329 | # CONFIG_AUTOFS4_FS is not set | ||
1330 | CONFIG_FUSE_FS=m | ||
1331 | CONFIG_GENERIC_ACL=y | ||
1332 | |||
1333 | # | ||
1334 | # CD-ROM/DVD Filesystems | ||
1335 | # | ||
1336 | # CONFIG_ISO9660_FS is not set | ||
1337 | # CONFIG_UDF_FS is not set | ||
1338 | |||
1339 | # | ||
1340 | # DOS/FAT/NT Filesystems | ||
1341 | # | ||
1342 | CONFIG_FAT_FS=y | ||
1343 | CONFIG_MSDOS_FS=m | ||
1344 | CONFIG_VFAT_FS=y | ||
1345 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
1346 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
1347 | CONFIG_NTFS_FS=m | ||
1348 | # CONFIG_NTFS_DEBUG is not set | ||
1349 | CONFIG_NTFS_RW=y | ||
1350 | |||
1351 | # | ||
1352 | # Pseudo filesystems | ||
1353 | # | ||
1354 | CONFIG_PROC_FS=y | ||
1355 | CONFIG_PROC_SYSCTL=y | ||
1356 | CONFIG_PROC_PAGE_MONITOR=y | ||
1357 | CONFIG_SYSFS=y | ||
1358 | CONFIG_TMPFS=y | ||
1359 | CONFIG_TMPFS_POSIX_ACL=y | ||
1360 | # CONFIG_HUGETLB_PAGE is not set | ||
1361 | CONFIG_CONFIGFS_FS=m | ||
1362 | |||
1363 | # | ||
1364 | # Miscellaneous filesystems | ||
1365 | # | ||
1366 | # CONFIG_ADFS_FS is not set | ||
1367 | # CONFIG_AFFS_FS is not set | ||
1368 | # CONFIG_HFS_FS is not set | ||
1369 | # CONFIG_HFSPLUS_FS is not set | ||
1370 | # CONFIG_BEFS_FS is not set | ||
1371 | # CONFIG_BFS_FS is not set | ||
1372 | # CONFIG_EFS_FS is not set | ||
1373 | CONFIG_JFFS2_FS=m | ||
1374 | CONFIG_JFFS2_FS_DEBUG=0 | ||
1375 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
1376 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
1377 | # CONFIG_JFFS2_SUMMARY is not set | ||
1378 | # CONFIG_JFFS2_FS_XATTR is not set | ||
1379 | CONFIG_JFFS2_COMPRESSION_OPTIONS=y | ||
1380 | CONFIG_JFFS2_ZLIB=y | ||
1381 | CONFIG_JFFS2_LZO=y | ||
1382 | CONFIG_JFFS2_RTIME=y | ||
1383 | # CONFIG_JFFS2_RUBIN is not set | ||
1384 | # CONFIG_JFFS2_CMODE_NONE is not set | ||
1385 | # CONFIG_JFFS2_CMODE_PRIORITY is not set | ||
1386 | # CONFIG_JFFS2_CMODE_SIZE is not set | ||
1387 | CONFIG_JFFS2_CMODE_FAVOURLZO=y | ||
1388 | # CONFIG_UBIFS_FS is not set | ||
1389 | CONFIG_CRAMFS=m | ||
1390 | # CONFIG_VXFS_FS is not set | ||
1391 | # CONFIG_MINIX_FS is not set | ||
1392 | # CONFIG_OMFS_FS is not set | ||
1393 | # CONFIG_HPFS_FS is not set | ||
1394 | # CONFIG_QNX4FS_FS is not set | ||
1395 | # CONFIG_ROMFS_FS is not set | ||
1396 | # CONFIG_SYSV_FS is not set | ||
1397 | # CONFIG_UFS_FS is not set | ||
1398 | CONFIG_NETWORK_FILESYSTEMS=y | ||
1399 | CONFIG_NFS_FS=m | ||
1400 | CONFIG_NFS_V3=y | ||
1401 | CONFIG_NFS_V3_ACL=y | ||
1402 | CONFIG_NFS_V4=y | ||
1403 | CONFIG_NFSD=m | ||
1404 | CONFIG_NFSD_V2_ACL=y | ||
1405 | CONFIG_NFSD_V3=y | ||
1406 | CONFIG_NFSD_V3_ACL=y | ||
1407 | CONFIG_NFSD_V4=y | ||
1408 | CONFIG_LOCKD=m | ||
1409 | CONFIG_LOCKD_V4=y | ||
1410 | CONFIG_EXPORTFS=m | ||
1411 | CONFIG_NFS_ACL_SUPPORT=m | ||
1412 | CONFIG_NFS_COMMON=y | ||
1413 | CONFIG_SUNRPC=m | ||
1414 | CONFIG_SUNRPC_GSS=m | ||
1415 | # CONFIG_SUNRPC_REGISTER_V4 is not set | ||
1416 | CONFIG_RPCSEC_GSS_KRB5=m | ||
1417 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1418 | # CONFIG_SMB_FS is not set | ||
1419 | CONFIG_CIFS=m | ||
1420 | # CONFIG_CIFS_STATS is not set | ||
1421 | CONFIG_CIFS_WEAK_PW_HASH=y | ||
1422 | # CONFIG_CIFS_XATTR is not set | ||
1423 | # CONFIG_CIFS_DEBUG2 is not set | ||
1424 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
1425 | # CONFIG_NCP_FS is not set | ||
1426 | # CONFIG_CODA_FS is not set | ||
1427 | # CONFIG_AFS_FS is not set | ||
1428 | |||
1429 | # | ||
1430 | # Partition Types | ||
1431 | # | ||
1432 | CONFIG_PARTITION_ADVANCED=y | ||
1433 | # CONFIG_ACORN_PARTITION is not set | ||
1434 | # CONFIG_OSF_PARTITION is not set | ||
1435 | # CONFIG_AMIGA_PARTITION is not set | ||
1436 | # CONFIG_ATARI_PARTITION is not set | ||
1437 | CONFIG_MAC_PARTITION=y | ||
1438 | CONFIG_MSDOS_PARTITION=y | ||
1439 | CONFIG_BSD_DISKLABEL=y | ||
1440 | CONFIG_MINIX_SUBPARTITION=y | ||
1441 | CONFIG_SOLARIS_X86_PARTITION=y | ||
1442 | CONFIG_UNIXWARE_DISKLABEL=y | ||
1443 | CONFIG_LDM_PARTITION=y | ||
1444 | CONFIG_LDM_DEBUG=y | ||
1445 | CONFIG_SGI_PARTITION=y | ||
1446 | # CONFIG_ULTRIX_PARTITION is not set | ||
1447 | CONFIG_SUN_PARTITION=y | ||
1448 | # CONFIG_KARMA_PARTITION is not set | ||
1449 | # CONFIG_EFI_PARTITION is not set | ||
1450 | # CONFIG_SYSV68_PARTITION is not set | ||
1451 | CONFIG_NLS=y | ||
1452 | CONFIG_NLS_DEFAULT="cp437" | ||
1453 | CONFIG_NLS_CODEPAGE_437=y | ||
1454 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1455 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1456 | CONFIG_NLS_CODEPAGE_850=m | ||
1457 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1458 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1459 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1460 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1461 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1462 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1463 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1464 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1465 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1466 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1467 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1468 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1469 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1470 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1471 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1472 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1473 | # CONFIG_NLS_ISO8859_8 is not set | ||
1474 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1475 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1476 | CONFIG_NLS_ASCII=y | ||
1477 | CONFIG_NLS_ISO8859_1=y | ||
1478 | # CONFIG_NLS_ISO8859_2 is not set | ||
1479 | # CONFIG_NLS_ISO8859_3 is not set | ||
1480 | # CONFIG_NLS_ISO8859_4 is not set | ||
1481 | # CONFIG_NLS_ISO8859_5 is not set | ||
1482 | # CONFIG_NLS_ISO8859_6 is not set | ||
1483 | # CONFIG_NLS_ISO8859_7 is not set | ||
1484 | # CONFIG_NLS_ISO8859_9 is not set | ||
1485 | # CONFIG_NLS_ISO8859_13 is not set | ||
1486 | # CONFIG_NLS_ISO8859_14 is not set | ||
1487 | # CONFIG_NLS_ISO8859_15 is not set | ||
1488 | # CONFIG_NLS_KOI8_R is not set | ||
1489 | # CONFIG_NLS_KOI8_U is not set | ||
1490 | CONFIG_NLS_UTF8=m | ||
1491 | CONFIG_DLM=m | ||
1492 | # CONFIG_DLM_DEBUG is not set | ||
1493 | |||
1494 | # | ||
1495 | # Kernel hacking | ||
1496 | # | ||
1497 | CONFIG_PRINTK_TIME=y | ||
1498 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
1499 | CONFIG_ENABLE_MUST_CHECK=y | ||
1500 | CONFIG_FRAME_WARN=1024 | ||
1501 | CONFIG_MAGIC_SYSRQ=y | ||
1502 | CONFIG_UNUSED_SYMBOLS=y | ||
1503 | CONFIG_DEBUG_FS=y | ||
1504 | # CONFIG_HEADERS_CHECK is not set | ||
1505 | # CONFIG_DEBUG_KERNEL is not set | ||
1506 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
1507 | # CONFIG_DEBUG_MEMORY_INIT is not set | ||
1508 | CONFIG_FRAME_POINTER=y | ||
1509 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
1510 | # CONFIG_LATENCYTOP is not set | ||
1511 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
1512 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
1513 | |||
1514 | # | ||
1515 | # Tracers | ||
1516 | # | ||
1517 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | ||
1518 | # CONFIG_SAMPLES is not set | ||
1519 | CONFIG_HAVE_ARCH_KGDB=y | ||
1520 | # CONFIG_DEBUG_USER is not set | ||
1521 | |||
1522 | # | ||
1523 | # Security options | ||
1524 | # | ||
1525 | # CONFIG_KEYS is not set | ||
1526 | # CONFIG_SECURITY is not set | ||
1527 | CONFIG_SECURITYFS=y | ||
1528 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
1529 | CONFIG_CRYPTO=y | ||
1530 | |||
1531 | # | ||
1532 | # Crypto core or helper | ||
1533 | # | ||
1534 | # CONFIG_CRYPTO_FIPS is not set | ||
1535 | CONFIG_CRYPTO_ALGAPI=y | ||
1536 | CONFIG_CRYPTO_AEAD=y | ||
1537 | CONFIG_CRYPTO_BLKCIPHER=y | ||
1538 | CONFIG_CRYPTO_HASH=y | ||
1539 | CONFIG_CRYPTO_RNG=y | ||
1540 | CONFIG_CRYPTO_MANAGER=y | ||
1541 | CONFIG_CRYPTO_GF128MUL=m | ||
1542 | # CONFIG_CRYPTO_NULL is not set | ||
1543 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1544 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1545 | # CONFIG_CRYPTO_TEST is not set | ||
1546 | |||
1547 | # | ||
1548 | # Authenticated Encryption with Associated Data | ||
1549 | # | ||
1550 | # CONFIG_CRYPTO_CCM is not set | ||
1551 | # CONFIG_CRYPTO_GCM is not set | ||
1552 | # CONFIG_CRYPTO_SEQIV is not set | ||
1553 | |||
1554 | # | ||
1555 | # Block modes | ||
1556 | # | ||
1557 | CONFIG_CRYPTO_CBC=m | ||
1558 | # CONFIG_CRYPTO_CTR is not set | ||
1559 | # CONFIG_CRYPTO_CTS is not set | ||
1560 | CONFIG_CRYPTO_ECB=m | ||
1561 | # CONFIG_CRYPTO_LRW is not set | ||
1562 | # CONFIG_CRYPTO_PCBC is not set | ||
1563 | # CONFIG_CRYPTO_XTS is not set | ||
1564 | |||
1565 | # | ||
1566 | # Hash modes | ||
1567 | # | ||
1568 | CONFIG_CRYPTO_HMAC=y | ||
1569 | # CONFIG_CRYPTO_XCBC is not set | ||
1570 | |||
1571 | # | ||
1572 | # Digest | ||
1573 | # | ||
1574 | # CONFIG_CRYPTO_CRC32C is not set | ||
1575 | # CONFIG_CRYPTO_MD4 is not set | ||
1576 | CONFIG_CRYPTO_MD5=y | ||
1577 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1578 | # CONFIG_CRYPTO_RMD128 is not set | ||
1579 | # CONFIG_CRYPTO_RMD160 is not set | ||
1580 | # CONFIG_CRYPTO_RMD256 is not set | ||
1581 | # CONFIG_CRYPTO_RMD320 is not set | ||
1582 | CONFIG_CRYPTO_SHA1=m | ||
1583 | # CONFIG_CRYPTO_SHA256 is not set | ||
1584 | # CONFIG_CRYPTO_SHA512 is not set | ||
1585 | # CONFIG_CRYPTO_TGR192 is not set | ||
1586 | # CONFIG_CRYPTO_WP512 is not set | ||
1587 | |||
1588 | # | ||
1589 | # Ciphers | ||
1590 | # | ||
1591 | # CONFIG_CRYPTO_AES is not set | ||
1592 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1593 | CONFIG_CRYPTO_ARC4=m | ||
1594 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1595 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1596 | # CONFIG_CRYPTO_CAST5 is not set | ||
1597 | # CONFIG_CRYPTO_CAST6 is not set | ||
1598 | CONFIG_CRYPTO_DES=m | ||
1599 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1600 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1601 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1602 | # CONFIG_CRYPTO_SEED is not set | ||
1603 | # CONFIG_CRYPTO_SERPENT is not set | ||
1604 | # CONFIG_CRYPTO_TEA is not set | ||
1605 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1606 | |||
1607 | # | ||
1608 | # Compression | ||
1609 | # | ||
1610 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1611 | # CONFIG_CRYPTO_LZO is not set | ||
1612 | |||
1613 | # | ||
1614 | # Random Number Generation | ||
1615 | # | ||
1616 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
1617 | # CONFIG_CRYPTO_HW is not set | ||
1618 | |||
1619 | # | ||
1620 | # Library routines | ||
1621 | # | ||
1622 | CONFIG_BITREVERSE=y | ||
1623 | CONFIG_CRC_CCITT=m | ||
1624 | CONFIG_CRC16=m | ||
1625 | # CONFIG_CRC_T10DIF is not set | ||
1626 | CONFIG_CRC_ITU_T=m | ||
1627 | CONFIG_CRC32=y | ||
1628 | CONFIG_CRC7=m | ||
1629 | CONFIG_LIBCRC32C=m | ||
1630 | CONFIG_AUDIT_GENERIC=y | ||
1631 | CONFIG_ZLIB_INFLATE=m | ||
1632 | CONFIG_ZLIB_DEFLATE=m | ||
1633 | CONFIG_LZO_COMPRESS=m | ||
1634 | CONFIG_LZO_DECOMPRESS=m | ||
1635 | CONFIG_REED_SOLOMON=m | ||
1636 | CONFIG_REED_SOLOMON_DEC16=y | ||
1637 | CONFIG_PLIST=y | ||
1638 | CONFIG_HAS_IOMEM=y | ||
1639 | CONFIG_HAS_IOPORT=y | ||
1640 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/configs/u300_defconfig b/arch/arm/configs/u300_defconfig index 610ac3c47b0f..9155196e623b 100644 --- a/arch/arm/configs/u300_defconfig +++ b/arch/arm/configs/u300_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.32-rc5 | 3 | # Linux kernel version: 2.6.33-rc2 |
4 | # Sat Oct 17 23:32:24 2009 | 4 | # Wed Jan 6 00:01:36 2010 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | 7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y |
@@ -46,6 +46,7 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
46 | # | 46 | # |
47 | CONFIG_TREE_RCU=y | 47 | CONFIG_TREE_RCU=y |
48 | # CONFIG_TREE_PREEMPT_RCU is not set | 48 | # CONFIG_TREE_PREEMPT_RCU is not set |
49 | # CONFIG_TINY_RCU is not set | ||
49 | # CONFIG_RCU_TRACE is not set | 50 | # CONFIG_RCU_TRACE is not set |
50 | CONFIG_RCU_FANOUT=32 | 51 | CONFIG_RCU_FANOUT=32 |
51 | # CONFIG_RCU_FANOUT_EXACT is not set | 52 | # CONFIG_RCU_FANOUT_EXACT is not set |
@@ -119,14 +120,41 @@ CONFIG_BLOCK=y | |||
119 | # IO Schedulers | 120 | # IO Schedulers |
120 | # | 121 | # |
121 | CONFIG_IOSCHED_NOOP=y | 122 | CONFIG_IOSCHED_NOOP=y |
122 | # CONFIG_IOSCHED_AS is not set | ||
123 | CONFIG_IOSCHED_DEADLINE=y | 123 | CONFIG_IOSCHED_DEADLINE=y |
124 | # CONFIG_IOSCHED_CFQ is not set | 124 | # CONFIG_IOSCHED_CFQ is not set |
125 | # CONFIG_DEFAULT_AS is not set | ||
126 | CONFIG_DEFAULT_DEADLINE=y | 125 | CONFIG_DEFAULT_DEADLINE=y |
127 | # CONFIG_DEFAULT_CFQ is not set | 126 | # CONFIG_DEFAULT_CFQ is not set |
128 | # CONFIG_DEFAULT_NOOP is not set | 127 | # CONFIG_DEFAULT_NOOP is not set |
129 | CONFIG_DEFAULT_IOSCHED="deadline" | 128 | CONFIG_DEFAULT_IOSCHED="deadline" |
129 | # CONFIG_INLINE_SPIN_TRYLOCK is not set | ||
130 | # CONFIG_INLINE_SPIN_TRYLOCK_BH is not set | ||
131 | # CONFIG_INLINE_SPIN_LOCK is not set | ||
132 | # CONFIG_INLINE_SPIN_LOCK_BH is not set | ||
133 | # CONFIG_INLINE_SPIN_LOCK_IRQ is not set | ||
134 | # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set | ||
135 | # CONFIG_INLINE_SPIN_UNLOCK is not set | ||
136 | # CONFIG_INLINE_SPIN_UNLOCK_BH is not set | ||
137 | # CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set | ||
138 | # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set | ||
139 | # CONFIG_INLINE_READ_TRYLOCK is not set | ||
140 | # CONFIG_INLINE_READ_LOCK is not set | ||
141 | # CONFIG_INLINE_READ_LOCK_BH is not set | ||
142 | # CONFIG_INLINE_READ_LOCK_IRQ is not set | ||
143 | # CONFIG_INLINE_READ_LOCK_IRQSAVE is not set | ||
144 | # CONFIG_INLINE_READ_UNLOCK is not set | ||
145 | # CONFIG_INLINE_READ_UNLOCK_BH is not set | ||
146 | # CONFIG_INLINE_READ_UNLOCK_IRQ is not set | ||
147 | # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set | ||
148 | # CONFIG_INLINE_WRITE_TRYLOCK is not set | ||
149 | # CONFIG_INLINE_WRITE_LOCK is not set | ||
150 | # CONFIG_INLINE_WRITE_LOCK_BH is not set | ||
151 | # CONFIG_INLINE_WRITE_LOCK_IRQ is not set | ||
152 | # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set | ||
153 | # CONFIG_INLINE_WRITE_UNLOCK is not set | ||
154 | # CONFIG_INLINE_WRITE_UNLOCK_BH is not set | ||
155 | # CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set | ||
156 | # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set | ||
157 | # CONFIG_MUTEX_SPIN_ON_OWNER is not set | ||
130 | # CONFIG_FREEZER is not set | 158 | # CONFIG_FREEZER is not set |
131 | 159 | ||
132 | # | 160 | # |
@@ -155,6 +183,7 @@ CONFIG_MMU=y | |||
155 | # CONFIG_ARCH_IXP2000 is not set | 183 | # CONFIG_ARCH_IXP2000 is not set |
156 | # CONFIG_ARCH_IXP4XX is not set | 184 | # CONFIG_ARCH_IXP4XX is not set |
157 | # CONFIG_ARCH_L7200 is not set | 185 | # CONFIG_ARCH_L7200 is not set |
186 | # CONFIG_ARCH_DOVE is not set | ||
158 | # CONFIG_ARCH_KIRKWOOD is not set | 187 | # CONFIG_ARCH_KIRKWOOD is not set |
159 | # CONFIG_ARCH_LOKI is not set | 188 | # CONFIG_ARCH_LOKI is not set |
160 | # CONFIG_ARCH_MV78XX0 is not set | 189 | # CONFIG_ARCH_MV78XX0 is not set |
@@ -177,6 +206,7 @@ CONFIG_ARCH_U300=y | |||
177 | # CONFIG_ARCH_DAVINCI is not set | 206 | # CONFIG_ARCH_DAVINCI is not set |
178 | # CONFIG_ARCH_OMAP is not set | 207 | # CONFIG_ARCH_OMAP is not set |
179 | # CONFIG_ARCH_BCMRING is not set | 208 | # CONFIG_ARCH_BCMRING is not set |
209 | # CONFIG_ARCH_U8500 is not set | ||
180 | 210 | ||
181 | # | 211 | # |
182 | # ST-Ericsson AB U300/U330/U335/U365 Platform | 212 | # ST-Ericsson AB U300/U330/U335/U365 Platform |
@@ -265,12 +295,10 @@ CONFIG_FLATMEM_MANUAL=y | |||
265 | CONFIG_FLATMEM=y | 295 | CONFIG_FLATMEM=y |
266 | CONFIG_FLAT_NODE_MEM_MAP=y | 296 | CONFIG_FLAT_NODE_MEM_MAP=y |
267 | CONFIG_PAGEFLAGS_EXTENDED=y | 297 | CONFIG_PAGEFLAGS_EXTENDED=y |
268 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | 298 | CONFIG_SPLIT_PTLOCK_CPUS=999999 |
269 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 299 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
270 | CONFIG_ZONE_DMA_FLAG=0 | 300 | CONFIG_ZONE_DMA_FLAG=0 |
271 | CONFIG_VIRT_TO_BUS=y | 301 | CONFIG_VIRT_TO_BUS=y |
272 | CONFIG_HAVE_MLOCK=y | ||
273 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | ||
274 | # CONFIG_KSM is not set | 302 | # CONFIG_KSM is not set |
275 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | 303 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 |
276 | CONFIG_ALIGNMENT_TRAP=y | 304 | CONFIG_ALIGNMENT_TRAP=y |
@@ -499,14 +527,21 @@ CONFIG_MTD_NAND_IDS=y | |||
499 | CONFIG_BLK_DEV=y | 527 | CONFIG_BLK_DEV=y |
500 | # CONFIG_BLK_DEV_COW_COMMON is not set | 528 | # CONFIG_BLK_DEV_COW_COMMON is not set |
501 | # CONFIG_BLK_DEV_LOOP is not set | 529 | # CONFIG_BLK_DEV_LOOP is not set |
530 | |||
531 | # | ||
532 | # DRBD disabled because PROC_FS, INET or CONNECTOR not selected | ||
533 | # | ||
502 | # CONFIG_BLK_DEV_NBD is not set | 534 | # CONFIG_BLK_DEV_NBD is not set |
503 | # CONFIG_BLK_DEV_RAM is not set | 535 | # CONFIG_BLK_DEV_RAM is not set |
504 | # CONFIG_CDROM_PKTCDVD is not set | 536 | # CONFIG_CDROM_PKTCDVD is not set |
505 | # CONFIG_ATA_OVER_ETH is not set | 537 | # CONFIG_ATA_OVER_ETH is not set |
506 | CONFIG_MISC_DEVICES=y | 538 | CONFIG_MISC_DEVICES=y |
539 | # CONFIG_AD525X_DPOT is not set | ||
507 | # CONFIG_ICS932S401 is not set | 540 | # CONFIG_ICS932S401 is not set |
508 | # CONFIG_ENCLOSURE_SERVICES is not set | 541 | # CONFIG_ENCLOSURE_SERVICES is not set |
509 | # CONFIG_ISL29003 is not set | 542 | # CONFIG_ISL29003 is not set |
543 | # CONFIG_DS1682 is not set | ||
544 | # CONFIG_TI_DAC7512 is not set | ||
510 | # CONFIG_C2PORT is not set | 545 | # CONFIG_C2PORT is not set |
511 | 546 | ||
512 | # | 547 | # |
@@ -517,6 +552,7 @@ CONFIG_MISC_DEVICES=y | |||
517 | # CONFIG_EEPROM_LEGACY is not set | 552 | # CONFIG_EEPROM_LEGACY is not set |
518 | # CONFIG_EEPROM_MAX6875 is not set | 553 | # CONFIG_EEPROM_MAX6875 is not set |
519 | # CONFIG_EEPROM_93CX6 is not set | 554 | # CONFIG_EEPROM_93CX6 is not set |
555 | # CONFIG_IWMC3200TOP is not set | ||
520 | CONFIG_HAVE_IDE=y | 556 | CONFIG_HAVE_IDE=y |
521 | # CONFIG_IDE is not set | 557 | # CONFIG_IDE is not set |
522 | 558 | ||
@@ -539,6 +575,7 @@ CONFIG_HAVE_IDE=y | |||
539 | CONFIG_INPUT=y | 575 | CONFIG_INPUT=y |
540 | # CONFIG_INPUT_FF_MEMLESS is not set | 576 | # CONFIG_INPUT_FF_MEMLESS is not set |
541 | # CONFIG_INPUT_POLLDEV is not set | 577 | # CONFIG_INPUT_POLLDEV is not set |
578 | # CONFIG_INPUT_SPARSEKMAP is not set | ||
542 | 579 | ||
543 | # | 580 | # |
544 | # Userland interfaces | 581 | # Userland interfaces |
@@ -645,7 +682,6 @@ CONFIG_I2C_STU300=y | |||
645 | # | 682 | # |
646 | # Miscellaneous I2C Chip support | 683 | # Miscellaneous I2C Chip support |
647 | # | 684 | # |
648 | # CONFIG_DS1682 is not set | ||
649 | # CONFIG_SENSORS_TSL2550 is not set | 685 | # CONFIG_SENSORS_TSL2550 is not set |
650 | # CONFIG_I2C_DEBUG_CORE is not set | 686 | # CONFIG_I2C_DEBUG_CORE is not set |
651 | # CONFIG_I2C_DEBUG_ALGO is not set | 687 | # CONFIG_I2C_DEBUG_ALGO is not set |
@@ -661,6 +697,8 @@ CONFIG_SPI_MASTER=y | |||
661 | # CONFIG_SPI_BITBANG is not set | 697 | # CONFIG_SPI_BITBANG is not set |
662 | # CONFIG_SPI_GPIO is not set | 698 | # CONFIG_SPI_GPIO is not set |
663 | CONFIG_SPI_PL022=y | 699 | CONFIG_SPI_PL022=y |
700 | # CONFIG_SPI_XILINX is not set | ||
701 | # CONFIG_SPI_DESIGNWARE is not set | ||
664 | 702 | ||
665 | # | 703 | # |
666 | # SPI Protocol Masters | 704 | # SPI Protocol Masters |
@@ -708,6 +746,7 @@ CONFIG_SSB_POSSIBLE=y | |||
708 | # CONFIG_MFD_T7L66XB is not set | 746 | # CONFIG_MFD_T7L66XB is not set |
709 | # CONFIG_MFD_TC6387XB is not set | 747 | # CONFIG_MFD_TC6387XB is not set |
710 | # CONFIG_PMIC_DA903X is not set | 748 | # CONFIG_PMIC_DA903X is not set |
749 | # CONFIG_PMIC_ADP5520 is not set | ||
711 | # CONFIG_MFD_WM8400 is not set | 750 | # CONFIG_MFD_WM8400 is not set |
712 | # CONFIG_MFD_WM831X is not set | 751 | # CONFIG_MFD_WM831X is not set |
713 | # CONFIG_MFD_WM8350_I2C is not set | 752 | # CONFIG_MFD_WM8350_I2C is not set |
@@ -716,6 +755,8 @@ CONFIG_SSB_POSSIBLE=y | |||
716 | CONFIG_AB3100_CORE=y | 755 | CONFIG_AB3100_CORE=y |
717 | CONFIG_AB3100_OTP=y | 756 | CONFIG_AB3100_OTP=y |
718 | # CONFIG_EZX_PCAP is not set | 757 | # CONFIG_EZX_PCAP is not set |
758 | # CONFIG_MFD_88PM8607 is not set | ||
759 | # CONFIG_AB4500_CORE is not set | ||
719 | CONFIG_REGULATOR=y | 760 | CONFIG_REGULATOR=y |
720 | # CONFIG_REGULATOR_DEBUG is not set | 761 | # CONFIG_REGULATOR_DEBUG is not set |
721 | # CONFIG_REGULATOR_FIXED_VOLTAGE is not set | 762 | # CONFIG_REGULATOR_FIXED_VOLTAGE is not set |
@@ -723,6 +764,7 @@ CONFIG_REGULATOR=y | |||
723 | # CONFIG_REGULATOR_USERSPACE_CONSUMER is not set | 764 | # CONFIG_REGULATOR_USERSPACE_CONSUMER is not set |
724 | # CONFIG_REGULATOR_BQ24022 is not set | 765 | # CONFIG_REGULATOR_BQ24022 is not set |
725 | # CONFIG_REGULATOR_MAX1586 is not set | 766 | # CONFIG_REGULATOR_MAX1586 is not set |
767 | # CONFIG_REGULATOR_MAX8660 is not set | ||
726 | # CONFIG_REGULATOR_LP3971 is not set | 768 | # CONFIG_REGULATOR_LP3971 is not set |
727 | CONFIG_REGULATOR_AB3100=y | 769 | CONFIG_REGULATOR_AB3100=y |
728 | # CONFIG_REGULATOR_TPS65023 is not set | 770 | # CONFIG_REGULATOR_TPS65023 is not set |
@@ -840,7 +882,9 @@ CONFIG_LEDS_CLASS=y | |||
840 | # CONFIG_LEDS_LP3944 is not set | 882 | # CONFIG_LEDS_LP3944 is not set |
841 | # CONFIG_LEDS_PCA955X is not set | 883 | # CONFIG_LEDS_PCA955X is not set |
842 | # CONFIG_LEDS_DAC124S085 is not set | 884 | # CONFIG_LEDS_DAC124S085 is not set |
885 | # CONFIG_LEDS_REGULATOR is not set | ||
843 | # CONFIG_LEDS_BD2802 is not set | 886 | # CONFIG_LEDS_BD2802 is not set |
887 | # CONFIG_LEDS_LT3593 is not set | ||
844 | 888 | ||
845 | # | 889 | # |
846 | # LED Triggers | 890 | # LED Triggers |
@@ -882,6 +926,7 @@ CONFIG_RTC_INTF_DEV=y | |||
882 | # CONFIG_RTC_DRV_PCF8563 is not set | 926 | # CONFIG_RTC_DRV_PCF8563 is not set |
883 | # CONFIG_RTC_DRV_PCF8583 is not set | 927 | # CONFIG_RTC_DRV_PCF8583 is not set |
884 | # CONFIG_RTC_DRV_M41T80 is not set | 928 | # CONFIG_RTC_DRV_M41T80 is not set |
929 | # CONFIG_RTC_DRV_BQ32K is not set | ||
885 | # CONFIG_RTC_DRV_S35390A is not set | 930 | # CONFIG_RTC_DRV_S35390A is not set |
886 | # CONFIG_RTC_DRV_FM3130 is not set | 931 | # CONFIG_RTC_DRV_FM3130 is not set |
887 | # CONFIG_RTC_DRV_RX8581 is not set | 932 | # CONFIG_RTC_DRV_RX8581 is not set |
@@ -911,7 +956,9 @@ CONFIG_RTC_INTF_DEV=y | |||
911 | # CONFIG_RTC_DRV_M48T86 is not set | 956 | # CONFIG_RTC_DRV_M48T86 is not set |
912 | # CONFIG_RTC_DRV_M48T35 is not set | 957 | # CONFIG_RTC_DRV_M48T35 is not set |
913 | # CONFIG_RTC_DRV_M48T59 is not set | 958 | # CONFIG_RTC_DRV_M48T59 is not set |
959 | # CONFIG_RTC_DRV_MSM6242 is not set | ||
914 | # CONFIG_RTC_DRV_BQ4802 is not set | 960 | # CONFIG_RTC_DRV_BQ4802 is not set |
961 | # CONFIG_RTC_DRV_RP5C01 is not set | ||
915 | # CONFIG_RTC_DRV_V3020 is not set | 962 | # CONFIG_RTC_DRV_V3020 is not set |
916 | CONFIG_RTC_DRV_AB3100=y | 963 | CONFIG_RTC_DRV_AB3100=y |
917 | 964 | ||
@@ -926,6 +973,15 @@ CONFIG_DMADEVICES=y | |||
926 | # | 973 | # |
927 | # DMA Devices | 974 | # DMA Devices |
928 | # | 975 | # |
976 | CONFIG_COH901318=y | ||
977 | CONFIG_DMA_ENGINE=y | ||
978 | |||
979 | # | ||
980 | # DMA Clients | ||
981 | # | ||
982 | # CONFIG_NET_DMA is not set | ||
983 | # CONFIG_ASYNC_TX_DMA is not set | ||
984 | # CONFIG_DMATEST is not set | ||
929 | # CONFIG_AUXDISPLAY is not set | 985 | # CONFIG_AUXDISPLAY is not set |
930 | # CONFIG_UIO is not set | 986 | # CONFIG_UIO is not set |
931 | 987 | ||
@@ -1018,7 +1074,7 @@ CONFIG_MISC_FILESYSTEMS=y | |||
1018 | CONFIG_MSDOS_PARTITION=y | 1074 | CONFIG_MSDOS_PARTITION=y |
1019 | CONFIG_NLS=y | 1075 | CONFIG_NLS=y |
1020 | CONFIG_NLS_DEFAULT="iso8859-1" | 1076 | CONFIG_NLS_DEFAULT="iso8859-1" |
1021 | # CONFIG_NLS_CODEPAGE_437 is not set | 1077 | CONFIG_NLS_CODEPAGE_437=y |
1022 | # CONFIG_NLS_CODEPAGE_737 is not set | 1078 | # CONFIG_NLS_CODEPAGE_737 is not set |
1023 | # CONFIG_NLS_CODEPAGE_775 is not set | 1079 | # CONFIG_NLS_CODEPAGE_775 is not set |
1024 | # CONFIG_NLS_CODEPAGE_850 is not set | 1080 | # CONFIG_NLS_CODEPAGE_850 is not set |
@@ -1135,6 +1191,7 @@ CONFIG_ARM_UNWIND=y | |||
1135 | # CONFIG_DEBUG_ERRORS is not set | 1191 | # CONFIG_DEBUG_ERRORS is not set |
1136 | # CONFIG_DEBUG_STACK_USAGE is not set | 1192 | # CONFIG_DEBUG_STACK_USAGE is not set |
1137 | # CONFIG_DEBUG_LL is not set | 1193 | # CONFIG_DEBUG_LL is not set |
1194 | # CONFIG_OC_ETM is not set | ||
1138 | 1195 | ||
1139 | # | 1196 | # |
1140 | # Security options | 1197 | # Security options |
@@ -1142,7 +1199,11 @@ CONFIG_ARM_UNWIND=y | |||
1142 | # CONFIG_KEYS is not set | 1199 | # CONFIG_KEYS is not set |
1143 | # CONFIG_SECURITY is not set | 1200 | # CONFIG_SECURITY is not set |
1144 | # CONFIG_SECURITYFS is not set | 1201 | # CONFIG_SECURITYFS is not set |
1145 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 1202 | # CONFIG_DEFAULT_SECURITY_SELINUX is not set |
1203 | # CONFIG_DEFAULT_SECURITY_SMACK is not set | ||
1204 | # CONFIG_DEFAULT_SECURITY_TOMOYO is not set | ||
1205 | CONFIG_DEFAULT_SECURITY_DAC=y | ||
1206 | CONFIG_DEFAULT_SECURITY="" | ||
1146 | # CONFIG_CRYPTO is not set | 1207 | # CONFIG_CRYPTO is not set |
1147 | # CONFIG_BINARY_PRINTF is not set | 1208 | # CONFIG_BINARY_PRINTF is not set |
1148 | 1209 | ||
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index 730aefcfbee3..be8b4d79cf41 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -182,21 +182,6 @@ | |||
182 | * DMA Cache Coherency | 182 | * DMA Cache Coherency |
183 | * =================== | 183 | * =================== |
184 | * | 184 | * |
185 | * dma_inv_range(start, end) | ||
186 | * | ||
187 | * Invalidate (discard) the specified virtual address range. | ||
188 | * May not write back any entries. If 'start' or 'end' | ||
189 | * are not cache line aligned, those lines must be written | ||
190 | * back. | ||
191 | * - start - virtual start address | ||
192 | * - end - virtual end address | ||
193 | * | ||
194 | * dma_clean_range(start, end) | ||
195 | * | ||
196 | * Clean (write back) the specified virtual address range. | ||
197 | * - start - virtual start address | ||
198 | * - end - virtual end address | ||
199 | * | ||
200 | * dma_flush_range(start, end) | 185 | * dma_flush_range(start, end) |
201 | * | 186 | * |
202 | * Clean and invalidate the specified virtual address range. | 187 | * Clean and invalidate the specified virtual address range. |
@@ -213,8 +198,9 @@ struct cpu_cache_fns { | |||
213 | void (*coherent_user_range)(unsigned long, unsigned long); | 198 | void (*coherent_user_range)(unsigned long, unsigned long); |
214 | void (*flush_kern_dcache_area)(void *, size_t); | 199 | void (*flush_kern_dcache_area)(void *, size_t); |
215 | 200 | ||
216 | void (*dma_inv_range)(const void *, const void *); | 201 | void (*dma_map_area)(const void *, size_t, int); |
217 | void (*dma_clean_range)(const void *, const void *); | 202 | void (*dma_unmap_area)(const void *, size_t, int); |
203 | |||
218 | void (*dma_flush_range)(const void *, const void *); | 204 | void (*dma_flush_range)(const void *, const void *); |
219 | }; | 205 | }; |
220 | 206 | ||
@@ -244,8 +230,8 @@ extern struct cpu_cache_fns cpu_cache; | |||
244 | * is visible to DMA, or data written by DMA to system memory is | 230 | * is visible to DMA, or data written by DMA to system memory is |
245 | * visible to the CPU. | 231 | * visible to the CPU. |
246 | */ | 232 | */ |
247 | #define dmac_inv_range cpu_cache.dma_inv_range | 233 | #define dmac_map_area cpu_cache.dma_map_area |
248 | #define dmac_clean_range cpu_cache.dma_clean_range | 234 | #define dmac_unmap_area cpu_cache.dma_unmap_area |
249 | #define dmac_flush_range cpu_cache.dma_flush_range | 235 | #define dmac_flush_range cpu_cache.dma_flush_range |
250 | 236 | ||
251 | #else | 237 | #else |
@@ -270,12 +256,12 @@ extern void __cpuc_flush_dcache_area(void *, size_t); | |||
270 | * is visible to DMA, or data written by DMA to system memory is | 256 | * is visible to DMA, or data written by DMA to system memory is |
271 | * visible to the CPU. | 257 | * visible to the CPU. |
272 | */ | 258 | */ |
273 | #define dmac_inv_range __glue(_CACHE,_dma_inv_range) | 259 | #define dmac_map_area __glue(_CACHE,_dma_map_area) |
274 | #define dmac_clean_range __glue(_CACHE,_dma_clean_range) | 260 | #define dmac_unmap_area __glue(_CACHE,_dma_unmap_area) |
275 | #define dmac_flush_range __glue(_CACHE,_dma_flush_range) | 261 | #define dmac_flush_range __glue(_CACHE,_dma_flush_range) |
276 | 262 | ||
277 | extern void dmac_inv_range(const void *, const void *); | 263 | extern void dmac_map_area(const void *, size_t, int); |
278 | extern void dmac_clean_range(const void *, const void *); | 264 | extern void dmac_unmap_area(const void *, size_t, int); |
279 | extern void dmac_flush_range(const void *, const void *); | 265 | extern void dmac_flush_range(const void *, const void *); |
280 | 266 | ||
281 | #endif | 267 | #endif |
@@ -316,12 +302,8 @@ static inline void outer_flush_range(unsigned long start, unsigned long end) | |||
316 | * processes address space. Really, we want to allow our "user | 302 | * processes address space. Really, we want to allow our "user |
317 | * space" model to handle this. | 303 | * space" model to handle this. |
318 | */ | 304 | */ |
319 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | 305 | extern void copy_to_user_page(struct vm_area_struct *, struct page *, |
320 | do { \ | 306 | unsigned long, void *, const void *, unsigned long); |
321 | memcpy(dst, src, len); \ | ||
322 | flush_ptrace_access(vma, page, vaddr, dst, len, 1);\ | ||
323 | } while (0) | ||
324 | |||
325 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | 307 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ |
326 | do { \ | 308 | do { \ |
327 | memcpy(dst, src, len); \ | 309 | memcpy(dst, src, len); \ |
@@ -355,17 +337,6 @@ vivt_flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsig | |||
355 | } | 337 | } |
356 | } | 338 | } |
357 | 339 | ||
358 | static inline void | ||
359 | vivt_flush_ptrace_access(struct vm_area_struct *vma, struct page *page, | ||
360 | unsigned long uaddr, void *kaddr, | ||
361 | unsigned long len, int write) | ||
362 | { | ||
363 | if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) { | ||
364 | unsigned long addr = (unsigned long)kaddr; | ||
365 | __cpuc_coherent_kern_range(addr, addr + len); | ||
366 | } | ||
367 | } | ||
368 | |||
369 | #ifndef CONFIG_CPU_CACHE_VIPT | 340 | #ifndef CONFIG_CPU_CACHE_VIPT |
370 | #define flush_cache_mm(mm) \ | 341 | #define flush_cache_mm(mm) \ |
371 | vivt_flush_cache_mm(mm) | 342 | vivt_flush_cache_mm(mm) |
@@ -373,15 +344,10 @@ vivt_flush_ptrace_access(struct vm_area_struct *vma, struct page *page, | |||
373 | vivt_flush_cache_range(vma,start,end) | 344 | vivt_flush_cache_range(vma,start,end) |
374 | #define flush_cache_page(vma,addr,pfn) \ | 345 | #define flush_cache_page(vma,addr,pfn) \ |
375 | vivt_flush_cache_page(vma,addr,pfn) | 346 | vivt_flush_cache_page(vma,addr,pfn) |
376 | #define flush_ptrace_access(vma,page,ua,ka,len,write) \ | ||
377 | vivt_flush_ptrace_access(vma,page,ua,ka,len,write) | ||
378 | #else | 347 | #else |
379 | extern void flush_cache_mm(struct mm_struct *mm); | 348 | extern void flush_cache_mm(struct mm_struct *mm); |
380 | extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); | 349 | extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); |
381 | extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn); | 350 | extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn); |
382 | extern void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, | ||
383 | unsigned long uaddr, void *kaddr, | ||
384 | unsigned long len, int write); | ||
385 | #endif | 351 | #endif |
386 | 352 | ||
387 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) | 353 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) |
diff --git a/arch/arm/include/asm/cpu.h b/arch/arm/include/asm/cpu.h index 634b2d7c612a..793968173bef 100644 --- a/arch/arm/include/asm/cpu.h +++ b/arch/arm/include/asm/cpu.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define __ASM_ARM_CPU_H | 11 | #define __ASM_ARM_CPU_H |
12 | 12 | ||
13 | #include <linux/percpu.h> | 13 | #include <linux/percpu.h> |
14 | #include <linux/cpu.h> | ||
14 | 15 | ||
15 | struct cpuinfo_arm { | 16 | struct cpuinfo_arm { |
16 | struct cpu cpu; | 17 | struct cpu cpu; |
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index a96300bf83fd..256ee1c9f51a 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -57,18 +57,58 @@ static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) | |||
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * DMA-consistent mapping functions. These allocate/free a region of | 60 | * The DMA API is built upon the notion of "buffer ownership". A buffer |
61 | * uncached, unwrite-buffered mapped memory space for use with DMA | 61 | * is either exclusively owned by the CPU (and therefore may be accessed |
62 | * devices. This is the "generic" version. The PCI specific version | 62 | * by it) or exclusively owned by the DMA device. These helper functions |
63 | * is in pci.h | 63 | * represent the transitions between these two ownership states. |
64 | * | 64 | * |
65 | * Note: Drivers should NOT use this function directly, as it will break | 65 | * Note, however, that on later ARMs, this notion does not work due to |
66 | * platforms with CONFIG_DMABOUNCE. | 66 | * speculative prefetches. We model our approach on the assumption that |
67 | * Use the driver DMA support - see dma-mapping.h (dma_sync_*) | 67 | * the CPU does do speculative prefetches, which means we clean caches |
68 | * before transfers and delay cache invalidation until transfer completion. | ||
69 | * | ||
70 | * Private support functions: these are not part of the API and are | ||
71 | * liable to change. Drivers must not use these. | ||
68 | */ | 72 | */ |
69 | extern void dma_cache_maint(const void *kaddr, size_t size, int rw); | 73 | static inline void __dma_single_cpu_to_dev(const void *kaddr, size_t size, |
70 | extern void dma_cache_maint_page(struct page *page, unsigned long offset, | 74 | enum dma_data_direction dir) |
71 | size_t size, int rw); | 75 | { |
76 | extern void ___dma_single_cpu_to_dev(const void *, size_t, | ||
77 | enum dma_data_direction); | ||
78 | |||
79 | if (!arch_is_coherent()) | ||
80 | ___dma_single_cpu_to_dev(kaddr, size, dir); | ||
81 | } | ||
82 | |||
83 | static inline void __dma_single_dev_to_cpu(const void *kaddr, size_t size, | ||
84 | enum dma_data_direction dir) | ||
85 | { | ||
86 | extern void ___dma_single_dev_to_cpu(const void *, size_t, | ||
87 | enum dma_data_direction); | ||
88 | |||
89 | if (!arch_is_coherent()) | ||
90 | ___dma_single_dev_to_cpu(kaddr, size, dir); | ||
91 | } | ||
92 | |||
93 | static inline void __dma_page_cpu_to_dev(struct page *page, unsigned long off, | ||
94 | size_t size, enum dma_data_direction dir) | ||
95 | { | ||
96 | extern void ___dma_page_cpu_to_dev(struct page *, unsigned long, | ||
97 | size_t, enum dma_data_direction); | ||
98 | |||
99 | if (!arch_is_coherent()) | ||
100 | ___dma_page_cpu_to_dev(page, off, size, dir); | ||
101 | } | ||
102 | |||
103 | static inline void __dma_page_dev_to_cpu(struct page *page, unsigned long off, | ||
104 | size_t size, enum dma_data_direction dir) | ||
105 | { | ||
106 | extern void ___dma_page_dev_to_cpu(struct page *, unsigned long, | ||
107 | size_t, enum dma_data_direction); | ||
108 | |||
109 | if (!arch_is_coherent()) | ||
110 | ___dma_page_dev_to_cpu(page, off, size, dir); | ||
111 | } | ||
72 | 112 | ||
73 | /* | 113 | /* |
74 | * Return whether the given device DMA address mask can be supported | 114 | * Return whether the given device DMA address mask can be supported |
@@ -304,8 +344,7 @@ static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, | |||
304 | { | 344 | { |
305 | BUG_ON(!valid_dma_direction(dir)); | 345 | BUG_ON(!valid_dma_direction(dir)); |
306 | 346 | ||
307 | if (!arch_is_coherent()) | 347 | __dma_single_cpu_to_dev(cpu_addr, size, dir); |
308 | dma_cache_maint(cpu_addr, size, dir); | ||
309 | 348 | ||
310 | return virt_to_dma(dev, cpu_addr); | 349 | return virt_to_dma(dev, cpu_addr); |
311 | } | 350 | } |
@@ -329,8 +368,7 @@ static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, | |||
329 | { | 368 | { |
330 | BUG_ON(!valid_dma_direction(dir)); | 369 | BUG_ON(!valid_dma_direction(dir)); |
331 | 370 | ||
332 | if (!arch_is_coherent()) | 371 | __dma_page_cpu_to_dev(page, offset, size, dir); |
333 | dma_cache_maint_page(page, offset, size, dir); | ||
334 | 372 | ||
335 | return page_to_dma(dev, page) + offset; | 373 | return page_to_dma(dev, page) + offset; |
336 | } | 374 | } |
@@ -352,7 +390,7 @@ static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, | |||
352 | static inline void dma_unmap_single(struct device *dev, dma_addr_t handle, | 390 | static inline void dma_unmap_single(struct device *dev, dma_addr_t handle, |
353 | size_t size, enum dma_data_direction dir) | 391 | size_t size, enum dma_data_direction dir) |
354 | { | 392 | { |
355 | /* nothing to do */ | 393 | __dma_single_dev_to_cpu(dma_to_virt(dev, handle), size, dir); |
356 | } | 394 | } |
357 | 395 | ||
358 | /** | 396 | /** |
@@ -372,7 +410,8 @@ static inline void dma_unmap_single(struct device *dev, dma_addr_t handle, | |||
372 | static inline void dma_unmap_page(struct device *dev, dma_addr_t handle, | 410 | static inline void dma_unmap_page(struct device *dev, dma_addr_t handle, |
373 | size_t size, enum dma_data_direction dir) | 411 | size_t size, enum dma_data_direction dir) |
374 | { | 412 | { |
375 | /* nothing to do */ | 413 | __dma_page_dev_to_cpu(dma_to_page(dev, handle), handle & ~PAGE_MASK, |
414 | size, dir); | ||
376 | } | 415 | } |
377 | #endif /* CONFIG_DMABOUNCE */ | 416 | #endif /* CONFIG_DMABOUNCE */ |
378 | 417 | ||
@@ -400,7 +439,10 @@ static inline void dma_sync_single_range_for_cpu(struct device *dev, | |||
400 | { | 439 | { |
401 | BUG_ON(!valid_dma_direction(dir)); | 440 | BUG_ON(!valid_dma_direction(dir)); |
402 | 441 | ||
403 | dmabounce_sync_for_cpu(dev, handle, offset, size, dir); | 442 | if (!dmabounce_sync_for_cpu(dev, handle, offset, size, dir)) |
443 | return; | ||
444 | |||
445 | __dma_single_dev_to_cpu(dma_to_virt(dev, handle) + offset, size, dir); | ||
404 | } | 446 | } |
405 | 447 | ||
406 | static inline void dma_sync_single_range_for_device(struct device *dev, | 448 | static inline void dma_sync_single_range_for_device(struct device *dev, |
@@ -412,8 +454,7 @@ static inline void dma_sync_single_range_for_device(struct device *dev, | |||
412 | if (!dmabounce_sync_for_device(dev, handle, offset, size, dir)) | 454 | if (!dmabounce_sync_for_device(dev, handle, offset, size, dir)) |
413 | return; | 455 | return; |
414 | 456 | ||
415 | if (!arch_is_coherent()) | 457 | __dma_single_cpu_to_dev(dma_to_virt(dev, handle) + offset, size, dir); |
416 | dma_cache_maint(dma_to_virt(dev, handle) + offset, size, dir); | ||
417 | } | 458 | } |
418 | 459 | ||
419 | static inline void dma_sync_single_for_cpu(struct device *dev, | 460 | static inline void dma_sync_single_for_cpu(struct device *dev, |
diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h index 7edf3536df24..ca51143f97f1 100644 --- a/arch/arm/include/asm/dma.h +++ b/arch/arm/include/asm/dma.h | |||
@@ -138,12 +138,12 @@ extern int get_dma_residue(unsigned int chan); | |||
138 | #define NO_DMA 255 | 138 | #define NO_DMA 255 |
139 | #endif | 139 | #endif |
140 | 140 | ||
141 | #endif /* CONFIG_ISA_DMA_API */ | ||
142 | |||
141 | #ifdef CONFIG_PCI | 143 | #ifdef CONFIG_PCI |
142 | extern int isa_dma_bridge_buggy; | 144 | extern int isa_dma_bridge_buggy; |
143 | #else | 145 | #else |
144 | #define isa_dma_bridge_buggy (0) | 146 | #define isa_dma_bridge_buggy (0) |
145 | #endif | 147 | #endif |
146 | 148 | ||
147 | #endif /* CONFIG_ISA_DMA_API */ | ||
148 | |||
149 | #endif /* __ASM_ARM_DMA_H */ | 149 | #endif /* __ASM_ARM_DMA_H */ |
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index 3a32af4cce30..a485ac3c8696 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -117,11 +117,12 @@ | |||
117 | #endif | 117 | #endif |
118 | 118 | ||
119 | struct page; | 119 | struct page; |
120 | struct vm_area_struct; | ||
120 | 121 | ||
121 | struct cpu_user_fns { | 122 | struct cpu_user_fns { |
122 | void (*cpu_clear_user_highpage)(struct page *page, unsigned long vaddr); | 123 | void (*cpu_clear_user_highpage)(struct page *page, unsigned long vaddr); |
123 | void (*cpu_copy_user_highpage)(struct page *to, struct page *from, | 124 | void (*cpu_copy_user_highpage)(struct page *to, struct page *from, |
124 | unsigned long vaddr); | 125 | unsigned long vaddr, struct vm_area_struct *vma); |
125 | }; | 126 | }; |
126 | 127 | ||
127 | #ifdef MULTI_USER | 128 | #ifdef MULTI_USER |
@@ -137,7 +138,7 @@ extern struct cpu_user_fns cpu_user; | |||
137 | 138 | ||
138 | extern void __cpu_clear_user_highpage(struct page *page, unsigned long vaddr); | 139 | extern void __cpu_clear_user_highpage(struct page *page, unsigned long vaddr); |
139 | extern void __cpu_copy_user_highpage(struct page *to, struct page *from, | 140 | extern void __cpu_copy_user_highpage(struct page *to, struct page *from, |
140 | unsigned long vaddr); | 141 | unsigned long vaddr, struct vm_area_struct *vma); |
141 | #endif | 142 | #endif |
142 | 143 | ||
143 | #define clear_user_highpage(page,vaddr) \ | 144 | #define clear_user_highpage(page,vaddr) \ |
@@ -145,7 +146,7 @@ extern void __cpu_copy_user_highpage(struct page *to, struct page *from, | |||
145 | 146 | ||
146 | #define __HAVE_ARCH_COPY_USER_HIGHPAGE | 147 | #define __HAVE_ARCH_COPY_USER_HIGHPAGE |
147 | #define copy_user_highpage(to,from,vaddr,vma) \ | 148 | #define copy_user_highpage(to,from,vaddr,vma) \ |
148 | __cpu_copy_user_highpage(to, from, vaddr) | 149 | __cpu_copy_user_highpage(to, from, vaddr, vma) |
149 | 150 | ||
150 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) | 151 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) |
151 | extern void copy_page(void *to, const void *from); | 152 | extern void copy_page(void *to, const void *from); |
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index bbecccda76d0..eec6e897ceb2 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h | |||
@@ -97,9 +97,15 @@ | |||
97 | * stack during a system call. Note that sizeof(struct pt_regs) | 97 | * stack during a system call. Note that sizeof(struct pt_regs) |
98 | * has to be a multiple of 8. | 98 | * has to be a multiple of 8. |
99 | */ | 99 | */ |
100 | #ifndef __KERNEL__ | ||
100 | struct pt_regs { | 101 | struct pt_regs { |
101 | long uregs[18]; | 102 | long uregs[18]; |
102 | }; | 103 | }; |
104 | #else /* __KERNEL__ */ | ||
105 | struct pt_regs { | ||
106 | unsigned long uregs[18]; | ||
107 | }; | ||
108 | #endif /* __KERNEL__ */ | ||
103 | 109 | ||
104 | #define ARM_cpsr uregs[16] | 110 | #define ARM_cpsr uregs[16] |
105 | #define ARM_pc uregs[15] | 111 | #define ARM_pc uregs[15] |
diff --git a/arch/arm/include/asm/smp_plat.h b/arch/arm/include/asm/smp_plat.h index 59303e200845..e6215305544a 100644 --- a/arch/arm/include/asm/smp_plat.h +++ b/arch/arm/include/asm/smp_plat.h | |||
@@ -13,4 +13,9 @@ static inline int tlb_ops_need_broadcast(void) | |||
13 | return ((read_cpuid_ext(CPUID_EXT_MMFR3) >> 12) & 0xf) < 2; | 13 | return ((read_cpuid_ext(CPUID_EXT_MMFR3) >> 12) & 0xf) < 2; |
14 | } | 14 | } |
15 | 15 | ||
16 | static inline int cache_ops_need_broadcast(void) | ||
17 | { | ||
18 | return ((read_cpuid_ext(CPUID_EXT_MMFR3) >> 12) & 0xf) < 1; | ||
19 | } | ||
20 | |||
16 | #endif | 21 | #endif |
diff --git a/arch/arm/include/asm/tlbflush.h b/arch/arm/include/asm/tlbflush.h index c2f1605de359..e085e2c545eb 100644 --- a/arch/arm/include/asm/tlbflush.h +++ b/arch/arm/include/asm/tlbflush.h | |||
@@ -529,7 +529,8 @@ extern void flush_tlb_kernel_range(unsigned long start, unsigned long end); | |||
529 | * cache entries for the kernels virtual memory range are written | 529 | * cache entries for the kernels virtual memory range are written |
530 | * back to the page. | 530 | * back to the page. |
531 | */ | 531 | */ |
532 | extern void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte); | 532 | extern void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, |
533 | pte_t *ptep); | ||
533 | 534 | ||
534 | #endif | 535 | #endif |
535 | 536 | ||
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index 4e506d09e5f9..cf9cdaa2d4d4 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
@@ -391,6 +391,7 @@ | |||
391 | #define __NR_pwritev (__NR_SYSCALL_BASE+362) | 391 | #define __NR_pwritev (__NR_SYSCALL_BASE+362) |
392 | #define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363) | 392 | #define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363) |
393 | #define __NR_perf_event_open (__NR_SYSCALL_BASE+364) | 393 | #define __NR_perf_event_open (__NR_SYSCALL_BASE+364) |
394 | #define __NR_recvmmsg (__NR_SYSCALL_BASE+365) | ||
394 | 395 | ||
395 | /* | 396 | /* |
396 | * The following SWIs are ARM private. | 397 | * The following SWIs are ARM private. |
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index 4a881258bb17..883511522fca 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/dma-mapping.h> | ||
15 | #include <asm/mach/arch.h> | 16 | #include <asm/mach/arch.h> |
16 | #include <asm/thread_info.h> | 17 | #include <asm/thread_info.h> |
17 | #include <asm/memory.h> | 18 | #include <asm/memory.h> |
@@ -112,5 +113,9 @@ int main(void) | |||
112 | #ifdef MULTI_PABORT | 113 | #ifdef MULTI_PABORT |
113 | DEFINE(PROCESSOR_PABT_FUNC, offsetof(struct processor, _prefetch_abort)); | 114 | DEFINE(PROCESSOR_PABT_FUNC, offsetof(struct processor, _prefetch_abort)); |
114 | #endif | 115 | #endif |
116 | BLANK(); | ||
117 | DEFINE(DMA_BIDIRECTIONAL, DMA_BIDIRECTIONAL); | ||
118 | DEFINE(DMA_TO_DEVICE, DMA_TO_DEVICE); | ||
119 | DEFINE(DMA_FROM_DEVICE, DMA_FROM_DEVICE); | ||
115 | return 0; | 120 | return 0; |
116 | } | 121 | } |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index d2903e3bc861..6c5cf369183b 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -957,9 +957,7 @@ kuser_cmpxchg_fixup: | |||
957 | 957 | ||
958 | #else | 958 | #else |
959 | 959 | ||
960 | #ifdef CONFIG_SMP | 960 | smp_dmb |
961 | mcr p15, 0, r0, c7, c10, 5 @ dmb | ||
962 | #endif | ||
963 | 1: ldrex r3, [r2] | 961 | 1: ldrex r3, [r2] |
964 | subs r3, r3, r0 | 962 | subs r3, r3, r0 |
965 | strexeq r3, r1, [r2] | 963 | strexeq r3, r1, [r2] |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 67304138a2ca..ba2adefa53f7 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -212,7 +212,8 @@ void __show_regs(struct pt_regs *regs) | |||
212 | char buf[64]; | 212 | char buf[64]; |
213 | 213 | ||
214 | printk("CPU: %d %s (%s %.*s)\n", | 214 | printk("CPU: %d %s (%s %.*s)\n", |
215 | smp_processor_id(), print_tainted(), init_utsname()->release, | 215 | raw_smp_processor_id(), print_tainted(), |
216 | init_utsname()->release, | ||
216 | (int)strcspn(init_utsname()->version, " "), | 217 | (int)strcspn(init_utsname()->version, " "), |
217 | init_utsname()->version); | 218 | init_utsname()->version); |
218 | print_symbol("PC is at %s\n", instruction_pointer(regs)); | 219 | print_symbol("PC is at %s\n", instruction_pointer(regs)); |
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 0b2ee953f164..2db43a5ddd9b 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -89,6 +89,12 @@ config ARCH_AT91CAP9 | |||
89 | select GENERIC_CLOCKEVENTS | 89 | select GENERIC_CLOCKEVENTS |
90 | select HAVE_FB_ATMEL | 90 | select HAVE_FB_ATMEL |
91 | 91 | ||
92 | config ARCH_AT572D940HF | ||
93 | bool "AT572D940HF" | ||
94 | select CPU_ARM926T | ||
95 | select GENERIC_TIME | ||
96 | select GENERIC_CLOCKEVENTS | ||
97 | |||
92 | config ARCH_AT91X40 | 98 | config ARCH_AT91X40 |
93 | bool "AT91x40" | 99 | bool "AT91x40" |
94 | 100 | ||
@@ -390,6 +396,23 @@ endif | |||
390 | 396 | ||
391 | # ---------------------------------------------------------- | 397 | # ---------------------------------------------------------- |
392 | 398 | ||
399 | if ARCH_AT572D940HF | ||
400 | |||
401 | comment "AT572D940HF Board Type" | ||
402 | |||
403 | config MACH_AT572D940HFEB | ||
404 | bool "AT572D940HF-EK" | ||
405 | depends on ARCH_AT572D940HF | ||
406 | select HAVE_AT91_DATAFLASH_CARD | ||
407 | select HAVE_NAND_ATMEL_BUSWIDTH_16 | ||
408 | help | ||
409 | Select this if you are using Atmel's AT572D940HF-EK evaluation kit. | ||
410 | <http://www.atmel.com/products/diopsis/default.asp> | ||
411 | |||
412 | endif | ||
413 | |||
414 | # ---------------------------------------------------------- | ||
415 | |||
393 | if ARCH_AT91X40 | 416 | if ARCH_AT91X40 |
394 | 417 | ||
395 | comment "AT91X40 Board Type" | 418 | comment "AT91X40 Board Type" |
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index 709fbad4a3ee..027dd570dcc3 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
@@ -19,6 +19,7 @@ obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devi | |||
19 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o | 19 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o |
20 | obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o | 20 | obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o |
21 | obj-$(CONFIG_ARCH_AT91CAP9) += at91cap9.o at91sam926x_time.o at91cap9_devices.o sam9_smc.o | 21 | obj-$(CONFIG_ARCH_AT91CAP9) += at91cap9.o at91sam926x_time.o at91cap9_devices.o sam9_smc.o |
22 | obj-$(CONFIG_ARCH_AT572D940HF) += at572d940hf.o at91sam926x_time.o at572d940hf_devices.o sam9_smc.o | ||
22 | obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o | 23 | obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o |
23 | 24 | ||
24 | # AT91RM9200 board-specific support | 25 | # AT91RM9200 board-specific support |
@@ -69,6 +70,9 @@ obj-$(CONFIG_MACH_AT91SAM9G45EKES) += board-sam9m10g45ek.o | |||
69 | # AT91CAP9 board-specific support | 70 | # AT91CAP9 board-specific support |
70 | obj-$(CONFIG_MACH_AT91CAP9ADK) += board-cap9adk.o | 71 | obj-$(CONFIG_MACH_AT91CAP9ADK) += board-cap9adk.o |
71 | 72 | ||
73 | # AT572D940HF board-specific support | ||
74 | obj-$(CONFIG_MACH_AT572D940HFEB) += board-at572d940hf_ek.o | ||
75 | |||
72 | # AT91X40 board-specific support | 76 | # AT91X40 board-specific support |
73 | obj-$(CONFIG_MACH_AT91EB01) += board-eb01.o | 77 | obj-$(CONFIG_MACH_AT91EB01) += board-eb01.o |
74 | 78 | ||
diff --git a/arch/arm/mach-at91/at572d940hf.c b/arch/arm/mach-at91/at572d940hf.c new file mode 100644 index 000000000000..a6b9c68c003a --- /dev/null +++ b/arch/arm/mach-at91/at572d940hf.c | |||
@@ -0,0 +1,377 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/at572d940hf.c | ||
3 | * | ||
4 | * Antonio R. Costa <costa.antonior@gmail.com> | ||
5 | * Copyright (C) 2008 Atmel | ||
6 | * | ||
7 | * Copyright (C) 2005 SAN People | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #include <linux/module.h> | ||
26 | |||
27 | #include <asm/mach/irq.h> | ||
28 | #include <asm/mach/arch.h> | ||
29 | #include <asm/mach/map.h> | ||
30 | #include <mach/at572d940hf.h> | ||
31 | #include <mach/at91_pmc.h> | ||
32 | #include <mach/at91_rstc.h> | ||
33 | |||
34 | #include "generic.h" | ||
35 | #include "clock.h" | ||
36 | |||
37 | static struct map_desc at572d940hf_io_desc[] __initdata = { | ||
38 | { | ||
39 | .virtual = AT91_VA_BASE_SYS, | ||
40 | .pfn = __phys_to_pfn(AT91_BASE_SYS), | ||
41 | .length = SZ_16K, | ||
42 | .type = MT_DEVICE, | ||
43 | }, { | ||
44 | .virtual = AT91_IO_VIRT_BASE - AT572D940HF_SRAM_SIZE, | ||
45 | .pfn = __phys_to_pfn(AT572D940HF_SRAM_BASE), | ||
46 | .length = AT572D940HF_SRAM_SIZE, | ||
47 | .type = MT_DEVICE, | ||
48 | }, | ||
49 | }; | ||
50 | |||
51 | /* -------------------------------------------------------------------- | ||
52 | * Clocks | ||
53 | * -------------------------------------------------------------------- */ | ||
54 | |||
55 | /* | ||
56 | * The peripheral clocks. | ||
57 | */ | ||
58 | static struct clk pioA_clk = { | ||
59 | .name = "pioA_clk", | ||
60 | .pmc_mask = 1 << AT572D940HF_ID_PIOA, | ||
61 | .type = CLK_TYPE_PERIPHERAL, | ||
62 | }; | ||
63 | static struct clk pioB_clk = { | ||
64 | .name = "pioB_clk", | ||
65 | .pmc_mask = 1 << AT572D940HF_ID_PIOB, | ||
66 | .type = CLK_TYPE_PERIPHERAL, | ||
67 | }; | ||
68 | static struct clk pioC_clk = { | ||
69 | .name = "pioC_clk", | ||
70 | .pmc_mask = 1 << AT572D940HF_ID_PIOC, | ||
71 | .type = CLK_TYPE_PERIPHERAL, | ||
72 | }; | ||
73 | static struct clk macb_clk = { | ||
74 | .name = "macb_clk", | ||
75 | .pmc_mask = 1 << AT572D940HF_ID_EMAC, | ||
76 | .type = CLK_TYPE_PERIPHERAL, | ||
77 | }; | ||
78 | static struct clk usart0_clk = { | ||
79 | .name = "usart0_clk", | ||
80 | .pmc_mask = 1 << AT572D940HF_ID_US0, | ||
81 | .type = CLK_TYPE_PERIPHERAL, | ||
82 | }; | ||
83 | static struct clk usart1_clk = { | ||
84 | .name = "usart1_clk", | ||
85 | .pmc_mask = 1 << AT572D940HF_ID_US1, | ||
86 | .type = CLK_TYPE_PERIPHERAL, | ||
87 | }; | ||
88 | static struct clk usart2_clk = { | ||
89 | .name = "usart2_clk", | ||
90 | .pmc_mask = 1 << AT572D940HF_ID_US2, | ||
91 | .type = CLK_TYPE_PERIPHERAL, | ||
92 | }; | ||
93 | static struct clk mmc_clk = { | ||
94 | .name = "mci_clk", | ||
95 | .pmc_mask = 1 << AT572D940HF_ID_MCI, | ||
96 | .type = CLK_TYPE_PERIPHERAL, | ||
97 | }; | ||
98 | static struct clk udc_clk = { | ||
99 | .name = "udc_clk", | ||
100 | .pmc_mask = 1 << AT572D940HF_ID_UDP, | ||
101 | .type = CLK_TYPE_PERIPHERAL, | ||
102 | }; | ||
103 | static struct clk twi0_clk = { | ||
104 | .name = "twi0_clk", | ||
105 | .pmc_mask = 1 << AT572D940HF_ID_TWI0, | ||
106 | .type = CLK_TYPE_PERIPHERAL, | ||
107 | }; | ||
108 | static struct clk spi0_clk = { | ||
109 | .name = "spi0_clk", | ||
110 | .pmc_mask = 1 << AT572D940HF_ID_SPI0, | ||
111 | .type = CLK_TYPE_PERIPHERAL, | ||
112 | }; | ||
113 | static struct clk spi1_clk = { | ||
114 | .name = "spi1_clk", | ||
115 | .pmc_mask = 1 << AT572D940HF_ID_SPI1, | ||
116 | .type = CLK_TYPE_PERIPHERAL, | ||
117 | }; | ||
118 | static struct clk ssc0_clk = { | ||
119 | .name = "ssc0_clk", | ||
120 | .pmc_mask = 1 << AT572D940HF_ID_SSC0, | ||
121 | .type = CLK_TYPE_PERIPHERAL, | ||
122 | }; | ||
123 | static struct clk ssc1_clk = { | ||
124 | .name = "ssc1_clk", | ||
125 | .pmc_mask = 1 << AT572D940HF_ID_SSC1, | ||
126 | .type = CLK_TYPE_PERIPHERAL, | ||
127 | }; | ||
128 | static struct clk ssc2_clk = { | ||
129 | .name = "ssc2_clk", | ||
130 | .pmc_mask = 1 << AT572D940HF_ID_SSC2, | ||
131 | .type = CLK_TYPE_PERIPHERAL, | ||
132 | }; | ||
133 | static struct clk tc0_clk = { | ||
134 | .name = "tc0_clk", | ||
135 | .pmc_mask = 1 << AT572D940HF_ID_TC0, | ||
136 | .type = CLK_TYPE_PERIPHERAL, | ||
137 | }; | ||
138 | static struct clk tc1_clk = { | ||
139 | .name = "tc1_clk", | ||
140 | .pmc_mask = 1 << AT572D940HF_ID_TC1, | ||
141 | .type = CLK_TYPE_PERIPHERAL, | ||
142 | }; | ||
143 | static struct clk tc2_clk = { | ||
144 | .name = "tc2_clk", | ||
145 | .pmc_mask = 1 << AT572D940HF_ID_TC2, | ||
146 | .type = CLK_TYPE_PERIPHERAL, | ||
147 | }; | ||
148 | static struct clk ohci_clk = { | ||
149 | .name = "ohci_clk", | ||
150 | .pmc_mask = 1 << AT572D940HF_ID_UHP, | ||
151 | .type = CLK_TYPE_PERIPHERAL, | ||
152 | }; | ||
153 | static struct clk ssc3_clk = { | ||
154 | .name = "ssc3_clk", | ||
155 | .pmc_mask = 1 << AT572D940HF_ID_SSC3, | ||
156 | .type = CLK_TYPE_PERIPHERAL, | ||
157 | }; | ||
158 | static struct clk twi1_clk = { | ||
159 | .name = "twi1_clk", | ||
160 | .pmc_mask = 1 << AT572D940HF_ID_TWI1, | ||
161 | .type = CLK_TYPE_PERIPHERAL, | ||
162 | }; | ||
163 | static struct clk can0_clk = { | ||
164 | .name = "can0_clk", | ||
165 | .pmc_mask = 1 << AT572D940HF_ID_CAN0, | ||
166 | .type = CLK_TYPE_PERIPHERAL, | ||
167 | }; | ||
168 | static struct clk can1_clk = { | ||
169 | .name = "can1_clk", | ||
170 | .pmc_mask = 1 << AT572D940HF_ID_CAN1, | ||
171 | .type = CLK_TYPE_PERIPHERAL, | ||
172 | }; | ||
173 | static struct clk mAgicV_clk = { | ||
174 | .name = "mAgicV_clk", | ||
175 | .pmc_mask = 1 << AT572D940HF_ID_MSIRQ0, | ||
176 | .type = CLK_TYPE_PERIPHERAL, | ||
177 | }; | ||
178 | |||
179 | |||
180 | static struct clk *periph_clocks[] __initdata = { | ||
181 | &pioA_clk, | ||
182 | &pioB_clk, | ||
183 | &pioC_clk, | ||
184 | &macb_clk, | ||
185 | &usart0_clk, | ||
186 | &usart1_clk, | ||
187 | &usart2_clk, | ||
188 | &mmc_clk, | ||
189 | &udc_clk, | ||
190 | &twi0_clk, | ||
191 | &spi0_clk, | ||
192 | &spi1_clk, | ||
193 | &ssc0_clk, | ||
194 | &ssc1_clk, | ||
195 | &ssc2_clk, | ||
196 | &tc0_clk, | ||
197 | &tc1_clk, | ||
198 | &tc2_clk, | ||
199 | &ohci_clk, | ||
200 | &ssc3_clk, | ||
201 | &twi1_clk, | ||
202 | &can0_clk, | ||
203 | &can1_clk, | ||
204 | &mAgicV_clk, | ||
205 | /* irq0 .. irq2 */ | ||
206 | }; | ||
207 | |||
208 | /* | ||
209 | * The five programmable clocks. | ||
210 | * You must configure pin multiplexing to bring these signals out. | ||
211 | */ | ||
212 | static struct clk pck0 = { | ||
213 | .name = "pck0", | ||
214 | .pmc_mask = AT91_PMC_PCK0, | ||
215 | .type = CLK_TYPE_PROGRAMMABLE, | ||
216 | .id = 0, | ||
217 | }; | ||
218 | static struct clk pck1 = { | ||
219 | .name = "pck1", | ||
220 | .pmc_mask = AT91_PMC_PCK1, | ||
221 | .type = CLK_TYPE_PROGRAMMABLE, | ||
222 | .id = 1, | ||
223 | }; | ||
224 | static struct clk pck2 = { | ||
225 | .name = "pck2", | ||
226 | .pmc_mask = AT91_PMC_PCK2, | ||
227 | .type = CLK_TYPE_PROGRAMMABLE, | ||
228 | .id = 2, | ||
229 | }; | ||
230 | static struct clk pck3 = { | ||
231 | .name = "pck3", | ||
232 | .pmc_mask = AT91_PMC_PCK3, | ||
233 | .type = CLK_TYPE_PROGRAMMABLE, | ||
234 | .id = 3, | ||
235 | }; | ||
236 | |||
237 | static struct clk mAgicV_mem_clk = { | ||
238 | .name = "mAgicV_mem_clk", | ||
239 | .pmc_mask = AT91_PMC_PCK4, | ||
240 | .type = CLK_TYPE_PROGRAMMABLE, | ||
241 | .id = 4, | ||
242 | }; | ||
243 | |||
244 | /* HClocks */ | ||
245 | static struct clk hck0 = { | ||
246 | .name = "hck0", | ||
247 | .pmc_mask = AT91_PMC_HCK0, | ||
248 | .type = CLK_TYPE_SYSTEM, | ||
249 | .id = 0, | ||
250 | }; | ||
251 | static struct clk hck1 = { | ||
252 | .name = "hck1", | ||
253 | .pmc_mask = AT91_PMC_HCK1, | ||
254 | .type = CLK_TYPE_SYSTEM, | ||
255 | .id = 1, | ||
256 | }; | ||
257 | |||
258 | static void __init at572d940hf_register_clocks(void) | ||
259 | { | ||
260 | int i; | ||
261 | |||
262 | for (i = 0; i < ARRAY_SIZE(periph_clocks); i++) | ||
263 | clk_register(periph_clocks[i]); | ||
264 | |||
265 | clk_register(&pck0); | ||
266 | clk_register(&pck1); | ||
267 | clk_register(&pck2); | ||
268 | clk_register(&pck3); | ||
269 | clk_register(&mAgicV_mem_clk); | ||
270 | |||
271 | clk_register(&hck0); | ||
272 | clk_register(&hck1); | ||
273 | } | ||
274 | |||
275 | /* -------------------------------------------------------------------- | ||
276 | * GPIO | ||
277 | * -------------------------------------------------------------------- */ | ||
278 | |||
279 | static struct at91_gpio_bank at572d940hf_gpio[] = { | ||
280 | { | ||
281 | .id = AT572D940HF_ID_PIOA, | ||
282 | .offset = AT91_PIOA, | ||
283 | .clock = &pioA_clk, | ||
284 | }, { | ||
285 | .id = AT572D940HF_ID_PIOB, | ||
286 | .offset = AT91_PIOB, | ||
287 | .clock = &pioB_clk, | ||
288 | }, { | ||
289 | .id = AT572D940HF_ID_PIOC, | ||
290 | .offset = AT91_PIOC, | ||
291 | .clock = &pioC_clk, | ||
292 | } | ||
293 | }; | ||
294 | |||
295 | static void at572d940hf_reset(void) | ||
296 | { | ||
297 | at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST); | ||
298 | } | ||
299 | |||
300 | |||
301 | /* -------------------------------------------------------------------- | ||
302 | * AT572D940HF processor initialization | ||
303 | * -------------------------------------------------------------------- */ | ||
304 | |||
305 | void __init at572d940hf_initialize(unsigned long main_clock) | ||
306 | { | ||
307 | /* Map peripherals */ | ||
308 | iotable_init(at572d940hf_io_desc, ARRAY_SIZE(at572d940hf_io_desc)); | ||
309 | |||
310 | at91_arch_reset = at572d940hf_reset; | ||
311 | at91_extern_irq = (1 << AT572D940HF_ID_IRQ0) | (1 << AT572D940HF_ID_IRQ1) | ||
312 | | (1 << AT572D940HF_ID_IRQ2); | ||
313 | |||
314 | /* Init clock subsystem */ | ||
315 | at91_clock_init(main_clock); | ||
316 | |||
317 | /* Register the processor-specific clocks */ | ||
318 | at572d940hf_register_clocks(); | ||
319 | |||
320 | /* Register GPIO subsystem */ | ||
321 | at91_gpio_init(at572d940hf_gpio, 3); | ||
322 | } | ||
323 | |||
324 | /* -------------------------------------------------------------------- | ||
325 | * Interrupt initialization | ||
326 | * -------------------------------------------------------------------- */ | ||
327 | |||
328 | /* | ||
329 | * The default interrupt priority levels (0 = lowest, 7 = highest). | ||
330 | */ | ||
331 | static unsigned int at572d940hf_default_irq_priority[NR_AIC_IRQS] __initdata = { | ||
332 | 7, /* Advanced Interrupt Controller */ | ||
333 | 7, /* System Peripherals */ | ||
334 | 0, /* Parallel IO Controller A */ | ||
335 | 0, /* Parallel IO Controller B */ | ||
336 | 0, /* Parallel IO Controller C */ | ||
337 | 3, /* Ethernet */ | ||
338 | 6, /* USART 0 */ | ||
339 | 6, /* USART 1 */ | ||
340 | 6, /* USART 2 */ | ||
341 | 0, /* Multimedia Card Interface */ | ||
342 | 4, /* USB Device Port */ | ||
343 | 0, /* Two-Wire Interface 0 */ | ||
344 | 6, /* Serial Peripheral Interface 0 */ | ||
345 | 6, /* Serial Peripheral Interface 1 */ | ||
346 | 5, /* Serial Synchronous Controller 0 */ | ||
347 | 5, /* Serial Synchronous Controller 1 */ | ||
348 | 5, /* Serial Synchronous Controller 2 */ | ||
349 | 0, /* Timer Counter 0 */ | ||
350 | 0, /* Timer Counter 1 */ | ||
351 | 0, /* Timer Counter 2 */ | ||
352 | 3, /* USB Host port */ | ||
353 | 3, /* Serial Synchronous Controller 3 */ | ||
354 | 0, /* Two-Wire Interface 1 */ | ||
355 | 0, /* CAN Controller 0 */ | ||
356 | 0, /* CAN Controller 1 */ | ||
357 | 0, /* mAgicV HALT line */ | ||
358 | 0, /* mAgicV SIRQ0 line */ | ||
359 | 0, /* mAgicV exception line */ | ||
360 | 0, /* mAgicV end of DMA line */ | ||
361 | 0, /* Advanced Interrupt Controller */ | ||
362 | 0, /* Advanced Interrupt Controller */ | ||
363 | 0, /* Advanced Interrupt Controller */ | ||
364 | }; | ||
365 | |||
366 | void __init at572d940hf_init_interrupts(unsigned int priority[NR_AIC_IRQS]) | ||
367 | { | ||
368 | if (!priority) | ||
369 | priority = at572d940hf_default_irq_priority; | ||
370 | |||
371 | /* Initialize the AIC interrupt controller */ | ||
372 | at91_aic_init(priority); | ||
373 | |||
374 | /* Enable GPIO interrupts */ | ||
375 | at91_gpio_irq_setup(); | ||
376 | } | ||
377 | |||
diff --git a/arch/arm/mach-at91/at572d940hf_devices.c b/arch/arm/mach-at91/at572d940hf_devices.c new file mode 100644 index 000000000000..0fc20a240782 --- /dev/null +++ b/arch/arm/mach-at91/at572d940hf_devices.c | |||
@@ -0,0 +1,970 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/at572d940hf_devices.c | ||
3 | * | ||
4 | * Copyright (C) 2008 Atmel Antonio R. Costa <costa.antonior@gmail.com> | ||
5 | * Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org> | ||
6 | * Copyright (C) 2005 David Brownell | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #include <asm/mach/arch.h> | ||
25 | #include <asm/mach/map.h> | ||
26 | |||
27 | #include <linux/dma-mapping.h> | ||
28 | #include <linux/platform_device.h> | ||
29 | |||
30 | #include <mach/board.h> | ||
31 | #include <mach/gpio.h> | ||
32 | #include <mach/at572d940hf.h> | ||
33 | #include <mach/at572d940hf_matrix.h> | ||
34 | #include <mach/at91sam9_smc.h> | ||
35 | |||
36 | #include "generic.h" | ||
37 | #include "sam9_smc.h" | ||
38 | |||
39 | |||
40 | /* -------------------------------------------------------------------- | ||
41 | * USB Host | ||
42 | * -------------------------------------------------------------------- */ | ||
43 | |||
44 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | ||
45 | static u64 ohci_dmamask = DMA_BIT_MASK(32); | ||
46 | static struct at91_usbh_data usbh_data; | ||
47 | |||
48 | static struct resource usbh_resources[] = { | ||
49 | [0] = { | ||
50 | .start = AT572D940HF_UHP_BASE, | ||
51 | .end = AT572D940HF_UHP_BASE + SZ_1M - 1, | ||
52 | .flags = IORESOURCE_MEM, | ||
53 | }, | ||
54 | [1] = { | ||
55 | .start = AT572D940HF_ID_UHP, | ||
56 | .end = AT572D940HF_ID_UHP, | ||
57 | .flags = IORESOURCE_IRQ, | ||
58 | }, | ||
59 | }; | ||
60 | |||
61 | static struct platform_device at572d940hf_usbh_device = { | ||
62 | .name = "at91_ohci", | ||
63 | .id = -1, | ||
64 | .dev = { | ||
65 | .dma_mask = &ohci_dmamask, | ||
66 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
67 | .platform_data = &usbh_data, | ||
68 | }, | ||
69 | .resource = usbh_resources, | ||
70 | .num_resources = ARRAY_SIZE(usbh_resources), | ||
71 | }; | ||
72 | |||
73 | void __init at91_add_device_usbh(struct at91_usbh_data *data) | ||
74 | { | ||
75 | if (!data) | ||
76 | return; | ||
77 | |||
78 | usbh_data = *data; | ||
79 | platform_device_register(&at572d940hf_usbh_device); | ||
80 | |||
81 | } | ||
82 | #else | ||
83 | void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | ||
84 | #endif | ||
85 | |||
86 | |||
87 | /* -------------------------------------------------------------------- | ||
88 | * USB Device (Gadget) | ||
89 | * -------------------------------------------------------------------- */ | ||
90 | |||
91 | #ifdef CONFIG_USB_GADGET_AT91 | ||
92 | static struct at91_udc_data udc_data; | ||
93 | |||
94 | static struct resource udc_resources[] = { | ||
95 | [0] = { | ||
96 | .start = AT572D940HF_BASE_UDP, | ||
97 | .end = AT572D940HF_BASE_UDP + SZ_16K - 1, | ||
98 | .flags = IORESOURCE_MEM, | ||
99 | }, | ||
100 | [1] = { | ||
101 | .start = AT572D940HF_ID_UDP, | ||
102 | .end = AT572D940HF_ID_UDP, | ||
103 | .flags = IORESOURCE_IRQ, | ||
104 | }, | ||
105 | }; | ||
106 | |||
107 | static struct platform_device at572d940hf_udc_device = { | ||
108 | .name = "at91_udc", | ||
109 | .id = -1, | ||
110 | .dev = { | ||
111 | .platform_data = &udc_data, | ||
112 | }, | ||
113 | .resource = udc_resources, | ||
114 | .num_resources = ARRAY_SIZE(udc_resources), | ||
115 | }; | ||
116 | |||
117 | void __init at91_add_device_udc(struct at91_udc_data *data) | ||
118 | { | ||
119 | if (!data) | ||
120 | return; | ||
121 | |||
122 | if (data->vbus_pin) { | ||
123 | at91_set_gpio_input(data->vbus_pin, 0); | ||
124 | at91_set_deglitch(data->vbus_pin, 1); | ||
125 | } | ||
126 | |||
127 | /* Pullup pin is handled internally */ | ||
128 | |||
129 | udc_data = *data; | ||
130 | platform_device_register(&at572d940hf_udc_device); | ||
131 | } | ||
132 | #else | ||
133 | void __init at91_add_device_udc(struct at91_udc_data *data) {} | ||
134 | #endif | ||
135 | |||
136 | |||
137 | /* -------------------------------------------------------------------- | ||
138 | * Ethernet | ||
139 | * -------------------------------------------------------------------- */ | ||
140 | |||
141 | #if defined(CONFIG_MACB) || defined(CONFIG_MACB_MODULE) | ||
142 | static u64 eth_dmamask = DMA_BIT_MASK(32); | ||
143 | static struct at91_eth_data eth_data; | ||
144 | |||
145 | static struct resource eth_resources[] = { | ||
146 | [0] = { | ||
147 | .start = AT572D940HF_BASE_EMAC, | ||
148 | .end = AT572D940HF_BASE_EMAC + SZ_16K - 1, | ||
149 | .flags = IORESOURCE_MEM, | ||
150 | }, | ||
151 | [1] = { | ||
152 | .start = AT572D940HF_ID_EMAC, | ||
153 | .end = AT572D940HF_ID_EMAC, | ||
154 | .flags = IORESOURCE_IRQ, | ||
155 | }, | ||
156 | }; | ||
157 | |||
158 | static struct platform_device at572d940hf_eth_device = { | ||
159 | .name = "macb", | ||
160 | .id = -1, | ||
161 | .dev = { | ||
162 | .dma_mask = ð_dmamask, | ||
163 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
164 | .platform_data = ð_data, | ||
165 | }, | ||
166 | .resource = eth_resources, | ||
167 | .num_resources = ARRAY_SIZE(eth_resources), | ||
168 | }; | ||
169 | |||
170 | void __init at91_add_device_eth(struct at91_eth_data *data) | ||
171 | { | ||
172 | if (!data) | ||
173 | return; | ||
174 | |||
175 | if (data->phy_irq_pin) { | ||
176 | at91_set_gpio_input(data->phy_irq_pin, 0); | ||
177 | at91_set_deglitch(data->phy_irq_pin, 1); | ||
178 | } | ||
179 | |||
180 | /* Only RMII is supported */ | ||
181 | data->is_rmii = 1; | ||
182 | |||
183 | /* Pins used for RMII */ | ||
184 | at91_set_A_periph(AT91_PIN_PA16, 0); /* ETXCK_EREFCK */ | ||
185 | at91_set_A_periph(AT91_PIN_PA17, 0); /* ERXDV */ | ||
186 | at91_set_A_periph(AT91_PIN_PA18, 0); /* ERX0 */ | ||
187 | at91_set_A_periph(AT91_PIN_PA19, 0); /* ERX1 */ | ||
188 | at91_set_A_periph(AT91_PIN_PA20, 0); /* ERXER */ | ||
189 | at91_set_A_periph(AT91_PIN_PA23, 0); /* ETXEN */ | ||
190 | at91_set_A_periph(AT91_PIN_PA21, 0); /* ETX0 */ | ||
191 | at91_set_A_periph(AT91_PIN_PA22, 0); /* ETX1 */ | ||
192 | at91_set_A_periph(AT91_PIN_PA13, 0); /* EMDIO */ | ||
193 | at91_set_A_periph(AT91_PIN_PA14, 0); /* EMDC */ | ||
194 | |||
195 | eth_data = *data; | ||
196 | platform_device_register(&at572d940hf_eth_device); | ||
197 | } | ||
198 | #else | ||
199 | void __init at91_add_device_eth(struct at91_eth_data *data) {} | ||
200 | #endif | ||
201 | |||
202 | |||
203 | /* -------------------------------------------------------------------- | ||
204 | * MMC / SD | ||
205 | * -------------------------------------------------------------------- */ | ||
206 | |||
207 | #if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE) | ||
208 | static u64 mmc_dmamask = DMA_BIT_MASK(32); | ||
209 | static struct at91_mmc_data mmc_data; | ||
210 | |||
211 | static struct resource mmc_resources[] = { | ||
212 | [0] = { | ||
213 | .start = AT572D940HF_BASE_MCI, | ||
214 | .end = AT572D940HF_BASE_MCI + SZ_16K - 1, | ||
215 | .flags = IORESOURCE_MEM, | ||
216 | }, | ||
217 | [1] = { | ||
218 | .start = AT572D940HF_ID_MCI, | ||
219 | .end = AT572D940HF_ID_MCI, | ||
220 | .flags = IORESOURCE_IRQ, | ||
221 | }, | ||
222 | }; | ||
223 | |||
224 | static struct platform_device at572d940hf_mmc_device = { | ||
225 | .name = "at91_mci", | ||
226 | .id = -1, | ||
227 | .dev = { | ||
228 | .dma_mask = &mmc_dmamask, | ||
229 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
230 | .platform_data = &mmc_data, | ||
231 | }, | ||
232 | .resource = mmc_resources, | ||
233 | .num_resources = ARRAY_SIZE(mmc_resources), | ||
234 | }; | ||
235 | |||
236 | void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) | ||
237 | { | ||
238 | if (!data) | ||
239 | return; | ||
240 | |||
241 | /* input/irq */ | ||
242 | if (data->det_pin) { | ||
243 | at91_set_gpio_input(data->det_pin, 1); | ||
244 | at91_set_deglitch(data->det_pin, 1); | ||
245 | } | ||
246 | if (data->wp_pin) | ||
247 | at91_set_gpio_input(data->wp_pin, 1); | ||
248 | if (data->vcc_pin) | ||
249 | at91_set_gpio_output(data->vcc_pin, 0); | ||
250 | |||
251 | /* CLK */ | ||
252 | at91_set_A_periph(AT91_PIN_PC22, 0); | ||
253 | |||
254 | /* CMD */ | ||
255 | at91_set_A_periph(AT91_PIN_PC23, 1); | ||
256 | |||
257 | /* DAT0, maybe DAT1..DAT3 */ | ||
258 | at91_set_A_periph(AT91_PIN_PC24, 1); | ||
259 | if (data->wire4) { | ||
260 | at91_set_A_periph(AT91_PIN_PC25, 1); | ||
261 | at91_set_A_periph(AT91_PIN_PC26, 1); | ||
262 | at91_set_A_periph(AT91_PIN_PC27, 1); | ||
263 | } | ||
264 | |||
265 | mmc_data = *data; | ||
266 | platform_device_register(&at572d940hf_mmc_device); | ||
267 | } | ||
268 | #else | ||
269 | void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {} | ||
270 | #endif | ||
271 | |||
272 | |||
273 | /* -------------------------------------------------------------------- | ||
274 | * NAND / SmartMedia | ||
275 | * -------------------------------------------------------------------- */ | ||
276 | |||
277 | #if defined(CONFIG_MTD_NAND_ATMEL) || defined(CONFIG_MTD_NAND_ATMEL_MODULE) | ||
278 | static struct atmel_nand_data nand_data; | ||
279 | |||
280 | #define NAND_BASE AT91_CHIPSELECT_3 | ||
281 | |||
282 | static struct resource nand_resources[] = { | ||
283 | { | ||
284 | .start = NAND_BASE, | ||
285 | .end = NAND_BASE + SZ_256M - 1, | ||
286 | .flags = IORESOURCE_MEM, | ||
287 | } | ||
288 | }; | ||
289 | |||
290 | static struct platform_device at572d940hf_nand_device = { | ||
291 | .name = "atmel_nand", | ||
292 | .id = -1, | ||
293 | .dev = { | ||
294 | .platform_data = &nand_data, | ||
295 | }, | ||
296 | .resource = nand_resources, | ||
297 | .num_resources = ARRAY_SIZE(nand_resources), | ||
298 | }; | ||
299 | |||
300 | void __init at91_add_device_nand(struct atmel_nand_data *data) | ||
301 | { | ||
302 | unsigned long csa; | ||
303 | |||
304 | if (!data) | ||
305 | return; | ||
306 | |||
307 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | ||
308 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA); | ||
309 | |||
310 | /* enable pin */ | ||
311 | if (data->enable_pin) | ||
312 | at91_set_gpio_output(data->enable_pin, 1); | ||
313 | |||
314 | /* ready/busy pin */ | ||
315 | if (data->rdy_pin) | ||
316 | at91_set_gpio_input(data->rdy_pin, 1); | ||
317 | |||
318 | /* card detect pin */ | ||
319 | if (data->det_pin) | ||
320 | at91_set_gpio_input(data->det_pin, 1); | ||
321 | |||
322 | at91_set_A_periph(AT91_PIN_PB28, 0); /* A[22] */ | ||
323 | at91_set_B_periph(AT91_PIN_PA28, 0); /* NANDOE */ | ||
324 | at91_set_B_periph(AT91_PIN_PA29, 0); /* NANDWE */ | ||
325 | |||
326 | nand_data = *data; | ||
327 | platform_device_register(&at572d940hf_nand_device); | ||
328 | } | ||
329 | |||
330 | #else | ||
331 | void __init at91_add_device_nand(struct atmel_nand_data *data) {} | ||
332 | #endif | ||
333 | |||
334 | |||
335 | /* -------------------------------------------------------------------- | ||
336 | * TWI (i2c) | ||
337 | * -------------------------------------------------------------------- */ | ||
338 | |||
339 | /* | ||
340 | * Prefer the GPIO code since the TWI controller isn't robust | ||
341 | * (gets overruns and underruns under load) and can only issue | ||
342 | * repeated STARTs in one scenario (the driver doesn't yet handle them). | ||
343 | */ | ||
344 | |||
345 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) | ||
346 | |||
347 | static struct i2c_gpio_platform_data pdata = { | ||
348 | .sda_pin = AT91_PIN_PC7, | ||
349 | .sda_is_open_drain = 1, | ||
350 | .scl_pin = AT91_PIN_PC8, | ||
351 | .scl_is_open_drain = 1, | ||
352 | .udelay = 2, /* ~100 kHz */ | ||
353 | }; | ||
354 | |||
355 | static struct platform_device at572d940hf_twi_device { | ||
356 | .name = "i2c-gpio", | ||
357 | .id = -1, | ||
358 | .dev.platform_data = &pdata, | ||
359 | }; | ||
360 | |||
361 | void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices) | ||
362 | { | ||
363 | at91_set_GPIO_periph(AT91_PIN_PC7, 1); /* TWD (SDA) */ | ||
364 | at91_set_multi_drive(AT91_PIN_PC7, 1); | ||
365 | |||
366 | at91_set_GPIO_periph(AT91_PIN_PA8, 1); /* TWCK (SCL) */ | ||
367 | at91_set_multi_drive(AT91_PIN_PC8, 1); | ||
368 | |||
369 | i2c_register_board_info(0, devices, nr_devices); | ||
370 | platform_device_register(&at572d940hf_twi_device); | ||
371 | } | ||
372 | |||
373 | #elif defined(CONFIG_I2C_AT91) || defined(CONFIG_I2C_AT91_MODULE) | ||
374 | |||
375 | static struct resource twi0_resources[] = { | ||
376 | [0] = { | ||
377 | .start = AT572D940HF_BASE_TWI0, | ||
378 | .end = AT572D940HF_BASE_TWI0 + SZ_16K - 1, | ||
379 | .flags = IORESOURCE_MEM, | ||
380 | }, | ||
381 | [1] = { | ||
382 | .start = AT572D940HF_ID_TWI0, | ||
383 | .end = AT572D940HF_ID_TWI0, | ||
384 | .flags = IORESOURCE_IRQ, | ||
385 | }, | ||
386 | }; | ||
387 | |||
388 | static struct platform_device at572d940hf_twi0_device = { | ||
389 | .name = "at91_i2c", | ||
390 | .id = 0, | ||
391 | .resource = twi0_resources, | ||
392 | .num_resources = ARRAY_SIZE(twi0_resources), | ||
393 | }; | ||
394 | |||
395 | static struct resource twi1_resources[] = { | ||
396 | [0] = { | ||
397 | .start = AT572D940HF_BASE_TWI1, | ||
398 | .end = AT572D940HF_BASE_TWI1 + SZ_16K - 1, | ||
399 | .flags = IORESOURCE_MEM, | ||
400 | }, | ||
401 | [1] = { | ||
402 | .start = AT572D940HF_ID_TWI1, | ||
403 | .end = AT572D940HF_ID_TWI1, | ||
404 | .flags = IORESOURCE_IRQ, | ||
405 | }, | ||
406 | }; | ||
407 | |||
408 | static struct platform_device at572d940hf_twi1_device = { | ||
409 | .name = "at91_i2c", | ||
410 | .id = 1, | ||
411 | .resource = twi1_resources, | ||
412 | .num_resources = ARRAY_SIZE(twi1_resources), | ||
413 | }; | ||
414 | |||
415 | void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices) | ||
416 | { | ||
417 | /* pins used for TWI0 interface */ | ||
418 | at91_set_A_periph(AT91_PIN_PC7, 0); /* TWD */ | ||
419 | at91_set_multi_drive(AT91_PIN_PC7, 1); | ||
420 | |||
421 | at91_set_A_periph(AT91_PIN_PC8, 0); /* TWCK */ | ||
422 | at91_set_multi_drive(AT91_PIN_PC8, 1); | ||
423 | |||
424 | /* pins used for TWI1 interface */ | ||
425 | at91_set_A_periph(AT91_PIN_PC20, 0); /* TWD */ | ||
426 | at91_set_multi_drive(AT91_PIN_PC20, 1); | ||
427 | |||
428 | at91_set_A_periph(AT91_PIN_PC21, 0); /* TWCK */ | ||
429 | at91_set_multi_drive(AT91_PIN_PC21, 1); | ||
430 | |||
431 | i2c_register_board_info(0, devices, nr_devices); | ||
432 | platform_device_register(&at572d940hf_twi0_device); | ||
433 | platform_device_register(&at572d940hf_twi1_device); | ||
434 | } | ||
435 | #else | ||
436 | void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices) {} | ||
437 | #endif | ||
438 | |||
439 | |||
440 | /* -------------------------------------------------------------------- | ||
441 | * SPI | ||
442 | * -------------------------------------------------------------------- */ | ||
443 | |||
444 | #if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE) | ||
445 | static u64 spi_dmamask = DMA_BIT_MASK(32); | ||
446 | |||
447 | static struct resource spi0_resources[] = { | ||
448 | [0] = { | ||
449 | .start = AT572D940HF_BASE_SPI0, | ||
450 | .end = AT572D940HF_BASE_SPI0 + SZ_16K - 1, | ||
451 | .flags = IORESOURCE_MEM, | ||
452 | }, | ||
453 | [1] = { | ||
454 | .start = AT572D940HF_ID_SPI0, | ||
455 | .end = AT572D940HF_ID_SPI0, | ||
456 | .flags = IORESOURCE_IRQ, | ||
457 | }, | ||
458 | }; | ||
459 | |||
460 | static struct platform_device at572d940hf_spi0_device = { | ||
461 | .name = "atmel_spi", | ||
462 | .id = 0, | ||
463 | .dev = { | ||
464 | .dma_mask = &spi_dmamask, | ||
465 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
466 | }, | ||
467 | .resource = spi0_resources, | ||
468 | .num_resources = ARRAY_SIZE(spi0_resources), | ||
469 | }; | ||
470 | |||
471 | static const unsigned spi0_standard_cs[4] = { AT91_PIN_PA3, AT91_PIN_PA4, AT91_PIN_PA5, AT91_PIN_PA6 }; | ||
472 | |||
473 | static struct resource spi1_resources[] = { | ||
474 | [0] = { | ||
475 | .start = AT572D940HF_BASE_SPI1, | ||
476 | .end = AT572D940HF_BASE_SPI1 + SZ_16K - 1, | ||
477 | .flags = IORESOURCE_MEM, | ||
478 | }, | ||
479 | [1] = { | ||
480 | .start = AT572D940HF_ID_SPI1, | ||
481 | .end = AT572D940HF_ID_SPI1, | ||
482 | .flags = IORESOURCE_IRQ, | ||
483 | }, | ||
484 | }; | ||
485 | |||
486 | static struct platform_device at572d940hf_spi1_device = { | ||
487 | .name = "atmel_spi", | ||
488 | .id = 1, | ||
489 | .dev = { | ||
490 | .dma_mask = &spi_dmamask, | ||
491 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
492 | }, | ||
493 | .resource = spi1_resources, | ||
494 | .num_resources = ARRAY_SIZE(spi1_resources), | ||
495 | }; | ||
496 | |||
497 | static const unsigned spi1_standard_cs[4] = { AT91_PIN_PC3, AT91_PIN_PC4, AT91_PIN_PC5, AT91_PIN_PC6 }; | ||
498 | |||
499 | void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | ||
500 | { | ||
501 | int i; | ||
502 | unsigned long cs_pin; | ||
503 | short enable_spi0 = 0; | ||
504 | short enable_spi1 = 0; | ||
505 | |||
506 | /* Choose SPI chip-selects */ | ||
507 | for (i = 0; i < nr_devices; i++) { | ||
508 | if (devices[i].controller_data) | ||
509 | cs_pin = (unsigned long) devices[i].controller_data; | ||
510 | else if (devices[i].bus_num == 0) | ||
511 | cs_pin = spi0_standard_cs[devices[i].chip_select]; | ||
512 | else | ||
513 | cs_pin = spi1_standard_cs[devices[i].chip_select]; | ||
514 | |||
515 | if (devices[i].bus_num == 0) | ||
516 | enable_spi0 = 1; | ||
517 | else | ||
518 | enable_spi1 = 1; | ||
519 | |||
520 | /* enable chip-select pin */ | ||
521 | at91_set_gpio_output(cs_pin, 1); | ||
522 | |||
523 | /* pass chip-select pin to driver */ | ||
524 | devices[i].controller_data = (void *) cs_pin; | ||
525 | } | ||
526 | |||
527 | spi_register_board_info(devices, nr_devices); | ||
528 | |||
529 | /* Configure SPI bus(es) */ | ||
530 | if (enable_spi0) { | ||
531 | at91_set_A_periph(AT91_PIN_PA0, 0); /* SPI0_MISO */ | ||
532 | at91_set_A_periph(AT91_PIN_PA1, 0); /* SPI0_MOSI */ | ||
533 | at91_set_A_periph(AT91_PIN_PA2, 0); /* SPI0_SPCK */ | ||
534 | |||
535 | at91_clock_associate("spi0_clk", &at572d940hf_spi0_device.dev, "spi_clk"); | ||
536 | platform_device_register(&at572d940hf_spi0_device); | ||
537 | } | ||
538 | if (enable_spi1) { | ||
539 | at91_set_A_periph(AT91_PIN_PC0, 0); /* SPI1_MISO */ | ||
540 | at91_set_A_periph(AT91_PIN_PC1, 0); /* SPI1_MOSI */ | ||
541 | at91_set_A_periph(AT91_PIN_PC2, 0); /* SPI1_SPCK */ | ||
542 | |||
543 | at91_clock_associate("spi1_clk", &at572d940hf_spi1_device.dev, "spi_clk"); | ||
544 | platform_device_register(&at572d940hf_spi1_device); | ||
545 | } | ||
546 | } | ||
547 | #else | ||
548 | void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) {} | ||
549 | #endif | ||
550 | |||
551 | |||
552 | /* -------------------------------------------------------------------- | ||
553 | * Timer/Counter blocks | ||
554 | * -------------------------------------------------------------------- */ | ||
555 | |||
556 | #ifdef CONFIG_ATMEL_TCLIB | ||
557 | |||
558 | static struct resource tcb_resources[] = { | ||
559 | [0] = { | ||
560 | .start = AT572D940HF_BASE_TCB, | ||
561 | .end = AT572D940HF_BASE_TCB + SZ_16K - 1, | ||
562 | .flags = IORESOURCE_MEM, | ||
563 | }, | ||
564 | [1] = { | ||
565 | .start = AT572D940HF_ID_TC0, | ||
566 | .end = AT572D940HF_ID_TC0, | ||
567 | .flags = IORESOURCE_IRQ, | ||
568 | }, | ||
569 | [2] = { | ||
570 | .start = AT572D940HF_ID_TC1, | ||
571 | .end = AT572D940HF_ID_TC1, | ||
572 | .flags = IORESOURCE_IRQ, | ||
573 | }, | ||
574 | [3] = { | ||
575 | .start = AT572D940HF_ID_TC2, | ||
576 | .end = AT572D940HF_ID_TC2, | ||
577 | .flags = IORESOURCE_IRQ, | ||
578 | }, | ||
579 | }; | ||
580 | |||
581 | static struct platform_device at572d940hf_tcb_device = { | ||
582 | .name = "atmel_tcb", | ||
583 | .id = 0, | ||
584 | .resource = tcb_resources, | ||
585 | .num_resources = ARRAY_SIZE(tcb_resources), | ||
586 | }; | ||
587 | |||
588 | static void __init at91_add_device_tc(void) | ||
589 | { | ||
590 | /* this chip has a separate clock and irq for each TC channel */ | ||
591 | at91_clock_associate("tc0_clk", &at572d940hf_tcb_device.dev, "t0_clk"); | ||
592 | at91_clock_associate("tc1_clk", &at572d940hf_tcb_device.dev, "t1_clk"); | ||
593 | at91_clock_associate("tc2_clk", &at572d940hf_tcb_device.dev, "t2_clk"); | ||
594 | platform_device_register(&at572d940hf_tcb_device); | ||
595 | } | ||
596 | #else | ||
597 | static void __init at91_add_device_tc(void) { } | ||
598 | #endif | ||
599 | |||
600 | |||
601 | /* -------------------------------------------------------------------- | ||
602 | * RTT | ||
603 | * -------------------------------------------------------------------- */ | ||
604 | |||
605 | static struct resource rtt_resources[] = { | ||
606 | { | ||
607 | .start = AT91_BASE_SYS + AT91_RTT, | ||
608 | .end = AT91_BASE_SYS + AT91_RTT + SZ_16 - 1, | ||
609 | .flags = IORESOURCE_MEM, | ||
610 | } | ||
611 | }; | ||
612 | |||
613 | static struct platform_device at572d940hf_rtt_device = { | ||
614 | .name = "at91_rtt", | ||
615 | .id = 0, | ||
616 | .resource = rtt_resources, | ||
617 | .num_resources = ARRAY_SIZE(rtt_resources), | ||
618 | }; | ||
619 | |||
620 | static void __init at91_add_device_rtt(void) | ||
621 | { | ||
622 | platform_device_register(&at572d940hf_rtt_device); | ||
623 | } | ||
624 | |||
625 | |||
626 | /* -------------------------------------------------------------------- | ||
627 | * Watchdog | ||
628 | * -------------------------------------------------------------------- */ | ||
629 | |||
630 | #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) | ||
631 | static struct platform_device at572d940hf_wdt_device = { | ||
632 | .name = "at91_wdt", | ||
633 | .id = -1, | ||
634 | .num_resources = 0, | ||
635 | }; | ||
636 | |||
637 | static void __init at91_add_device_watchdog(void) | ||
638 | { | ||
639 | platform_device_register(&at572d940hf_wdt_device); | ||
640 | } | ||
641 | #else | ||
642 | static void __init at91_add_device_watchdog(void) {} | ||
643 | #endif | ||
644 | |||
645 | |||
646 | /* -------------------------------------------------------------------- | ||
647 | * UART | ||
648 | * -------------------------------------------------------------------- */ | ||
649 | |||
650 | #if defined(CONFIG_SERIAL_ATMEL) | ||
651 | static struct resource dbgu_resources[] = { | ||
652 | [0] = { | ||
653 | .start = AT91_VA_BASE_SYS + AT91_DBGU, | ||
654 | .end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1, | ||
655 | .flags = IORESOURCE_MEM, | ||
656 | }, | ||
657 | [1] = { | ||
658 | .start = AT91_ID_SYS, | ||
659 | .end = AT91_ID_SYS, | ||
660 | .flags = IORESOURCE_IRQ, | ||
661 | }, | ||
662 | }; | ||
663 | |||
664 | static struct atmel_uart_data dbgu_data = { | ||
665 | .use_dma_tx = 0, | ||
666 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | ||
667 | .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU), | ||
668 | }; | ||
669 | |||
670 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | ||
671 | |||
672 | static struct platform_device at572d940hf_dbgu_device = { | ||
673 | .name = "atmel_usart", | ||
674 | .id = 0, | ||
675 | .dev = { | ||
676 | .dma_mask = &dbgu_dmamask, | ||
677 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
678 | .platform_data = &dbgu_data, | ||
679 | }, | ||
680 | .resource = dbgu_resources, | ||
681 | .num_resources = ARRAY_SIZE(dbgu_resources), | ||
682 | }; | ||
683 | |||
684 | static inline void configure_dbgu_pins(void) | ||
685 | { | ||
686 | at91_set_A_periph(AT91_PIN_PC31, 1); /* DTXD */ | ||
687 | at91_set_A_periph(AT91_PIN_PC30, 0); /* DRXD */ | ||
688 | } | ||
689 | |||
690 | static struct resource uart0_resources[] = { | ||
691 | [0] = { | ||
692 | .start = AT572D940HF_BASE_US0, | ||
693 | .end = AT572D940HF_BASE_US0 + SZ_16K - 1, | ||
694 | .flags = IORESOURCE_MEM, | ||
695 | }, | ||
696 | [1] = { | ||
697 | .start = AT572D940HF_ID_US0, | ||
698 | .end = AT572D940HF_ID_US0, | ||
699 | .flags = IORESOURCE_IRQ, | ||
700 | }, | ||
701 | }; | ||
702 | |||
703 | static struct atmel_uart_data uart0_data = { | ||
704 | .use_dma_tx = 1, | ||
705 | .use_dma_rx = 1, | ||
706 | }; | ||
707 | |||
708 | static u64 uart0_dmamask = DMA_BIT_MASK(32); | ||
709 | |||
710 | static struct platform_device at572d940hf_uart0_device = { | ||
711 | .name = "atmel_usart", | ||
712 | .id = 1, | ||
713 | .dev = { | ||
714 | .dma_mask = &uart0_dmamask, | ||
715 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
716 | .platform_data = &uart0_data, | ||
717 | }, | ||
718 | .resource = uart0_resources, | ||
719 | .num_resources = ARRAY_SIZE(uart0_resources), | ||
720 | }; | ||
721 | |||
722 | static inline void configure_usart0_pins(unsigned pins) | ||
723 | { | ||
724 | at91_set_A_periph(AT91_PIN_PA8, 1); /* TXD0 */ | ||
725 | at91_set_A_periph(AT91_PIN_PA7, 0); /* RXD0 */ | ||
726 | |||
727 | if (pins & ATMEL_UART_RTS) | ||
728 | at91_set_A_periph(AT91_PIN_PA10, 0); /* RTS0 */ | ||
729 | if (pins & ATMEL_UART_CTS) | ||
730 | at91_set_A_periph(AT91_PIN_PA9, 0); /* CTS0 */ | ||
731 | } | ||
732 | |||
733 | static struct resource uart1_resources[] = { | ||
734 | [0] = { | ||
735 | .start = AT572D940HF_BASE_US1, | ||
736 | .end = AT572D940HF_BASE_US1 + SZ_16K - 1, | ||
737 | .flags = IORESOURCE_MEM, | ||
738 | }, | ||
739 | [1] = { | ||
740 | .start = AT572D940HF_ID_US1, | ||
741 | .end = AT572D940HF_ID_US1, | ||
742 | .flags = IORESOURCE_IRQ, | ||
743 | }, | ||
744 | }; | ||
745 | |||
746 | static struct atmel_uart_data uart1_data = { | ||
747 | .use_dma_tx = 1, | ||
748 | .use_dma_rx = 1, | ||
749 | }; | ||
750 | |||
751 | static u64 uart1_dmamask = DMA_BIT_MASK(32); | ||
752 | |||
753 | static struct platform_device at572d940hf_uart1_device = { | ||
754 | .name = "atmel_usart", | ||
755 | .id = 2, | ||
756 | .dev = { | ||
757 | .dma_mask = &uart1_dmamask, | ||
758 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
759 | .platform_data = &uart1_data, | ||
760 | }, | ||
761 | .resource = uart1_resources, | ||
762 | .num_resources = ARRAY_SIZE(uart1_resources), | ||
763 | }; | ||
764 | |||
765 | static inline void configure_usart1_pins(unsigned pins) | ||
766 | { | ||
767 | at91_set_A_periph(AT91_PIN_PC10, 1); /* TXD1 */ | ||
768 | at91_set_A_periph(AT91_PIN_PC9 , 0); /* RXD1 */ | ||
769 | |||
770 | if (pins & ATMEL_UART_RTS) | ||
771 | at91_set_A_periph(AT91_PIN_PC12, 0); /* RTS1 */ | ||
772 | if (pins & ATMEL_UART_CTS) | ||
773 | at91_set_A_periph(AT91_PIN_PC11, 0); /* CTS1 */ | ||
774 | } | ||
775 | |||
776 | static struct resource uart2_resources[] = { | ||
777 | [0] = { | ||
778 | .start = AT572D940HF_BASE_US2, | ||
779 | .end = AT572D940HF_BASE_US2 + SZ_16K - 1, | ||
780 | .flags = IORESOURCE_MEM, | ||
781 | }, | ||
782 | [1] = { | ||
783 | .start = AT572D940HF_ID_US2, | ||
784 | .end = AT572D940HF_ID_US2, | ||
785 | .flags = IORESOURCE_IRQ, | ||
786 | }, | ||
787 | }; | ||
788 | |||
789 | static struct atmel_uart_data uart2_data = { | ||
790 | .use_dma_tx = 1, | ||
791 | .use_dma_rx = 1, | ||
792 | }; | ||
793 | |||
794 | static u64 uart2_dmamask = DMA_BIT_MASK(32); | ||
795 | |||
796 | static struct platform_device at572d940hf_uart2_device = { | ||
797 | .name = "atmel_usart", | ||
798 | .id = 3, | ||
799 | .dev = { | ||
800 | .dma_mask = &uart2_dmamask, | ||
801 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
802 | .platform_data = &uart2_data, | ||
803 | }, | ||
804 | .resource = uart2_resources, | ||
805 | .num_resources = ARRAY_SIZE(uart2_resources), | ||
806 | }; | ||
807 | |||
808 | static inline void configure_usart2_pins(unsigned pins) | ||
809 | { | ||
810 | at91_set_A_periph(AT91_PIN_PC15, 1); /* TXD2 */ | ||
811 | at91_set_A_periph(AT91_PIN_PC14, 0); /* RXD2 */ | ||
812 | |||
813 | if (pins & ATMEL_UART_RTS) | ||
814 | at91_set_A_periph(AT91_PIN_PC17, 0); /* RTS2 */ | ||
815 | if (pins & ATMEL_UART_CTS) | ||
816 | at91_set_A_periph(AT91_PIN_PC16, 0); /* CTS2 */ | ||
817 | } | ||
818 | |||
819 | static struct platform_device *__initdata at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ | ||
820 | struct platform_device *atmel_default_console_device; /* the serial console device */ | ||
821 | |||
822 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) | ||
823 | { | ||
824 | struct platform_device *pdev; | ||
825 | |||
826 | switch (id) { | ||
827 | case 0: /* DBGU */ | ||
828 | pdev = &at572d940hf_dbgu_device; | ||
829 | configure_dbgu_pins(); | ||
830 | at91_clock_associate("mck", &pdev->dev, "usart"); | ||
831 | break; | ||
832 | case AT572D940HF_ID_US0: | ||
833 | pdev = &at572d940hf_uart0_device; | ||
834 | configure_usart0_pins(pins); | ||
835 | at91_clock_associate("usart0_clk", &pdev->dev, "usart"); | ||
836 | break; | ||
837 | case AT572D940HF_ID_US1: | ||
838 | pdev = &at572d940hf_uart1_device; | ||
839 | configure_usart1_pins(pins); | ||
840 | at91_clock_associate("usart1_clk", &pdev->dev, "usart"); | ||
841 | break; | ||
842 | case AT572D940HF_ID_US2: | ||
843 | pdev = &at572d940hf_uart2_device; | ||
844 | configure_usart2_pins(pins); | ||
845 | at91_clock_associate("usart2_clk", &pdev->dev, "usart"); | ||
846 | break; | ||
847 | default: | ||
848 | return; | ||
849 | } | ||
850 | pdev->id = portnr; /* update to mapped ID */ | ||
851 | |||
852 | if (portnr < ATMEL_MAX_UART) | ||
853 | at91_uarts[portnr] = pdev; | ||
854 | } | ||
855 | |||
856 | void __init at91_set_serial_console(unsigned portnr) | ||
857 | { | ||
858 | if (portnr < ATMEL_MAX_UART) | ||
859 | atmel_default_console_device = at91_uarts[portnr]; | ||
860 | } | ||
861 | |||
862 | void __init at91_add_device_serial(void) | ||
863 | { | ||
864 | int i; | ||
865 | |||
866 | for (i = 0; i < ATMEL_MAX_UART; i++) { | ||
867 | if (at91_uarts[i]) | ||
868 | platform_device_register(at91_uarts[i]); | ||
869 | } | ||
870 | |||
871 | if (!atmel_default_console_device) | ||
872 | printk(KERN_INFO "AT91: No default serial console defined.\n"); | ||
873 | } | ||
874 | |||
875 | #else | ||
876 | void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {} | ||
877 | void __init at91_set_serial_console(unsigned portnr) {} | ||
878 | void __init at91_add_device_serial(void) {} | ||
879 | #endif | ||
880 | |||
881 | |||
882 | /* -------------------------------------------------------------------- | ||
883 | * mAgic | ||
884 | * -------------------------------------------------------------------- */ | ||
885 | |||
886 | #ifdef CONFIG_MAGICV | ||
887 | static struct resource mAgic_resources[] = { | ||
888 | { | ||
889 | .start = AT91_MAGIC_PM_BASE, | ||
890 | .end = AT91_MAGIC_PM_BASE + AT91_MAGIC_PM_SIZE - 1, | ||
891 | .flags = IORESOURCE_MEM, | ||
892 | }, | ||
893 | { | ||
894 | .start = AT91_MAGIC_DM_I_BASE, | ||
895 | .end = AT91_MAGIC_DM_I_BASE + AT91_MAGIC_DM_I_SIZE - 1, | ||
896 | .flags = IORESOURCE_MEM, | ||
897 | }, | ||
898 | { | ||
899 | .start = AT91_MAGIC_DM_F_BASE, | ||
900 | .end = AT91_MAGIC_DM_F_BASE + AT91_MAGIC_DM_F_SIZE - 1, | ||
901 | .flags = IORESOURCE_MEM, | ||
902 | }, | ||
903 | { | ||
904 | .start = AT91_MAGIC_DM_DB_BASE, | ||
905 | .end = AT91_MAGIC_DM_DB_BASE + AT91_MAGIC_DM_DB_SIZE - 1, | ||
906 | .flags = IORESOURCE_MEM, | ||
907 | }, | ||
908 | { | ||
909 | .start = AT91_MAGIC_REGS_BASE, | ||
910 | .end = AT91_MAGIC_REGS_BASE + AT91_MAGIC_REGS_SIZE - 1, | ||
911 | .flags = IORESOURCE_MEM, | ||
912 | }, | ||
913 | { | ||
914 | .start = AT91_MAGIC_EXTPAGE_BASE, | ||
915 | .end = AT91_MAGIC_EXTPAGE_BASE + AT91_MAGIC_EXTPAGE_SIZE - 1, | ||
916 | .flags = IORESOURCE_MEM, | ||
917 | }, | ||
918 | { | ||
919 | .start = AT572D940HF_ID_MSIRQ0, | ||
920 | .end = AT572D940HF_ID_MSIRQ0, | ||
921 | .flags = IORESOURCE_IRQ, | ||
922 | }, | ||
923 | { | ||
924 | .start = AT572D940HF_ID_MHALT, | ||
925 | .end = AT572D940HF_ID_MHALT, | ||
926 | .flags = IORESOURCE_IRQ, | ||
927 | }, | ||
928 | { | ||
929 | .start = AT572D940HF_ID_MEXC, | ||
930 | .end = AT572D940HF_ID_MEXC, | ||
931 | .flags = IORESOURCE_IRQ, | ||
932 | }, | ||
933 | { | ||
934 | .start = AT572D940HF_ID_MEDMA, | ||
935 | .end = AT572D940HF_ID_MEDMA, | ||
936 | .flags = IORESOURCE_IRQ, | ||
937 | }, | ||
938 | }; | ||
939 | |||
940 | static struct platform_device mAgic_device = { | ||
941 | .name = "mAgic", | ||
942 | .id = -1, | ||
943 | .num_resources = ARRAY_SIZE(mAgic_resources), | ||
944 | .resource = mAgic_resources, | ||
945 | }; | ||
946 | |||
947 | void __init at91_add_device_mAgic(void) | ||
948 | { | ||
949 | platform_device_register(&mAgic_device); | ||
950 | } | ||
951 | #else | ||
952 | void __init at91_add_device_mAgic(void) {} | ||
953 | #endif | ||
954 | |||
955 | |||
956 | /* -------------------------------------------------------------------- */ | ||
957 | |||
958 | /* | ||
959 | * These devices are always present and don't need any board-specific | ||
960 | * setup. | ||
961 | */ | ||
962 | static int __init at91_add_standard_devices(void) | ||
963 | { | ||
964 | at91_add_device_rtt(); | ||
965 | at91_add_device_watchdog(); | ||
966 | at91_add_device_tc(); | ||
967 | return 0; | ||
968 | } | ||
969 | |||
970 | arch_initcall(at91_add_standard_devices); | ||
diff --git a/arch/arm/mach-at91/board-at572d940hf_ek.c b/arch/arm/mach-at91/board-at572d940hf_ek.c new file mode 100644 index 000000000000..5daff277f53e --- /dev/null +++ b/arch/arm/mach-at91/board-at572d940hf_ek.c | |||
@@ -0,0 +1,328 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-at91/board-at572d940hf_ek.c | ||
3 | * | ||
4 | * Copyright (C) 2008 Atmel Antonio R. Costa <costa.antonior@gmail.com> | ||
5 | * Copyright (C) 2005 SAN People | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #include <linux/types.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/mm.h> | ||
25 | #include <linux/module.h> | ||
26 | #include <linux/platform_device.h> | ||
27 | #include <linux/spi/spi.h> | ||
28 | #include <linux/spi/ds1305.h> | ||
29 | #include <linux/irq.h> | ||
30 | #include <linux/mtd/physmap.h> | ||
31 | |||
32 | #include <mach/hardware.h> | ||
33 | #include <asm/setup.h> | ||
34 | #include <asm/mach-types.h> | ||
35 | #include <asm/irq.h> | ||
36 | |||
37 | #include <asm/mach/arch.h> | ||
38 | #include <asm/mach/map.h> | ||
39 | #include <asm/mach/irq.h> | ||
40 | |||
41 | #include <mach/board.h> | ||
42 | #include <mach/gpio.h> | ||
43 | #include <mach/at91sam9_smc.h> | ||
44 | |||
45 | #include "sam9_smc.h" | ||
46 | #include "generic.h" | ||
47 | |||
48 | |||
49 | static void __init eb_map_io(void) | ||
50 | { | ||
51 | /* Initialize processor: 12.500 MHz crystal */ | ||
52 | at572d940hf_initialize(12000000); | ||
53 | |||
54 | /* DBGU on ttyS0. (Rx & Tx only) */ | ||
55 | at91_register_uart(0, 0, 0); | ||
56 | |||
57 | /* USART0 on ttyS1. (Rx & Tx only) */ | ||
58 | at91_register_uart(AT572D940HF_ID_US0, 1, 0); | ||
59 | |||
60 | /* USART1 on ttyS2. (Rx & Tx only) */ | ||
61 | at91_register_uart(AT572D940HF_ID_US1, 2, 0); | ||
62 | |||
63 | /* USART2 on ttyS3. (Tx & Rx only */ | ||
64 | at91_register_uart(AT572D940HF_ID_US2, 3, 0); | ||
65 | |||
66 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
67 | at91_set_serial_console(0); | ||
68 | } | ||
69 | |||
70 | static void __init eb_init_irq(void) | ||
71 | { | ||
72 | at572d940hf_init_interrupts(NULL); | ||
73 | } | ||
74 | |||
75 | |||
76 | /* | ||
77 | * USB Host Port | ||
78 | */ | ||
79 | static struct at91_usbh_data __initdata eb_usbh_data = { | ||
80 | .ports = 2, | ||
81 | }; | ||
82 | |||
83 | |||
84 | /* | ||
85 | * USB Device Port | ||
86 | */ | ||
87 | static struct at91_udc_data __initdata eb_udc_data = { | ||
88 | .vbus_pin = 0, /* no VBUS detection,UDC always on */ | ||
89 | .pullup_pin = 0, /* pull-up driven by UDC */ | ||
90 | }; | ||
91 | |||
92 | |||
93 | /* | ||
94 | * MCI (SD/MMC) | ||
95 | */ | ||
96 | static struct at91_mmc_data __initdata eb_mmc_data = { | ||
97 | .wire4 = 1, | ||
98 | /* .det_pin = ... not connected */ | ||
99 | /* .wp_pin = ... not connected */ | ||
100 | /* .vcc_pin = ... not connected */ | ||
101 | }; | ||
102 | |||
103 | |||
104 | /* | ||
105 | * MACB Ethernet device | ||
106 | */ | ||
107 | static struct at91_eth_data __initdata eb_eth_data = { | ||
108 | .phy_irq_pin = AT91_PIN_PB25, | ||
109 | .is_rmii = 1, | ||
110 | }; | ||
111 | |||
112 | /* | ||
113 | * NOR flash | ||
114 | */ | ||
115 | |||
116 | static struct mtd_partition eb_nor_partitions[] = { | ||
117 | { | ||
118 | .name = "Raw Environment", | ||
119 | .offset = 0, | ||
120 | .size = SZ_4M, | ||
121 | .mask_flags = 0, | ||
122 | }, | ||
123 | { | ||
124 | .name = "OS FS", | ||
125 | .offset = MTDPART_OFS_APPEND, | ||
126 | .size = 3 * SZ_1M, | ||
127 | .mask_flags = 0, | ||
128 | }, | ||
129 | { | ||
130 | .name = "APP FS", | ||
131 | .offset = MTDPART_OFS_APPEND, | ||
132 | .size = MTDPART_SIZ_FULL, | ||
133 | .mask_flags = 0, | ||
134 | }, | ||
135 | }; | ||
136 | |||
137 | static void nor_flash_set_vpp(struct map_info* mi, int i) { | ||
138 | }; | ||
139 | |||
140 | static struct physmap_flash_data nor_flash_data = { | ||
141 | .width = 4, | ||
142 | .parts = eb_nor_partitions, | ||
143 | .nr_parts = ARRAY_SIZE(eb_nor_partitions), | ||
144 | .set_vpp = nor_flash_set_vpp, | ||
145 | }; | ||
146 | |||
147 | static struct resource nor_flash_resources[] = { | ||
148 | { | ||
149 | .start = AT91_CHIPSELECT_0, | ||
150 | .end = AT91_CHIPSELECT_0 + SZ_16M - 1, | ||
151 | .flags = IORESOURCE_MEM, | ||
152 | }, | ||
153 | }; | ||
154 | |||
155 | static struct platform_device nor_flash = { | ||
156 | .name = "physmap-flash", | ||
157 | .id = 0, | ||
158 | .dev = { | ||
159 | .platform_data = &nor_flash_data, | ||
160 | }, | ||
161 | .resource = nor_flash_resources, | ||
162 | .num_resources = ARRAY_SIZE(nor_flash_resources), | ||
163 | }; | ||
164 | |||
165 | static struct sam9_smc_config __initdata eb_nor_smc_config = { | ||
166 | .ncs_read_setup = 1, | ||
167 | .nrd_setup = 1, | ||
168 | .ncs_write_setup = 1, | ||
169 | .nwe_setup = 1, | ||
170 | |||
171 | .ncs_read_pulse = 7, | ||
172 | .nrd_pulse = 7, | ||
173 | .ncs_write_pulse = 7, | ||
174 | .nwe_pulse = 7, | ||
175 | |||
176 | .read_cycle = 9, | ||
177 | .write_cycle = 9, | ||
178 | |||
179 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_BAT_WRITE | AT91_SMC_DBW_32, | ||
180 | .tdf_cycles = 1, | ||
181 | }; | ||
182 | |||
183 | static void __init eb_add_device_nor(void) | ||
184 | { | ||
185 | /* configure chip-select 0 (NOR) */ | ||
186 | sam9_smc_configure(0, &eb_nor_smc_config); | ||
187 | platform_device_register(&nor_flash); | ||
188 | } | ||
189 | |||
190 | /* | ||
191 | * NAND flash | ||
192 | */ | ||
193 | static struct mtd_partition __initdata eb_nand_partition[] = { | ||
194 | { | ||
195 | .name = "Partition 1", | ||
196 | .offset = 0, | ||
197 | .size = SZ_16M, | ||
198 | }, | ||
199 | { | ||
200 | .name = "Partition 2", | ||
201 | .offset = MTDPART_OFS_NXTBLK, | ||
202 | .size = MTDPART_SIZ_FULL, | ||
203 | } | ||
204 | }; | ||
205 | |||
206 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
207 | { | ||
208 | *num_partitions = ARRAY_SIZE(eb_nand_partition); | ||
209 | return eb_nand_partition; | ||
210 | } | ||
211 | |||
212 | static struct atmel_nand_data __initdata eb_nand_data = { | ||
213 | .ale = 22, | ||
214 | .cle = 21, | ||
215 | /* .det_pin = ... not connected */ | ||
216 | /* .rdy_pin = AT91_PIN_PC16, */ | ||
217 | .enable_pin = AT91_PIN_PA15, | ||
218 | .partition_info = nand_partitions, | ||
219 | #if defined(CONFIG_MTD_NAND_AT91_BUSWIDTH_16) | ||
220 | .bus_width_16 = 1, | ||
221 | #else | ||
222 | .bus_width_16 = 0, | ||
223 | #endif | ||
224 | }; | ||
225 | |||
226 | static struct sam9_smc_config __initdata eb_nand_smc_config = { | ||
227 | .ncs_read_setup = 0, | ||
228 | .nrd_setup = 0, | ||
229 | .ncs_write_setup = 1, | ||
230 | .nwe_setup = 1, | ||
231 | |||
232 | .ncs_read_pulse = 3, | ||
233 | .nrd_pulse = 3, | ||
234 | .ncs_write_pulse = 3, | ||
235 | .nwe_pulse = 3, | ||
236 | |||
237 | .read_cycle = 5, | ||
238 | .write_cycle = 5, | ||
239 | |||
240 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE, | ||
241 | .tdf_cycles = 12, | ||
242 | }; | ||
243 | |||
244 | static void __init eb_add_device_nand(void) | ||
245 | { | ||
246 | /* setup bus-width (8 or 16) */ | ||
247 | if (eb_nand_data.bus_width_16) | ||
248 | eb_nand_smc_config.mode |= AT91_SMC_DBW_16; | ||
249 | else | ||
250 | eb_nand_smc_config.mode |= AT91_SMC_DBW_8; | ||
251 | |||
252 | /* configure chip-select 3 (NAND) */ | ||
253 | sam9_smc_configure(3, &eb_nand_smc_config); | ||
254 | |||
255 | at91_add_device_nand(&eb_nand_data); | ||
256 | } | ||
257 | |||
258 | |||
259 | /* | ||
260 | * SPI devices | ||
261 | */ | ||
262 | static struct resource rtc_resources[] = { | ||
263 | [0] = { | ||
264 | .start = AT572D940HF_ID_IRQ1, | ||
265 | .end = AT572D940HF_ID_IRQ1, | ||
266 | .flags = IORESOURCE_IRQ, | ||
267 | }, | ||
268 | }; | ||
269 | |||
270 | static struct ds1305_platform_data ds1306_data = { | ||
271 | .is_ds1306 = true, | ||
272 | .en_1hz = false, | ||
273 | }; | ||
274 | |||
275 | static struct spi_board_info eb_spi_devices[] = { | ||
276 | { /* RTC Dallas DS1306 */ | ||
277 | .modalias = "rtc-ds1305", | ||
278 | .chip_select = 3, | ||
279 | .mode = SPI_CS_HIGH | SPI_CPOL | SPI_CPHA, | ||
280 | .max_speed_hz = 500000, | ||
281 | .bus_num = 0, | ||
282 | .irq = AT572D940HF_ID_IRQ1, | ||
283 | .platform_data = (void *) &ds1306_data, | ||
284 | }, | ||
285 | #if defined(CONFIG_MTD_AT91_DATAFLASH_CARD) | ||
286 | { /* Dataflash card */ | ||
287 | .modalias = "mtd_dataflash", | ||
288 | .chip_select = 0, | ||
289 | .max_speed_hz = 15 * 1000 * 1000, | ||
290 | .bus_num = 0, | ||
291 | }, | ||
292 | #endif | ||
293 | }; | ||
294 | |||
295 | static void __init eb_board_init(void) | ||
296 | { | ||
297 | /* Serial */ | ||
298 | at91_add_device_serial(); | ||
299 | /* USB Host */ | ||
300 | at91_add_device_usbh(&eb_usbh_data); | ||
301 | /* USB Device */ | ||
302 | at91_add_device_udc(&eb_udc_data); | ||
303 | /* I2C */ | ||
304 | at91_add_device_i2c(NULL, 0); | ||
305 | /* NOR */ | ||
306 | eb_add_device_nor(); | ||
307 | /* NAND */ | ||
308 | eb_add_device_nand(); | ||
309 | /* SPI */ | ||
310 | at91_add_device_spi(eb_spi_devices, ARRAY_SIZE(eb_spi_devices)); | ||
311 | /* MMC */ | ||
312 | at91_add_device_mmc(0, &eb_mmc_data); | ||
313 | /* Ethernet */ | ||
314 | at91_add_device_eth(&eb_eth_data); | ||
315 | /* mAgic */ | ||
316 | at91_add_device_mAgic(); | ||
317 | } | ||
318 | |||
319 | MACHINE_START(AT572D940HFEB, "Atmel AT91D940HF-EB") | ||
320 | /* Maintainer: Atmel <costa.antonior@gmail.com> */ | ||
321 | .phys_io = AT91_BASE_SYS, | ||
322 | .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc, | ||
323 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
324 | .timer = &at91sam926x_timer, | ||
325 | .map_io = eb_map_io, | ||
326 | .init_irq = eb_init_irq, | ||
327 | .init_machine = eb_board_init, | ||
328 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index c042dcf4725f..7f7da439341f 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91/clock.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <mach/cpu.h> | 29 | #include <mach/cpu.h> |
30 | 30 | ||
31 | #include "clock.h" | 31 | #include "clock.h" |
32 | #include "generic.h" | ||
32 | 33 | ||
33 | 34 | ||
34 | /* | 35 | /* |
@@ -628,7 +629,7 @@ static void __init at91_pllb_usbfs_clock_init(unsigned long main_clock) | |||
628 | at91_sys_write(AT91_PMC_SCER, AT91RM9200_PMC_MCKUDP); | 629 | at91_sys_write(AT91_PMC_SCER, AT91RM9200_PMC_MCKUDP); |
629 | } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || | 630 | } else if (cpu_is_at91sam9260() || cpu_is_at91sam9261() || |
630 | cpu_is_at91sam9263() || cpu_is_at91sam9g20() || | 631 | cpu_is_at91sam9263() || cpu_is_at91sam9g20() || |
631 | cpu_is_at91sam9g10()) { | 632 | cpu_is_at91sam9g10() || cpu_is_at572d940hf()) { |
632 | uhpck.pmc_mask = AT91SAM926x_PMC_UHP; | 633 | uhpck.pmc_mask = AT91SAM926x_PMC_UHP; |
633 | udpck.pmc_mask = AT91SAM926x_PMC_UDP; | 634 | udpck.pmc_mask = AT91SAM926x_PMC_UDP; |
634 | } else if (cpu_is_at91cap9()) { | 635 | } else if (cpu_is_at91cap9()) { |
@@ -711,12 +712,13 @@ int __init at91_clock_init(unsigned long main_clock) | |||
711 | /* | 712 | /* |
712 | * USB HS clock init | 713 | * USB HS clock init |
713 | */ | 714 | */ |
714 | if (cpu_has_utmi()) | 715 | if (cpu_has_utmi()) { |
715 | /* | 716 | /* |
716 | * multiplier is hard-wired to 40 | 717 | * multiplier is hard-wired to 40 |
717 | * (obtain the USB High Speed 480 MHz when input is 12 MHz) | 718 | * (obtain the USB High Speed 480 MHz when input is 12 MHz) |
718 | */ | 719 | */ |
719 | utmi_clk.rate_hz = 40 * utmi_clk.parent->rate_hz; | 720 | utmi_clk.rate_hz = 40 * utmi_clk.parent->rate_hz; |
721 | } | ||
720 | 722 | ||
721 | /* | 723 | /* |
722 | * USB FS clock init | 724 | * USB FS clock init |
@@ -746,7 +748,7 @@ int __init at91_clock_init(unsigned long main_clock) | |||
746 | mck.rate_hz = (mckr & AT91_PMC_MDIV) == AT91SAM9_PMC_MDIV_3 ? | 748 | mck.rate_hz = (mckr & AT91_PMC_MDIV) == AT91SAM9_PMC_MDIV_3 ? |
747 | freq / 3 : freq / (1 << ((mckr & AT91_PMC_MDIV) >> 8)); /* mdiv */ | 749 | freq / 3 : freq / (1 << ((mckr & AT91_PMC_MDIV) >> 8)); /* mdiv */ |
748 | } else { | 750 | } else { |
749 | mck.rate_hz = freq / (1 << ((mckr & AT91_PMC_MDIV) >> 8)); /* mdiv */ | 751 | mck.rate_hz = freq / (1 << ((mckr & AT91_PMC_MDIV) >> 8)); /* mdiv */ |
750 | } | 752 | } |
751 | 753 | ||
752 | /* Register the PMC's standard clocks */ | 754 | /* Register the PMC's standard clocks */ |
diff --git a/arch/arm/mach-at91/clock.h b/arch/arm/mach-at91/clock.h index 1ba3b95ff359..6cf4b78e175d 100644 --- a/arch/arm/mach-at91/clock.h +++ b/arch/arm/mach-at91/clock.h | |||
@@ -22,7 +22,7 @@ struct clk { | |||
22 | struct clk *parent; | 22 | struct clk *parent; |
23 | u32 pmc_mask; | 23 | u32 pmc_mask; |
24 | void (*mode)(struct clk *, int); | 24 | void (*mode)(struct clk *, int); |
25 | unsigned id:2; /* PCK0..3, or 32k/main/a/b */ | 25 | unsigned id:3; /* PCK0..4, or 32k/main/a/b */ |
26 | unsigned type; /* clock type */ | 26 | unsigned type; /* clock type */ |
27 | u16 users; | 27 | u16 users; |
28 | }; | 28 | }; |
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index 88e413b38480..65c3dc5ba0d0 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -17,6 +17,7 @@ extern void __init at91sam9rl_initialize(unsigned long main_clock); | |||
17 | extern void __init at91sam9g45_initialize(unsigned long main_clock); | 17 | extern void __init at91sam9g45_initialize(unsigned long main_clock); |
18 | extern void __init at91x40_initialize(unsigned long main_clock); | 18 | extern void __init at91x40_initialize(unsigned long main_clock); |
19 | extern void __init at91cap9_initialize(unsigned long main_clock); | 19 | extern void __init at91cap9_initialize(unsigned long main_clock); |
20 | extern void __init at572d940hf_initialize(unsigned long main_clock); | ||
20 | 21 | ||
21 | /* Interrupts */ | 22 | /* Interrupts */ |
22 | extern void __init at91rm9200_init_interrupts(unsigned int priority[]); | 23 | extern void __init at91rm9200_init_interrupts(unsigned int priority[]); |
@@ -27,6 +28,7 @@ extern void __init at91sam9rl_init_interrupts(unsigned int priority[]); | |||
27 | extern void __init at91sam9g45_init_interrupts(unsigned int priority[]); | 28 | extern void __init at91sam9g45_init_interrupts(unsigned int priority[]); |
28 | extern void __init at91x40_init_interrupts(unsigned int priority[]); | 29 | extern void __init at91x40_init_interrupts(unsigned int priority[]); |
29 | extern void __init at91cap9_init_interrupts(unsigned int priority[]); | 30 | extern void __init at91cap9_init_interrupts(unsigned int priority[]); |
31 | extern void __init at572d940hf_init_interrupts(unsigned int priority[]); | ||
30 | extern void __init at91_aic_init(unsigned int priority[]); | 32 | extern void __init at91_aic_init(unsigned int priority[]); |
31 | 33 | ||
32 | /* Timer */ | 34 | /* Timer */ |
diff --git a/arch/arm/mach-at91/include/mach/at572d940hf.h b/arch/arm/mach-at91/include/mach/at572d940hf.h new file mode 100644 index 000000000000..2d9b0af9c4d5 --- /dev/null +++ b/arch/arm/mach-at91/include/mach/at572d940hf.h | |||
@@ -0,0 +1,123 @@ | |||
1 | /* | ||
2 | * include/mach/at572d940hf.h | ||
3 | * | ||
4 | * Antonio R. Costa <costa.antonior@gmail.com> | ||
5 | * Copyright (C) 2008 Atmel | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #ifndef AT572D940HF_H | ||
24 | #define AT572D940HF_H | ||
25 | |||
26 | /* | ||
27 | * Peripheral identifiers/interrupts. | ||
28 | */ | ||
29 | #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ | ||
30 | #define AT91_ID_SYS 1 /* System Peripherals */ | ||
31 | #define AT572D940HF_ID_PIOA 2 /* Parallel IO Controller A */ | ||
32 | #define AT572D940HF_ID_PIOB 3 /* Parallel IO Controller B */ | ||
33 | #define AT572D940HF_ID_PIOC 4 /* Parallel IO Controller C */ | ||
34 | #define AT572D940HF_ID_EMAC 5 /* MACB ethernet controller */ | ||
35 | #define AT572D940HF_ID_US0 6 /* USART 0 */ | ||
36 | #define AT572D940HF_ID_US1 7 /* USART 1 */ | ||
37 | #define AT572D940HF_ID_US2 8 /* USART 2 */ | ||
38 | #define AT572D940HF_ID_MCI 9 /* Multimedia Card Interface */ | ||
39 | #define AT572D940HF_ID_UDP 10 /* USB Device Port */ | ||
40 | #define AT572D940HF_ID_TWI0 11 /* Two-Wire Interface 0 */ | ||
41 | #define AT572D940HF_ID_SPI0 12 /* Serial Peripheral Interface 0 */ | ||
42 | #define AT572D940HF_ID_SPI1 13 /* Serial Peripheral Interface 1 */ | ||
43 | #define AT572D940HF_ID_SSC0 14 /* Serial Synchronous Controller 0 */ | ||
44 | #define AT572D940HF_ID_SSC1 15 /* Serial Synchronous Controller 1 */ | ||
45 | #define AT572D940HF_ID_SSC2 16 /* Serial Synchronous Controller 2 */ | ||
46 | #define AT572D940HF_ID_TC0 17 /* Timer Counter 0 */ | ||
47 | #define AT572D940HF_ID_TC1 18 /* Timer Counter 1 */ | ||
48 | #define AT572D940HF_ID_TC2 19 /* Timer Counter 2 */ | ||
49 | #define AT572D940HF_ID_UHP 20 /* USB Host port */ | ||
50 | #define AT572D940HF_ID_SSC3 21 /* Serial Synchronous Controller 3 */ | ||
51 | #define AT572D940HF_ID_TWI1 22 /* Two-Wire Interface 1 */ | ||
52 | #define AT572D940HF_ID_CAN0 23 /* CAN Controller 0 */ | ||
53 | #define AT572D940HF_ID_CAN1 24 /* CAN Controller 1 */ | ||
54 | #define AT572D940HF_ID_MHALT 25 /* mAgicV HALT line */ | ||
55 | #define AT572D940HF_ID_MSIRQ0 26 /* mAgicV SIRQ0 line */ | ||
56 | #define AT572D940HF_ID_MEXC 27 /* mAgicV exception line */ | ||
57 | #define AT572D940HF_ID_MEDMA 28 /* mAgicV end of DMA line */ | ||
58 | #define AT572D940HF_ID_IRQ0 29 /* External Interrupt Source (IRQ0) */ | ||
59 | #define AT572D940HF_ID_IRQ1 30 /* External Interrupt Source (IRQ1) */ | ||
60 | #define AT572D940HF_ID_IRQ2 31 /* External Interrupt Source (IRQ2) */ | ||
61 | |||
62 | |||
63 | /* | ||
64 | * User Peripheral physical base addresses. | ||
65 | */ | ||
66 | #define AT572D940HF_BASE_TCB 0xfffa0000 | ||
67 | #define AT572D940HF_BASE_TC0 0xfffa0000 | ||
68 | #define AT572D940HF_BASE_TC1 0xfffa0040 | ||
69 | #define AT572D940HF_BASE_TC2 0xfffa0080 | ||
70 | #define AT572D940HF_BASE_UDP 0xfffa4000 | ||
71 | #define AT572D940HF_BASE_MCI 0xfffa8000 | ||
72 | #define AT572D940HF_BASE_TWI0 0xfffac000 | ||
73 | #define AT572D940HF_BASE_US0 0xfffb0000 | ||
74 | #define AT572D940HF_BASE_US1 0xfffb4000 | ||
75 | #define AT572D940HF_BASE_US2 0xfffb8000 | ||
76 | #define AT572D940HF_BASE_SSC0 0xfffbc000 | ||
77 | #define AT572D940HF_BASE_SSC1 0xfffc0000 | ||
78 | #define AT572D940HF_BASE_SSC2 0xfffc4000 | ||
79 | #define AT572D940HF_BASE_SPI0 0xfffc8000 | ||
80 | #define AT572D940HF_BASE_SPI1 0xfffcc000 | ||
81 | #define AT572D940HF_BASE_SSC3 0xfffd0000 | ||
82 | #define AT572D940HF_BASE_TWI1 0xfffd4000 | ||
83 | #define AT572D940HF_BASE_EMAC 0xfffd8000 | ||
84 | #define AT572D940HF_BASE_CAN0 0xfffdc000 | ||
85 | #define AT572D940HF_BASE_CAN1 0xfffe0000 | ||
86 | #define AT91_BASE_SYS 0xffffea00 | ||
87 | |||
88 | |||
89 | /* | ||
90 | * System Peripherals (offset from AT91_BASE_SYS) | ||
91 | */ | ||
92 | #define AT91_SDRAMC (0xffffea00 - AT91_BASE_SYS) | ||
93 | #define AT91_SMC (0xffffec00 - AT91_BASE_SYS) | ||
94 | #define AT91_MATRIX (0xffffee00 - AT91_BASE_SYS) | ||
95 | #define AT91_AIC (0xfffff000 - AT91_BASE_SYS) | ||
96 | #define AT91_DBGU (0xfffff200 - AT91_BASE_SYS) | ||
97 | #define AT91_PIOA (0xfffff400 - AT91_BASE_SYS) | ||
98 | #define AT91_PIOB (0xfffff600 - AT91_BASE_SYS) | ||
99 | #define AT91_PIOC (0xfffff800 - AT91_BASE_SYS) | ||
100 | #define AT91_PMC (0xfffffc00 - AT91_BASE_SYS) | ||
101 | #define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS) | ||
102 | #define AT91_RTT (0xfffffd20 - AT91_BASE_SYS) | ||
103 | #define AT91_PIT (0xfffffd30 - AT91_BASE_SYS) | ||
104 | #define AT91_WDT (0xfffffd40 - AT91_BASE_SYS) | ||
105 | |||
106 | #define AT91_USART0 AT572D940HF_ID_US0 | ||
107 | #define AT91_USART1 AT572D940HF_ID_US1 | ||
108 | #define AT91_USART2 AT572D940HF_ID_US2 | ||
109 | |||
110 | |||
111 | /* | ||
112 | * Internal Memory. | ||
113 | */ | ||
114 | #define AT572D940HF_SRAM_BASE 0x00300000 /* Internal SRAM base address */ | ||
115 | #define AT572D940HF_SRAM_SIZE (48 * SZ_1K) /* Internal SRAM size (48Kb) */ | ||
116 | |||
117 | #define AT572D940HF_ROM_BASE 0x00400000 /* Internal ROM base address */ | ||
118 | #define AT572D940HF_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */ | ||
119 | |||
120 | #define AT572D940HF_UHP_BASE 0x00500000 /* USB Host controller */ | ||
121 | |||
122 | |||
123 | #endif | ||
diff --git a/arch/arm/mach-at91/include/mach/at572d940hf_matrix.h b/arch/arm/mach-at91/include/mach/at572d940hf_matrix.h new file mode 100644 index 000000000000..b6751df09488 --- /dev/null +++ b/arch/arm/mach-at91/include/mach/at572d940hf_matrix.h | |||
@@ -0,0 +1,123 @@ | |||
1 | /* | ||
2 | * include/mach//at572d940hf_matrix.h | ||
3 | * | ||
4 | * Antonio R. Costa <costa.antonior@gmail.com> | ||
5 | * Copyright (C) 2008 Atmel | ||
6 | * | ||
7 | * Copyright (C) 2005 SAN People | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | */ | ||
23 | |||
24 | #ifndef AT572D940HF_MATRIX_H | ||
25 | #define AT572D940HF_MATRIX_H | ||
26 | |||
27 | #define AT91_MATRIX_MCFG0 (AT91_MATRIX + 0x00) /* Master Configuration Register 0 */ | ||
28 | #define AT91_MATRIX_MCFG1 (AT91_MATRIX + 0x04) /* Master Configuration Register 1 */ | ||
29 | #define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */ | ||
30 | #define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */ | ||
31 | #define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */ | ||
32 | #define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x14) /* Master Configuration Register 5 */ | ||
33 | |||
34 | #define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */ | ||
35 | #define AT91_MATRIX_ULBT_INFINITE (0 << 0) | ||
36 | #define AT91_MATRIX_ULBT_SINGLE (1 << 0) | ||
37 | #define AT91_MATRIX_ULBT_FOUR (2 << 0) | ||
38 | #define AT91_MATRIX_ULBT_EIGHT (3 << 0) | ||
39 | #define AT91_MATRIX_ULBT_SIXTEEN (4 << 0) | ||
40 | |||
41 | #define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x40) /* Slave Configuration Register 0 */ | ||
42 | #define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x44) /* Slave Configuration Register 1 */ | ||
43 | #define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x48) /* Slave Configuration Register 2 */ | ||
44 | #define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x4C) /* Slave Configuration Register 3 */ | ||
45 | #define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x50) /* Slave Configuration Register 4 */ | ||
46 | #define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */ | ||
47 | #define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */ | ||
48 | #define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16) | ||
49 | #define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16) | ||
50 | #define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16) | ||
51 | #define AT91_MATRIX_FIXED_DEFMSTR (0x7 << 18) /* Fixed Index of Default Master */ | ||
52 | #define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */ | ||
53 | #define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24) | ||
54 | #define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24) | ||
55 | |||
56 | #define AT91_MATRIX_PRAS0 (AT91_MATRIX + 0x80) /* Priority Register A for Slave 0 */ | ||
57 | #define AT91_MATRIX_PRAS1 (AT91_MATRIX + 0x88) /* Priority Register A for Slave 1 */ | ||
58 | #define AT91_MATRIX_PRAS2 (AT91_MATRIX + 0x90) /* Priority Register A for Slave 2 */ | ||
59 | #define AT91_MATRIX_PRAS3 (AT91_MATRIX + 0x98) /* Priority Register A for Slave 3 */ | ||
60 | #define AT91_MATRIX_PRAS4 (AT91_MATRIX + 0xA0) /* Priority Register A for Slave 4 */ | ||
61 | |||
62 | #define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */ | ||
63 | #define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */ | ||
64 | #define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */ | ||
65 | #define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */ | ||
66 | #define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */ | ||
67 | #define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */ | ||
68 | #define AT91_MATRIX_M6PR (3 << 24) /* Master 6 Priority */ | ||
69 | |||
70 | #define AT91_MATRIX_MRCR (AT91_MATRIX + 0x100) /* Master Remap Control Register */ | ||
71 | #define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */ | ||
72 | #define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */ | ||
73 | |||
74 | #define AT91_MATRIX_SFR0 (AT91_MATRIX + 0x110) /* Special Function Register 0 */ | ||
75 | #define AT91_MATRIX_SFR1 (AT91_MATRIX + 0x114) /* Special Function Register 1 */ | ||
76 | #define AT91_MATRIX_SFR2 (AT91_MATRIX + 0x118) /* Special Function Register 2 */ | ||
77 | #define AT91_MATRIX_SFR3 (AT91_MATRIX + 0x11C) /* Special Function Register 3 */ | ||
78 | #define AT91_MATRIX_SFR4 (AT91_MATRIX + 0x120) /* Special Function Register 4 */ | ||
79 | #define AT91_MATRIX_SFR5 (AT91_MATRIX + 0x124) /* Special Function Register 5 */ | ||
80 | #define AT91_MATRIX_SFR6 (AT91_MATRIX + 0x128) /* Special Function Register 6 */ | ||
81 | #define AT91_MATRIX_SFR7 (AT91_MATRIX + 0x12C) /* Special Function Register 7 */ | ||
82 | #define AT91_MATRIX_SFR8 (AT91_MATRIX + 0x130) /* Special Function Register 8 */ | ||
83 | #define AT91_MATRIX_SFR9 (AT91_MATRIX + 0x134) /* Special Function Register 9 */ | ||
84 | #define AT91_MATRIX_SFR10 (AT91_MATRIX + 0x138) /* Special Function Register 10 */ | ||
85 | #define AT91_MATRIX_SFR11 (AT91_MATRIX + 0x13C) /* Special Function Register 11 */ | ||
86 | #define AT91_MATRIX_SFR12 (AT91_MATRIX + 0x140) /* Special Function Register 12 */ | ||
87 | #define AT91_MATRIX_SFR13 (AT91_MATRIX + 0x144) /* Special Function Register 13 */ | ||
88 | #define AT91_MATRIX_SFR14 (AT91_MATRIX + 0x148) /* Special Function Register 14 */ | ||
89 | #define AT91_MATRIX_SFR15 (AT91_MATRIX + 0x14C) /* Special Function Register 15 */ | ||
90 | |||
91 | |||
92 | /* | ||
93 | * The following registers / bits are not defined in the Datasheet (Revision A) | ||
94 | */ | ||
95 | |||
96 | #define AT91_MATRIX_TCR (AT91_MATRIX + 0x100) /* TCM Configuration Register */ | ||
97 | #define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */ | ||
98 | #define AT91_MATRIX_ITCM_0 (0 << 0) | ||
99 | #define AT91_MATRIX_ITCM_16 (5 << 0) | ||
100 | #define AT91_MATRIX_ITCM_32 (6 << 0) | ||
101 | #define AT91_MATRIX_ITCM_64 (7 << 0) | ||
102 | #define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */ | ||
103 | #define AT91_MATRIX_DTCM_0 (0 << 4) | ||
104 | #define AT91_MATRIX_DTCM_16 (5 << 4) | ||
105 | #define AT91_MATRIX_DTCM_32 (6 << 4) | ||
106 | #define AT91_MATRIX_DTCM_64 (7 << 4) | ||
107 | |||
108 | #define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x11C) /* EBI Chip Select Assignment Register */ | ||
109 | #define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */ | ||
110 | #define AT91_MATRIX_CS1A_SMC (0 << 1) | ||
111 | #define AT91_MATRIX_CS1A_SDRAMC (1 << 1) | ||
112 | #define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */ | ||
113 | #define AT91_MATRIX_CS3A_SMC (0 << 3) | ||
114 | #define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3) | ||
115 | #define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */ | ||
116 | #define AT91_MATRIX_CS4A_SMC (0 << 4) | ||
117 | #define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4) | ||
118 | #define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */ | ||
119 | #define AT91_MATRIX_CS5A_SMC (0 << 5) | ||
120 | #define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5) | ||
121 | #define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */ | ||
122 | |||
123 | #endif | ||
diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/arch/arm/mach-at91/include/mach/at91_pmc.h index 64589eaaaee8..e46f93e34aab 100644 --- a/arch/arm/mach-at91/include/mach/at91_pmc.h +++ b/arch/arm/mach-at91/include/mach/at91_pmc.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #define AT91_PMC_PCK1 (1 << 9) /* Programmable Clock 1 */ | 32 | #define AT91_PMC_PCK1 (1 << 9) /* Programmable Clock 1 */ |
33 | #define AT91_PMC_PCK2 (1 << 10) /* Programmable Clock 2 */ | 33 | #define AT91_PMC_PCK2 (1 << 10) /* Programmable Clock 2 */ |
34 | #define AT91_PMC_PCK3 (1 << 11) /* Programmable Clock 3 */ | 34 | #define AT91_PMC_PCK3 (1 << 11) /* Programmable Clock 3 */ |
35 | #define AT91_PMC_PCK4 (1 << 12) /* Programmable Clock 4 [AT572D940HF only] */ | ||
35 | #define AT91_PMC_HCK0 (1 << 16) /* AHB Clock (USB host) [AT91SAM9261 only] */ | 36 | #define AT91_PMC_HCK0 (1 << 16) /* AHB Clock (USB host) [AT91SAM9261 only] */ |
36 | #define AT91_PMC_HCK1 (1 << 17) /* AHB Clock (LCD) [AT91SAM9261 only] */ | 37 | #define AT91_PMC_HCK1 (1 << 17) /* AHB Clock (LCD) [AT91SAM9261 only] */ |
37 | 38 | ||
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index bb6f6a7ba5e0..ceaec6c16eb2 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h | |||
@@ -87,7 +87,7 @@ struct at91_eth_data { | |||
87 | extern void __init at91_add_device_eth(struct at91_eth_data *data); | 87 | extern void __init at91_add_device_eth(struct at91_eth_data *data); |
88 | 88 | ||
89 | #if defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91SAM9G20) || defined(CONFIG_ARCH_AT91CAP9) \ | 89 | #if defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9263) || defined(CONFIG_ARCH_AT91SAM9G20) || defined(CONFIG_ARCH_AT91CAP9) \ |
90 | || defined(CONFIG_ARCH_AT91SAM9G45) | 90 | || defined(CONFIG_ARCH_AT91SAM9G45) || defined(CONFIG_ARCH_AT572D940HF) |
91 | #define eth_platform_data at91_eth_data | 91 | #define eth_platform_data at91_eth_data |
92 | #endif | 92 | #endif |
93 | 93 | ||
@@ -205,6 +205,9 @@ extern void __init at91_init_leds(u8 cpu_led, u8 timer_led); | |||
205 | extern void __init at91_gpio_leds(struct gpio_led *leds, int nr); | 205 | extern void __init at91_gpio_leds(struct gpio_led *leds, int nr); |
206 | extern void __init at91_pwm_leds(struct gpio_led *leds, int nr); | 206 | extern void __init at91_pwm_leds(struct gpio_led *leds, int nr); |
207 | 207 | ||
208 | /* AT572D940HF DSP */ | ||
209 | extern void __init at91_add_device_mAgic(void); | ||
210 | |||
208 | /* FIXME: this needs a better location, but gets stuff building again */ | 211 | /* FIXME: this needs a better location, but gets stuff building again */ |
209 | extern int at91_suspend_entering_slow_clock(void); | 212 | extern int at91_suspend_entering_slow_clock(void); |
210 | 213 | ||
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h index c22df30ed5e5..5a0650101d45 100644 --- a/arch/arm/mach-at91/include/mach/cpu.h +++ b/arch/arm/mach-at91/include/mach/cpu.h | |||
@@ -33,6 +33,8 @@ | |||
33 | #define ARCH_ID_AT91SAM9XE256 0x329a93a0 | 33 | #define ARCH_ID_AT91SAM9XE256 0x329a93a0 |
34 | #define ARCH_ID_AT91SAM9XE512 0x329aa3a0 | 34 | #define ARCH_ID_AT91SAM9XE512 0x329aa3a0 |
35 | 35 | ||
36 | #define ARCH_ID_AT572D940HF 0x0e0303e0 | ||
37 | |||
36 | #define ARCH_ID_AT91M40800 0x14080044 | 38 | #define ARCH_ID_AT91M40800 0x14080044 |
37 | #define ARCH_ID_AT91R40807 0x44080746 | 39 | #define ARCH_ID_AT91R40807 0x44080746 |
38 | #define ARCH_ID_AT91M40807 0x14080745 | 40 | #define ARCH_ID_AT91M40807 0x14080745 |
@@ -141,6 +143,12 @@ static inline unsigned long at91cap9_rev_identify(void) | |||
141 | #define cpu_is_at91cap9_revC() (0) | 143 | #define cpu_is_at91cap9_revC() (0) |
142 | #endif | 144 | #endif |
143 | 145 | ||
146 | #ifdef CONFIG_ARCH_AT572D940HF | ||
147 | #define cpu_is_at572d940hf() (at91_cpu_identify() == ARCH_ID_AT572D940HF) | ||
148 | #else | ||
149 | #define cpu_is_at572d940hf() (0) | ||
150 | #endif | ||
151 | |||
144 | /* | 152 | /* |
145 | * Since this is ARM, we will never run on any AVR32 CPU. But these | 153 | * Since this is ARM, we will never run on any AVR32 CPU. But these |
146 | * definitions may reduce clutter in common drivers. | 154 | * definitions may reduce clutter in common drivers. |
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h index a0df8b022df2..3d64a75e3ed5 100644 --- a/arch/arm/mach-at91/include/mach/hardware.h +++ b/arch/arm/mach-at91/include/mach/hardware.h | |||
@@ -32,6 +32,8 @@ | |||
32 | #include <mach/at91cap9.h> | 32 | #include <mach/at91cap9.h> |
33 | #elif defined(CONFIG_ARCH_AT91X40) | 33 | #elif defined(CONFIG_ARCH_AT91X40) |
34 | #include <mach/at91x40.h> | 34 | #include <mach/at91x40.h> |
35 | #elif defined(CONFIG_ARCH_AT572D940HF) | ||
36 | #include <mach/at572d940hf.h> | ||
35 | #else | 37 | #else |
36 | #error "Unsupported AT91 processor" | 38 | #error "Unsupported AT91 processor" |
37 | #endif | 39 | #endif |
diff --git a/arch/arm/mach-at91/include/mach/timex.h b/arch/arm/mach-at91/include/mach/timex.h index 31ac2d97f14c..05a6e8af80c4 100644 --- a/arch/arm/mach-at91/include/mach/timex.h +++ b/arch/arm/mach-at91/include/mach/timex.h | |||
@@ -82,6 +82,11 @@ | |||
82 | #define AT91X40_MASTER_CLOCK 40000000 | 82 | #define AT91X40_MASTER_CLOCK 40000000 |
83 | #define CLOCK_TICK_RATE (AT91X40_MASTER_CLOCK) | 83 | #define CLOCK_TICK_RATE (AT91X40_MASTER_CLOCK) |
84 | 84 | ||
85 | #elif defined(CONFIG_ARCH_AT572D940HF) | ||
86 | |||
87 | #define AT572D940HF_MASTER_CLOCK 80000000 | ||
88 | #define CLOCK_TICK_RATE (AT572D940HF_MASTER_CLOCK/16) | ||
89 | |||
85 | #endif | 90 | #endif |
86 | 91 | ||
87 | #endif | 92 | #endif |
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index a9b650dcc172..077ecf4fecda 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c | |||
@@ -236,6 +236,7 @@ static struct vpfe_subdev_info vpfe_sub_devs[] = { | |||
236 | 236 | ||
237 | static struct vpfe_config vpfe_cfg = { | 237 | static struct vpfe_config vpfe_cfg = { |
238 | .num_subdevs = ARRAY_SIZE(vpfe_sub_devs), | 238 | .num_subdevs = ARRAY_SIZE(vpfe_sub_devs), |
239 | .i2c_adapter_id = 1, | ||
239 | .sub_devs = vpfe_sub_devs, | 240 | .sub_devs = vpfe_sub_devs, |
240 | .card_name = "DM355 EVM", | 241 | .card_name = "DM355 EVM", |
241 | .ccdc = "DM355 CCDC", | 242 | .ccdc = "DM355 CCDC", |
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 289fe1b7d25a..b476395d2cd4 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c | |||
@@ -192,7 +192,11 @@ static struct davinci_i2c_platform_data i2c_pdata = { | |||
192 | .bus_delay = 0 /* usec */, | 192 | .bus_delay = 0 /* usec */, |
193 | }; | 193 | }; |
194 | 194 | ||
195 | #ifdef CONFIG_KEYBOARD_DAVINCI | 195 | static int dm365evm_keyscan_enable(struct device *dev) |
196 | { | ||
197 | return davinci_cfg_reg(DM365_KEYSCAN); | ||
198 | } | ||
199 | |||
196 | static unsigned short dm365evm_keymap[] = { | 200 | static unsigned short dm365evm_keymap[] = { |
197 | KEY_KP2, | 201 | KEY_KP2, |
198 | KEY_LEFT, | 202 | KEY_LEFT, |
@@ -214,6 +218,7 @@ static unsigned short dm365evm_keymap[] = { | |||
214 | }; | 218 | }; |
215 | 219 | ||
216 | static struct davinci_ks_platform_data dm365evm_ks_data = { | 220 | static struct davinci_ks_platform_data dm365evm_ks_data = { |
221 | .device_enable = dm365evm_keyscan_enable, | ||
217 | .keymap = dm365evm_keymap, | 222 | .keymap = dm365evm_keymap, |
218 | .keymapsize = ARRAY_SIZE(dm365evm_keymap), | 223 | .keymapsize = ARRAY_SIZE(dm365evm_keymap), |
219 | .rep = 1, | 224 | .rep = 1, |
@@ -222,7 +227,6 @@ static struct davinci_ks_platform_data dm365evm_ks_data = { | |||
222 | .interval = 0x2, | 227 | .interval = 0x2, |
223 | .matrix_type = DAVINCI_KEYSCAN_MATRIX_4X4, | 228 | .matrix_type = DAVINCI_KEYSCAN_MATRIX_4X4, |
224 | }; | 229 | }; |
225 | #endif | ||
226 | 230 | ||
227 | static int cpld_mmc_get_cd(int module) | 231 | static int cpld_mmc_get_cd(int module) |
228 | { | 232 | { |
@@ -511,10 +515,7 @@ static __init void dm365_evm_init(void) | |||
511 | 515 | ||
512 | dm365_init_asp(&dm365_evm_snd_data); | 516 | dm365_init_asp(&dm365_evm_snd_data); |
513 | dm365_init_rtc(); | 517 | dm365_init_rtc(); |
514 | |||
515 | #ifdef CONFIG_KEYBOARD_DAVINCI | ||
516 | dm365_init_ks(&dm365evm_ks_data); | 518 | dm365_init_ks(&dm365evm_ks_data); |
517 | #endif | ||
518 | } | 519 | } |
519 | 520 | ||
520 | static __init void dm365_evm_irq_init(void) | 521 | static __init void dm365_evm_irq_init(void) |
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index fd0398bc6db3..e9612cf727b7 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -247,6 +247,7 @@ static struct vpfe_subdev_info vpfe_sub_devs[] = { | |||
247 | 247 | ||
248 | static struct vpfe_config vpfe_cfg = { | 248 | static struct vpfe_config vpfe_cfg = { |
249 | .num_subdevs = ARRAY_SIZE(vpfe_sub_devs), | 249 | .num_subdevs = ARRAY_SIZE(vpfe_sub_devs), |
250 | .i2c_adapter_id = 1, | ||
250 | .sub_devs = vpfe_sub_devs, | 251 | .sub_devs = vpfe_sub_devs, |
251 | .card_name = "DM6446 EVM", | 252 | .card_name = "DM6446 EVM", |
252 | .ccdc = "DM6446 CCDC", | 253 | .ccdc = "DM6446 CCDC", |
diff --git a/arch/arm/mach-davinci/cp_intc.c b/arch/arm/mach-davinci/cp_intc.c index 52b287cf3a42..37311d1830eb 100644 --- a/arch/arm/mach-davinci/cp_intc.c +++ b/arch/arm/mach-davinci/cp_intc.c | |||
@@ -81,12 +81,23 @@ static int cp_intc_set_irq_type(unsigned int irq, unsigned int flow_type) | |||
81 | return 0; | 81 | return 0; |
82 | } | 82 | } |
83 | 83 | ||
84 | /* | ||
85 | * Faking this allows us to to work with suspend functions of | ||
86 | * generic drivers which call {enable|disable}_irq_wake for | ||
87 | * wake up interrupt sources (eg RTC on DA850). | ||
88 | */ | ||
89 | static int cp_intc_set_wake(unsigned int irq, unsigned int on) | ||
90 | { | ||
91 | return 0; | ||
92 | } | ||
93 | |||
84 | static struct irq_chip cp_intc_irq_chip = { | 94 | static struct irq_chip cp_intc_irq_chip = { |
85 | .name = "cp_intc", | 95 | .name = "cp_intc", |
86 | .ack = cp_intc_ack_irq, | 96 | .ack = cp_intc_ack_irq, |
87 | .mask = cp_intc_mask_irq, | 97 | .mask = cp_intc_mask_irq, |
88 | .unmask = cp_intc_unmask_irq, | 98 | .unmask = cp_intc_unmask_irq, |
89 | .set_type = cp_intc_set_irq_type, | 99 | .set_type = cp_intc_set_irq_type, |
100 | .set_wake = cp_intc_set_wake, | ||
90 | }; | 101 | }; |
91 | 102 | ||
92 | void __init cp_intc_init(void __iomem *base, unsigned short num_irq, | 103 | void __init cp_intc_init(void __iomem *base, unsigned short num_irq, |
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index dd2d32c4ce86..a5105f03fd86 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -481,11 +481,18 @@ static struct platform_device da8xx_rtc_device = { | |||
481 | 481 | ||
482 | int da8xx_register_rtc(void) | 482 | int da8xx_register_rtc(void) |
483 | { | 483 | { |
484 | int ret; | ||
485 | |||
484 | /* Unlock the rtc's registers */ | 486 | /* Unlock the rtc's registers */ |
485 | __raw_writel(0x83e70b13, IO_ADDRESS(DA8XX_RTC_BASE + 0x6c)); | 487 | __raw_writel(0x83e70b13, IO_ADDRESS(DA8XX_RTC_BASE + 0x6c)); |
486 | __raw_writel(0x95a4f1e0, IO_ADDRESS(DA8XX_RTC_BASE + 0x70)); | 488 | __raw_writel(0x95a4f1e0, IO_ADDRESS(DA8XX_RTC_BASE + 0x70)); |
487 | 489 | ||
488 | return platform_device_register(&da8xx_rtc_device); | 490 | ret = platform_device_register(&da8xx_rtc_device); |
491 | if (!ret) | ||
492 | /* Atleast on DA850, RTC is a wakeup source */ | ||
493 | device_init_wakeup(&da8xx_rtc_device.dev, true); | ||
494 | |||
495 | return ret; | ||
489 | } | 496 | } |
490 | 497 | ||
491 | static struct resource da8xx_cpuidle_resources[] = { | 498 | static struct resource da8xx_cpuidle_resources[] = { |
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index 2ec619ec1657..f53735cb922e 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -993,7 +993,6 @@ void __init dm365_init_asp(struct snd_platform_data *pdata) | |||
993 | 993 | ||
994 | void __init dm365_init_ks(struct davinci_ks_platform_data *pdata) | 994 | void __init dm365_init_ks(struct davinci_ks_platform_data *pdata) |
995 | { | 995 | { |
996 | davinci_cfg_reg(DM365_KEYSCAN); | ||
997 | dm365_ks_device.dev.platform_data = pdata; | 996 | dm365_ks_device.dev.platform_data = pdata; |
998 | platform_device_register(&dm365_ks_device); | 997 | platform_device_register(&dm365_ks_device); |
999 | } | 998 | } |
diff --git a/arch/arm/mach-davinci/include/mach/keyscan.h b/arch/arm/mach-davinci/include/mach/keyscan.h index b4e21a2976d1..7a560e05bda8 100644 --- a/arch/arm/mach-davinci/include/mach/keyscan.h +++ b/arch/arm/mach-davinci/include/mach/keyscan.h | |||
@@ -29,6 +29,7 @@ enum davinci_matrix_types { | |||
29 | }; | 29 | }; |
30 | 30 | ||
31 | struct davinci_ks_platform_data { | 31 | struct davinci_ks_platform_data { |
32 | int (*device_enable)(struct device *dev); | ||
32 | unsigned short *keymap; | 33 | unsigned short *keymap; |
33 | u32 keymapsize; | 34 | u32 keymapsize; |
34 | u8 rep:1; | 35 | u8 rep:1; |
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig index 9167c3d2a5ed..3a08b18f6433 100644 --- a/arch/arm/mach-ep93xx/Kconfig +++ b/arch/arm/mach-ep93xx/Kconfig | |||
@@ -161,6 +161,20 @@ config MACH_MICRO9S | |||
161 | Say 'Y' here if you want your kernel to support the | 161 | Say 'Y' here if you want your kernel to support the |
162 | Contec Micro9-Slim board. | 162 | Contec Micro9-Slim board. |
163 | 163 | ||
164 | config MACH_SIM_ONE | ||
165 | bool "Support Simplemachines Sim.One board" | ||
166 | depends on EP93XX_SDCE0_PHYS_OFFSET | ||
167 | help | ||
168 | Say 'Y' here if you want your kernel to support the | ||
169 | Simplemachines Sim.One board. | ||
170 | |||
171 | config MACH_SNAPPER_CL15 | ||
172 | bool "Support Bluewater Systems Snapper CL15 Module" | ||
173 | depends on EP93XX_SDCE0_PHYS_OFFSET | ||
174 | help | ||
175 | Say 'Y' here if you want your kernel to support the Bluewater | ||
176 | Systems Snapper CL15 Module. | ||
177 | |||
164 | config MACH_TS72XX | 178 | config MACH_TS72XX |
165 | bool "Support Technologic Systems TS-72xx SBC" | 179 | bool "Support Technologic Systems TS-72xx SBC" |
166 | depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET | 180 | depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET |
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile index eae6199a9891..33ee2c863d18 100644 --- a/arch/arm/mach-ep93xx/Makefile +++ b/arch/arm/mach-ep93xx/Makefile | |||
@@ -10,4 +10,6 @@ obj-$(CONFIG_MACH_ADSSPHERE) += adssphere.o | |||
10 | obj-$(CONFIG_MACH_EDB93XX) += edb93xx.o | 10 | obj-$(CONFIG_MACH_EDB93XX) += edb93xx.o |
11 | obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o | 11 | obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o |
12 | obj-$(CONFIG_MACH_MICRO9) += micro9.o | 12 | obj-$(CONFIG_MACH_MICRO9) += micro9.o |
13 | obj-$(CONFIG_MACH_SIM_ONE) += simone.o | ||
14 | obj-$(CONFIG_MACH_SNAPPER_CL15) += snappercl15.o | ||
13 | obj-$(CONFIG_MACH_TS72XX) += ts72xx.o | 15 | obj-$(CONFIG_MACH_TS72XX) += ts72xx.o |
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c index 1d0f9d8aff2e..49fa9f8fef4a 100644 --- a/arch/arm/mach-ep93xx/clock.c +++ b/arch/arm/mach-ep93xx/clock.c | |||
@@ -10,6 +10,8 @@ | |||
10 | * your option) any later version. | 10 | * your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #define pr_fmt(fmt) "ep93xx " KBUILD_MODNAME ": " fmt | ||
14 | |||
13 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
14 | #include <linux/clk.h> | 16 | #include <linux/clk.h> |
15 | #include <linux/err.h> | 17 | #include <linux/err.h> |
@@ -447,30 +449,34 @@ static int __init ep93xx_clock_init(void) | |||
447 | u32 value; | 449 | u32 value; |
448 | int i; | 450 | int i; |
449 | 451 | ||
450 | value = __raw_readl(EP93XX_SYSCON_CLOCK_SET1); | 452 | /* Determine the bootloader configured pll1 rate */ |
451 | if (!(value & 0x00800000)) { /* PLL1 bypassed? */ | 453 | value = __raw_readl(EP93XX_SYSCON_CLKSET1); |
454 | if (!(value & EP93XX_SYSCON_CLKSET1_NBYP1)) | ||
452 | clk_pll1.rate = clk_xtali.rate; | 455 | clk_pll1.rate = clk_xtali.rate; |
453 | } else { | 456 | else |
454 | clk_pll1.rate = calc_pll_rate(value); | 457 | clk_pll1.rate = calc_pll_rate(value); |
455 | } | 458 | |
459 | /* Initialize the pll1 derived clocks */ | ||
456 | clk_f.rate = clk_pll1.rate / fclk_divisors[(value >> 25) & 0x7]; | 460 | clk_f.rate = clk_pll1.rate / fclk_divisors[(value >> 25) & 0x7]; |
457 | clk_h.rate = clk_pll1.rate / hclk_divisors[(value >> 20) & 0x7]; | 461 | clk_h.rate = clk_pll1.rate / hclk_divisors[(value >> 20) & 0x7]; |
458 | clk_p.rate = clk_h.rate / pclk_divisors[(value >> 18) & 0x3]; | 462 | clk_p.rate = clk_h.rate / pclk_divisors[(value >> 18) & 0x3]; |
459 | ep93xx_dma_clock_init(); | 463 | ep93xx_dma_clock_init(); |
460 | 464 | ||
461 | value = __raw_readl(EP93XX_SYSCON_CLOCK_SET2); | 465 | /* Determine the bootloader configured pll2 rate */ |
462 | if (!(value & 0x00080000)) { /* PLL2 bypassed? */ | 466 | value = __raw_readl(EP93XX_SYSCON_CLKSET2); |
467 | if (!(value & EP93XX_SYSCON_CLKSET2_NBYP2)) | ||
463 | clk_pll2.rate = clk_xtali.rate; | 468 | clk_pll2.rate = clk_xtali.rate; |
464 | } else if (value & 0x00040000) { /* PLL2 enabled? */ | 469 | else if (value & EP93XX_SYSCON_CLKSET2_PLL2_EN) |
465 | clk_pll2.rate = calc_pll_rate(value); | 470 | clk_pll2.rate = calc_pll_rate(value); |
466 | } else { | 471 | else |
467 | clk_pll2.rate = 0; | 472 | clk_pll2.rate = 0; |
468 | } | 473 | |
474 | /* Initialize the pll2 derived clocks */ | ||
469 | clk_usb_host.rate = clk_pll2.rate / (((value >> 28) & 0xf) + 1); | 475 | clk_usb_host.rate = clk_pll2.rate / (((value >> 28) & 0xf) + 1); |
470 | 476 | ||
471 | printk(KERN_INFO "ep93xx: PLL1 running at %ld MHz, PLL2 at %ld MHz\n", | 477 | pr_info("PLL1 running at %ld MHz, PLL2 at %ld MHz\n", |
472 | clk_pll1.rate / 1000000, clk_pll2.rate / 1000000); | 478 | clk_pll1.rate / 1000000, clk_pll2.rate / 1000000); |
473 | printk(KERN_INFO "ep93xx: FCLK %ld MHz, HCLK %ld MHz, PCLK %ld MHz\n", | 479 | pr_info("FCLK %ld MHz, HCLK %ld MHz, PCLK %ld MHz\n", |
474 | clk_f.rate / 1000000, clk_h.rate / 1000000, | 480 | clk_f.rate / 1000000, clk_h.rate / 1000000, |
475 | clk_p.rate / 1000000); | 481 | clk_p.rate / 1000000); |
476 | 482 | ||
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 1f0d66561bbe..90fb591cbffa 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -14,12 +14,15 @@ | |||
14 | * your option) any later version. | 14 | * your option) any later version. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #define pr_fmt(fmt) "ep93xx " KBUILD_MODNAME ": " fmt | ||
18 | |||
17 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 20 | #include <linux/init.h> |
19 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
20 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
21 | #include <linux/dma-mapping.h> | 23 | #include <linux/dma-mapping.h> |
22 | #include <linux/timex.h> | 24 | #include <linux/timex.h> |
25 | #include <linux/irq.h> | ||
23 | #include <linux/io.h> | 26 | #include <linux/io.h> |
24 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
25 | #include <linux/leds.h> | 28 | #include <linux/leds.h> |
@@ -35,7 +38,6 @@ | |||
35 | 38 | ||
36 | #include <asm/mach/map.h> | 39 | #include <asm/mach/map.h> |
37 | #include <asm/mach/time.h> | 40 | #include <asm/mach/time.h> |
38 | #include <asm/mach/irq.h> | ||
39 | 41 | ||
40 | #include <asm/hardware/vic.h> | 42 | #include <asm/hardware/vic.h> |
41 | 43 | ||
@@ -82,13 +84,40 @@ void __init ep93xx_map_io(void) | |||
82 | * to use this timer for something else. We also use timer 4 for keeping | 84 | * to use this timer for something else. We also use timer 4 for keeping |
83 | * track of lost jiffies. | 85 | * track of lost jiffies. |
84 | */ | 86 | */ |
85 | static unsigned int last_jiffy_time; | 87 | #define EP93XX_TIMER_REG(x) (EP93XX_TIMER_BASE + (x)) |
86 | 88 | #define EP93XX_TIMER1_LOAD EP93XX_TIMER_REG(0x00) | |
89 | #define EP93XX_TIMER1_VALUE EP93XX_TIMER_REG(0x04) | ||
90 | #define EP93XX_TIMER1_CONTROL EP93XX_TIMER_REG(0x08) | ||
91 | #define EP93XX_TIMER123_CONTROL_ENABLE (1 << 7) | ||
92 | #define EP93XX_TIMER123_CONTROL_MODE (1 << 6) | ||
93 | #define EP93XX_TIMER123_CONTROL_CLKSEL (1 << 3) | ||
94 | #define EP93XX_TIMER1_CLEAR EP93XX_TIMER_REG(0x0c) | ||
95 | #define EP93XX_TIMER2_LOAD EP93XX_TIMER_REG(0x20) | ||
96 | #define EP93XX_TIMER2_VALUE EP93XX_TIMER_REG(0x24) | ||
97 | #define EP93XX_TIMER2_CONTROL EP93XX_TIMER_REG(0x28) | ||
98 | #define EP93XX_TIMER2_CLEAR EP93XX_TIMER_REG(0x2c) | ||
99 | #define EP93XX_TIMER4_VALUE_LOW EP93XX_TIMER_REG(0x60) | ||
100 | #define EP93XX_TIMER4_VALUE_HIGH EP93XX_TIMER_REG(0x64) | ||
101 | #define EP93XX_TIMER4_VALUE_HIGH_ENABLE (1 << 8) | ||
102 | #define EP93XX_TIMER3_LOAD EP93XX_TIMER_REG(0x80) | ||
103 | #define EP93XX_TIMER3_VALUE EP93XX_TIMER_REG(0x84) | ||
104 | #define EP93XX_TIMER3_CONTROL EP93XX_TIMER_REG(0x88) | ||
105 | #define EP93XX_TIMER3_CLEAR EP93XX_TIMER_REG(0x8c) | ||
106 | |||
107 | #define EP93XX_TIMER123_CLOCK 508469 | ||
108 | #define EP93XX_TIMER4_CLOCK 983040 | ||
109 | |||
110 | #define TIMER1_RELOAD ((EP93XX_TIMER123_CLOCK / HZ) - 1) | ||
87 | #define TIMER4_TICKS_PER_JIFFY DIV_ROUND_CLOSEST(CLOCK_TICK_RATE, HZ) | 111 | #define TIMER4_TICKS_PER_JIFFY DIV_ROUND_CLOSEST(CLOCK_TICK_RATE, HZ) |
88 | 112 | ||
113 | static unsigned int last_jiffy_time; | ||
114 | |||
89 | static irqreturn_t ep93xx_timer_interrupt(int irq, void *dev_id) | 115 | static irqreturn_t ep93xx_timer_interrupt(int irq, void *dev_id) |
90 | { | 116 | { |
117 | /* Writing any value clears the timer interrupt */ | ||
91 | __raw_writel(1, EP93XX_TIMER1_CLEAR); | 118 | __raw_writel(1, EP93XX_TIMER1_CLEAR); |
119 | |||
120 | /* Recover lost jiffies */ | ||
92 | while ((signed long) | 121 | while ((signed long) |
93 | (__raw_readl(EP93XX_TIMER4_VALUE_LOW) - last_jiffy_time) | 122 | (__raw_readl(EP93XX_TIMER4_VALUE_LOW) - last_jiffy_time) |
94 | >= TIMER4_TICKS_PER_JIFFY) { | 123 | >= TIMER4_TICKS_PER_JIFFY) { |
@@ -107,13 +136,18 @@ static struct irqaction ep93xx_timer_irq = { | |||
107 | 136 | ||
108 | static void __init ep93xx_timer_init(void) | 137 | static void __init ep93xx_timer_init(void) |
109 | { | 138 | { |
139 | u32 tmode = EP93XX_TIMER123_CONTROL_MODE | | ||
140 | EP93XX_TIMER123_CONTROL_CLKSEL; | ||
141 | |||
110 | /* Enable periodic HZ timer. */ | 142 | /* Enable periodic HZ timer. */ |
111 | __raw_writel(0x48, EP93XX_TIMER1_CONTROL); | 143 | __raw_writel(tmode, EP93XX_TIMER1_CONTROL); |
112 | __raw_writel((508469 / HZ) - 1, EP93XX_TIMER1_LOAD); | 144 | __raw_writel(TIMER1_RELOAD, EP93XX_TIMER1_LOAD); |
113 | __raw_writel(0xc8, EP93XX_TIMER1_CONTROL); | 145 | __raw_writel(tmode | EP93XX_TIMER123_CONTROL_ENABLE, |
146 | EP93XX_TIMER1_CONTROL); | ||
114 | 147 | ||
115 | /* Enable lost jiffy timer. */ | 148 | /* Enable lost jiffy timer. */ |
116 | __raw_writel(0x100, EP93XX_TIMER4_VALUE_HIGH); | 149 | __raw_writel(EP93XX_TIMER4_VALUE_HIGH_ENABLE, |
150 | EP93XX_TIMER4_VALUE_HIGH); | ||
117 | 151 | ||
118 | setup_irq(IRQ_EP93XX_TIMER1, &ep93xx_timer_irq); | 152 | setup_irq(IRQ_EP93XX_TIMER1, &ep93xx_timer_irq); |
119 | } | 153 | } |
@@ -135,237 +169,16 @@ struct sys_timer ep93xx_timer = { | |||
135 | 169 | ||
136 | 170 | ||
137 | /************************************************************************* | 171 | /************************************************************************* |
138 | * GPIO handling for EP93xx | ||
139 | *************************************************************************/ | ||
140 | static unsigned char gpio_int_unmasked[3]; | ||
141 | static unsigned char gpio_int_enabled[3]; | ||
142 | static unsigned char gpio_int_type1[3]; | ||
143 | static unsigned char gpio_int_type2[3]; | ||
144 | static unsigned char gpio_int_debounce[3]; | ||
145 | |||
146 | /* Port ordering is: A B F */ | ||
147 | static const u8 int_type1_register_offset[3] = { 0x90, 0xac, 0x4c }; | ||
148 | static const u8 int_type2_register_offset[3] = { 0x94, 0xb0, 0x50 }; | ||
149 | static const u8 eoi_register_offset[3] = { 0x98, 0xb4, 0x54 }; | ||
150 | static const u8 int_en_register_offset[3] = { 0x9c, 0xb8, 0x58 }; | ||
151 | static const u8 int_debounce_register_offset[3] = { 0xa8, 0xc4, 0x64 }; | ||
152 | |||
153 | void ep93xx_gpio_update_int_params(unsigned port) | ||
154 | { | ||
155 | BUG_ON(port > 2); | ||
156 | |||
157 | __raw_writeb(0, EP93XX_GPIO_REG(int_en_register_offset[port])); | ||
158 | |||
159 | __raw_writeb(gpio_int_type2[port], | ||
160 | EP93XX_GPIO_REG(int_type2_register_offset[port])); | ||
161 | |||
162 | __raw_writeb(gpio_int_type1[port], | ||
163 | EP93XX_GPIO_REG(int_type1_register_offset[port])); | ||
164 | |||
165 | __raw_writeb(gpio_int_unmasked[port] & gpio_int_enabled[port], | ||
166 | EP93XX_GPIO_REG(int_en_register_offset[port])); | ||
167 | } | ||
168 | |||
169 | void ep93xx_gpio_int_mask(unsigned line) | ||
170 | { | ||
171 | gpio_int_unmasked[line >> 3] &= ~(1 << (line & 7)); | ||
172 | } | ||
173 | |||
174 | void ep93xx_gpio_int_debounce(unsigned int irq, int enable) | ||
175 | { | ||
176 | int line = irq_to_gpio(irq); | ||
177 | int port = line >> 3; | ||
178 | int port_mask = 1 << (line & 7); | ||
179 | |||
180 | if (enable) | ||
181 | gpio_int_debounce[port] |= port_mask; | ||
182 | else | ||
183 | gpio_int_debounce[port] &= ~port_mask; | ||
184 | |||
185 | __raw_writeb(gpio_int_debounce[port], | ||
186 | EP93XX_GPIO_REG(int_debounce_register_offset[port])); | ||
187 | } | ||
188 | EXPORT_SYMBOL(ep93xx_gpio_int_debounce); | ||
189 | |||
190 | /************************************************************************* | ||
191 | * EP93xx IRQ handling | 172 | * EP93xx IRQ handling |
192 | *************************************************************************/ | 173 | *************************************************************************/ |
193 | static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc) | 174 | extern void ep93xx_gpio_init_irq(void); |
194 | { | ||
195 | unsigned char status; | ||
196 | int i; | ||
197 | |||
198 | status = __raw_readb(EP93XX_GPIO_A_INT_STATUS); | ||
199 | for (i = 0; i < 8; i++) { | ||
200 | if (status & (1 << i)) { | ||
201 | int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_A(0)) + i; | ||
202 | generic_handle_irq(gpio_irq); | ||
203 | } | ||
204 | } | ||
205 | |||
206 | status = __raw_readb(EP93XX_GPIO_B_INT_STATUS); | ||
207 | for (i = 0; i < 8; i++) { | ||
208 | if (status & (1 << i)) { | ||
209 | int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_B(0)) + i; | ||
210 | generic_handle_irq(gpio_irq); | ||
211 | } | ||
212 | } | ||
213 | } | ||
214 | |||
215 | static void ep93xx_gpio_f_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
216 | { | ||
217 | /* | ||
218 | * map discontiguous hw irq range to continous sw irq range: | ||
219 | * | ||
220 | * IRQ_EP93XX_GPIO{0..7}MUX -> gpio_to_irq(EP93XX_GPIO_LINE_F({0..7}) | ||
221 | */ | ||
222 | int port_f_idx = ((irq + 1) & 7) ^ 4; /* {19..22,47..50} -> {0..7} */ | ||
223 | int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_F(0)) + port_f_idx; | ||
224 | |||
225 | generic_handle_irq(gpio_irq); | ||
226 | } | ||
227 | |||
228 | static void ep93xx_gpio_irq_ack(unsigned int irq) | ||
229 | { | ||
230 | int line = irq_to_gpio(irq); | ||
231 | int port = line >> 3; | ||
232 | int port_mask = 1 << (line & 7); | ||
233 | |||
234 | if ((irq_desc[irq].status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) { | ||
235 | gpio_int_type2[port] ^= port_mask; /* switch edge direction */ | ||
236 | ep93xx_gpio_update_int_params(port); | ||
237 | } | ||
238 | |||
239 | __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); | ||
240 | } | ||
241 | |||
242 | static void ep93xx_gpio_irq_mask_ack(unsigned int irq) | ||
243 | { | ||
244 | int line = irq_to_gpio(irq); | ||
245 | int port = line >> 3; | ||
246 | int port_mask = 1 << (line & 7); | ||
247 | |||
248 | if ((irq_desc[irq].status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) | ||
249 | gpio_int_type2[port] ^= port_mask; /* switch edge direction */ | ||
250 | |||
251 | gpio_int_unmasked[port] &= ~port_mask; | ||
252 | ep93xx_gpio_update_int_params(port); | ||
253 | |||
254 | __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); | ||
255 | } | ||
256 | |||
257 | static void ep93xx_gpio_irq_mask(unsigned int irq) | ||
258 | { | ||
259 | int line = irq_to_gpio(irq); | ||
260 | int port = line >> 3; | ||
261 | |||
262 | gpio_int_unmasked[port] &= ~(1 << (line & 7)); | ||
263 | ep93xx_gpio_update_int_params(port); | ||
264 | } | ||
265 | |||
266 | static void ep93xx_gpio_irq_unmask(unsigned int irq) | ||
267 | { | ||
268 | int line = irq_to_gpio(irq); | ||
269 | int port = line >> 3; | ||
270 | |||
271 | gpio_int_unmasked[port] |= 1 << (line & 7); | ||
272 | ep93xx_gpio_update_int_params(port); | ||
273 | } | ||
274 | |||
275 | |||
276 | /* | ||
277 | * gpio_int_type1 controls whether the interrupt is level (0) or | ||
278 | * edge (1) triggered, while gpio_int_type2 controls whether it | ||
279 | * triggers on low/falling (0) or high/rising (1). | ||
280 | */ | ||
281 | static int ep93xx_gpio_irq_type(unsigned int irq, unsigned int type) | ||
282 | { | ||
283 | struct irq_desc *desc = irq_desc + irq; | ||
284 | const int gpio = irq_to_gpio(irq); | ||
285 | const int port = gpio >> 3; | ||
286 | const int port_mask = 1 << (gpio & 7); | ||
287 | |||
288 | gpio_direction_input(gpio); | ||
289 | |||
290 | switch (type) { | ||
291 | case IRQ_TYPE_EDGE_RISING: | ||
292 | gpio_int_type1[port] |= port_mask; | ||
293 | gpio_int_type2[port] |= port_mask; | ||
294 | desc->handle_irq = handle_edge_irq; | ||
295 | break; | ||
296 | case IRQ_TYPE_EDGE_FALLING: | ||
297 | gpio_int_type1[port] |= port_mask; | ||
298 | gpio_int_type2[port] &= ~port_mask; | ||
299 | desc->handle_irq = handle_edge_irq; | ||
300 | break; | ||
301 | case IRQ_TYPE_LEVEL_HIGH: | ||
302 | gpio_int_type1[port] &= ~port_mask; | ||
303 | gpio_int_type2[port] |= port_mask; | ||
304 | desc->handle_irq = handle_level_irq; | ||
305 | break; | ||
306 | case IRQ_TYPE_LEVEL_LOW: | ||
307 | gpio_int_type1[port] &= ~port_mask; | ||
308 | gpio_int_type2[port] &= ~port_mask; | ||
309 | desc->handle_irq = handle_level_irq; | ||
310 | break; | ||
311 | case IRQ_TYPE_EDGE_BOTH: | ||
312 | gpio_int_type1[port] |= port_mask; | ||
313 | /* set initial polarity based on current input level */ | ||
314 | if (gpio_get_value(gpio)) | ||
315 | gpio_int_type2[port] &= ~port_mask; /* falling */ | ||
316 | else | ||
317 | gpio_int_type2[port] |= port_mask; /* rising */ | ||
318 | desc->handle_irq = handle_edge_irq; | ||
319 | break; | ||
320 | default: | ||
321 | pr_err("ep93xx: failed to set irq type %d for gpio %d\n", | ||
322 | type, gpio); | ||
323 | return -EINVAL; | ||
324 | } | ||
325 | |||
326 | gpio_int_enabled[port] |= port_mask; | ||
327 | |||
328 | desc->status &= ~IRQ_TYPE_SENSE_MASK; | ||
329 | desc->status |= type & IRQ_TYPE_SENSE_MASK; | ||
330 | |||
331 | ep93xx_gpio_update_int_params(port); | ||
332 | |||
333 | return 0; | ||
334 | } | ||
335 | |||
336 | static struct irq_chip ep93xx_gpio_irq_chip = { | ||
337 | .name = "GPIO", | ||
338 | .ack = ep93xx_gpio_irq_ack, | ||
339 | .mask_ack = ep93xx_gpio_irq_mask_ack, | ||
340 | .mask = ep93xx_gpio_irq_mask, | ||
341 | .unmask = ep93xx_gpio_irq_unmask, | ||
342 | .set_type = ep93xx_gpio_irq_type, | ||
343 | }; | ||
344 | |||
345 | 175 | ||
346 | void __init ep93xx_init_irq(void) | 176 | void __init ep93xx_init_irq(void) |
347 | { | 177 | { |
348 | int gpio_irq; | ||
349 | |||
350 | vic_init(EP93XX_VIC1_BASE, 0, EP93XX_VIC1_VALID_IRQ_MASK, 0); | 178 | vic_init(EP93XX_VIC1_BASE, 0, EP93XX_VIC1_VALID_IRQ_MASK, 0); |
351 | vic_init(EP93XX_VIC2_BASE, 32, EP93XX_VIC2_VALID_IRQ_MASK, 0); | 179 | vic_init(EP93XX_VIC2_BASE, 32, EP93XX_VIC2_VALID_IRQ_MASK, 0); |
352 | 180 | ||
353 | for (gpio_irq = gpio_to_irq(0); | 181 | ep93xx_gpio_init_irq(); |
354 | gpio_irq <= gpio_to_irq(EP93XX_GPIO_LINE_MAX_IRQ); ++gpio_irq) { | ||
355 | set_irq_chip(gpio_irq, &ep93xx_gpio_irq_chip); | ||
356 | set_irq_handler(gpio_irq, handle_level_irq); | ||
357 | set_irq_flags(gpio_irq, IRQF_VALID); | ||
358 | } | ||
359 | |||
360 | set_irq_chained_handler(IRQ_EP93XX_GPIO_AB, ep93xx_gpio_ab_irq_handler); | ||
361 | set_irq_chained_handler(IRQ_EP93XX_GPIO0MUX, ep93xx_gpio_f_irq_handler); | ||
362 | set_irq_chained_handler(IRQ_EP93XX_GPIO1MUX, ep93xx_gpio_f_irq_handler); | ||
363 | set_irq_chained_handler(IRQ_EP93XX_GPIO2MUX, ep93xx_gpio_f_irq_handler); | ||
364 | set_irq_chained_handler(IRQ_EP93XX_GPIO3MUX, ep93xx_gpio_f_irq_handler); | ||
365 | set_irq_chained_handler(IRQ_EP93XX_GPIO4MUX, ep93xx_gpio_f_irq_handler); | ||
366 | set_irq_chained_handler(IRQ_EP93XX_GPIO5MUX, ep93xx_gpio_f_irq_handler); | ||
367 | set_irq_chained_handler(IRQ_EP93XX_GPIO6MUX, ep93xx_gpio_f_irq_handler); | ||
368 | set_irq_chained_handler(IRQ_EP93XX_GPIO7MUX, ep93xx_gpio_f_irq_handler); | ||
369 | } | 182 | } |
370 | 183 | ||
371 | 184 | ||
@@ -572,9 +385,9 @@ void __init ep93xx_register_i2c(struct i2c_gpio_platform_data *data, | |||
572 | * CMOS driver. | 385 | * CMOS driver. |
573 | */ | 386 | */ |
574 | if (data->sda_is_open_drain && data->sda_pin != EP93XX_GPIO_LINE_EEDAT) | 387 | if (data->sda_is_open_drain && data->sda_pin != EP93XX_GPIO_LINE_EEDAT) |
575 | pr_warning("ep93xx: sda != EEDAT, open drain has no effect\n"); | 388 | pr_warning("sda != EEDAT, open drain has no effect\n"); |
576 | if (data->scl_is_open_drain && data->scl_pin != EP93XX_GPIO_LINE_EECLK) | 389 | if (data->scl_is_open_drain && data->scl_pin != EP93XX_GPIO_LINE_EECLK) |
577 | pr_warning("ep93xx: scl != EECLK, open drain has no effect\n"); | 390 | pr_warning("scl != EECLK, open drain has no effect\n"); |
578 | 391 | ||
579 | __raw_writel((data->sda_is_open_drain << 1) | | 392 | __raw_writel((data->sda_is_open_drain << 1) | |
580 | (data->scl_is_open_drain << 0), | 393 | (data->scl_is_open_drain << 0), |
diff --git a/arch/arm/mach-ep93xx/dma-m2p.c b/arch/arm/mach-ep93xx/dma-m2p.c index dbcac9c40a28..8904ca4e2e24 100644 --- a/arch/arm/mach-ep93xx/dma-m2p.c +++ b/arch/arm/mach-ep93xx/dma-m2p.c | |||
@@ -28,6 +28,8 @@ | |||
28 | * with this implementation. | 28 | * with this implementation. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #define pr_fmt(fmt) "ep93xx " KBUILD_MODNAME ": " fmt | ||
32 | |||
31 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
32 | #include <linux/clk.h> | 34 | #include <linux/clk.h> |
33 | #include <linux/err.h> | 35 | #include <linux/err.h> |
@@ -173,7 +175,7 @@ static irqreturn_t m2p_irq(int irq, void *dev_id) | |||
173 | 175 | ||
174 | switch (m2p_channel_state(ch)) { | 176 | switch (m2p_channel_state(ch)) { |
175 | case STATE_IDLE: | 177 | case STATE_IDLE: |
176 | pr_crit("m2p_irq: dma interrupt without a dma buffer\n"); | 178 | pr_crit("dma interrupt without a dma buffer\n"); |
177 | BUG(); | 179 | BUG(); |
178 | break; | 180 | break; |
179 | 181 | ||
@@ -197,7 +199,7 @@ static irqreturn_t m2p_irq(int irq, void *dev_id) | |||
197 | break; | 199 | break; |
198 | 200 | ||
199 | case STATE_NEXT: | 201 | case STATE_NEXT: |
200 | pr_crit("m2p_irq: dma interrupt while next\n"); | 202 | pr_crit("dma interrupt while next\n"); |
201 | BUG(); | 203 | BUG(); |
202 | break; | 204 | break; |
203 | } | 205 | } |
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index a4a7be308000..d22d67ac8b99 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c +++ b/arch/arm/mach-ep93xx/edb93xx.c | |||
@@ -118,12 +118,33 @@ static void __init edb93xx_register_i2c(void) | |||
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
121 | |||
122 | /************************************************************************* | ||
123 | * EDB93xx pwm | ||
124 | *************************************************************************/ | ||
125 | static void __init edb93xx_register_pwm(void) | ||
126 | { | ||
127 | if (machine_is_edb9301() || | ||
128 | machine_is_edb9302() || machine_is_edb9302a()) { | ||
129 | /* EP9301 and EP9302 only have pwm.1 (EGPIO14) */ | ||
130 | ep93xx_register_pwm(0, 1); | ||
131 | } else if (machine_is_edb9307() || machine_is_edb9307a()) { | ||
132 | /* EP9307 only has pwm.0 (PWMOUT) */ | ||
133 | ep93xx_register_pwm(1, 0); | ||
134 | } else { | ||
135 | /* EP9312 and EP9315 have both */ | ||
136 | ep93xx_register_pwm(1, 1); | ||
137 | } | ||
138 | } | ||
139 | |||
140 | |||
121 | static void __init edb93xx_init_machine(void) | 141 | static void __init edb93xx_init_machine(void) |
122 | { | 142 | { |
123 | ep93xx_init_devices(); | 143 | ep93xx_init_devices(); |
124 | edb93xx_register_flash(); | 144 | edb93xx_register_flash(); |
125 | ep93xx_register_eth(&edb93xx_eth_data, 1); | 145 | ep93xx_register_eth(&edb93xx_eth_data, 1); |
126 | edb93xx_register_i2c(); | 146 | edb93xx_register_i2c(); |
147 | edb93xx_register_pwm(); | ||
127 | } | 148 | } |
128 | 149 | ||
129 | 150 | ||
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c index 1ea8871e03a9..cc377ae8c428 100644 --- a/arch/arm/mach-ep93xx/gpio.c +++ b/arch/arm/mach-ep93xx/gpio.c | |||
@@ -13,6 +13,8 @@ | |||
13 | * published by the Free Software Foundation. | 13 | * published by the Free Software Foundation. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #define pr_fmt(fmt) "ep93xx " KBUILD_MODNAME ": " fmt | ||
17 | |||
16 | #include <linux/init.h> | 18 | #include <linux/init.h> |
17 | #include <linux/module.h> | 19 | #include <linux/module.h> |
18 | #include <linux/seq_file.h> | 20 | #include <linux/seq_file.h> |
@@ -22,6 +24,235 @@ | |||
22 | 24 | ||
23 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
24 | 26 | ||
27 | /************************************************************************* | ||
28 | * GPIO handling for EP93xx | ||
29 | *************************************************************************/ | ||
30 | static unsigned char gpio_int_unmasked[3]; | ||
31 | static unsigned char gpio_int_enabled[3]; | ||
32 | static unsigned char gpio_int_type1[3]; | ||
33 | static unsigned char gpio_int_type2[3]; | ||
34 | static unsigned char gpio_int_debounce[3]; | ||
35 | |||
36 | /* Port ordering is: A B F */ | ||
37 | static const u8 int_type1_register_offset[3] = { 0x90, 0xac, 0x4c }; | ||
38 | static const u8 int_type2_register_offset[3] = { 0x94, 0xb0, 0x50 }; | ||
39 | static const u8 eoi_register_offset[3] = { 0x98, 0xb4, 0x54 }; | ||
40 | static const u8 int_en_register_offset[3] = { 0x9c, 0xb8, 0x58 }; | ||
41 | static const u8 int_debounce_register_offset[3] = { 0xa8, 0xc4, 0x64 }; | ||
42 | |||
43 | void ep93xx_gpio_update_int_params(unsigned port) | ||
44 | { | ||
45 | BUG_ON(port > 2); | ||
46 | |||
47 | __raw_writeb(0, EP93XX_GPIO_REG(int_en_register_offset[port])); | ||
48 | |||
49 | __raw_writeb(gpio_int_type2[port], | ||
50 | EP93XX_GPIO_REG(int_type2_register_offset[port])); | ||
51 | |||
52 | __raw_writeb(gpio_int_type1[port], | ||
53 | EP93XX_GPIO_REG(int_type1_register_offset[port])); | ||
54 | |||
55 | __raw_writeb(gpio_int_unmasked[port] & gpio_int_enabled[port], | ||
56 | EP93XX_GPIO_REG(int_en_register_offset[port])); | ||
57 | } | ||
58 | |||
59 | void ep93xx_gpio_int_mask(unsigned line) | ||
60 | { | ||
61 | gpio_int_unmasked[line >> 3] &= ~(1 << (line & 7)); | ||
62 | } | ||
63 | |||
64 | void ep93xx_gpio_int_debounce(unsigned int irq, int enable) | ||
65 | { | ||
66 | int line = irq_to_gpio(irq); | ||
67 | int port = line >> 3; | ||
68 | int port_mask = 1 << (line & 7); | ||
69 | |||
70 | if (enable) | ||
71 | gpio_int_debounce[port] |= port_mask; | ||
72 | else | ||
73 | gpio_int_debounce[port] &= ~port_mask; | ||
74 | |||
75 | __raw_writeb(gpio_int_debounce[port], | ||
76 | EP93XX_GPIO_REG(int_debounce_register_offset[port])); | ||
77 | } | ||
78 | EXPORT_SYMBOL(ep93xx_gpio_int_debounce); | ||
79 | |||
80 | static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
81 | { | ||
82 | unsigned char status; | ||
83 | int i; | ||
84 | |||
85 | status = __raw_readb(EP93XX_GPIO_A_INT_STATUS); | ||
86 | for (i = 0; i < 8; i++) { | ||
87 | if (status & (1 << i)) { | ||
88 | int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_A(0)) + i; | ||
89 | generic_handle_irq(gpio_irq); | ||
90 | } | ||
91 | } | ||
92 | |||
93 | status = __raw_readb(EP93XX_GPIO_B_INT_STATUS); | ||
94 | for (i = 0; i < 8; i++) { | ||
95 | if (status & (1 << i)) { | ||
96 | int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_B(0)) + i; | ||
97 | generic_handle_irq(gpio_irq); | ||
98 | } | ||
99 | } | ||
100 | } | ||
101 | |||
102 | static void ep93xx_gpio_f_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
103 | { | ||
104 | /* | ||
105 | * map discontiguous hw irq range to continous sw irq range: | ||
106 | * | ||
107 | * IRQ_EP93XX_GPIO{0..7}MUX -> gpio_to_irq(EP93XX_GPIO_LINE_F({0..7}) | ||
108 | */ | ||
109 | int port_f_idx = ((irq + 1) & 7) ^ 4; /* {19..22,47..50} -> {0..7} */ | ||
110 | int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_F(0)) + port_f_idx; | ||
111 | |||
112 | generic_handle_irq(gpio_irq); | ||
113 | } | ||
114 | |||
115 | static void ep93xx_gpio_irq_ack(unsigned int irq) | ||
116 | { | ||
117 | int line = irq_to_gpio(irq); | ||
118 | int port = line >> 3; | ||
119 | int port_mask = 1 << (line & 7); | ||
120 | |||
121 | if ((irq_desc[irq].status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) { | ||
122 | gpio_int_type2[port] ^= port_mask; /* switch edge direction */ | ||
123 | ep93xx_gpio_update_int_params(port); | ||
124 | } | ||
125 | |||
126 | __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); | ||
127 | } | ||
128 | |||
129 | static void ep93xx_gpio_irq_mask_ack(unsigned int irq) | ||
130 | { | ||
131 | int line = irq_to_gpio(irq); | ||
132 | int port = line >> 3; | ||
133 | int port_mask = 1 << (line & 7); | ||
134 | |||
135 | if ((irq_desc[irq].status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) | ||
136 | gpio_int_type2[port] ^= port_mask; /* switch edge direction */ | ||
137 | |||
138 | gpio_int_unmasked[port] &= ~port_mask; | ||
139 | ep93xx_gpio_update_int_params(port); | ||
140 | |||
141 | __raw_writeb(port_mask, EP93XX_GPIO_REG(eoi_register_offset[port])); | ||
142 | } | ||
143 | |||
144 | static void ep93xx_gpio_irq_mask(unsigned int irq) | ||
145 | { | ||
146 | int line = irq_to_gpio(irq); | ||
147 | int port = line >> 3; | ||
148 | |||
149 | gpio_int_unmasked[port] &= ~(1 << (line & 7)); | ||
150 | ep93xx_gpio_update_int_params(port); | ||
151 | } | ||
152 | |||
153 | static void ep93xx_gpio_irq_unmask(unsigned int irq) | ||
154 | { | ||
155 | int line = irq_to_gpio(irq); | ||
156 | int port = line >> 3; | ||
157 | |||
158 | gpio_int_unmasked[port] |= 1 << (line & 7); | ||
159 | ep93xx_gpio_update_int_params(port); | ||
160 | } | ||
161 | |||
162 | /* | ||
163 | * gpio_int_type1 controls whether the interrupt is level (0) or | ||
164 | * edge (1) triggered, while gpio_int_type2 controls whether it | ||
165 | * triggers on low/falling (0) or high/rising (1). | ||
166 | */ | ||
167 | static int ep93xx_gpio_irq_type(unsigned int irq, unsigned int type) | ||
168 | { | ||
169 | struct irq_desc *desc = irq_desc + irq; | ||
170 | const int gpio = irq_to_gpio(irq); | ||
171 | const int port = gpio >> 3; | ||
172 | const int port_mask = 1 << (gpio & 7); | ||
173 | |||
174 | gpio_direction_input(gpio); | ||
175 | |||
176 | switch (type) { | ||
177 | case IRQ_TYPE_EDGE_RISING: | ||
178 | gpio_int_type1[port] |= port_mask; | ||
179 | gpio_int_type2[port] |= port_mask; | ||
180 | desc->handle_irq = handle_edge_irq; | ||
181 | break; | ||
182 | case IRQ_TYPE_EDGE_FALLING: | ||
183 | gpio_int_type1[port] |= port_mask; | ||
184 | gpio_int_type2[port] &= ~port_mask; | ||
185 | desc->handle_irq = handle_edge_irq; | ||
186 | break; | ||
187 | case IRQ_TYPE_LEVEL_HIGH: | ||
188 | gpio_int_type1[port] &= ~port_mask; | ||
189 | gpio_int_type2[port] |= port_mask; | ||
190 | desc->handle_irq = handle_level_irq; | ||
191 | break; | ||
192 | case IRQ_TYPE_LEVEL_LOW: | ||
193 | gpio_int_type1[port] &= ~port_mask; | ||
194 | gpio_int_type2[port] &= ~port_mask; | ||
195 | desc->handle_irq = handle_level_irq; | ||
196 | break; | ||
197 | case IRQ_TYPE_EDGE_BOTH: | ||
198 | gpio_int_type1[port] |= port_mask; | ||
199 | /* set initial polarity based on current input level */ | ||
200 | if (gpio_get_value(gpio)) | ||
201 | gpio_int_type2[port] &= ~port_mask; /* falling */ | ||
202 | else | ||
203 | gpio_int_type2[port] |= port_mask; /* rising */ | ||
204 | desc->handle_irq = handle_edge_irq; | ||
205 | break; | ||
206 | default: | ||
207 | pr_err("failed to set irq type %d for gpio %d\n", type, gpio); | ||
208 | return -EINVAL; | ||
209 | } | ||
210 | |||
211 | gpio_int_enabled[port] |= port_mask; | ||
212 | |||
213 | desc->status &= ~IRQ_TYPE_SENSE_MASK; | ||
214 | desc->status |= type & IRQ_TYPE_SENSE_MASK; | ||
215 | |||
216 | ep93xx_gpio_update_int_params(port); | ||
217 | |||
218 | return 0; | ||
219 | } | ||
220 | |||
221 | static struct irq_chip ep93xx_gpio_irq_chip = { | ||
222 | .name = "GPIO", | ||
223 | .ack = ep93xx_gpio_irq_ack, | ||
224 | .mask_ack = ep93xx_gpio_irq_mask_ack, | ||
225 | .mask = ep93xx_gpio_irq_mask, | ||
226 | .unmask = ep93xx_gpio_irq_unmask, | ||
227 | .set_type = ep93xx_gpio_irq_type, | ||
228 | }; | ||
229 | |||
230 | void __init ep93xx_gpio_init_irq(void) | ||
231 | { | ||
232 | int gpio_irq; | ||
233 | |||
234 | for (gpio_irq = gpio_to_irq(0); | ||
235 | gpio_irq <= gpio_to_irq(EP93XX_GPIO_LINE_MAX_IRQ); ++gpio_irq) { | ||
236 | set_irq_chip(gpio_irq, &ep93xx_gpio_irq_chip); | ||
237 | set_irq_handler(gpio_irq, handle_level_irq); | ||
238 | set_irq_flags(gpio_irq, IRQF_VALID); | ||
239 | } | ||
240 | |||
241 | set_irq_chained_handler(IRQ_EP93XX_GPIO_AB, ep93xx_gpio_ab_irq_handler); | ||
242 | set_irq_chained_handler(IRQ_EP93XX_GPIO0MUX, ep93xx_gpio_f_irq_handler); | ||
243 | set_irq_chained_handler(IRQ_EP93XX_GPIO1MUX, ep93xx_gpio_f_irq_handler); | ||
244 | set_irq_chained_handler(IRQ_EP93XX_GPIO2MUX, ep93xx_gpio_f_irq_handler); | ||
245 | set_irq_chained_handler(IRQ_EP93XX_GPIO3MUX, ep93xx_gpio_f_irq_handler); | ||
246 | set_irq_chained_handler(IRQ_EP93XX_GPIO4MUX, ep93xx_gpio_f_irq_handler); | ||
247 | set_irq_chained_handler(IRQ_EP93XX_GPIO5MUX, ep93xx_gpio_f_irq_handler); | ||
248 | set_irq_chained_handler(IRQ_EP93XX_GPIO6MUX, ep93xx_gpio_f_irq_handler); | ||
249 | set_irq_chained_handler(IRQ_EP93XX_GPIO7MUX, ep93xx_gpio_f_irq_handler); | ||
250 | } | ||
251 | |||
252 | |||
253 | /************************************************************************* | ||
254 | * gpiolib interface for EP93xx on-chip GPIOs | ||
255 | *************************************************************************/ | ||
25 | struct ep93xx_gpio_chip { | 256 | struct ep93xx_gpio_chip { |
26 | struct gpio_chip chip; | 257 | struct gpio_chip chip; |
27 | 258 | ||
@@ -31,10 +262,6 @@ struct ep93xx_gpio_chip { | |||
31 | 262 | ||
32 | #define to_ep93xx_gpio_chip(c) container_of(c, struct ep93xx_gpio_chip, chip) | 263 | #define to_ep93xx_gpio_chip(c) container_of(c, struct ep93xx_gpio_chip, chip) |
33 | 264 | ||
34 | /* From core.c */ | ||
35 | extern void ep93xx_gpio_int_mask(unsigned line); | ||
36 | extern void ep93xx_gpio_update_int_params(unsigned port); | ||
37 | |||
38 | static int ep93xx_gpio_direction_input(struct gpio_chip *chip, unsigned offset) | 265 | static int ep93xx_gpio_direction_input(struct gpio_chip *chip, unsigned offset) |
39 | { | 266 | { |
40 | struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip); | 267 | struct ep93xx_gpio_chip *ep93xx_chip = to_ep93xx_gpio_chip(chip); |
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h index d55194a4c093..93e2ecc79ceb 100644 --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | |||
@@ -92,21 +92,6 @@ | |||
92 | 92 | ||
93 | /* APB peripherals */ | 93 | /* APB peripherals */ |
94 | #define EP93XX_TIMER_BASE EP93XX_APB_IOMEM(0x00010000) | 94 | #define EP93XX_TIMER_BASE EP93XX_APB_IOMEM(0x00010000) |
95 | #define EP93XX_TIMER_REG(x) (EP93XX_TIMER_BASE + (x)) | ||
96 | #define EP93XX_TIMER1_LOAD EP93XX_TIMER_REG(0x00) | ||
97 | #define EP93XX_TIMER1_VALUE EP93XX_TIMER_REG(0x04) | ||
98 | #define EP93XX_TIMER1_CONTROL EP93XX_TIMER_REG(0x08) | ||
99 | #define EP93XX_TIMER1_CLEAR EP93XX_TIMER_REG(0x0c) | ||
100 | #define EP93XX_TIMER2_LOAD EP93XX_TIMER_REG(0x20) | ||
101 | #define EP93XX_TIMER2_VALUE EP93XX_TIMER_REG(0x24) | ||
102 | #define EP93XX_TIMER2_CONTROL EP93XX_TIMER_REG(0x28) | ||
103 | #define EP93XX_TIMER2_CLEAR EP93XX_TIMER_REG(0x2c) | ||
104 | #define EP93XX_TIMER4_VALUE_LOW EP93XX_TIMER_REG(0x60) | ||
105 | #define EP93XX_TIMER4_VALUE_HIGH EP93XX_TIMER_REG(0x64) | ||
106 | #define EP93XX_TIMER3_LOAD EP93XX_TIMER_REG(0x80) | ||
107 | #define EP93XX_TIMER3_VALUE EP93XX_TIMER_REG(0x84) | ||
108 | #define EP93XX_TIMER3_CONTROL EP93XX_TIMER_REG(0x88) | ||
109 | #define EP93XX_TIMER3_CLEAR EP93XX_TIMER_REG(0x8c) | ||
110 | 95 | ||
111 | #define EP93XX_I2S_BASE EP93XX_APB_IOMEM(0x00020000) | 96 | #define EP93XX_I2S_BASE EP93XX_APB_IOMEM(0x00020000) |
112 | 97 | ||
@@ -167,8 +152,11 @@ | |||
167 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P1 (1<<16) | 152 | #define EP93XX_SYSCON_PWRCNT_DMA_M2P1 (1<<16) |
168 | #define EP93XX_SYSCON_HALT EP93XX_SYSCON_REG(0x08) | 153 | #define EP93XX_SYSCON_HALT EP93XX_SYSCON_REG(0x08) |
169 | #define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c) | 154 | #define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c) |
170 | #define EP93XX_SYSCON_CLOCK_SET1 EP93XX_SYSCON_REG(0x20) | 155 | #define EP93XX_SYSCON_CLKSET1 EP93XX_SYSCON_REG(0x20) |
171 | #define EP93XX_SYSCON_CLOCK_SET2 EP93XX_SYSCON_REG(0x24) | 156 | #define EP93XX_SYSCON_CLKSET1_NBYP1 (1<<23) |
157 | #define EP93XX_SYSCON_CLKSET2 EP93XX_SYSCON_REG(0x24) | ||
158 | #define EP93XX_SYSCON_CLKSET2_NBYP2 (1<<19) | ||
159 | #define EP93XX_SYSCON_CLKSET2_PLL2_EN (1<<18) | ||
172 | #define EP93XX_SYSCON_DEVCFG EP93XX_SYSCON_REG(0x80) | 160 | #define EP93XX_SYSCON_DEVCFG EP93XX_SYSCON_REG(0x80) |
173 | #define EP93XX_SYSCON_DEVCFG_SWRST (1<<31) | 161 | #define EP93XX_SYSCON_DEVCFG_SWRST (1<<31) |
174 | #define EP93XX_SYSCON_DEVCFG_D1ONG (1<<30) | 162 | #define EP93XX_SYSCON_DEVCFG_D1ONG (1<<30) |
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c new file mode 100644 index 000000000000..cd93990f1b99 --- /dev/null +++ b/arch/arm/mach-ep93xx/simone.c | |||
@@ -0,0 +1,97 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/simone.c | ||
3 | * Simplemachines Sim.One support. | ||
4 | * | ||
5 | * Copyright (C) 2010 Ryan Mallon <ryan@bluewatersys.com> | ||
6 | * | ||
7 | * Based on the 2.6.24.7 support: | ||
8 | * Copyright (C) 2009 Simplemachines | ||
9 | * MMC support by Peter Ivanov <ivanovp@gmail.com>, 2007 | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or (at | ||
14 | * your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/mtd/physmap.h> | ||
22 | #include <linux/gpio.h> | ||
23 | #include <linux/i2c.h> | ||
24 | #include <linux/i2c-gpio.h> | ||
25 | |||
26 | #include <mach/hardware.h> | ||
27 | #include <mach/fb.h> | ||
28 | |||
29 | #include <asm/mach-types.h> | ||
30 | #include <asm/mach/arch.h> | ||
31 | |||
32 | static struct physmap_flash_data simone_flash_data = { | ||
33 | .width = 2, | ||
34 | }; | ||
35 | |||
36 | static struct resource simone_flash_resource = { | ||
37 | .start = EP93XX_CS6_PHYS_BASE, | ||
38 | .end = EP93XX_CS6_PHYS_BASE + SZ_8M - 1, | ||
39 | .flags = IORESOURCE_MEM, | ||
40 | }; | ||
41 | |||
42 | static struct platform_device simone_flash = { | ||
43 | .name = "physmap-flash", | ||
44 | .id = 0, | ||
45 | .num_resources = 1, | ||
46 | .resource = &simone_flash_resource, | ||
47 | .dev = { | ||
48 | .platform_data = &simone_flash_data, | ||
49 | }, | ||
50 | }; | ||
51 | |||
52 | static struct ep93xx_eth_data simone_eth_data = { | ||
53 | .phy_id = 1, | ||
54 | }; | ||
55 | |||
56 | static struct ep93xxfb_mach_info simone_fb_info = { | ||
57 | .num_modes = EP93XXFB_USE_MODEDB, | ||
58 | .bpp = 16, | ||
59 | .flags = EP93XXFB_USE_SDCSN0 | EP93XXFB_PCLK_FALLING, | ||
60 | }; | ||
61 | |||
62 | static struct i2c_gpio_platform_data simone_i2c_gpio_data = { | ||
63 | .sda_pin = EP93XX_GPIO_LINE_EEDAT, | ||
64 | .sda_is_open_drain = 0, | ||
65 | .scl_pin = EP93XX_GPIO_LINE_EECLK, | ||
66 | .scl_is_open_drain = 0, | ||
67 | .udelay = 0, | ||
68 | .timeout = 0, | ||
69 | }; | ||
70 | |||
71 | static struct i2c_board_info __initdata simone_i2c_board_info[] = { | ||
72 | { | ||
73 | I2C_BOARD_INFO("ds1337", 0x68), | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | static void __init simone_init_machine(void) | ||
78 | { | ||
79 | ep93xx_init_devices(); | ||
80 | |||
81 | platform_device_register(&simone_flash); | ||
82 | ep93xx_register_eth(&simone_eth_data, 1); | ||
83 | ep93xx_register_fb(&simone_fb_info); | ||
84 | ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info, | ||
85 | ARRAY_SIZE(simone_i2c_board_info)); | ||
86 | } | ||
87 | |||
88 | MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board") | ||
89 | /* Maintainer: Ryan Mallon <ryan@bluewatersys.com> */ | ||
90 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
91 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
92 | .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100, | ||
93 | .map_io = ep93xx_map_io, | ||
94 | .init_irq = ep93xx_init_irq, | ||
95 | .timer = &ep93xx_timer, | ||
96 | .init_machine = simone_init_machine, | ||
97 | MACHINE_END | ||
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c new file mode 100644 index 000000000000..51134b0382ca --- /dev/null +++ b/arch/arm/mach-ep93xx/snappercl15.c | |||
@@ -0,0 +1,172 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/snappercl15.c | ||
3 | * Bluewater Systems Snapper CL15 system module | ||
4 | * | ||
5 | * Copyright (C) 2009 Bluewater Systems Ltd | ||
6 | * Author: Ryan Mallon <ryan@bluewatersys.com> | ||
7 | * | ||
8 | * NAND code adapted from driver by: | ||
9 | * Andre Renaud <andre@bluewatersys.com> | ||
10 | * James R. McKaskill | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License as published by | ||
14 | * the Free Software Foundation; either version 2 of the License, or (at | ||
15 | * your option) any later version. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #include <linux/platform_device.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/io.h> | ||
23 | #include <linux/gpio.h> | ||
24 | #include <linux/i2c.h> | ||
25 | #include <linux/i2c-gpio.h> | ||
26 | #include <linux/fb.h> | ||
27 | |||
28 | #include <linux/mtd/partitions.h> | ||
29 | #include <linux/mtd/nand.h> | ||
30 | |||
31 | #include <mach/hardware.h> | ||
32 | #include <mach/fb.h> | ||
33 | |||
34 | #include <asm/mach-types.h> | ||
35 | #include <asm/mach/arch.h> | ||
36 | |||
37 | #define SNAPPERCL15_NAND_BASE (EP93XX_CS7_PHYS_BASE + SZ_16M) | ||
38 | |||
39 | #define SNAPPERCL15_NAND_WPN (1 << 8) /* Write protect (active low) */ | ||
40 | #define SNAPPERCL15_NAND_ALE (1 << 9) /* Address latch */ | ||
41 | #define SNAPPERCL15_NAND_CLE (1 << 10) /* Command latch */ | ||
42 | #define SNAPPERCL15_NAND_CEN (1 << 11) /* Chip enable (active low) */ | ||
43 | #define SNAPPERCL15_NAND_RDY (1 << 14) /* Device ready */ | ||
44 | |||
45 | #define NAND_CTRL_ADDR(chip) (chip->IO_ADDR_W + 0x40) | ||
46 | |||
47 | static void snappercl15_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, | ||
48 | unsigned int ctrl) | ||
49 | { | ||
50 | struct nand_chip *chip = mtd->priv; | ||
51 | static u16 nand_state = SNAPPERCL15_NAND_WPN; | ||
52 | u16 set; | ||
53 | |||
54 | if (ctrl & NAND_CTRL_CHANGE) { | ||
55 | set = SNAPPERCL15_NAND_CEN | SNAPPERCL15_NAND_WPN; | ||
56 | |||
57 | if (ctrl & NAND_NCE) | ||
58 | set &= ~SNAPPERCL15_NAND_CEN; | ||
59 | if (ctrl & NAND_CLE) | ||
60 | set |= SNAPPERCL15_NAND_CLE; | ||
61 | if (ctrl & NAND_ALE) | ||
62 | set |= SNAPPERCL15_NAND_ALE; | ||
63 | |||
64 | nand_state &= ~(SNAPPERCL15_NAND_CEN | | ||
65 | SNAPPERCL15_NAND_CLE | | ||
66 | SNAPPERCL15_NAND_ALE); | ||
67 | nand_state |= set; | ||
68 | __raw_writew(nand_state, NAND_CTRL_ADDR(chip)); | ||
69 | } | ||
70 | |||
71 | if (cmd != NAND_CMD_NONE) | ||
72 | __raw_writew((cmd & 0xff) | nand_state, chip->IO_ADDR_W); | ||
73 | } | ||
74 | |||
75 | static int snappercl15_nand_dev_ready(struct mtd_info *mtd) | ||
76 | { | ||
77 | struct nand_chip *chip = mtd->priv; | ||
78 | |||
79 | return !!(__raw_readw(NAND_CTRL_ADDR(chip)) & SNAPPERCL15_NAND_RDY); | ||
80 | } | ||
81 | |||
82 | static const char *snappercl15_nand_part_probes[] = {"cmdlinepart", NULL}; | ||
83 | |||
84 | static struct mtd_partition snappercl15_nand_parts[] = { | ||
85 | { | ||
86 | .name = "Kernel", | ||
87 | .offset = 0, | ||
88 | .size = SZ_2M, | ||
89 | }, | ||
90 | { | ||
91 | .name = "Filesystem", | ||
92 | .offset = MTDPART_OFS_APPEND, | ||
93 | .size = MTDPART_SIZ_FULL, | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | static struct platform_nand_data snappercl15_nand_data = { | ||
98 | .chip = { | ||
99 | .nr_chips = 1, | ||
100 | .part_probe_types = snappercl15_nand_part_probes, | ||
101 | .partitions = snappercl15_nand_parts, | ||
102 | .nr_partitions = ARRAY_SIZE(snappercl15_nand_parts), | ||
103 | .options = NAND_NO_AUTOINCR, | ||
104 | .chip_delay = 25, | ||
105 | }, | ||
106 | .ctrl = { | ||
107 | .dev_ready = snappercl15_nand_dev_ready, | ||
108 | .cmd_ctrl = snappercl15_nand_cmd_ctrl, | ||
109 | }, | ||
110 | }; | ||
111 | |||
112 | static struct resource snappercl15_nand_resource[] = { | ||
113 | { | ||
114 | .start = SNAPPERCL15_NAND_BASE, | ||
115 | .end = SNAPPERCL15_NAND_BASE + SZ_4K - 1, | ||
116 | .flags = IORESOURCE_MEM, | ||
117 | }, | ||
118 | }; | ||
119 | |||
120 | static struct platform_device snappercl15_nand_device = { | ||
121 | .name = "gen_nand", | ||
122 | .id = -1, | ||
123 | .dev.platform_data = &snappercl15_nand_data, | ||
124 | .resource = snappercl15_nand_resource, | ||
125 | .num_resources = ARRAY_SIZE(snappercl15_nand_resource), | ||
126 | }; | ||
127 | |||
128 | static struct ep93xx_eth_data snappercl15_eth_data = { | ||
129 | .phy_id = 1, | ||
130 | }; | ||
131 | |||
132 | static struct i2c_gpio_platform_data snappercl15_i2c_gpio_data = { | ||
133 | .sda_pin = EP93XX_GPIO_LINE_EEDAT, | ||
134 | .sda_is_open_drain = 0, | ||
135 | .scl_pin = EP93XX_GPIO_LINE_EECLK, | ||
136 | .scl_is_open_drain = 0, | ||
137 | .udelay = 0, | ||
138 | .timeout = 0, | ||
139 | }; | ||
140 | |||
141 | static struct i2c_board_info __initdata snappercl15_i2c_data[] = { | ||
142 | { | ||
143 | /* Audio codec */ | ||
144 | I2C_BOARD_INFO("tlv320aic23", 0x1a), | ||
145 | }, | ||
146 | }; | ||
147 | |||
148 | static struct ep93xxfb_mach_info snappercl15_fb_info = { | ||
149 | .num_modes = EP93XXFB_USE_MODEDB, | ||
150 | .bpp = 16, | ||
151 | }; | ||
152 | |||
153 | static void __init snappercl15_init_machine(void) | ||
154 | { | ||
155 | ep93xx_init_devices(); | ||
156 | ep93xx_register_eth(&snappercl15_eth_data, 1); | ||
157 | ep93xx_register_i2c(&snappercl15_i2c_gpio_data, snappercl15_i2c_data, | ||
158 | ARRAY_SIZE(snappercl15_i2c_data)); | ||
159 | ep93xx_register_fb(&snappercl15_fb_info); | ||
160 | platform_device_register(&snappercl15_nand_device); | ||
161 | } | ||
162 | |||
163 | MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15") | ||
164 | /* Maintainer: Ryan Mallon <ryan@bluewatersys.com> */ | ||
165 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
166 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
167 | .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100, | ||
168 | .map_io = ep93xx_map_io, | ||
169 | .init_irq = ep93xx_init_irq, | ||
170 | .timer = &ep93xx_timer, | ||
171 | .init_machine = snappercl15_init_machine, | ||
172 | MACHINE_END | ||
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 3bbf40f6d964..71728d36d501 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -427,6 +427,17 @@ static void __init ixp4xx_clocksource_init(void) | |||
427 | } | 427 | } |
428 | 428 | ||
429 | /* | 429 | /* |
430 | * sched_clock() | ||
431 | */ | ||
432 | unsigned long long sched_clock(void) | ||
433 | { | ||
434 | cycle_t cyc = ixp4xx_get_cycles(NULL); | ||
435 | struct clocksource *cs = &clocksource_ixp4xx; | ||
436 | |||
437 | return clocksource_cyc2ns(cyc, cs->mult, cs->shift); | ||
438 | } | ||
439 | |||
440 | /* | ||
430 | * clockevents | 441 | * clockevents |
431 | */ | 442 | */ |
432 | static int ixp4xx_set_next_event(unsigned long evt, | 443 | static int ixp4xx_set_next_event(unsigned long evt, |
diff --git a/arch/arm/mach-lh7a40x/clocks.c b/arch/arm/mach-lh7a40x/clocks.c index fcaf876f19b6..0651f96653f9 100644 --- a/arch/arm/mach-lh7a40x/clocks.c +++ b/arch/arm/mach-lh7a40x/clocks.c | |||
@@ -10,6 +10,8 @@ | |||
10 | #include <mach/hardware.h> | 10 | #include <mach/hardware.h> |
11 | #include <mach/clocks.h> | 11 | #include <mach/clocks.h> |
12 | #include <linux/err.h> | 12 | #include <linux/err.h> |
13 | #include <linux/device.h> | ||
14 | #include <linux/string.h> | ||
13 | 15 | ||
14 | struct module; | 16 | struct module; |
15 | 17 | ||
diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c index 8f49b2b12608..b22dec4abf78 100644 --- a/arch/arm/mach-mmp/ttc_dkb.c +++ b/arch/arm/mach-mmp/ttc_dkb.c | |||
@@ -24,8 +24,6 @@ | |||
24 | 24 | ||
25 | #include "common.h" | 25 | #include "common.h" |
26 | 26 | ||
27 | #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) | ||
28 | |||
29 | static unsigned long ttc_dkb_pin_config[] __initdata = { | 27 | static unsigned long ttc_dkb_pin_config[] __initdata = { |
30 | /* UART2 */ | 28 | /* UART2 */ |
31 | GPIO47_UART2_RXD, | 29 | GPIO47_UART2_RXD, |
diff --git a/arch/arm/mach-mx2/mxt_td60.c b/arch/arm/mach-mx2/mxt_td60.c index 03dbbdc98955..8bcc1a5b8829 100644 --- a/arch/arm/mach-mx2/mxt_td60.c +++ b/arch/arm/mach-mx2/mxt_td60.c | |||
@@ -58,21 +58,6 @@ static unsigned int mxt_td60_pins[] __initdata = { | |||
58 | PE9_PF_UART3_RXD, | 58 | PE9_PF_UART3_RXD, |
59 | PE10_PF_UART3_CTS, | 59 | PE10_PF_UART3_CTS, |
60 | PE11_PF_UART3_RTS, | 60 | PE11_PF_UART3_RTS, |
61 | /* UART3 */ | ||
62 | PB26_AF_UART4_RTS, | ||
63 | PB28_AF_UART4_TXD, | ||
64 | PB29_AF_UART4_CTS, | ||
65 | PB31_AF_UART4_RXD, | ||
66 | /* UART4 */ | ||
67 | PB18_AF_UART5_TXD, | ||
68 | PB19_AF_UART5_RXD, | ||
69 | PB20_AF_UART5_CTS, | ||
70 | PB21_AF_UART5_RTS, | ||
71 | /* UART5 */ | ||
72 | PB10_AF_UART6_TXD, | ||
73 | PB12_AF_UART6_CTS, | ||
74 | PB11_AF_UART6_RXD, | ||
75 | PB13_AF_UART6_RTS, | ||
76 | /* FEC */ | 61 | /* FEC */ |
77 | PD0_AIN_FEC_TXD0, | 62 | PD0_AIN_FEC_TXD0, |
78 | PD1_AIN_FEC_TXD1, | 63 | PD1_AIN_FEC_TXD1, |
@@ -261,12 +246,6 @@ static struct imxuart_platform_data uart_pdata[] = { | |||
261 | .flags = IMXUART_HAVE_RTSCTS, | 246 | .flags = IMXUART_HAVE_RTSCTS, |
262 | }, { | 247 | }, { |
263 | .flags = IMXUART_HAVE_RTSCTS, | 248 | .flags = IMXUART_HAVE_RTSCTS, |
264 | }, { | ||
265 | .flags = IMXUART_HAVE_RTSCTS, | ||
266 | }, { | ||
267 | .flags = IMXUART_HAVE_RTSCTS, | ||
268 | }, { | ||
269 | .flags = IMXUART_HAVE_RTSCTS, | ||
270 | }, | 249 | }, |
271 | }; | 250 | }; |
272 | 251 | ||
@@ -278,9 +257,6 @@ static void __init mxt_td60_board_init(void) | |||
278 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); | 257 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); |
279 | mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); | 258 | mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); |
280 | mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); | 259 | mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); |
281 | mxc_register_device(&mxc_uart_device3, &uart_pdata[3]); | ||
282 | mxc_register_device(&mxc_uart_device4, &uart_pdata[4]); | ||
283 | mxc_register_device(&mxc_uart_device5, &uart_pdata[5]); | ||
284 | mxc_register_device(&mxc_nand_device, &mxt_td60_nand_board_info); | 260 | mxc_register_device(&mxc_nand_device, &mxt_td60_nand_board_info); |
285 | 261 | ||
286 | i2c_register_board_info(0, mxt_td60_i2c_devices, | 262 | i2c_register_board_info(0, mxt_td60_i2c_devices, |
diff --git a/arch/arm/mach-mx25/clock.c b/arch/arm/mach-mx25/clock.c index ef26951a5275..6e838b857712 100644 --- a/arch/arm/mach-mx25/clock.c +++ b/arch/arm/mach-mx25/clock.c | |||
@@ -173,6 +173,7 @@ DEFINE_CLOCK(pwm4_clk, 0, CCM_CGCR2, 2, get_rate_ipg, NULL); | |||
173 | DEFINE_CLOCK(kpp_clk, 0, CCM_CGCR1, 28, get_rate_ipg, NULL); | 173 | DEFINE_CLOCK(kpp_clk, 0, CCM_CGCR1, 28, get_rate_ipg, NULL); |
174 | DEFINE_CLOCK(tsc_clk, 0, CCM_CGCR2, 13, get_rate_ipg, NULL); | 174 | DEFINE_CLOCK(tsc_clk, 0, CCM_CGCR2, 13, get_rate_ipg, NULL); |
175 | DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL); | 175 | DEFINE_CLOCK(i2c_clk, 0, CCM_CGCR0, 6, get_rate_i2c, NULL); |
176 | DEFINE_CLOCK(fec_clk, 0, CCM_CGCR0, 23, get_rate_ipg, NULL); | ||
176 | 177 | ||
177 | #define _REGISTER_CLOCK(d, n, c) \ | 178 | #define _REGISTER_CLOCK(d, n, c) \ |
178 | { \ | 179 | { \ |
@@ -204,6 +205,7 @@ static struct clk_lookup lookups[] = { | |||
204 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) | 205 | _REGISTER_CLOCK("imx-i2c.0", NULL, i2c_clk) |
205 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk) | 206 | _REGISTER_CLOCK("imx-i2c.1", NULL, i2c_clk) |
206 | _REGISTER_CLOCK("imx-i2c.2", NULL, i2c_clk) | 207 | _REGISTER_CLOCK("imx-i2c.2", NULL, i2c_clk) |
208 | _REGISTER_CLOCK("fec.0", NULL, fec_clk) | ||
207 | }; | 209 | }; |
208 | 210 | ||
209 | int __init mx25_clocks_init(unsigned long fref) | 211 | int __init mx25_clocks_init(unsigned long fref) |
diff --git a/arch/arm/mach-mx25/devices.c b/arch/arm/mach-mx25/devices.c index 63511de3a559..9fdeea1c083b 100644 --- a/arch/arm/mach-mx25/devices.c +++ b/arch/arm/mach-mx25/devices.c | |||
@@ -419,3 +419,22 @@ int __init mxc_register_gpios(void) | |||
419 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); | 419 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); |
420 | } | 420 | } |
421 | 421 | ||
422 | static struct resource mx25_fec_resources[] = { | ||
423 | { | ||
424 | .start = MX25_FEC_BASE_ADDR, | ||
425 | .end = MX25_FEC_BASE_ADDR + 0xfff, | ||
426 | .flags = IORESOURCE_MEM, | ||
427 | }, | ||
428 | { | ||
429 | .start = MX25_INT_FEC, | ||
430 | .end = MX25_INT_FEC, | ||
431 | .flags = IORESOURCE_IRQ, | ||
432 | }, | ||
433 | }; | ||
434 | |||
435 | struct platform_device mx25_fec_device = { | ||
436 | .name = "fec", | ||
437 | .id = 0, | ||
438 | .num_resources = ARRAY_SIZE(mx25_fec_resources), | ||
439 | .resource = mx25_fec_resources, | ||
440 | }; | ||
diff --git a/arch/arm/mach-mx25/devices.h b/arch/arm/mach-mx25/devices.h index fe6bf88ad1dd..fe5420fcd11f 100644 --- a/arch/arm/mach-mx25/devices.h +++ b/arch/arm/mach-mx25/devices.h | |||
@@ -17,3 +17,4 @@ extern struct platform_device mxc_keypad_device; | |||
17 | extern struct platform_device mxc_i2c_device0; | 17 | extern struct platform_device mxc_i2c_device0; |
18 | extern struct platform_device mxc_i2c_device1; | 18 | extern struct platform_device mxc_i2c_device1; |
19 | extern struct platform_device mxc_i2c_device2; | 19 | extern struct platform_device mxc_i2c_device2; |
20 | extern struct platform_device mx25_fec_device; | ||
diff --git a/arch/arm/mach-mx25/mx25pdk.c b/arch/arm/mach-mx25/mx25pdk.c index d23ae571c03f..921bc99ea231 100644 --- a/arch/arm/mach-mx25/mx25pdk.c +++ b/arch/arm/mach-mx25/mx25pdk.c | |||
@@ -18,10 +18,11 @@ | |||
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/delay.h> | ||
21 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
22 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
23 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
24 | #include <linux/smsc911x.h> | 25 | #include <linux/fec.h> |
25 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
26 | 27 | ||
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
@@ -35,16 +36,57 @@ | |||
35 | #include <mach/mx25.h> | 36 | #include <mach/mx25.h> |
36 | #include <mach/mxc_nand.h> | 37 | #include <mach/mxc_nand.h> |
37 | #include "devices.h" | 38 | #include "devices.h" |
38 | #include <mach/iomux-v3.h> | 39 | #include <mach/iomux.h> |
39 | 40 | ||
40 | static struct imxuart_platform_data uart_pdata = { | 41 | static struct imxuart_platform_data uart_pdata = { |
41 | .flags = IMXUART_HAVE_RTSCTS, | 42 | .flags = IMXUART_HAVE_RTSCTS, |
42 | }; | 43 | }; |
43 | 44 | ||
45 | static struct pad_desc mx25pdk_pads[] = { | ||
46 | MX25_PAD_FEC_MDC__FEC_MDC, | ||
47 | MX25_PAD_FEC_MDIO__FEC_MDIO, | ||
48 | MX25_PAD_FEC_TDATA0__FEC_TDATA0, | ||
49 | MX25_PAD_FEC_TDATA1__FEC_TDATA1, | ||
50 | MX25_PAD_FEC_TX_EN__FEC_TX_EN, | ||
51 | MX25_PAD_FEC_RDATA0__FEC_RDATA0, | ||
52 | MX25_PAD_FEC_RDATA1__FEC_RDATA1, | ||
53 | MX25_PAD_FEC_RX_DV__FEC_RX_DV, | ||
54 | MX25_PAD_FEC_TX_CLK__FEC_TX_CLK, | ||
55 | MX25_PAD_A17__GPIO_2_3, /* FEC_EN, GPIO 35 */ | ||
56 | MX25_PAD_D12__GPIO_4_8, /* FEC_RESET_B, GPIO 104 */ | ||
57 | }; | ||
58 | |||
59 | static struct fec_platform_data mx25_fec_pdata = { | ||
60 | .phy = PHY_INTERFACE_MODE_RMII, | ||
61 | }; | ||
62 | |||
63 | #define FEC_ENABLE_GPIO 35 | ||
64 | #define FEC_RESET_B_GPIO 104 | ||
65 | |||
66 | static void __init mx25pdk_fec_reset(void) | ||
67 | { | ||
68 | gpio_request(FEC_ENABLE_GPIO, "FEC PHY enable"); | ||
69 | gpio_request(FEC_RESET_B_GPIO, "FEC PHY reset"); | ||
70 | |||
71 | gpio_direction_output(FEC_ENABLE_GPIO, 0); /* drop PHY power */ | ||
72 | gpio_direction_output(FEC_RESET_B_GPIO, 0); /* assert reset */ | ||
73 | udelay(2); | ||
74 | |||
75 | /* turn on PHY power and lift reset */ | ||
76 | gpio_set_value(FEC_ENABLE_GPIO, 1); | ||
77 | gpio_set_value(FEC_RESET_B_GPIO, 1); | ||
78 | } | ||
79 | |||
44 | static void __init mx25pdk_init(void) | 80 | static void __init mx25pdk_init(void) |
45 | { | 81 | { |
82 | mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads, | ||
83 | ARRAY_SIZE(mx25pdk_pads)); | ||
84 | |||
46 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 85 | mxc_register_device(&mxc_uart_device0, &uart_pdata); |
47 | mxc_register_device(&mxc_usbh2, NULL); | 86 | mxc_register_device(&mxc_usbh2, NULL); |
87 | |||
88 | mx25pdk_fec_reset(); | ||
89 | mxc_register_device(&mx25_fec_device, &mx25_fec_pdata); | ||
48 | } | 90 | } |
49 | 91 | ||
50 | static void __init mx25pdk_timer_init(void) | 92 | static void __init mx25pdk_timer_init(void) |
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig index ea8ed109a7c2..28294416b0af 100644 --- a/arch/arm/mach-mx3/Kconfig +++ b/arch/arm/mach-mx3/Kconfig | |||
@@ -49,6 +49,7 @@ config MACH_PCM037_EET | |||
49 | config MACH_MX31LITE | 49 | config MACH_MX31LITE |
50 | bool "Support MX31 LITEKIT (LogicPD)" | 50 | bool "Support MX31 LITEKIT (LogicPD)" |
51 | select ARCH_MX31 | 51 | select ARCH_MX31 |
52 | select MXC_ULPI if USB_ULPI | ||
52 | help | 53 | help |
53 | Include support for MX31 LITEKIT platform. This includes specific | 54 | Include support for MX31 LITEKIT platform. This includes specific |
54 | configurations for the board and its peripherals. | 55 | configurations for the board and its peripherals. |
@@ -63,7 +64,7 @@ config MACH_MX31_3DS | |||
63 | config MACH_MX31MOBOARD | 64 | config MACH_MX31MOBOARD |
64 | bool "Support mx31moboard platforms (EPFL Mobots group)" | 65 | bool "Support mx31moboard platforms (EPFL Mobots group)" |
65 | select ARCH_MX31 | 66 | select ARCH_MX31 |
66 | select MXC_ULPI | 67 | select MXC_ULPI if USB_ULPI |
67 | help | 68 | help |
68 | Include support for mx31moboard platform. This includes specific | 69 | Include support for mx31moboard platform. This includes specific |
69 | configurations for the board and its peripherals. | 70 | configurations for the board and its peripherals. |
diff --git a/arch/arm/mach-mx3/mm.c b/arch/arm/mach-mx3/mm.c index bedf5b8d976a..6858a4f9806c 100644 --- a/arch/arm/mach-mx3/mm.c +++ b/arch/arm/mach-mx3/mm.c | |||
@@ -65,6 +65,11 @@ static struct map_desc mxc_io_desc[] __initdata = { | |||
65 | .pfn = __phys_to_pfn(AIPS2_BASE_ADDR), | 65 | .pfn = __phys_to_pfn(AIPS2_BASE_ADDR), |
66 | .length = AIPS2_SIZE, | 66 | .length = AIPS2_SIZE, |
67 | .type = MT_DEVICE_NONSHARED | 67 | .type = MT_DEVICE_NONSHARED |
68 | }, { | ||
69 | .virtual = SPBA0_BASE_ADDR_VIRT, | ||
70 | .pfn = __phys_to_pfn(SPBA0_BASE_ADDR), | ||
71 | .length = SPBA0_SIZE, | ||
72 | .type = MT_DEVICE_NONSHARED | ||
68 | }, | 73 | }, |
69 | }; | 74 | }; |
70 | 75 | ||
diff --git a/arch/arm/mach-mx3/mx31ads.c b/arch/arm/mach-mx3/mx31ads.c index 0497c152be18..3e7bafa2ddbb 100644 --- a/arch/arm/mach-mx3/mx31ads.c +++ b/arch/arm/mach-mx3/mx31ads.c | |||
@@ -494,11 +494,6 @@ static void mxc_init_i2c(void) | |||
494 | */ | 494 | */ |
495 | static struct map_desc mx31ads_io_desc[] __initdata = { | 495 | static struct map_desc mx31ads_io_desc[] __initdata = { |
496 | { | 496 | { |
497 | .virtual = SPBA0_BASE_ADDR_VIRT, | ||
498 | .pfn = __phys_to_pfn(SPBA0_BASE_ADDR), | ||
499 | .length = SPBA0_SIZE, | ||
500 | .type = MT_DEVICE_NONSHARED | ||
501 | }, { | ||
502 | .virtual = CS4_BASE_ADDR_VIRT, | 497 | .virtual = CS4_BASE_ADDR_VIRT, |
503 | .pfn = __phys_to_pfn(CS4_BASE_ADDR), | 498 | .pfn = __phys_to_pfn(CS4_BASE_ADDR), |
504 | .length = CS4_SIZE / 2, | 499 | .length = CS4_SIZE / 2, |
diff --git a/arch/arm/mach-mx3/mx31lite.c b/arch/arm/mach-mx3/mx31lite.c index def6b6736594..789b20d1730f 100644 --- a/arch/arm/mach-mx3/mx31lite.c +++ b/arch/arm/mach-mx3/mx31lite.c | |||
@@ -135,6 +135,7 @@ static struct spi_board_info mc13783_spi_dev __initdata = { | |||
135 | * USB | 135 | * USB |
136 | */ | 136 | */ |
137 | 137 | ||
138 | #if defined(CONFIG_USB_ULPI) | ||
138 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ | 139 | #define USB_PAD_CFG (PAD_CTL_DRV_MAX | PAD_CTL_SRE_FAST | PAD_CTL_HYS_CMOS | \ |
139 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) | 140 | PAD_CTL_ODE_CMOS | PAD_CTL_100K_PU) |
140 | 141 | ||
@@ -180,6 +181,7 @@ static struct mxc_usbh_platform_data usbh2_pdata = { | |||
180 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, | 181 | .portsc = MXC_EHCI_MODE_ULPI | MXC_EHCI_UTMI_8BIT, |
181 | .flags = MXC_EHCI_POWER_PINS_ENABLED, | 182 | .flags = MXC_EHCI_POWER_PINS_ENABLED, |
182 | }; | 183 | }; |
184 | #endif | ||
183 | 185 | ||
184 | /* | 186 | /* |
185 | * NOR flash | 187 | * NOR flash |
@@ -212,11 +214,6 @@ static struct platform_device physmap_flash_device = { | |||
212 | */ | 214 | */ |
213 | static struct map_desc mx31lite_io_desc[] __initdata = { | 215 | static struct map_desc mx31lite_io_desc[] __initdata = { |
214 | { | 216 | { |
215 | .virtual = SPBA0_BASE_ADDR_VIRT, | ||
216 | .pfn = __phys_to_pfn(SPBA0_BASE_ADDR), | ||
217 | .length = SPBA0_SIZE, | ||
218 | .type = MT_DEVICE_NONSHARED | ||
219 | }, { | ||
220 | .virtual = CS4_BASE_ADDR_VIRT, | 217 | .virtual = CS4_BASE_ADDR_VIRT, |
221 | .pfn = __phys_to_pfn(CS4_BASE_ADDR), | 218 | .pfn = __phys_to_pfn(CS4_BASE_ADDR), |
222 | .length = CS4_SIZE, | 219 | .length = CS4_SIZE, |
@@ -261,11 +258,13 @@ static void __init mxc_board_init(void) | |||
261 | mxc_register_device(&mxc_spi_device1, &spi1_pdata); | 258 | mxc_register_device(&mxc_spi_device1, &spi1_pdata); |
262 | spi_register_board_info(&mc13783_spi_dev, 1); | 259 | spi_register_board_info(&mc13783_spi_dev, 1); |
263 | 260 | ||
261 | #if defined(CONFIG_USB_ULPI) | ||
264 | /* USB */ | 262 | /* USB */ |
265 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 263 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, |
266 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | 264 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); |
267 | 265 | ||
268 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); | 266 | mxc_register_device(&mxc_usbh2, &usbh2_pdata); |
267 | #endif | ||
269 | 268 | ||
270 | /* SMSC9117 IRQ pin */ | 269 | /* SMSC9117 IRQ pin */ |
271 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq"); | 270 | ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_SFS6), "sms9117-irq"); |
diff --git a/arch/arm/mach-mx3/mx31moboard-devboard.c b/arch/arm/mach-mx3/mx31moboard-devboard.c index 8fc624f141cb..438428eaf769 100644 --- a/arch/arm/mach-mx3/mx31moboard-devboard.c +++ b/arch/arm/mach-mx3/mx31moboard-devboard.c | |||
@@ -179,7 +179,7 @@ static int __init devboard_usbh1_init(void) | |||
179 | 179 | ||
180 | usbh1_pdata.otg = otg; | 180 | usbh1_pdata.otg = otg; |
181 | 181 | ||
182 | return mxc_register_device(&mx31_usbh1, &usbh1_pdata); | 182 | return mxc_register_device(&mxc_usbh1, &usbh1_pdata); |
183 | } | 183 | } |
184 | 184 | ||
185 | /* | 185 | /* |
diff --git a/arch/arm/mach-mx3/mx31moboard-marxbot.c b/arch/arm/mach-mx3/mx31moboard-marxbot.c index 85184a35e674..1f44b9ccbb0f 100644 --- a/arch/arm/mach-mx3/mx31moboard-marxbot.c +++ b/arch/arm/mach-mx3/mx31moboard-marxbot.c | |||
@@ -294,7 +294,7 @@ static int __init marxbot_usbh1_init(void) | |||
294 | 294 | ||
295 | usbh1_pdata.otg = otg; | 295 | usbh1_pdata.otg = otg; |
296 | 296 | ||
297 | return mxc_register_device(&mx31_usbh1, &usbh1_pdata); | 297 | return mxc_register_device(&mxc_usbh1, &usbh1_pdata); |
298 | } | 298 | } |
299 | 299 | ||
300 | /* | 300 | /* |
diff --git a/arch/arm/mach-mx3/mx31moboard.c b/arch/arm/mach-mx3/mx31moboard.c index b70529145936..cfd605d078ec 100644 --- a/arch/arm/mach-mx3/mx31moboard.c +++ b/arch/arm/mach-mx3/mx31moboard.c | |||
@@ -346,6 +346,8 @@ static struct fsl_usb2_platform_data usb_pdata = { | |||
346 | .phy_mode = FSL_USB2_PHY_ULPI, | 346 | .phy_mode = FSL_USB2_PHY_ULPI, |
347 | }; | 347 | }; |
348 | 348 | ||
349 | #if defined(CONFIG_USB_ULPI) | ||
350 | |||
349 | #define USBH2_EN_B IOMUX_TO_GPIO(MX31_PIN_SCK6) | 351 | #define USBH2_EN_B IOMUX_TO_GPIO(MX31_PIN_SCK6) |
350 | 352 | ||
351 | static int moboard_usbh2_hw_init(struct platform_device *pdev) | 353 | static int moboard_usbh2_hw_init(struct platform_device *pdev) |
@@ -392,8 +394,11 @@ static int __init moboard_usbh2_init(void) | |||
392 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 394 | usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, |
393 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); | 395 | USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); |
394 | 396 | ||
395 | return mxc_register_device(&mx31_usbh2, &usbh2_pdata); | 397 | return mxc_register_device(&mxc_usbh2, &usbh2_pdata); |
396 | } | 398 | } |
399 | #else | ||
400 | static inline int moboard_usbh2_init(void) { return 0; } | ||
401 | #endif | ||
397 | 402 | ||
398 | 403 | ||
399 | static struct gpio_led mx31moboard_leds[] = { | 404 | static struct gpio_led mx31moboard_leds[] = { |
diff --git a/arch/arm/mach-mx3/mx31pdk.c b/arch/arm/mach-mx3/mx31pdk.c index 0f7a2f06bc2d..18715f1aa7eb 100644 --- a/arch/arm/mach-mx3/mx31pdk.c +++ b/arch/arm/mach-mx3/mx31pdk.c | |||
@@ -211,11 +211,6 @@ static int __init mx31pdk_init_expio(void) | |||
211 | */ | 211 | */ |
212 | static struct map_desc mx31pdk_io_desc[] __initdata = { | 212 | static struct map_desc mx31pdk_io_desc[] __initdata = { |
213 | { | 213 | { |
214 | .virtual = SPBA0_BASE_ADDR_VIRT, | ||
215 | .pfn = __phys_to_pfn(SPBA0_BASE_ADDR), | ||
216 | .length = SPBA0_SIZE, | ||
217 | .type = MT_DEVICE_NONSHARED, | ||
218 | }, { | ||
219 | .virtual = CS5_BASE_ADDR_VIRT, | 214 | .virtual = CS5_BASE_ADDR_VIRT, |
220 | .pfn = __phys_to_pfn(CS5_BASE_ADDR), | 215 | .pfn = __phys_to_pfn(CS5_BASE_ADDR), |
221 | .length = CS5_SIZE, | 216 | .length = CS5_SIZE, |
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c index 6cbaabedf386..5be396917c99 100644 --- a/arch/arm/mach-mx3/pcm037.c +++ b/arch/arm/mach-mx3/pcm037.c | |||
@@ -322,16 +322,25 @@ static int pcm037_camera_power(struct device *dev, int on) | |||
322 | return 0; | 322 | return 0; |
323 | } | 323 | } |
324 | 324 | ||
325 | static struct i2c_board_info pcm037_i2c_2_devices[] = { | 325 | static struct i2c_board_info pcm037_i2c_camera[] = { |
326 | { | 326 | { |
327 | I2C_BOARD_INFO("mt9t031", 0x5d), | 327 | I2C_BOARD_INFO("mt9t031", 0x5d), |
328 | }, { | ||
329 | I2C_BOARD_INFO("mt9v022", 0x48), | ||
328 | }, | 330 | }, |
329 | }; | 331 | }; |
330 | 332 | ||
331 | static struct soc_camera_link iclink = { | 333 | static struct soc_camera_link iclink_mt9v022 = { |
334 | .bus_id = 0, /* Must match with the camera ID */ | ||
335 | .board_info = &pcm037_i2c_camera[1], | ||
336 | .i2c_adapter_id = 2, | ||
337 | .module_name = "mt9v022", | ||
338 | }; | ||
339 | |||
340 | static struct soc_camera_link iclink_mt9t031 = { | ||
332 | .bus_id = 0, /* Must match with the camera ID */ | 341 | .bus_id = 0, /* Must match with the camera ID */ |
333 | .power = pcm037_camera_power, | 342 | .power = pcm037_camera_power, |
334 | .board_info = &pcm037_i2c_2_devices[0], | 343 | .board_info = &pcm037_i2c_camera[0], |
335 | .i2c_adapter_id = 2, | 344 | .i2c_adapter_id = 2, |
336 | .module_name = "mt9t031", | 345 | .module_name = "mt9t031", |
337 | }; | 346 | }; |
@@ -345,11 +354,19 @@ static struct i2c_board_info pcm037_i2c_devices[] = { | |||
345 | } | 354 | } |
346 | }; | 355 | }; |
347 | 356 | ||
348 | static struct platform_device pcm037_camera = { | 357 | static struct platform_device pcm037_mt9t031 = { |
349 | .name = "soc-camera-pdrv", | 358 | .name = "soc-camera-pdrv", |
350 | .id = 0, | 359 | .id = 0, |
351 | .dev = { | 360 | .dev = { |
352 | .platform_data = &iclink, | 361 | .platform_data = &iclink_mt9t031, |
362 | }, | ||
363 | }; | ||
364 | |||
365 | static struct platform_device pcm037_mt9v022 = { | ||
366 | .name = "soc-camera-pdrv", | ||
367 | .id = 1, | ||
368 | .dev = { | ||
369 | .platform_data = &iclink_mt9v022, | ||
353 | }, | 370 | }, |
354 | }; | 371 | }; |
355 | 372 | ||
@@ -449,7 +466,8 @@ static int __init pcm037_camera_alloc_dma(const size_t buf_size) | |||
449 | static struct platform_device *devices[] __initdata = { | 466 | static struct platform_device *devices[] __initdata = { |
450 | &pcm037_flash, | 467 | &pcm037_flash, |
451 | &pcm037_sram_device, | 468 | &pcm037_sram_device, |
452 | &pcm037_camera, | 469 | &pcm037_mt9t031, |
470 | &pcm037_mt9v022, | ||
453 | }; | 471 | }; |
454 | 472 | ||
455 | static struct ipu_platform_data mx3_ipu_data = { | 473 | static struct ipu_platform_data mx3_ipu_data = { |
@@ -599,7 +617,7 @@ static void __init mxc_board_init(void) | |||
599 | if (!ret) | 617 | if (!ret) |
600 | gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), 1); | 618 | gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), 1); |
601 | else | 619 | else |
602 | iclink.power = NULL; | 620 | iclink_mt9t031.power = NULL; |
603 | 621 | ||
604 | if (!pcm037_camera_alloc_dma(4 * 1024 * 1024)) | 622 | if (!pcm037_camera_alloc_dma(4 * 1024 * 1024)) |
605 | mxc_register_device(&mx3_camera, &camera_pdata); | 623 | mxc_register_device(&mx3_camera, &camera_pdata); |
diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c index ab995a9c606c..65e7b5b85d83 100644 --- a/arch/arm/mach-omap1/clock_data.c +++ b/arch/arm/mach-omap1/clock_data.c | |||
@@ -599,7 +599,7 @@ static struct clk i2c_ick = { | |||
599 | static struct omap_clk omap_clks[] = { | 599 | static struct omap_clk omap_clks[] = { |
600 | /* non-ULPD clocks */ | 600 | /* non-ULPD clocks */ |
601 | CLK(NULL, "ck_ref", &ck_ref, CK_16XX | CK_1510 | CK_310 | CK_7XX), | 601 | CLK(NULL, "ck_ref", &ck_ref, CK_16XX | CK_1510 | CK_310 | CK_7XX), |
602 | CLK(NULL, "ck_dpll1", &ck_dpll1, CK_16XX | CK_1510 | CK_310), | 602 | CLK(NULL, "ck_dpll1", &ck_dpll1, CK_16XX | CK_1510 | CK_310 | CK_7XX), |
603 | /* CK_GEN1 clocks */ | 603 | /* CK_GEN1 clocks */ |
604 | CLK(NULL, "ck_dpll1out", &ck_dpll1out.clk, CK_16XX), | 604 | CLK(NULL, "ck_dpll1out", &ck_dpll1out.clk, CK_16XX), |
605 | CLK(NULL, "ck_sossi", &sossi_ck, CK_16XX), | 605 | CLK(NULL, "ck_sossi", &sossi_ck, CK_16XX), |
@@ -627,7 +627,7 @@ static struct omap_clk omap_clks[] = { | |||
627 | CLK(NULL, "tc2_ck", &tc2_ck, CK_16XX), | 627 | CLK(NULL, "tc2_ck", &tc2_ck, CK_16XX), |
628 | CLK(NULL, "dma_ck", &dma_ck, CK_16XX | CK_1510 | CK_310), | 628 | CLK(NULL, "dma_ck", &dma_ck, CK_16XX | CK_1510 | CK_310), |
629 | CLK(NULL, "dma_lcdfree_ck", &dma_lcdfree_ck, CK_16XX), | 629 | CLK(NULL, "dma_lcdfree_ck", &dma_lcdfree_ck, CK_16XX), |
630 | CLK(NULL, "api_ck", &api_ck.clk, CK_16XX | CK_1510 | CK_310), | 630 | CLK(NULL, "api_ck", &api_ck.clk, CK_16XX | CK_1510 | CK_310 | CK_7XX), |
631 | CLK(NULL, "lb_ck", &lb_ck.clk, CK_1510 | CK_310), | 631 | CLK(NULL, "lb_ck", &lb_ck.clk, CK_1510 | CK_310), |
632 | CLK(NULL, "rhea1_ck", &rhea1_ck, CK_16XX), | 632 | CLK(NULL, "rhea1_ck", &rhea1_ck, CK_16XX), |
633 | CLK(NULL, "rhea2_ck", &rhea2_ck, CK_16XX), | 633 | CLK(NULL, "rhea2_ck", &rhea2_ck, CK_16XX), |
@@ -658,6 +658,10 @@ static struct omap_clk omap_clks[] = { | |||
658 | CLK("i2c_omap.1", "fck", &i2c_fck, CK_16XX | CK_1510 | CK_310 | CK_7XX), | 658 | CLK("i2c_omap.1", "fck", &i2c_fck, CK_16XX | CK_1510 | CK_310 | CK_7XX), |
659 | CLK("i2c_omap.1", "ick", &i2c_ick, CK_16XX), | 659 | CLK("i2c_omap.1", "ick", &i2c_ick, CK_16XX), |
660 | CLK("i2c_omap.1", "ick", &dummy_ck, CK_1510 | CK_310 | CK_7XX), | 660 | CLK("i2c_omap.1", "ick", &dummy_ck, CK_1510 | CK_310 | CK_7XX), |
661 | CLK("omap1_spi100k.1", "fck", &dummy_ck, CK_7XX), | ||
662 | CLK("omap1_spi100k.1", "ick", &dummy_ck, CK_7XX), | ||
663 | CLK("omap1_spi100k.2", "fck", &dummy_ck, CK_7XX), | ||
664 | CLK("omap1_spi100k.2", "ick", &dummy_ck, CK_7XX), | ||
661 | CLK("omap_uwire", "fck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310), | 665 | CLK("omap_uwire", "fck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310), |
662 | CLK("omap-mcbsp.1", "ick", &dspper_ck, CK_16XX), | 666 | CLK("omap-mcbsp.1", "ick", &dspper_ck, CK_16XX), |
663 | CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_1510 | CK_310), | 667 | CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_1510 | CK_310), |
@@ -674,7 +678,7 @@ static struct omap_clk omap_clks[] = { | |||
674 | * init | 678 | * init |
675 | */ | 679 | */ |
676 | 680 | ||
677 | static struct clk_functions omap1_clk_functions __initdata = { | 681 | static struct clk_functions omap1_clk_functions = { |
678 | .clk_enable = omap1_clk_enable, | 682 | .clk_enable = omap1_clk_enable, |
679 | .clk_disable = omap1_clk_disable, | 683 | .clk_disable = omap1_clk_disable, |
680 | .clk_round_rate = omap1_clk_round_rate, | 684 | .clk_round_rate = omap1_clk_round_rate, |
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 23ded2d49600..a2d07aa75c9e 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/spi/spi.h> | ||
17 | 18 | ||
18 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
19 | #include <asm/mach/map.h> | 20 | #include <asm/mach/map.h> |
@@ -23,6 +24,7 @@ | |||
23 | #include <plat/mux.h> | 24 | #include <plat/mux.h> |
24 | #include <mach/gpio.h> | 25 | #include <mach/gpio.h> |
25 | #include <plat/mmc.h> | 26 | #include <plat/mmc.h> |
27 | #include <plat/omap7xx.h> | ||
26 | 28 | ||
27 | /*-------------------------------------------------------------------------*/ | 29 | /*-------------------------------------------------------------------------*/ |
28 | 30 | ||
@@ -196,6 +198,38 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, | |||
196 | 198 | ||
197 | /*-------------------------------------------------------------------------*/ | 199 | /*-------------------------------------------------------------------------*/ |
198 | 200 | ||
201 | /* OMAP7xx SPI support */ | ||
202 | #if defined(CONFIG_SPI_OMAP_100K) || defined(CONFIG_SPI_OMAP_100K_MODULE) | ||
203 | |||
204 | struct platform_device omap_spi1 = { | ||
205 | .name = "omap1_spi100k", | ||
206 | .id = 1, | ||
207 | }; | ||
208 | |||
209 | struct platform_device omap_spi2 = { | ||
210 | .name = "omap1_spi100k", | ||
211 | .id = 2, | ||
212 | }; | ||
213 | |||
214 | static void omap_init_spi100k(void) | ||
215 | { | ||
216 | omap_spi1.dev.platform_data = ioremap(OMAP7XX_SPI1_BASE, 0x7ff); | ||
217 | if (omap_spi1.dev.platform_data) | ||
218 | platform_device_register(&omap_spi1); | ||
219 | |||
220 | omap_spi2.dev.platform_data = ioremap(OMAP7XX_SPI2_BASE, 0x7ff); | ||
221 | if (omap_spi2.dev.platform_data) | ||
222 | platform_device_register(&omap_spi2); | ||
223 | } | ||
224 | |||
225 | #else | ||
226 | static inline void omap_init_spi100k(void) | ||
227 | { | ||
228 | } | ||
229 | #endif | ||
230 | |||
231 | /*-------------------------------------------------------------------------*/ | ||
232 | |||
199 | #if defined(CONFIG_OMAP_STI) | 233 | #if defined(CONFIG_OMAP_STI) |
200 | 234 | ||
201 | #define OMAP1_STI_BASE 0xfffea000 | 235 | #define OMAP1_STI_BASE 0xfffea000 |
@@ -263,6 +297,7 @@ static int __init omap1_init_devices(void) | |||
263 | 297 | ||
264 | omap_init_mbox(); | 298 | omap_init_mbox(); |
265 | omap_init_rtc(); | 299 | omap_init_rtc(); |
300 | omap_init_spi100k(); | ||
266 | omap_init_sti(); | 301 | omap_init_sti(); |
267 | 302 | ||
268 | return 0; | 303 | return 0; |
diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c index 07212cc621ae..84341377232d 100644 --- a/arch/arm/mach-omap1/mux.c +++ b/arch/arm/mach-omap1/mux.c | |||
@@ -62,6 +62,14 @@ MUX_CFG_7XX("MMC_7XX_DAT0", 2, 17, 0, 16, 1, 0) | |||
62 | /* I2C interface */ | 62 | /* I2C interface */ |
63 | MUX_CFG_7XX("I2C_7XX_SCL", 5, 1, 0, 0, 1, 0) | 63 | MUX_CFG_7XX("I2C_7XX_SCL", 5, 1, 0, 0, 1, 0) |
64 | MUX_CFG_7XX("I2C_7XX_SDA", 5, 5, 0, 0, 1, 0) | 64 | MUX_CFG_7XX("I2C_7XX_SDA", 5, 5, 0, 0, 1, 0) |
65 | |||
66 | /* SPI pins */ | ||
67 | MUX_CFG_7XX("SPI_7XX_1", 6, 5, 4, 4, 1, 0) | ||
68 | MUX_CFG_7XX("SPI_7XX_2", 6, 9, 4, 8, 1, 0) | ||
69 | MUX_CFG_7XX("SPI_7XX_3", 6, 13, 4, 12, 1, 0) | ||
70 | MUX_CFG_7XX("SPI_7XX_4", 6, 17, 4, 16, 1, 0) | ||
71 | MUX_CFG_7XX("SPI_7XX_5", 8, 25, 0, 24, 0, 0) | ||
72 | MUX_CFG_7XX("SPI_7XX_6", 9, 5, 0, 4, 0, 0) | ||
65 | }; | 73 | }; |
66 | #define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins) | 74 | #define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins) |
67 | #else | 75 | #else |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 10eafa70a909..606bf04f51b6 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -80,6 +80,7 @@ config MACH_OVERO | |||
80 | config MACH_OMAP3EVM | 80 | config MACH_OMAP3EVM |
81 | bool "OMAP 3530 EVM board" | 81 | bool "OMAP 3530 EVM board" |
82 | depends on ARCH_OMAP3 && ARCH_OMAP34XX | 82 | depends on ARCH_OMAP3 && ARCH_OMAP34XX |
83 | select OMAP_PACKAGE_CBB | ||
83 | 84 | ||
84 | config MACH_OMAP3517EVM | 85 | config MACH_OMAP3517EVM |
85 | bool "OMAP3517/ AM3517 EVM board" | 86 | bool "OMAP3517/ AM3517 EVM board" |
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index 8dd277c36661..1e3dfb652acc 100755 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c | |||
@@ -63,21 +63,21 @@ static int board_keymap[] = { | |||
63 | KEY(5, 1, KEY_H), | 63 | KEY(5, 1, KEY_H), |
64 | KEY(5, 2, KEY_J), | 64 | KEY(5, 2, KEY_J), |
65 | KEY(5, 3, KEY_F3), | 65 | KEY(5, 3, KEY_F3), |
66 | KEY(5, 4, KEY_UNKNOWN), | ||
66 | KEY(5, 5, KEY_VOLUMEDOWN), | 67 | KEY(5, 5, KEY_VOLUMEDOWN), |
67 | KEY(5, 6, KEY_M), | 68 | KEY(5, 6, KEY_M), |
68 | KEY(5, 7, KEY_ENTER), | 69 | KEY(5, 7, KEY_RIGHT), |
69 | KEY(6, 0, KEY_Q), | 70 | KEY(6, 0, KEY_Q), |
70 | KEY(6, 1, KEY_A), | 71 | KEY(6, 1, KEY_A), |
71 | KEY(6, 2, KEY_N), | 72 | KEY(6, 2, KEY_N), |
72 | KEY(6, 3, KEY_BACKSPACE), | 73 | KEY(6, 3, KEY_BACKSPACE), |
73 | KEY(6, 6, KEY_P), | 74 | KEY(6, 6, KEY_P), |
74 | KEY(6, 7, KEY_SELECT), | 75 | KEY(6, 7, KEY_UP), |
75 | KEY(7, 0, KEY_PROG1), /*MACRO 1 <User defined> */ | 76 | KEY(7, 0, KEY_PROG1), /*MACRO 1 <User defined> */ |
76 | KEY(7, 1, KEY_PROG2), /*MACRO 2 <User defined> */ | 77 | KEY(7, 1, KEY_PROG2), /*MACRO 2 <User defined> */ |
77 | KEY(7, 2, KEY_PROG3), /*MACRO 3 <User defined> */ | 78 | KEY(7, 2, KEY_PROG3), /*MACRO 3 <User defined> */ |
78 | KEY(7, 3, KEY_PROG4), /*MACRO 4 <User defined> */ | 79 | KEY(7, 3, KEY_PROG4), /*MACRO 4 <User defined> */ |
79 | KEY(7, 5, KEY_RIGHT), | 80 | KEY(7, 6, KEY_SELECT), |
80 | KEY(7, 6, KEY_UP), | ||
81 | KEY(7, 7, KEY_DOWN) | 81 | KEY(7, 7, KEY_DOWN) |
82 | }; | 82 | }; |
83 | 83 | ||
diff --git a/arch/arm/mach-omap2/clock2xxx.c b/arch/arm/mach-omap2/clock2xxx.c index d0e3fb7f9298..5420356eb407 100644 --- a/arch/arm/mach-omap2/clock2xxx.c +++ b/arch/arm/mach-omap2/clock2xxx.c | |||
@@ -449,40 +449,78 @@ int omap2_select_table_rate(struct clk *clk, unsigned long rate) | |||
449 | #ifdef CONFIG_CPU_FREQ | 449 | #ifdef CONFIG_CPU_FREQ |
450 | /* | 450 | /* |
451 | * Walk PRCM rate table and fillout cpufreq freq_table | 451 | * Walk PRCM rate table and fillout cpufreq freq_table |
452 | * XXX This should be replaced by an OPP layer in the near future | ||
452 | */ | 453 | */ |
453 | static struct cpufreq_frequency_table freq_table[ARRAY_SIZE(rate_table)]; | 454 | static struct cpufreq_frequency_table *freq_table; |
454 | 455 | ||
455 | void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table) | 456 | void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table) |
456 | { | 457 | { |
457 | struct prcm_config *prcm; | 458 | const struct prcm_config *prcm; |
459 | long sys_ck_rate; | ||
458 | int i = 0; | 460 | int i = 0; |
461 | int tbl_sz = 0; | ||
462 | |||
463 | sys_ck_rate = clk_get_rate(sclk); | ||
459 | 464 | ||
460 | for (prcm = rate_table; prcm->mpu_speed; prcm++) { | 465 | for (prcm = rate_table; prcm->mpu_speed; prcm++) { |
461 | if (!(prcm->flags & cpu_mask)) | 466 | if (!(prcm->flags & cpu_mask)) |
462 | continue; | 467 | continue; |
463 | if (prcm->xtal_speed != sys_ck.rate) | 468 | if (prcm->xtal_speed != sys_ck_rate) |
464 | continue; | 469 | continue; |
465 | 470 | ||
466 | /* don't put bypass rates in table */ | 471 | /* don't put bypass rates in table */ |
467 | if (prcm->dpll_speed == prcm->xtal_speed) | 472 | if (prcm->dpll_speed == prcm->xtal_speed) |
468 | continue; | 473 | continue; |
469 | 474 | ||
470 | freq_table[i].index = i; | 475 | tbl_sz++; |
471 | freq_table[i].frequency = prcm->mpu_speed / 1000; | ||
472 | i++; | ||
473 | } | 476 | } |
474 | 477 | ||
475 | if (i == 0) { | 478 | /* |
476 | printk(KERN_WARNING "%s: failed to initialize frequency " | 479 | * XXX Ensure that we're doing what CPUFreq expects for this error |
477 | "table\n", __func__); | 480 | * case and the following one |
481 | */ | ||
482 | if (tbl_sz == 0) { | ||
483 | pr_warning("%s: no matching entries in rate_table\n", | ||
484 | __func__); | ||
485 | return; | ||
486 | } | ||
487 | |||
488 | /* Include the CPUFREQ_TABLE_END terminator entry */ | ||
489 | tbl_sz++; | ||
490 | |||
491 | freq_table = kzalloc(sizeof(struct cpufreq_frequency_table) * tbl_sz, | ||
492 | GFP_ATOMIC); | ||
493 | if (!freq_table) { | ||
494 | pr_err("%s: could not kzalloc frequency table\n", __func__); | ||
478 | return; | 495 | return; |
479 | } | 496 | } |
480 | 497 | ||
498 | for (prcm = rate_table; prcm->mpu_speed; prcm++) { | ||
499 | if (!(prcm->flags & cpu_mask)) | ||
500 | continue; | ||
501 | if (prcm->xtal_speed != sys_ck_rate) | ||
502 | continue; | ||
503 | |||
504 | /* don't put bypass rates in table */ | ||
505 | if (prcm->dpll_speed == prcm->xtal_speed) | ||
506 | continue; | ||
507 | |||
508 | freq_table[i].index = i; | ||
509 | freq_table[i].frequency = prcm->mpu_speed / 1000; | ||
510 | i++; | ||
511 | } | ||
512 | |||
481 | freq_table[i].index = i; | 513 | freq_table[i].index = i; |
482 | freq_table[i].frequency = CPUFREQ_TABLE_END; | 514 | freq_table[i].frequency = CPUFREQ_TABLE_END; |
483 | 515 | ||
484 | *table = &freq_table[0]; | 516 | *table = &freq_table[0]; |
485 | } | 517 | } |
518 | |||
519 | void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table) | ||
520 | { | ||
521 | kfree(freq_table); | ||
522 | } | ||
523 | |||
486 | #endif | 524 | #endif |
487 | 525 | ||
488 | struct clk_functions omap2_clk_functions = { | 526 | struct clk_functions omap2_clk_functions = { |
@@ -494,6 +532,7 @@ struct clk_functions omap2_clk_functions = { | |||
494 | .clk_disable_unused = omap2_clk_disable_unused, | 532 | .clk_disable_unused = omap2_clk_disable_unused, |
495 | #ifdef CONFIG_CPU_FREQ | 533 | #ifdef CONFIG_CPU_FREQ |
496 | .clk_init_cpufreq_table = omap2_clk_init_cpufreq_table, | 534 | .clk_init_cpufreq_table = omap2_clk_init_cpufreq_table, |
535 | .clk_exit_cpufreq_table = omap2_clk_exit_cpufreq_table, | ||
497 | #endif | 536 | #endif |
498 | }; | 537 | }; |
499 | 538 | ||
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c index ded32364f32b..d4217b93e10b 100644 --- a/arch/arm/mach-omap2/clock34xx.c +++ b/arch/arm/mach-omap2/clock34xx.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <asm/div64.h> | 34 | #include <asm/div64.h> |
35 | #include <asm/clkdev.h> | 35 | #include <asm/clkdev.h> |
36 | 36 | ||
37 | #include <plat/sdrc.h> | ||
38 | #include "clock.h" | 37 | #include "clock.h" |
39 | #include "clock34xx.h" | 38 | #include "clock34xx.h" |
40 | #include "sdrc.h" | 39 | #include "sdrc.h" |
diff --git a/arch/arm/mach-omap2/clock34xx_data.c b/arch/arm/mach-omap2/clock34xx_data.c index 8bdcc9cc7f9a..c6031d74d6f6 100644 --- a/arch/arm/mach-omap2/clock34xx_data.c +++ b/arch/arm/mach-omap2/clock34xx_data.c | |||
@@ -776,6 +776,8 @@ static struct clk dpll4_m5_ck = { | |||
776 | .clksel_mask = OMAP3430_CLKSEL_CAM_MASK, | 776 | .clksel_mask = OMAP3430_CLKSEL_CAM_MASK, |
777 | .clksel = div16_dpll4_clksel, | 777 | .clksel = div16_dpll4_clksel, |
778 | .clkdm_name = "dpll4_clkdm", | 778 | .clkdm_name = "dpll4_clkdm", |
779 | .set_rate = &omap2_clksel_set_rate, | ||
780 | .round_rate = &omap2_clksel_round_rate, | ||
779 | .recalc = &omap2_clksel_recalc, | 781 | .recalc = &omap2_clksel_recalc, |
780 | }; | 782 | }; |
781 | 783 | ||
@@ -1500,6 +1502,7 @@ static struct clk uart2_fck = { | |||
1500 | .parent = &core_48m_fck, | 1502 | .parent = &core_48m_fck, |
1501 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1503 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
1502 | .enable_bit = OMAP3430_EN_UART2_SHIFT, | 1504 | .enable_bit = OMAP3430_EN_UART2_SHIFT, |
1505 | .clkdm_name = "core_l4_clkdm", | ||
1503 | .recalc = &followparent_recalc, | 1506 | .recalc = &followparent_recalc, |
1504 | }; | 1507 | }; |
1505 | 1508 | ||
@@ -1509,6 +1512,7 @@ static struct clk uart1_fck = { | |||
1509 | .parent = &core_48m_fck, | 1512 | .parent = &core_48m_fck, |
1510 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1513 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
1511 | .enable_bit = OMAP3430_EN_UART1_SHIFT, | 1514 | .enable_bit = OMAP3430_EN_UART1_SHIFT, |
1515 | .clkdm_name = "core_l4_clkdm", | ||
1512 | .recalc = &followparent_recalc, | 1516 | .recalc = &followparent_recalc, |
1513 | }; | 1517 | }; |
1514 | 1518 | ||
@@ -2745,7 +2749,7 @@ static struct clk mcbsp4_ick = { | |||
2745 | }; | 2749 | }; |
2746 | 2750 | ||
2747 | static const struct clksel mcbsp_234_clksel[] = { | 2751 | static const struct clksel mcbsp_234_clksel[] = { |
2748 | { .parent = &core_96m_fck, .rates = common_mcbsp_96m_rates }, | 2752 | { .parent = &per_96m_fck, .rates = common_mcbsp_96m_rates }, |
2749 | { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates }, | 2753 | { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates }, |
2750 | { .parent = NULL } | 2754 | { .parent = NULL } |
2751 | }; | 2755 | }; |
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index 1a45ed1e8ba1..dd285f001467 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c | |||
@@ -559,7 +559,7 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk) | |||
559 | * downstream clocks for debugging purposes? | 559 | * downstream clocks for debugging purposes? |
560 | */ | 560 | */ |
561 | 561 | ||
562 | if (!clkdm || !clk) | 562 | if (!clkdm || !clk || !clkdm->clktrctrl_mask) |
563 | return -EINVAL; | 563 | return -EINVAL; |
564 | 564 | ||
565 | if (atomic_inc_return(&clkdm->usecount) > 1) | 565 | if (atomic_inc_return(&clkdm->usecount) > 1) |
@@ -610,7 +610,7 @@ int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) | |||
610 | * downstream clocks for debugging purposes? | 610 | * downstream clocks for debugging purposes? |
611 | */ | 611 | */ |
612 | 612 | ||
613 | if (!clkdm || !clk) | 613 | if (!clkdm || !clk || !clkdm->clktrctrl_mask) |
614 | return -EINVAL; | 614 | return -EINVAL; |
615 | 615 | ||
616 | #ifdef DEBUG | 616 | #ifdef DEBUG |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index a8749e8017b9..5a7996402c53 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <plat/sdrc.h> | 33 | #include <plat/sdrc.h> |
34 | #include <plat/gpmc.h> | 34 | #include <plat/gpmc.h> |
35 | #include <plat/serial.h> | 35 | #include <plat/serial.h> |
36 | #include <plat/mux.h> | ||
37 | #include <plat/vram.h> | 36 | #include <plat/vram.h> |
38 | 37 | ||
39 | #include "clock.h" | 38 | #include "clock.h" |
@@ -73,21 +72,21 @@ static struct map_desc omap24xx_io_desc[] __initdata = { | |||
73 | #ifdef CONFIG_ARCH_OMAP2420 | 72 | #ifdef CONFIG_ARCH_OMAP2420 |
74 | static struct map_desc omap242x_io_desc[] __initdata = { | 73 | static struct map_desc omap242x_io_desc[] __initdata = { |
75 | { | 74 | { |
76 | .virtual = DSP_MEM_24XX_VIRT, | 75 | .virtual = DSP_MEM_2420_VIRT, |
77 | .pfn = __phys_to_pfn(DSP_MEM_24XX_PHYS), | 76 | .pfn = __phys_to_pfn(DSP_MEM_2420_PHYS), |
78 | .length = DSP_MEM_24XX_SIZE, | 77 | .length = DSP_MEM_2420_SIZE, |
79 | .type = MT_DEVICE | 78 | .type = MT_DEVICE |
80 | }, | 79 | }, |
81 | { | 80 | { |
82 | .virtual = DSP_IPI_24XX_VIRT, | 81 | .virtual = DSP_IPI_2420_VIRT, |
83 | .pfn = __phys_to_pfn(DSP_IPI_24XX_PHYS), | 82 | .pfn = __phys_to_pfn(DSP_IPI_2420_PHYS), |
84 | .length = DSP_IPI_24XX_SIZE, | 83 | .length = DSP_IPI_2420_SIZE, |
85 | .type = MT_DEVICE | 84 | .type = MT_DEVICE |
86 | }, | 85 | }, |
87 | { | 86 | { |
88 | .virtual = DSP_MMU_24XX_VIRT, | 87 | .virtual = DSP_MMU_2420_VIRT, |
89 | .pfn = __phys_to_pfn(DSP_MMU_24XX_PHYS), | 88 | .pfn = __phys_to_pfn(DSP_MMU_2420_PHYS), |
90 | .length = DSP_MMU_24XX_SIZE, | 89 | .length = DSP_MMU_2420_SIZE, |
91 | .type = MT_DEVICE | 90 | .type = MT_DEVICE |
92 | }, | 91 | }, |
93 | }; | 92 | }; |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index e071b3fd1878..459ef23ab8a8 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -994,8 +994,10 @@ int __init omap_mux_init(u32 mux_pbase, u32 mux_size, | |||
994 | } | 994 | } |
995 | 995 | ||
996 | #ifdef CONFIG_OMAP_MUX | 996 | #ifdef CONFIG_OMAP_MUX |
997 | omap_mux_package_fixup(package_subset, superset); | 997 | if (package_subset) |
998 | omap_mux_package_init_balls(package_balls, superset); | 998 | omap_mux_package_fixup(package_subset, superset); |
999 | if (package_balls) | ||
1000 | omap_mux_package_init_balls(package_balls, superset); | ||
999 | omap_mux_set_cmdline_signals(); | 1001 | omap_mux_set_cmdline_signals(); |
1000 | omap_mux_set_board_signals(board_mux); | 1002 | omap_mux_set_board_signals(board_mux); |
1001 | #endif | 1003 | #endif |
diff --git a/arch/arm/mach-omap2/opp2420_data.c b/arch/arm/mach-omap2/opp2420_data.c index 126a9396b3a8..e6dda694fd5c 100644 --- a/arch/arm/mach-omap2/opp2420_data.c +++ b/arch/arm/mach-omap2/opp2420_data.c | |||
@@ -9,45 +9,47 @@ | |||
9 | * The OMAP2 processor can be run at several discrete 'PRCM configurations'. | 9 | * The OMAP2 processor can be run at several discrete 'PRCM configurations'. |
10 | * These configurations are characterized by voltage and speed for clocks. | 10 | * These configurations are characterized by voltage and speed for clocks. |
11 | * The device is only validated for certain combinations. One way to express | 11 | * The device is only validated for certain combinations. One way to express |
12 | * these combinations is via the 'ratio's' which the clocks operate with | 12 | * these combinations is via the 'ratios' which the clocks operate with |
13 | * respect to each other. These ratio sets are for a given voltage/DPLL | 13 | * respect to each other. These ratio sets are for a given voltage/DPLL |
14 | * setting. All configurations can be described by a DPLL setting and a ratio | 14 | * setting. All configurations can be described by a DPLL setting and a ratio. |
15 | * There are 3 ratio sets for the 2430 and X ratio sets for 2420. | ||
16 | * | ||
17 | * 2430 differs from 2420 in that there are no more phase synchronizers used. | ||
18 | * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs | ||
19 | * 2430 (iva2.1, NOdsp, mdm) | ||
20 | * | 15 | * |
21 | * XXX Missing voltage data. | 16 | * XXX Missing voltage data. |
17 | * XXX Missing 19.2MHz sys_clk rate sets (needed for N800/N810) | ||
22 | * | 18 | * |
23 | * THe format described in this file is deprecated. Once a reasonable | 19 | * THe format described in this file is deprecated. Once a reasonable |
24 | * OPP API exists, the data in this file should be converted to use it. | 20 | * OPP API exists, the data in this file should be converted to use it. |
25 | * | 21 | * |
26 | * This is technically part of the OMAP2xxx clock code. | 22 | * This is technically part of the OMAP2xxx clock code. |
23 | * | ||
24 | * Considerable work is still needed to fully support dynamic frequency | ||
25 | * changes on OMAP2xxx-series chips. Readers interested in such a | ||
26 | * project are encouraged to review the Maemo Diablo RX-34 and RX-44 | ||
27 | * kernel source at: | ||
28 | * http://repository.maemo.org/pool/diablo/free/k/kernel-source-diablo/ | ||
27 | */ | 29 | */ |
28 | 30 | ||
29 | #include "opp2xxx.h" | 31 | #include "opp2xxx.h" |
30 | #include "sdrc.h" | 32 | #include "sdrc.h" |
31 | #include "clock.h" | 33 | #include "clock.h" |
32 | 34 | ||
33 | /*------------------------------------------------------------------------- | 35 | /* |
34 | * Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated. | 36 | * Key dividers which make up a PRCM set. Ratios for a PRCM are mandated. |
35 | * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU, | 37 | * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU, |
36 | * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL, | 38 | * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL, |
37 | * CM_CLKSEL2_PLL, CM_CLKSEL_MDM | 39 | * CM_CLKSEL2_PLL, CM_CLKSEL_MDM |
38 | * | 40 | * |
39 | * Filling in table based on H4 boards and 2430-SDPs variants available. | 41 | * Filling in table based on H4 boards available. There are quite a |
40 | * There are quite a few more rates combinations which could be defined. | 42 | * few more rate combinations which could be defined. |
41 | * | 43 | * |
42 | * When multiple values are defined the start up will try and choose the | 44 | * When multiple values are defined the start up will try and choose |
43 | * fastest one. If a 'fast' value is defined, then automatically, the /2 | 45 | * the fastest one. If a 'fast' value is defined, then automatically, |
44 | * one should be included as it can be used. Generally having more that | 46 | * the /2 one should be included as it can be used. Generally having |
45 | * one fast set does not make sense, as static timings need to be changed | 47 | * more than one fast set does not make sense, as static timings need |
46 | * to change the set. The exception is the bypass setting which is | 48 | * to be changed to change the set. The exception is the bypass |
47 | * availble for low power bypass. | 49 | * setting which is available for low power bypass. |
48 | * | 50 | * |
49 | * Note: This table needs to be sorted, fastest to slowest. | 51 | * Note: This table needs to be sorted, fastest to slowest. |
50 | *-------------------------------------------------------------------------*/ | 52 | **/ |
51 | const struct prcm_config omap2420_rate_table[] = { | 53 | const struct prcm_config omap2420_rate_table[] = { |
52 | /* PRCM I - FAST */ | 54 | /* PRCM I - FAST */ |
53 | {S12M, S660M, S330M, RI_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */ | 55 | {S12M, S660M, S330M, RI_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */ |
diff --git a/arch/arm/mach-omap2/opp2430_data.c b/arch/arm/mach-omap2/opp2430_data.c index edb81672c844..1b9596ae201e 100644 --- a/arch/arm/mach-omap2/opp2430_data.c +++ b/arch/arm/mach-omap2/opp2430_data.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * opp2420_data.c - old-style "OPP" table for OMAP2420 | 2 | * opp2430_data.c - old-style "OPP" table for OMAP2430 |
3 | * | 3 | * |
4 | * Copyright (C) 2005-2009 Texas Instruments, Inc. | 4 | * Copyright (C) 2005-2009 Texas Instruments, Inc. |
5 | * Copyright (C) 2004-2009 Nokia Corporation | 5 | * Copyright (C) 2004-2009 Nokia Corporation |
@@ -9,16 +9,16 @@ | |||
9 | * The OMAP2 processor can be run at several discrete 'PRCM configurations'. | 9 | * The OMAP2 processor can be run at several discrete 'PRCM configurations'. |
10 | * These configurations are characterized by voltage and speed for clocks. | 10 | * These configurations are characterized by voltage and speed for clocks. |
11 | * The device is only validated for certain combinations. One way to express | 11 | * The device is only validated for certain combinations. One way to express |
12 | * these combinations is via the 'ratio's' which the clocks operate with | 12 | * these combinations is via the 'ratios' which the clocks operate with |
13 | * respect to each other. These ratio sets are for a given voltage/DPLL | 13 | * respect to each other. These ratio sets are for a given voltage/DPLL |
14 | * setting. All configurations can be described by a DPLL setting and a ratio | 14 | * setting. All configurations can be described by a DPLL setting and a ratio. |
15 | * There are 3 ratio sets for the 2430 and X ratio sets for 2420. | ||
16 | * | 15 | * |
17 | * 2430 differs from 2420 in that there are no more phase synchronizers used. | 16 | * 2430 differs from 2420 in that there are no more phase synchronizers used. |
18 | * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs | 17 | * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs |
19 | * 2430 (iva2.1, NOdsp, mdm) | 18 | * 2430 (iva2.1, NOdsp, mdm) |
20 | * | 19 | * |
21 | * XXX Missing voltage data. | 20 | * XXX Missing voltage data. |
21 | * XXX Missing 19.2MHz sys_clk rate sets. | ||
22 | * | 22 | * |
23 | * THe format described in this file is deprecated. Once a reasonable | 23 | * THe format described in this file is deprecated. Once a reasonable |
24 | * OPP API exists, the data in this file should be converted to use it. | 24 | * OPP API exists, the data in this file should be converted to use it. |
@@ -30,24 +30,24 @@ | |||
30 | #include "sdrc.h" | 30 | #include "sdrc.h" |
31 | #include "clock.h" | 31 | #include "clock.h" |
32 | 32 | ||
33 | /*------------------------------------------------------------------------- | 33 | /* |
34 | * Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated. | 34 | * Key dividers which make up a PRCM set. Ratios for a PRCM are mandated. |
35 | * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU, | 35 | * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU, |
36 | * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL, | 36 | * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL, |
37 | * CM_CLKSEL2_PLL, CM_CLKSEL_MDM | 37 | * CM_CLKSEL2_PLL, CM_CLKSEL_MDM |
38 | * | 38 | * |
39 | * Filling in table based on H4 boards and 2430-SDPs variants available. | 39 | * Filling in table based on 2430-SDPs variants available. There are |
40 | * There are quite a few more rates combinations which could be defined. | 40 | * quite a few more rate combinations which could be defined. |
41 | * | 41 | * |
42 | * When multiple values are defined the start up will try and choose the | 42 | * When multiple values are defined the start up will try and choose |
43 | * fastest one. If a 'fast' value is defined, then automatically, the /2 | 43 | * the fastest one. If a 'fast' value is defined, then automatically, |
44 | * one should be included as it can be used. Generally having more that | 44 | * the /2 one should be included as it can be used. Generally having |
45 | * one fast set does not make sense, as static timings need to be changed | 45 | * more than one fast set does not make sense, as static timings need |
46 | * to change the set. The exception is the bypass setting which is | 46 | * to be changed to change the set. The exception is the bypass |
47 | * availble for low power bypass. | 47 | * setting which is available for low power bypass. |
48 | * | 48 | * |
49 | * Note: This table needs to be sorted, fastest to slowest. | 49 | * Note: This table needs to be sorted, fastest to slowest. |
50 | *-------------------------------------------------------------------------*/ | 50 | */ |
51 | const struct prcm_config omap2430_rate_table[] = { | 51 | const struct prcm_config omap2430_rate_table[] = { |
52 | /* PRCM #4 - ratio2 (ES2.1) - FAST */ | 52 | /* PRCM #4 - ratio2 (ES2.1) - FAST */ |
53 | {S13M, S798M, S399M, R2_CM_CLKSEL_MPU_VAL, /* 399MHz ARM */ | 53 | {S13M, S798M, S399M, R2_CM_CLKSEL_MPU_VAL, /* 399MHz ARM */ |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 81ed252a0f8a..c6cc809afb79 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -124,8 +124,8 @@ static void omap3_core_save_context(void) | |||
124 | control_padconf_off |= START_PADCONF_SAVE; | 124 | control_padconf_off |= START_PADCONF_SAVE; |
125 | omap_ctrl_writel(control_padconf_off, OMAP343X_CONTROL_PADCONF_OFF); | 125 | omap_ctrl_writel(control_padconf_off, OMAP343X_CONTROL_PADCONF_OFF); |
126 | /* wait for the save to complete */ | 126 | /* wait for the save to complete */ |
127 | while (!omap_ctrl_readl(OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS) | 127 | while (!(omap_ctrl_readl(OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS) |
128 | & PADCONF_SAVE_DONE) | 128 | & PADCONF_SAVE_DONE)) |
129 | ; | 129 | ; |
130 | /* Save the Interrupt controller context */ | 130 | /* Save the Interrupt controller context */ |
131 | omap_intc_save_context(); | 131 | omap_intc_save_context(); |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 19805a7de06c..8c964bec8159 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -125,6 +125,13 @@ static struct plat_serial8250_port serial_platform_data3[] = { | |||
125 | } | 125 | } |
126 | }; | 126 | }; |
127 | #endif | 127 | #endif |
128 | static inline unsigned int __serial_read_reg(struct uart_port *up, | ||
129 | int offset) | ||
130 | { | ||
131 | offset <<= up->regshift; | ||
132 | return (unsigned int)__raw_readb(up->membase + offset); | ||
133 | } | ||
134 | |||
128 | static inline unsigned int serial_read_reg(struct plat_serial8250_port *up, | 135 | static inline unsigned int serial_read_reg(struct plat_serial8250_port *up, |
129 | int offset) | 136 | int offset) |
130 | { | 137 | { |
@@ -583,11 +590,12 @@ static unsigned int serial_in_override(struct uart_port *up, int offset) | |||
583 | { | 590 | { |
584 | if (UART_RX == offset) { | 591 | if (UART_RX == offset) { |
585 | unsigned int lsr; | 592 | unsigned int lsr; |
586 | lsr = serial_read_reg(omap_uart[up->line].p, UART_LSR); | 593 | lsr = __serial_read_reg(up, UART_LSR); |
587 | if (!(lsr & UART_LSR_DR)) | 594 | if (!(lsr & UART_LSR_DR)) |
588 | return -EPERM; | 595 | return -EPERM; |
589 | } | 596 | } |
590 | return serial_read_reg(omap_uart[up->line].p, offset); | 597 | |
598 | return __serial_read_reg(up, offset); | ||
591 | } | 599 | } |
592 | 600 | ||
593 | void __init omap_serial_early_init(void) | 601 | void __init omap_serial_early_init(void) |
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 8a0837ea0294..dee92182749b 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -37,6 +37,8 @@ config MACH_ZYLONITE320 | |||
37 | config MACH_LITTLETON | 37 | config MACH_LITTLETON |
38 | bool "PXA3xx Form Factor Platform (aka Littleton)" | 38 | bool "PXA3xx Form Factor Platform (aka Littleton)" |
39 | select PXA3xx | 39 | select PXA3xx |
40 | select CPU_PXA300 | ||
41 | select CPU_PXA310 | ||
40 | select PXA_SSP | 42 | select PXA_SSP |
41 | 43 | ||
42 | config MACH_TAVOREVB | 44 | config MACH_TAVOREVB |
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h index 50f1297bf5ac..e741bf1bfb2d 100644 --- a/arch/arm/mach-pxa/include/mach/hardware.h +++ b/arch/arm/mach-pxa/include/mach/hardware.h | |||
@@ -250,20 +250,17 @@ | |||
250 | 250 | ||
251 | #define cpu_is_pxa930() \ | 251 | #define cpu_is_pxa930() \ |
252 | ({ \ | 252 | ({ \ |
253 | unsigned int id = read_cpuid(CPUID_ID); \ | 253 | __cpu_is_pxa930(read_cpuid_id()); \ |
254 | __cpu_is_pxa930(id); \ | ||
255 | }) | 254 | }) |
256 | 255 | ||
257 | #define cpu_is_pxa935() \ | 256 | #define cpu_is_pxa935() \ |
258 | ({ \ | 257 | ({ \ |
259 | unsigned int id = read_cpuid(CPUID_ID); \ | 258 | __cpu_is_pxa935(read_cpuid_id()); \ |
260 | __cpu_is_pxa935(id); \ | ||
261 | }) | 259 | }) |
262 | 260 | ||
263 | #define cpu_is_pxa950() \ | 261 | #define cpu_is_pxa950() \ |
264 | ({ \ | 262 | ({ \ |
265 | unsigned int id = read_cpuid(CPUID_ID); \ | 263 | __cpu_is_pxa950(read_cpuid_id()); \ |
266 | __cpu_is_pxa950(id); \ | ||
267 | }) | 264 | }) |
268 | 265 | ||
269 | 266 | ||
diff --git a/arch/arm/mach-pxa/include/mach/zylonite.h b/arch/arm/mach-pxa/include/mach/zylonite.h index bf6785adccf4..9edf645368d6 100644 --- a/arch/arm/mach-pxa/include/mach/zylonite.h +++ b/arch/arm/mach-pxa/include/mach/zylonite.h | |||
@@ -8,13 +8,6 @@ | |||
8 | /* the following variables are processor specific and initialized | 8 | /* the following variables are processor specific and initialized |
9 | * by the corresponding zylonite_pxa3xx_init() | 9 | * by the corresponding zylonite_pxa3xx_init() |
10 | */ | 10 | */ |
11 | struct platform_mmc_slot { | ||
12 | int gpio_cd; | ||
13 | int gpio_wp; | ||
14 | }; | ||
15 | |||
16 | extern struct platform_mmc_slot zylonite_mmc_slot[]; | ||
17 | |||
18 | extern int gpio_eth_irq; | 11 | extern int gpio_eth_irq; |
19 | extern int gpio_debug_led1; | 12 | extern int gpio_debug_led1; |
20 | extern int gpio_debug_led2; | 13 | extern int gpio_debug_led2; |
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c index f28c1715b910..fa527b258d61 100644 --- a/arch/arm/mach-pxa/littleton.c +++ b/arch/arm/mach-pxa/littleton.c | |||
@@ -110,6 +110,12 @@ static mfp_cfg_t littleton_mfp_cfg[] __initdata = { | |||
110 | GPIO7_MMC1_CLK, | 110 | GPIO7_MMC1_CLK, |
111 | GPIO8_MMC1_CMD, | 111 | GPIO8_MMC1_CMD, |
112 | GPIO15_GPIO, /* card detect */ | 112 | GPIO15_GPIO, /* card detect */ |
113 | |||
114 | /* UART3 */ | ||
115 | GPIO107_UART3_CTS, | ||
116 | GPIO108_UART3_RTS, | ||
117 | GPIO109_UART3_TXD, | ||
118 | GPIO110_UART3_RXD, | ||
113 | }; | 119 | }; |
114 | 120 | ||
115 | static struct resource smc91x_resources[] = { | 121 | static struct resource smc91x_resources[] = { |
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 8a38d604dc77..189f330719a2 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
@@ -381,7 +381,7 @@ err: | |||
381 | return ret; | 381 | return ret; |
382 | } | 382 | } |
383 | 383 | ||
384 | static int magician_backlight_notify(int brightness) | 384 | static int magician_backlight_notify(struct device *dev, int brightness) |
385 | { | 385 | { |
386 | gpio_set_value(EGPIO_MAGICIAN_BL_POWER, brightness); | 386 | gpio_set_value(EGPIO_MAGICIAN_BL_POWER, brightness); |
387 | if (brightness >= 200) { | 387 | if (brightness >= 200) { |
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c index 59140217890a..e100af78b166 100644 --- a/arch/arm/mach-pxa/palmld.c +++ b/arch/arm/mach-pxa/palmld.c | |||
@@ -270,7 +270,7 @@ err: | |||
270 | return ret; | 270 | return ret; |
271 | } | 271 | } |
272 | 272 | ||
273 | static int palmld_backlight_notify(int brightness) | 273 | static int palmld_backlight_notify(struct device *dev, int brightness) |
274 | { | 274 | { |
275 | gpio_set_value(GPIO_NR_PALMLD_BL_POWER, brightness); | 275 | gpio_set_value(GPIO_NR_PALMLD_BL_POWER, brightness); |
276 | gpio_set_value(GPIO_NR_PALMLD_LCD_POWER, brightness); | 276 | gpio_set_value(GPIO_NR_PALMLD_LCD_POWER, brightness); |
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c index 7f89ca20f13a..8fe3ec27568f 100644 --- a/arch/arm/mach-pxa/palmt5.c +++ b/arch/arm/mach-pxa/palmt5.c | |||
@@ -209,7 +209,7 @@ err: | |||
209 | return ret; | 209 | return ret; |
210 | } | 210 | } |
211 | 211 | ||
212 | static int palmt5_backlight_notify(int brightness) | 212 | static int palmt5_backlight_notify(struct device *dev, int brightness) |
213 | { | 213 | { |
214 | gpio_set_value(GPIO_NR_PALMT5_BL_POWER, brightness); | 214 | gpio_set_value(GPIO_NR_PALMT5_BL_POWER, brightness); |
215 | gpio_set_value(GPIO_NR_PALMT5_LCD_POWER, brightness); | 215 | gpio_set_value(GPIO_NR_PALMT5_LCD_POWER, brightness); |
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index 308417592007..b992f07ece21 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c | |||
@@ -185,7 +185,7 @@ err: | |||
185 | return ret; | 185 | return ret; |
186 | } | 186 | } |
187 | 187 | ||
188 | static int palmtc_backlight_notify(int brightness) | 188 | static int palmtc_backlight_notify(struct device *dev, int brightness) |
189 | { | 189 | { |
190 | /* backlight is on when GPIO16 AF0 is high */ | 190 | /* backlight is on when GPIO16 AF0 is high */ |
191 | gpio_set_value(GPIO_NR_PALMTC_BL_POWER, brightness); | 191 | gpio_set_value(GPIO_NR_PALMTC_BL_POWER, brightness); |
diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c index 265d62bae7de..dc728d6ab94e 100644 --- a/arch/arm/mach-pxa/palmte2.c +++ b/arch/arm/mach-pxa/palmte2.c | |||
@@ -181,7 +181,7 @@ err: | |||
181 | return ret; | 181 | return ret; |
182 | } | 182 | } |
183 | 183 | ||
184 | static int palmte2_backlight_notify(int brightness) | 184 | static int palmte2_backlight_notify(struct device *dev, int brightness) |
185 | { | 185 | { |
186 | gpio_set_value(GPIO_NR_PALMTE2_BL_POWER, brightness); | 186 | gpio_set_value(GPIO_NR_PALMTE2_BL_POWER, brightness); |
187 | gpio_set_value(GPIO_NR_PALMTE2_LCD_POWER, brightness); | 187 | gpio_set_value(GPIO_NR_PALMTE2_LCD_POWER, brightness); |
diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c index 606eb7e8a17e..b433bb496711 100644 --- a/arch/arm/mach-pxa/palmtreo.c +++ b/arch/arm/mach-pxa/palmtreo.c | |||
@@ -375,7 +375,7 @@ err: | |||
375 | return ret; | 375 | return ret; |
376 | } | 376 | } |
377 | 377 | ||
378 | static int treo_backlight_notify(int brightness) | 378 | static int treo_backlight_notify(struct device *dev, int brightness) |
379 | { | 379 | { |
380 | gpio_set_value(GPIO_NR_TREO_BL_POWER, brightness); | 380 | gpio_set_value(GPIO_NR_TREO_BL_POWER, brightness); |
381 | return TREO_MAX_INTENSITY - brightness; | 381 | return TREO_MAX_INTENSITY - brightness; |
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index 7bf18c2f002f..b37a025c0b7b 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c | |||
@@ -269,7 +269,7 @@ err: | |||
269 | return ret; | 269 | return ret; |
270 | } | 270 | } |
271 | 271 | ||
272 | static int palmtx_backlight_notify(int brightness) | 272 | static int palmtx_backlight_notify(struct device *dev, int brightness) |
273 | { | 273 | { |
274 | gpio_set_value(GPIO_NR_PALMTX_BL_POWER, brightness); | 274 | gpio_set_value(GPIO_NR_PALMTX_BL_POWER, brightness); |
275 | gpio_set_value(GPIO_NR_PALMTX_LCD_POWER, brightness); | 275 | gpio_set_value(GPIO_NR_PALMTX_LCD_POWER, brightness); |
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c index d787ac7cfdd8..1c5d68a94511 100644 --- a/arch/arm/mach-pxa/palmz72.c +++ b/arch/arm/mach-pxa/palmz72.c | |||
@@ -196,7 +196,7 @@ err: | |||
196 | return ret; | 196 | return ret; |
197 | } | 197 | } |
198 | 198 | ||
199 | static int palmz72_backlight_notify(int brightness) | 199 | static int palmz72_backlight_notify(struct device *dev, int brightness) |
200 | { | 200 | { |
201 | gpio_set_value(GPIO_NR_PALMZ72_BL_POWER, brightness); | 201 | gpio_set_value(GPIO_NR_PALMZ72_BL_POWER, brightness); |
202 | gpio_set_value(GPIO_NR_PALMZ72_LCD_POWER, brightness); | 202 | gpio_set_value(GPIO_NR_PALMZ72_LCD_POWER, brightness); |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index e5eeb3a62d01..c2b938a4d5c9 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -293,7 +293,7 @@ static struct pxamci_platform_data poodle_mci_platform_data = { | |||
293 | .init = poodle_mci_init, | 293 | .init = poodle_mci_init, |
294 | .setpower = poodle_mci_setpower, | 294 | .setpower = poodle_mci_setpower, |
295 | .exit = poodle_mci_exit, | 295 | .exit = poodle_mci_exit, |
296 | .gpio_card_detect = POODLE_IRQ_GPIO_nSD_DETECT, | 296 | .gpio_card_detect = POODLE_GPIO_nSD_DETECT, |
297 | .gpio_card_ro = POODLE_GPIO_nSD_WP, | 297 | .gpio_card_ro = POODLE_GPIO_nSD_WP, |
298 | .gpio_power = -1, | 298 | .gpio_power = -1, |
299 | }; | 299 | }; |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 4b50f144fa48..28352c0b8c34 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -389,13 +389,13 @@ static struct gpio_keys_button spitz_gpio_keys[] = { | |||
389 | .type = EV_SW, | 389 | .type = EV_SW, |
390 | .code = 0, | 390 | .code = 0, |
391 | .gpio = SPITZ_GPIO_SWA, | 391 | .gpio = SPITZ_GPIO_SWA, |
392 | .desc = "Display Down", | 392 | .desc = "Display Down", |
393 | }, | 393 | }, |
394 | { | 394 | { |
395 | .type = EV_SW, | 395 | .type = EV_SW, |
396 | .code = 1, | 396 | .code = 1, |
397 | .gpio = SPITZ_GPIO_SWB, | 397 | .gpio = SPITZ_GPIO_SWB, |
398 | .desc = "Lid Closed", | 398 | .desc = "Lid Closed", |
399 | }, | 399 | }, |
400 | }; | 400 | }; |
401 | 401 | ||
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 5352b4e5a7dd..89f258c9e126 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c | |||
@@ -379,7 +379,7 @@ err_request_bckl: | |||
379 | return ret; | 379 | return ret; |
380 | } | 380 | } |
381 | 381 | ||
382 | static int viper_backlight_notify(int brightness) | 382 | static int viper_backlight_notify(struct device *dev, int brightness) |
383 | { | 383 | { |
384 | gpio_set_value(VIPER_LCD_EN_GPIO, !!brightness); | 384 | gpio_set_value(VIPER_LCD_EN_GPIO, !!brightness); |
385 | gpio_set_value(VIPER_BCKLIGHT_EN_GPIO, !!brightness); | 385 | gpio_set_value(VIPER_BCKLIGHT_EN_GPIO, !!brightness); |
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 5b986a8bd9e6..75f2a37f945d 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/mtd/physmap.h> | 25 | #include <linux/mtd/physmap.h> |
26 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
27 | #include <linux/i2c/pca953x.h> | 27 | #include <linux/i2c/pca953x.h> |
28 | #include <linux/apm-emulation.h> | ||
28 | 29 | ||
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
@@ -626,8 +627,27 @@ static void zeus_power_off(void) | |||
626 | pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP); | 627 | pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP); |
627 | } | 628 | } |
628 | 629 | ||
629 | int zeus_get_pcb_info(struct i2c_client *client, unsigned gpio, | 630 | #ifdef CONFIG_APM_EMULATION |
630 | unsigned ngpio, void *context) | 631 | static void zeus_get_power_status(struct apm_power_info *info) |
632 | { | ||
633 | /* Power supply is always present */ | ||
634 | info->ac_line_status = APM_AC_ONLINE; | ||
635 | info->battery_status = APM_BATTERY_STATUS_NOT_PRESENT; | ||
636 | info->battery_flag = APM_BATTERY_FLAG_NOT_PRESENT; | ||
637 | } | ||
638 | |||
639 | static inline void zeus_setup_apm(void) | ||
640 | { | ||
641 | apm_get_power_status = zeus_get_power_status; | ||
642 | } | ||
643 | #else | ||
644 | static inline void zeus_setup_apm(void) | ||
645 | { | ||
646 | } | ||
647 | #endif | ||
648 | |||
649 | static int zeus_get_pcb_info(struct i2c_client *client, unsigned gpio, | ||
650 | unsigned ngpio, void *context) | ||
631 | { | 651 | { |
632 | int i; | 652 | int i; |
633 | u8 pcb_info = 0; | 653 | u8 pcb_info = 0; |
@@ -726,9 +746,18 @@ static mfp_cfg_t zeus_pin_config[] __initdata = { | |||
726 | GPIO99_GPIO, /* CF RDY */ | 746 | GPIO99_GPIO, /* CF RDY */ |
727 | }; | 747 | }; |
728 | 748 | ||
749 | /* | ||
750 | * DM9k MSCx settings: SRAM, 16 bits | ||
751 | * 17 cycles delay first access | ||
752 | * 5 cycles delay next access | ||
753 | * 13 cycles recovery time | ||
754 | * faster device | ||
755 | */ | ||
756 | #define DM9K_MSC_VALUE 0xe4c9 | ||
757 | |||
729 | static void __init zeus_init(void) | 758 | static void __init zeus_init(void) |
730 | { | 759 | { |
731 | u16 dm9000_msc = 0xe279; | 760 | u16 dm9000_msc = DM9K_MSC_VALUE; |
732 | 761 | ||
733 | system_rev = __raw_readw(ZEUS_CPLD_VERSION); | 762 | system_rev = __raw_readw(ZEUS_CPLD_VERSION); |
734 | pr_info("Zeus CPLD V%dI%d\n", (system_rev & 0xf0) >> 4, (system_rev & 0x0f)); | 763 | pr_info("Zeus CPLD V%dI%d\n", (system_rev & 0xf0) >> 4, (system_rev & 0x0f)); |
@@ -738,6 +767,7 @@ static void __init zeus_init(void) | |||
738 | MSC1 = (MSC1 & 0xffff0000) | dm9000_msc; | 767 | MSC1 = (MSC1 & 0xffff0000) | dm9000_msc; |
739 | 768 | ||
740 | pm_power_off = zeus_power_off; | 769 | pm_power_off = zeus_power_off; |
770 | zeus_setup_apm(); | ||
741 | 771 | ||
742 | pxa2xx_mfp_config(ARRAY_AND_SIZE(zeus_pin_config)); | 772 | pxa2xx_mfp_config(ARRAY_AND_SIZE(zeus_pin_config)); |
743 | 773 | ||
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index b66e9e2d06e7..2b4043c04d0c 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c | |||
@@ -36,9 +36,6 @@ | |||
36 | #include "devices.h" | 36 | #include "devices.h" |
37 | #include "generic.h" | 37 | #include "generic.h" |
38 | 38 | ||
39 | #define MAX_SLOTS 3 | ||
40 | struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS]; | ||
41 | |||
42 | int gpio_eth_irq; | 39 | int gpio_eth_irq; |
43 | int gpio_debug_led1; | 40 | int gpio_debug_led1; |
44 | int gpio_debug_led2; | 41 | int gpio_debug_led2; |
@@ -220,84 +217,28 @@ static inline void zylonite_init_lcd(void) {} | |||
220 | #endif | 217 | #endif |
221 | 218 | ||
222 | #if defined(CONFIG_MMC) | 219 | #if defined(CONFIG_MMC) |
223 | static int zylonite_mci_ro(struct device *dev) | ||
224 | { | ||
225 | struct platform_device *pdev = to_platform_device(dev); | ||
226 | |||
227 | return gpio_get_value(zylonite_mmc_slot[pdev->id].gpio_wp); | ||
228 | } | ||
229 | |||
230 | static int zylonite_mci_init(struct device *dev, | ||
231 | irq_handler_t zylonite_detect_int, | ||
232 | void *data) | ||
233 | { | ||
234 | struct platform_device *pdev = to_platform_device(dev); | ||
235 | int err, cd_irq, gpio_cd, gpio_wp; | ||
236 | |||
237 | cd_irq = gpio_to_irq(zylonite_mmc_slot[pdev->id].gpio_cd); | ||
238 | gpio_cd = zylonite_mmc_slot[pdev->id].gpio_cd; | ||
239 | gpio_wp = zylonite_mmc_slot[pdev->id].gpio_wp; | ||
240 | |||
241 | /* | ||
242 | * setup GPIO for Zylonite MMC controller | ||
243 | */ | ||
244 | err = gpio_request(gpio_cd, "mmc card detect"); | ||
245 | if (err) | ||
246 | goto err_request_cd; | ||
247 | gpio_direction_input(gpio_cd); | ||
248 | |||
249 | err = gpio_request(gpio_wp, "mmc write protect"); | ||
250 | if (err) | ||
251 | goto err_request_wp; | ||
252 | gpio_direction_input(gpio_wp); | ||
253 | |||
254 | err = request_irq(cd_irq, zylonite_detect_int, | ||
255 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, | ||
256 | "MMC card detect", data); | ||
257 | if (err) { | ||
258 | printk(KERN_ERR "%s: MMC/SD/SDIO: " | ||
259 | "can't request card detect IRQ\n", __func__); | ||
260 | goto err_request_irq; | ||
261 | } | ||
262 | |||
263 | return 0; | ||
264 | |||
265 | err_request_irq: | ||
266 | gpio_free(gpio_wp); | ||
267 | err_request_wp: | ||
268 | gpio_free(gpio_cd); | ||
269 | err_request_cd: | ||
270 | return err; | ||
271 | } | ||
272 | |||
273 | static void zylonite_mci_exit(struct device *dev, void *data) | ||
274 | { | ||
275 | struct platform_device *pdev = to_platform_device(dev); | ||
276 | int cd_irq, gpio_cd, gpio_wp; | ||
277 | |||
278 | cd_irq = gpio_to_irq(zylonite_mmc_slot[pdev->id].gpio_cd); | ||
279 | gpio_cd = zylonite_mmc_slot[pdev->id].gpio_cd; | ||
280 | gpio_wp = zylonite_mmc_slot[pdev->id].gpio_wp; | ||
281 | |||
282 | free_irq(cd_irq, data); | ||
283 | gpio_free(gpio_cd); | ||
284 | gpio_free(gpio_wp); | ||
285 | } | ||
286 | |||
287 | static struct pxamci_platform_data zylonite_mci_platform_data = { | 220 | static struct pxamci_platform_data zylonite_mci_platform_data = { |
288 | .detect_delay = 20, | 221 | .detect_delay = 20, |
289 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 222 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
290 | .init = zylonite_mci_init, | 223 | .gpio_card_detect = EXT_GPIO(0), |
291 | .exit = zylonite_mci_exit, | 224 | .gpio_card_ro = EXT_GPIO(2), |
292 | .get_ro = zylonite_mci_ro, | ||
293 | .gpio_card_detect = -1, | ||
294 | .gpio_card_ro = -1, | ||
295 | .gpio_power = -1, | 225 | .gpio_power = -1, |
296 | }; | 226 | }; |
297 | 227 | ||
298 | static struct pxamci_platform_data zylonite_mci2_platform_data = { | 228 | static struct pxamci_platform_data zylonite_mci2_platform_data = { |
299 | .detect_delay = 20, | 229 | .detect_delay = 20, |
300 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | 230 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
231 | .gpio_card_detect = EXT_GPIO(1), | ||
232 | .gpio_card_ro = EXT_GPIO(3), | ||
233 | .gpio_power = -1, | ||
234 | }; | ||
235 | |||
236 | static struct pxamci_platform_data zylonite_mci3_platform_data = { | ||
237 | .detect_delay = 20, | ||
238 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, | ||
239 | .gpio_card_detect = EXT_GPIO(30), | ||
240 | .gpio_card_ro = EXT_GPIO(31), | ||
241 | .gpio_power = -1, | ||
301 | }; | 242 | }; |
302 | 243 | ||
303 | static void __init zylonite_init_mmc(void) | 244 | static void __init zylonite_init_mmc(void) |
@@ -305,7 +246,7 @@ static void __init zylonite_init_mmc(void) | |||
305 | pxa_set_mci_info(&zylonite_mci_platform_data); | 246 | pxa_set_mci_info(&zylonite_mci_platform_data); |
306 | pxa3xx_set_mci2_info(&zylonite_mci2_platform_data); | 247 | pxa3xx_set_mci2_info(&zylonite_mci2_platform_data); |
307 | if (cpu_is_pxa310()) | 248 | if (cpu_is_pxa310()) |
308 | pxa3xx_set_mci3_info(&zylonite_mci_platform_data); | 249 | pxa3xx_set_mci3_info(&zylonite_mci3_platform_data); |
309 | } | 250 | } |
310 | #else | 251 | #else |
311 | static inline void zylonite_init_mmc(void) {} | 252 | static inline void zylonite_init_mmc(void) {} |
diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c index 84095440a878..3aa73b3e33f2 100644 --- a/arch/arm/mach-pxa/zylonite_pxa300.c +++ b/arch/arm/mach-pxa/zylonite_pxa300.c | |||
@@ -129,8 +129,8 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = { | |||
129 | GPIO22_I2C_SDA, | 129 | GPIO22_I2C_SDA, |
130 | 130 | ||
131 | /* GPIO */ | 131 | /* GPIO */ |
132 | GPIO18_GPIO, /* GPIO Expander #0 INT_N */ | 132 | GPIO18_GPIO | MFP_PULL_HIGH, /* GPIO Expander #0 INT_N */ |
133 | GPIO19_GPIO, /* GPIO Expander #1 INT_N */ | 133 | GPIO19_GPIO | MFP_PULL_HIGH, /* GPIO Expander #1 INT_N */ |
134 | }; | 134 | }; |
135 | 135 | ||
136 | static mfp_cfg_t pxa300_mfp_cfg[] __initdata = { | 136 | static mfp_cfg_t pxa300_mfp_cfg[] __initdata = { |
@@ -258,10 +258,6 @@ void __init zylonite_pxa300_init(void) | |||
258 | /* detect LCD panel */ | 258 | /* detect LCD panel */ |
259 | zylonite_detect_lcd_panel(); | 259 | zylonite_detect_lcd_panel(); |
260 | 260 | ||
261 | /* MMC card detect & write protect for controller 0 */ | ||
262 | zylonite_mmc_slot[0].gpio_cd = EXT_GPIO(0); | ||
263 | zylonite_mmc_slot[0].gpio_wp = EXT_GPIO(2); | ||
264 | |||
265 | /* WM9713 IRQ */ | 261 | /* WM9713 IRQ */ |
266 | wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO26); | 262 | wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO26); |
267 | 263 | ||
@@ -276,10 +272,6 @@ void __init zylonite_pxa300_init(void) | |||
276 | if (cpu_is_pxa310()) { | 272 | if (cpu_is_pxa310()) { |
277 | pxa3xx_mfp_config(ARRAY_AND_SIZE(pxa310_mfp_cfg)); | 273 | pxa3xx_mfp_config(ARRAY_AND_SIZE(pxa310_mfp_cfg)); |
278 | gpio_eth_irq = mfp_to_gpio(MFP_PIN_GPIO102); | 274 | gpio_eth_irq = mfp_to_gpio(MFP_PIN_GPIO102); |
279 | |||
280 | /* MMC card detect & write protect for controller 2 */ | ||
281 | zylonite_mmc_slot[2].gpio_cd = EXT_GPIO(30); | ||
282 | zylonite_mmc_slot[2].gpio_wp = EXT_GPIO(31); | ||
283 | } | 275 | } |
284 | 276 | ||
285 | /* GPIOs for Debug LEDs */ | 277 | /* GPIOs for Debug LEDs */ |
diff --git a/arch/arm/mach-pxa/zylonite_pxa320.c b/arch/arm/mach-pxa/zylonite_pxa320.c index 60d08f23f5e4..9942bac4cf7d 100644 --- a/arch/arm/mach-pxa/zylonite_pxa320.c +++ b/arch/arm/mach-pxa/zylonite_pxa320.c | |||
@@ -209,10 +209,6 @@ void __init zylonite_pxa320_init(void) | |||
209 | gpio_debug_led1 = mfp_to_gpio(MFP_PIN_GPIO1_2); | 209 | gpio_debug_led1 = mfp_to_gpio(MFP_PIN_GPIO1_2); |
210 | gpio_debug_led2 = mfp_to_gpio(MFP_PIN_GPIO4_2); | 210 | gpio_debug_led2 = mfp_to_gpio(MFP_PIN_GPIO4_2); |
211 | 211 | ||
212 | /* MMC card detect & write protect for controller 0 */ | ||
213 | zylonite_mmc_slot[0].gpio_cd = mfp_to_gpio(MFP_PIN_GPIO1); | ||
214 | zylonite_mmc_slot[0].gpio_wp = mfp_to_gpio(MFP_PIN_GPIO5); | ||
215 | |||
216 | /* WM9713 IRQ */ | 212 | /* WM9713 IRQ */ |
217 | wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO15); | 213 | wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO15); |
218 | } | 214 | } |
diff --git a/arch/arm/mach-realview/include/mach/board-pb1176.h b/arch/arm/mach-realview/include/mach/board-pb1176.h index 34b80b7d40b8..2f5ccb298858 100644 --- a/arch/arm/mach-realview/include/mach/board-pb1176.h +++ b/arch/arm/mach-realview/include/mach/board-pb1176.h | |||
@@ -74,8 +74,8 @@ | |||
74 | #define REALVIEW_PB1176_L220_BASE 0x10110000 /* L220 registers */ | 74 | #define REALVIEW_PB1176_L220_BASE 0x10110000 /* L220 registers */ |
75 | 75 | ||
76 | /* | 76 | /* |
77 | * Control register SYS_RESETCTL is set to 1 to force a soft reset | 77 | * Control register SYS_RESETCTL Bit 8 is set to 1 to force a soft reset |
78 | */ | 78 | */ |
79 | #define REALVIEW_PB1176_SYS_LOCKVAL_RSTCTL 0x0100 | 79 | #define REALVIEW_PB1176_SYS_SOFT_RESET 0x0100 |
80 | 80 | ||
81 | #endif /* __ASM_ARCH_BOARD_PB1176_H */ | 81 | #endif /* __ASM_ARCH_BOARD_PB1176_H */ |
diff --git a/arch/arm/mach-realview/include/mach/platform.h b/arch/arm/mach-realview/include/mach/platform.h index 4f46bf71e752..86c0c4435a46 100644 --- a/arch/arm/mach-realview/include/mach/platform.h +++ b/arch/arm/mach-realview/include/mach/platform.h | |||
@@ -140,7 +140,7 @@ | |||
140 | * SYS_CLD, SYS_BOOTCS | 140 | * SYS_CLD, SYS_BOOTCS |
141 | */ | 141 | */ |
142 | #define REALVIEW_SYS_LOCK_LOCKED (1 << 16) | 142 | #define REALVIEW_SYS_LOCK_LOCKED (1 << 16) |
143 | #define REALVIEW_SYS_LOCKVAL_MASK 0xA05F /* Enable write access */ | 143 | #define REALVIEW_SYS_LOCK_VAL 0xA05F /* Enable write access */ |
144 | 144 | ||
145 | /* | 145 | /* |
146 | * REALVIEW_SYS_FLASH | 146 | * REALVIEW_SYS_FLASH |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 917f8ca3abff..7d857d300558 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -381,6 +381,20 @@ static struct sys_timer realview_eb_timer = { | |||
381 | .init = realview_eb_timer_init, | 381 | .init = realview_eb_timer_init, |
382 | }; | 382 | }; |
383 | 383 | ||
384 | static void realview_eb_reset(char mode) | ||
385 | { | ||
386 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); | ||
387 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); | ||
388 | |||
389 | /* | ||
390 | * To reset, we hit the on-board reset register | ||
391 | * in the system FPGA | ||
392 | */ | ||
393 | __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); | ||
394 | if (core_tile_eb11mp()) | ||
395 | __raw_writel(0x0008, reset_ctrl); | ||
396 | } | ||
397 | |||
384 | static void __init realview_eb_init(void) | 398 | static void __init realview_eb_init(void) |
385 | { | 399 | { |
386 | int i; | 400 | int i; |
@@ -408,6 +422,7 @@ static void __init realview_eb_init(void) | |||
408 | #ifdef CONFIG_LEDS | 422 | #ifdef CONFIG_LEDS |
409 | leds_event = realview_leds_event; | 423 | leds_event = realview_leds_event; |
410 | #endif | 424 | #endif |
425 | realview_reset = realview_eb_reset; | ||
411 | } | 426 | } |
412 | 427 | ||
413 | MACHINE_START(REALVIEW_EB, "ARM-RealView EB") | 428 | MACHINE_START(REALVIEW_EB, "ARM-RealView EB") |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index 7fb726d5f8b9..44392e51dd50 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -292,12 +292,10 @@ static struct sys_timer realview_pb1176_timer = { | |||
292 | 292 | ||
293 | static void realview_pb1176_reset(char mode) | 293 | static void realview_pb1176_reset(char mode) |
294 | { | 294 | { |
295 | void __iomem *hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + | 295 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); |
296 | REALVIEW_SYS_RESETCTL_OFFSET; | 296 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); |
297 | void __iomem *rst_hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + | 297 | __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); |
298 | REALVIEW_SYS_LOCK_OFFSET; | 298 | __raw_writel(REALVIEW_PB1176_SYS_SOFT_RESET, reset_ctrl); |
299 | __raw_writel(REALVIEW_SYS_LOCKVAL_MASK, rst_hdr_ctrl); | ||
300 | __raw_writel(REALVIEW_PB1176_SYS_LOCKVAL_RSTCTL, hdr_ctrl); | ||
301 | } | 299 | } |
302 | 300 | ||
303 | static void realview_pb1176_fixup(struct machine_desc *mdesc, | 301 | static void realview_pb1176_fixup(struct machine_desc *mdesc, |
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index 9bbbfc05f225..3e02731af959 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
@@ -301,17 +301,16 @@ static struct sys_timer realview_pb11mp_timer = { | |||
301 | 301 | ||
302 | static void realview_pb11mp_reset(char mode) | 302 | static void realview_pb11mp_reset(char mode) |
303 | { | 303 | { |
304 | void __iomem *hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + | 304 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); |
305 | REALVIEW_SYS_RESETCTL_OFFSET; | 305 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); |
306 | unsigned int val; | ||
307 | 306 | ||
308 | /* | 307 | /* |
309 | * To reset, we hit the on-board reset register | 308 | * To reset, we hit the on-board reset register |
310 | * in the system FPGA | 309 | * in the system FPGA |
311 | */ | 310 | */ |
312 | val = __raw_readl(hdr_ctrl); | 311 | __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); |
313 | val |= REALVIEW_PB11MP_SYS_CTRL_RESET_CONFIGCLR; | 312 | __raw_writel(0x0000, reset_ctrl); |
314 | __raw_writel(val, hdr_ctrl); | 313 | __raw_writel(0x0004, reset_ctrl); |
315 | } | 314 | } |
316 | 315 | ||
317 | static void __init realview_pb11mp_init(void) | 316 | static void __init realview_pb11mp_init(void) |
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index fe861e96c566..fe4e25c4201a 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
@@ -272,6 +272,20 @@ static struct sys_timer realview_pba8_timer = { | |||
272 | .init = realview_pba8_timer_init, | 272 | .init = realview_pba8_timer_init, |
273 | }; | 273 | }; |
274 | 274 | ||
275 | static void realview_pba8_reset(char mode) | ||
276 | { | ||
277 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); | ||
278 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); | ||
279 | |||
280 | /* | ||
281 | * To reset, we hit the on-board reset register | ||
282 | * in the system FPGA | ||
283 | */ | ||
284 | __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); | ||
285 | __raw_writel(0x0000, reset_ctrl); | ||
286 | __raw_writel(0x0004, reset_ctrl); | ||
287 | } | ||
288 | |||
275 | static void __init realview_pba8_init(void) | 289 | static void __init realview_pba8_init(void) |
276 | { | 290 | { |
277 | int i; | 291 | int i; |
@@ -291,6 +305,7 @@ static void __init realview_pba8_init(void) | |||
291 | #ifdef CONFIG_LEDS | 305 | #ifdef CONFIG_LEDS |
292 | leds_event = realview_leds_event; | 306 | leds_event = realview_leds_event; |
293 | #endif | 307 | #endif |
308 | realview_reset = realview_pba8_reset; | ||
294 | } | 309 | } |
295 | 310 | ||
296 | MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") | 311 | MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") |
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index ec39488e2b42..a21a4b395f73 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c | |||
@@ -324,6 +324,20 @@ static void realview_pbx_fixup(struct machine_desc *mdesc, struct tag *tags, | |||
324 | #endif | 324 | #endif |
325 | } | 325 | } |
326 | 326 | ||
327 | static void realview_pbx_reset(char mode) | ||
328 | { | ||
329 | void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); | ||
330 | void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); | ||
331 | |||
332 | /* | ||
333 | * To reset, we hit the on-board reset register | ||
334 | * in the system FPGA | ||
335 | */ | ||
336 | __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); | ||
337 | __raw_writel(0x0000, reset_ctrl); | ||
338 | __raw_writel(0x0004, reset_ctrl); | ||
339 | } | ||
340 | |||
327 | static void __init realview_pbx_init(void) | 341 | static void __init realview_pbx_init(void) |
328 | { | 342 | { |
329 | int i; | 343 | int i; |
@@ -358,6 +372,7 @@ static void __init realview_pbx_init(void) | |||
358 | #ifdef CONFIG_LEDS | 372 | #ifdef CONFIG_LEDS |
359 | leds_event = realview_leds_event; | 373 | leds_event = realview_leds_event; |
360 | #endif | 374 | #endif |
375 | realview_reset = realview_pbx_reset; | ||
361 | } | 376 | } |
362 | 377 | ||
363 | MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") | 378 | MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") |
diff --git a/arch/arm/mach-s3c2440/mach-mini2440.c b/arch/arm/mach-s3c2440/mach-mini2440.c index 547d4fc99131..2068e9096a43 100644 --- a/arch/arm/mach-s3c2440/mach-mini2440.c +++ b/arch/arm/mach-s3c2440/mach-mini2440.c | |||
@@ -288,7 +288,7 @@ static struct s3c2410_platform_nand mini2440_nand_info __initdata = { | |||
288 | 288 | ||
289 | /* DM9000AEP 10/100 ethernet controller */ | 289 | /* DM9000AEP 10/100 ethernet controller */ |
290 | 290 | ||
291 | static struct resource mini2440_dm9k_resource[] __initdata = { | 291 | static struct resource mini2440_dm9k_resource[] = { |
292 | [0] = { | 292 | [0] = { |
293 | .start = MACH_MINI2440_DM9K_BASE, | 293 | .start = MACH_MINI2440_DM9K_BASE, |
294 | .end = MACH_MINI2440_DM9K_BASE + 3, | 294 | .end = MACH_MINI2440_DM9K_BASE + 3, |
@@ -310,11 +310,11 @@ static struct resource mini2440_dm9k_resource[] __initdata = { | |||
310 | * The DM9000 has no eeprom, and it's MAC address is set by | 310 | * The DM9000 has no eeprom, and it's MAC address is set by |
311 | * the bootloader before starting the kernel. | 311 | * the bootloader before starting the kernel. |
312 | */ | 312 | */ |
313 | static struct dm9000_plat_data mini2440_dm9k_pdata __initdata = { | 313 | static struct dm9000_plat_data mini2440_dm9k_pdata = { |
314 | .flags = (DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM), | 314 | .flags = (DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM), |
315 | }; | 315 | }; |
316 | 316 | ||
317 | static struct platform_device mini2440_device_eth __initdata = { | 317 | static struct platform_device mini2440_device_eth = { |
318 | .name = "dm9000", | 318 | .name = "dm9000", |
319 | .id = -1, | 319 | .id = -1, |
320 | .num_resources = ARRAY_SIZE(mini2440_dm9k_resource), | 320 | .num_resources = ARRAY_SIZE(mini2440_dm9k_resource), |
@@ -341,7 +341,7 @@ static struct platform_device mini2440_device_eth __initdata = { | |||
341 | * | | +----+ +----+ | 341 | * | | +----+ +----+ |
342 | * ..... | 342 | * ..... |
343 | */ | 343 | */ |
344 | static struct gpio_keys_button mini2440_buttons[] __initdata = { | 344 | static struct gpio_keys_button mini2440_buttons[] = { |
345 | { | 345 | { |
346 | .gpio = S3C2410_GPG(0), /* K1 */ | 346 | .gpio = S3C2410_GPG(0), /* K1 */ |
347 | .code = KEY_F1, | 347 | .code = KEY_F1, |
@@ -384,12 +384,12 @@ static struct gpio_keys_button mini2440_buttons[] __initdata = { | |||
384 | #endif | 384 | #endif |
385 | }; | 385 | }; |
386 | 386 | ||
387 | static struct gpio_keys_platform_data mini2440_button_data __initdata = { | 387 | static struct gpio_keys_platform_data mini2440_button_data = { |
388 | .buttons = mini2440_buttons, | 388 | .buttons = mini2440_buttons, |
389 | .nbuttons = ARRAY_SIZE(mini2440_buttons), | 389 | .nbuttons = ARRAY_SIZE(mini2440_buttons), |
390 | }; | 390 | }; |
391 | 391 | ||
392 | static struct platform_device mini2440_button_device __initdata = { | 392 | static struct platform_device mini2440_button_device = { |
393 | .name = "gpio-keys", | 393 | .name = "gpio-keys", |
394 | .id = -1, | 394 | .id = -1, |
395 | .dev = { | 395 | .dev = { |
@@ -399,41 +399,41 @@ static struct platform_device mini2440_button_device __initdata = { | |||
399 | 399 | ||
400 | /* LEDS */ | 400 | /* LEDS */ |
401 | 401 | ||
402 | static struct s3c24xx_led_platdata mini2440_led1_pdata __initdata = { | 402 | static struct s3c24xx_led_platdata mini2440_led1_pdata = { |
403 | .name = "led1", | 403 | .name = "led1", |
404 | .gpio = S3C2410_GPB(5), | 404 | .gpio = S3C2410_GPB(5), |
405 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, | 405 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, |
406 | .def_trigger = "heartbeat", | 406 | .def_trigger = "heartbeat", |
407 | }; | 407 | }; |
408 | 408 | ||
409 | static struct s3c24xx_led_platdata mini2440_led2_pdata __initdata = { | 409 | static struct s3c24xx_led_platdata mini2440_led2_pdata = { |
410 | .name = "led2", | 410 | .name = "led2", |
411 | .gpio = S3C2410_GPB(6), | 411 | .gpio = S3C2410_GPB(6), |
412 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, | 412 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, |
413 | .def_trigger = "nand-disk", | 413 | .def_trigger = "nand-disk", |
414 | }; | 414 | }; |
415 | 415 | ||
416 | static struct s3c24xx_led_platdata mini2440_led3_pdata __initdata = { | 416 | static struct s3c24xx_led_platdata mini2440_led3_pdata = { |
417 | .name = "led3", | 417 | .name = "led3", |
418 | .gpio = S3C2410_GPB(7), | 418 | .gpio = S3C2410_GPB(7), |
419 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, | 419 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, |
420 | .def_trigger = "mmc0", | 420 | .def_trigger = "mmc0", |
421 | }; | 421 | }; |
422 | 422 | ||
423 | static struct s3c24xx_led_platdata mini2440_led4_pdata __initdata = { | 423 | static struct s3c24xx_led_platdata mini2440_led4_pdata = { |
424 | .name = "led4", | 424 | .name = "led4", |
425 | .gpio = S3C2410_GPB(8), | 425 | .gpio = S3C2410_GPB(8), |
426 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, | 426 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, |
427 | .def_trigger = "", | 427 | .def_trigger = "", |
428 | }; | 428 | }; |
429 | 429 | ||
430 | static struct s3c24xx_led_platdata mini2440_led_backlight_pdata __initdata = { | 430 | static struct s3c24xx_led_platdata mini2440_led_backlight_pdata = { |
431 | .name = "backlight", | 431 | .name = "backlight", |
432 | .gpio = S3C2410_GPG(4), | 432 | .gpio = S3C2410_GPG(4), |
433 | .def_trigger = "backlight", | 433 | .def_trigger = "backlight", |
434 | }; | 434 | }; |
435 | 435 | ||
436 | static struct platform_device mini2440_led1 __initdata = { | 436 | static struct platform_device mini2440_led1 = { |
437 | .name = "s3c24xx_led", | 437 | .name = "s3c24xx_led", |
438 | .id = 1, | 438 | .id = 1, |
439 | .dev = { | 439 | .dev = { |
@@ -441,7 +441,7 @@ static struct platform_device mini2440_led1 __initdata = { | |||
441 | }, | 441 | }, |
442 | }; | 442 | }; |
443 | 443 | ||
444 | static struct platform_device mini2440_led2 __initdata = { | 444 | static struct platform_device mini2440_led2 = { |
445 | .name = "s3c24xx_led", | 445 | .name = "s3c24xx_led", |
446 | .id = 2, | 446 | .id = 2, |
447 | .dev = { | 447 | .dev = { |
@@ -449,7 +449,7 @@ static struct platform_device mini2440_led2 __initdata = { | |||
449 | }, | 449 | }, |
450 | }; | 450 | }; |
451 | 451 | ||
452 | static struct platform_device mini2440_led3 __initdata = { | 452 | static struct platform_device mini2440_led3 = { |
453 | .name = "s3c24xx_led", | 453 | .name = "s3c24xx_led", |
454 | .id = 3, | 454 | .id = 3, |
455 | .dev = { | 455 | .dev = { |
@@ -457,7 +457,7 @@ static struct platform_device mini2440_led3 __initdata = { | |||
457 | }, | 457 | }, |
458 | }; | 458 | }; |
459 | 459 | ||
460 | static struct platform_device mini2440_led4 __initdata = { | 460 | static struct platform_device mini2440_led4 = { |
461 | .name = "s3c24xx_led", | 461 | .name = "s3c24xx_led", |
462 | .id = 4, | 462 | .id = 4, |
463 | .dev = { | 463 | .dev = { |
@@ -465,7 +465,7 @@ static struct platform_device mini2440_led4 __initdata = { | |||
465 | }, | 465 | }, |
466 | }; | 466 | }; |
467 | 467 | ||
468 | static struct platform_device mini2440_led_backlight __initdata = { | 468 | static struct platform_device mini2440_led_backlight = { |
469 | .name = "s3c24xx_led", | 469 | .name = "s3c24xx_led", |
470 | .id = 5, | 470 | .id = 5, |
471 | .dev = { | 471 | .dev = { |
@@ -475,14 +475,14 @@ static struct platform_device mini2440_led_backlight __initdata = { | |||
475 | 475 | ||
476 | /* AUDIO */ | 476 | /* AUDIO */ |
477 | 477 | ||
478 | static struct s3c24xx_uda134x_platform_data mini2440_audio_pins __initdata = { | 478 | static struct s3c24xx_uda134x_platform_data mini2440_audio_pins = { |
479 | .l3_clk = S3C2410_GPB(4), | 479 | .l3_clk = S3C2410_GPB(4), |
480 | .l3_mode = S3C2410_GPB(2), | 480 | .l3_mode = S3C2410_GPB(2), |
481 | .l3_data = S3C2410_GPB(3), | 481 | .l3_data = S3C2410_GPB(3), |
482 | .model = UDA134X_UDA1341 | 482 | .model = UDA134X_UDA1341 |
483 | }; | 483 | }; |
484 | 484 | ||
485 | static struct platform_device mini2440_audio __initdata = { | 485 | static struct platform_device mini2440_audio = { |
486 | .name = "s3c24xx_uda134x", | 486 | .name = "s3c24xx_uda134x", |
487 | .id = 0, | 487 | .id = 0, |
488 | .dev = { | 488 | .dev = { |
diff --git a/arch/arm/mach-s3c6410/mach-smdk6410.c b/arch/arm/mach-s3c6410/mach-smdk6410.c index 480d297c1de2..8969fe73b83f 100644 --- a/arch/arm/mach-s3c6410/mach-smdk6410.c +++ b/arch/arm/mach-s3c6410/mach-smdk6410.c | |||
@@ -211,6 +211,7 @@ static struct fixed_voltage_config smdk6410_b_pwr_5v_pdata = { | |||
211 | .supply_name = "B_PWR_5V", | 211 | .supply_name = "B_PWR_5V", |
212 | .microvolts = 5000000, | 212 | .microvolts = 5000000, |
213 | .init_data = &smdk6410_b_pwr_5v_data, | 213 | .init_data = &smdk6410_b_pwr_5v_data, |
214 | .gpio = -EINVAL, | ||
214 | }; | 215 | }; |
215 | 216 | ||
216 | static struct platform_device smdk6410_b_pwr_5v = { | 217 | static struct platform_device smdk6410_b_pwr_5v = { |
diff --git a/arch/arm/mach-u300/clock.c b/arch/arm/mach-u300/clock.c index 111f7ea32b38..36ffd6a8b34c 100644 --- a/arch/arm/mach-u300/clock.c +++ b/arch/arm/mach-u300/clock.c | |||
@@ -610,34 +610,34 @@ EXPORT_SYMBOL(clk_get_rate); | |||
610 | 610 | ||
611 | static unsigned long clk_round_rate_mclk(struct clk *clk, unsigned long rate) | 611 | static unsigned long clk_round_rate_mclk(struct clk *clk, unsigned long rate) |
612 | { | 612 | { |
613 | if (rate >= 18900000) | 613 | if (rate <= 18900000) |
614 | return 18900000; | 614 | return 18900000; |
615 | if (rate >= 20800000) | 615 | if (rate <= 20800000) |
616 | return 20800000; | 616 | return 20800000; |
617 | if (rate >= 23100000) | 617 | if (rate <= 23100000) |
618 | return 23100000; | 618 | return 23100000; |
619 | if (rate >= 26000000) | 619 | if (rate <= 26000000) |
620 | return 26000000; | 620 | return 26000000; |
621 | if (rate >= 29700000) | 621 | if (rate <= 29700000) |
622 | return 29700000; | 622 | return 29700000; |
623 | if (rate >= 34700000) | 623 | if (rate <= 34700000) |
624 | return 34700000; | 624 | return 34700000; |
625 | if (rate >= 41600000) | 625 | if (rate <= 41600000) |
626 | return 41600000; | 626 | return 41600000; |
627 | if (rate >= 52000000) | 627 | if (rate <= 52000000) |
628 | return 52000000; | 628 | return 52000000; |
629 | return -EINVAL; | 629 | return -EINVAL; |
630 | } | 630 | } |
631 | 631 | ||
632 | static unsigned long clk_round_rate_cpuclk(struct clk *clk, unsigned long rate) | 632 | static unsigned long clk_round_rate_cpuclk(struct clk *clk, unsigned long rate) |
633 | { | 633 | { |
634 | if (rate >= 13000000) | 634 | if (rate <= 13000000) |
635 | return 13000000; | 635 | return 13000000; |
636 | if (rate >= 52000000) | 636 | if (rate <= 52000000) |
637 | return 52000000; | 637 | return 52000000; |
638 | if (rate >= 104000000) | 638 | if (rate <= 104000000) |
639 | return 104000000; | 639 | return 104000000; |
640 | if (rate >= 208000000) | 640 | if (rate <= 208000000) |
641 | return 208000000; | 641 | return 208000000; |
642 | return -EINVAL; | 642 | return -EINVAL; |
643 | } | 643 | } |
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index 653e25be3dd8..01b50313914c 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * arch/arm/mach-u300/core.c | 3 | * arch/arm/mach-u300/core.c |
4 | * | 4 | * |
5 | * | 5 | * |
6 | * Copyright (C) 2007-2009 ST-Ericsson AB | 6 | * Copyright (C) 2007-2010 ST-Ericsson AB |
7 | * License terms: GNU General Public License (GPL) version 2 | 7 | * License terms: GNU General Public License (GPL) version 2 |
8 | * Core platform support, IRQ handling and device definitions. | 8 | * Core platform support, IRQ handling and device definitions. |
9 | * Author: Linus Walleij <linus.walleij@stericsson.com> | 9 | * Author: Linus Walleij <linus.walleij@stericsson.com> |
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/amba/bus.h> | 19 | #include <linux/amba/bus.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <mach/coh901318.h> | ||
22 | 23 | ||
23 | #include <asm/types.h> | 24 | #include <asm/types.h> |
24 | #include <asm/setup.h> | 25 | #include <asm/setup.h> |
@@ -29,6 +30,7 @@ | |||
29 | 30 | ||
30 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
31 | #include <mach/syscon.h> | 32 | #include <mach/syscon.h> |
33 | #include <mach/dma_channels.h> | ||
32 | 34 | ||
33 | #include "clock.h" | 35 | #include "clock.h" |
34 | #include "mmc.h" | 36 | #include "mmc.h" |
@@ -372,8 +374,1019 @@ static struct resource ave_resources[] = { | |||
372 | }, | 374 | }, |
373 | }; | 375 | }; |
374 | 376 | ||
377 | static struct resource dma_resource[] = { | ||
378 | { | ||
379 | .start = U300_DMAC_BASE, | ||
380 | .end = U300_DMAC_BASE + PAGE_SIZE - 1, | ||
381 | .flags = IORESOURCE_MEM, | ||
382 | }, | ||
383 | { | ||
384 | .start = IRQ_U300_DMA, | ||
385 | .end = IRQ_U300_DMA, | ||
386 | .flags = IORESOURCE_IRQ, | ||
387 | } | ||
388 | }; | ||
389 | |||
390 | #ifdef CONFIG_MACH_U300_BS335 | ||
391 | /* points out all dma slave channels. | ||
392 | * Syntax is [A1, B1, A2, B2, .... ,-1,-1] | ||
393 | * Select all channels from A to B, end of list is marked with -1,-1 | ||
394 | */ | ||
395 | static int dma_slave_channels[] = { | ||
396 | U300_DMA_MSL_TX_0, U300_DMA_SPI_RX, | ||
397 | U300_DMA_UART1_TX, U300_DMA_UART1_RX, -1, -1}; | ||
398 | |||
399 | /* points out all dma memcpy channels. */ | ||
400 | static int dma_memcpy_channels[] = { | ||
401 | U300_DMA_GENERAL_PURPOSE_0, U300_DMA_GENERAL_PURPOSE_8, -1, -1}; | ||
402 | |||
403 | #else /* CONFIG_MACH_U300_BS335 */ | ||
404 | |||
405 | static int dma_slave_channels[] = {U300_DMA_MSL_TX_0, U300_DMA_SPI_RX, -1, -1}; | ||
406 | static int dma_memcpy_channels[] = { | ||
407 | U300_DMA_GENERAL_PURPOSE_0, U300_DMA_GENERAL_PURPOSE_10, -1, -1}; | ||
408 | |||
409 | #endif | ||
410 | |||
411 | /** register dma for memory access | ||
412 | * | ||
413 | * active 1 means dma intends to access memory | ||
414 | * 0 means dma wont access memory | ||
415 | */ | ||
416 | static void coh901318_access_memory_state(struct device *dev, bool active) | ||
417 | { | ||
418 | } | ||
419 | |||
420 | #define flags_memcpy_config (COH901318_CX_CFG_CH_DISABLE | \ | ||
421 | COH901318_CX_CFG_RM_MEMORY_TO_MEMORY | \ | ||
422 | COH901318_CX_CFG_LCR_DISABLE | \ | ||
423 | COH901318_CX_CFG_TC_IRQ_ENABLE | \ | ||
424 | COH901318_CX_CFG_BE_IRQ_ENABLE) | ||
425 | #define flags_memcpy_lli_chained (COH901318_CX_CTRL_TC_ENABLE | \ | ||
426 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | \ | ||
427 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | \ | ||
428 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | \ | ||
429 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | \ | ||
430 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | \ | ||
431 | COH901318_CX_CTRL_MASTER_MODE_M1RW | \ | ||
432 | COH901318_CX_CTRL_TCP_DISABLE | \ | ||
433 | COH901318_CX_CTRL_TC_IRQ_DISABLE | \ | ||
434 | COH901318_CX_CTRL_HSP_DISABLE | \ | ||
435 | COH901318_CX_CTRL_HSS_DISABLE | \ | ||
436 | COH901318_CX_CTRL_DDMA_LEGACY | \ | ||
437 | COH901318_CX_CTRL_PRDD_SOURCE) | ||
438 | #define flags_memcpy_lli (COH901318_CX_CTRL_TC_ENABLE | \ | ||
439 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | \ | ||
440 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | \ | ||
441 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | \ | ||
442 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | \ | ||
443 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | \ | ||
444 | COH901318_CX_CTRL_MASTER_MODE_M1RW | \ | ||
445 | COH901318_CX_CTRL_TCP_DISABLE | \ | ||
446 | COH901318_CX_CTRL_TC_IRQ_DISABLE | \ | ||
447 | COH901318_CX_CTRL_HSP_DISABLE | \ | ||
448 | COH901318_CX_CTRL_HSS_DISABLE | \ | ||
449 | COH901318_CX_CTRL_DDMA_LEGACY | \ | ||
450 | COH901318_CX_CTRL_PRDD_SOURCE) | ||
451 | #define flags_memcpy_lli_last (COH901318_CX_CTRL_TC_ENABLE | \ | ||
452 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | \ | ||
453 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | \ | ||
454 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | \ | ||
455 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | \ | ||
456 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | \ | ||
457 | COH901318_CX_CTRL_MASTER_MODE_M1RW | \ | ||
458 | COH901318_CX_CTRL_TCP_DISABLE | \ | ||
459 | COH901318_CX_CTRL_TC_IRQ_ENABLE | \ | ||
460 | COH901318_CX_CTRL_HSP_DISABLE | \ | ||
461 | COH901318_CX_CTRL_HSS_DISABLE | \ | ||
462 | COH901318_CX_CTRL_DDMA_LEGACY | \ | ||
463 | COH901318_CX_CTRL_PRDD_SOURCE) | ||
464 | |||
465 | const struct coh_dma_channel chan_config[U300_DMA_CHANNELS] = { | ||
466 | { | ||
467 | .number = U300_DMA_MSL_TX_0, | ||
468 | .name = "MSL TX 0", | ||
469 | .priority_high = 0, | ||
470 | .dev_addr = U300_MSL_BASE + 0 * 0x40 + 0x20, | ||
471 | }, | ||
472 | { | ||
473 | .number = U300_DMA_MSL_TX_1, | ||
474 | .name = "MSL TX 1", | ||
475 | .priority_high = 0, | ||
476 | .dev_addr = U300_MSL_BASE + 1 * 0x40 + 0x20, | ||
477 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
478 | COH901318_CX_CFG_LCR_DISABLE | | ||
479 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
480 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
481 | .param.ctrl_lli_chained = 0 | | ||
482 | COH901318_CX_CTRL_TC_ENABLE | | ||
483 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
484 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
485 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
486 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
487 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
488 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
489 | COH901318_CX_CTRL_TCP_DISABLE | | ||
490 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
491 | COH901318_CX_CTRL_HSP_ENABLE | | ||
492 | COH901318_CX_CTRL_HSS_DISABLE | | ||
493 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
494 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
495 | .param.ctrl_lli = 0 | | ||
496 | COH901318_CX_CTRL_TC_ENABLE | | ||
497 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
498 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
499 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
500 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
501 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
502 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
503 | COH901318_CX_CTRL_TCP_ENABLE | | ||
504 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
505 | COH901318_CX_CTRL_HSP_ENABLE | | ||
506 | COH901318_CX_CTRL_HSS_DISABLE | | ||
507 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
508 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
509 | .param.ctrl_lli_last = 0 | | ||
510 | COH901318_CX_CTRL_TC_ENABLE | | ||
511 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
512 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
513 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
514 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
515 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
516 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
517 | COH901318_CX_CTRL_TCP_ENABLE | | ||
518 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
519 | COH901318_CX_CTRL_HSP_ENABLE | | ||
520 | COH901318_CX_CTRL_HSS_DISABLE | | ||
521 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
522 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
523 | }, | ||
524 | { | ||
525 | .number = U300_DMA_MSL_TX_2, | ||
526 | .name = "MSL TX 2", | ||
527 | .priority_high = 0, | ||
528 | .dev_addr = U300_MSL_BASE + 2 * 0x40 + 0x20, | ||
529 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
530 | COH901318_CX_CFG_LCR_DISABLE | | ||
531 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
532 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
533 | .param.ctrl_lli_chained = 0 | | ||
534 | COH901318_CX_CTRL_TC_ENABLE | | ||
535 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
536 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
537 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
538 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
539 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
540 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
541 | COH901318_CX_CTRL_TCP_DISABLE | | ||
542 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
543 | COH901318_CX_CTRL_HSP_ENABLE | | ||
544 | COH901318_CX_CTRL_HSS_DISABLE | | ||
545 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
546 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
547 | .param.ctrl_lli = 0 | | ||
548 | COH901318_CX_CTRL_TC_ENABLE | | ||
549 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
550 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
551 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
552 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
553 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
554 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
555 | COH901318_CX_CTRL_TCP_ENABLE | | ||
556 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
557 | COH901318_CX_CTRL_HSP_ENABLE | | ||
558 | COH901318_CX_CTRL_HSS_DISABLE | | ||
559 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
560 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
561 | .param.ctrl_lli_last = 0 | | ||
562 | COH901318_CX_CTRL_TC_ENABLE | | ||
563 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
564 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
565 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
566 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
567 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
568 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
569 | COH901318_CX_CTRL_TCP_ENABLE | | ||
570 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
571 | COH901318_CX_CTRL_HSP_ENABLE | | ||
572 | COH901318_CX_CTRL_HSS_DISABLE | | ||
573 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
574 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
575 | .desc_nbr_max = 10, | ||
576 | }, | ||
577 | { | ||
578 | .number = U300_DMA_MSL_TX_3, | ||
579 | .name = "MSL TX 3", | ||
580 | .priority_high = 0, | ||
581 | .dev_addr = U300_MSL_BASE + 3 * 0x40 + 0x20, | ||
582 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
583 | COH901318_CX_CFG_LCR_DISABLE | | ||
584 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
585 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
586 | .param.ctrl_lli_chained = 0 | | ||
587 | COH901318_CX_CTRL_TC_ENABLE | | ||
588 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
589 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
590 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
591 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
592 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
593 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
594 | COH901318_CX_CTRL_TCP_DISABLE | | ||
595 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
596 | COH901318_CX_CTRL_HSP_ENABLE | | ||
597 | COH901318_CX_CTRL_HSS_DISABLE | | ||
598 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
599 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
600 | .param.ctrl_lli = 0 | | ||
601 | COH901318_CX_CTRL_TC_ENABLE | | ||
602 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
603 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
604 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
605 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
606 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
607 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
608 | COH901318_CX_CTRL_TCP_ENABLE | | ||
609 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
610 | COH901318_CX_CTRL_HSP_ENABLE | | ||
611 | COH901318_CX_CTRL_HSS_DISABLE | | ||
612 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
613 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
614 | .param.ctrl_lli_last = 0 | | ||
615 | COH901318_CX_CTRL_TC_ENABLE | | ||
616 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
617 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
618 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
619 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
620 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
621 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
622 | COH901318_CX_CTRL_TCP_ENABLE | | ||
623 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
624 | COH901318_CX_CTRL_HSP_ENABLE | | ||
625 | COH901318_CX_CTRL_HSS_DISABLE | | ||
626 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
627 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
628 | }, | ||
629 | { | ||
630 | .number = U300_DMA_MSL_TX_4, | ||
631 | .name = "MSL TX 4", | ||
632 | .priority_high = 0, | ||
633 | .dev_addr = U300_MSL_BASE + 4 * 0x40 + 0x20, | ||
634 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
635 | COH901318_CX_CFG_LCR_DISABLE | | ||
636 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
637 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
638 | .param.ctrl_lli_chained = 0 | | ||
639 | COH901318_CX_CTRL_TC_ENABLE | | ||
640 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
641 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
642 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
643 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
644 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
645 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
646 | COH901318_CX_CTRL_TCP_DISABLE | | ||
647 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
648 | COH901318_CX_CTRL_HSP_ENABLE | | ||
649 | COH901318_CX_CTRL_HSS_DISABLE | | ||
650 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
651 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
652 | .param.ctrl_lli = 0 | | ||
653 | COH901318_CX_CTRL_TC_ENABLE | | ||
654 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
655 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
656 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
657 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
658 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
659 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
660 | COH901318_CX_CTRL_TCP_ENABLE | | ||
661 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
662 | COH901318_CX_CTRL_HSP_ENABLE | | ||
663 | COH901318_CX_CTRL_HSS_DISABLE | | ||
664 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
665 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
666 | .param.ctrl_lli_last = 0 | | ||
667 | COH901318_CX_CTRL_TC_ENABLE | | ||
668 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
669 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
670 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
671 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
672 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
673 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
674 | COH901318_CX_CTRL_TCP_ENABLE | | ||
675 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
676 | COH901318_CX_CTRL_HSP_ENABLE | | ||
677 | COH901318_CX_CTRL_HSS_DISABLE | | ||
678 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
679 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
680 | }, | ||
681 | { | ||
682 | .number = U300_DMA_MSL_TX_5, | ||
683 | .name = "MSL TX 5", | ||
684 | .priority_high = 0, | ||
685 | .dev_addr = U300_MSL_BASE + 5 * 0x40 + 0x20, | ||
686 | }, | ||
687 | { | ||
688 | .number = U300_DMA_MSL_TX_6, | ||
689 | .name = "MSL TX 6", | ||
690 | .priority_high = 0, | ||
691 | .dev_addr = U300_MSL_BASE + 6 * 0x40 + 0x20, | ||
692 | }, | ||
693 | { | ||
694 | .number = U300_DMA_MSL_RX_0, | ||
695 | .name = "MSL RX 0", | ||
696 | .priority_high = 0, | ||
697 | .dev_addr = U300_MSL_BASE + 0 * 0x40 + 0x220, | ||
698 | }, | ||
699 | { | ||
700 | .number = U300_DMA_MSL_RX_1, | ||
701 | .name = "MSL RX 1", | ||
702 | .priority_high = 0, | ||
703 | .dev_addr = U300_MSL_BASE + 1 * 0x40 + 0x220, | ||
704 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
705 | COH901318_CX_CFG_LCR_DISABLE | | ||
706 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
707 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
708 | .param.ctrl_lli_chained = 0 | | ||
709 | COH901318_CX_CTRL_TC_ENABLE | | ||
710 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
711 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
712 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
713 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
714 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
715 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
716 | COH901318_CX_CTRL_TCP_DISABLE | | ||
717 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
718 | COH901318_CX_CTRL_HSP_ENABLE | | ||
719 | COH901318_CX_CTRL_HSS_DISABLE | | ||
720 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
721 | COH901318_CX_CTRL_PRDD_DEST, | ||
722 | .param.ctrl_lli = 0, | ||
723 | .param.ctrl_lli_last = 0 | | ||
724 | COH901318_CX_CTRL_TC_ENABLE | | ||
725 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
726 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
727 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
728 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
729 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
730 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
731 | COH901318_CX_CTRL_TCP_DISABLE | | ||
732 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
733 | COH901318_CX_CTRL_HSP_ENABLE | | ||
734 | COH901318_CX_CTRL_HSS_DISABLE | | ||
735 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
736 | COH901318_CX_CTRL_PRDD_DEST, | ||
737 | }, | ||
738 | { | ||
739 | .number = U300_DMA_MSL_RX_2, | ||
740 | .name = "MSL RX 2", | ||
741 | .priority_high = 0, | ||
742 | .dev_addr = U300_MSL_BASE + 2 * 0x40 + 0x220, | ||
743 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
744 | COH901318_CX_CFG_LCR_DISABLE | | ||
745 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
746 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
747 | .param.ctrl_lli_chained = 0 | | ||
748 | COH901318_CX_CTRL_TC_ENABLE | | ||
749 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
750 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
751 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
752 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
753 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
754 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
755 | COH901318_CX_CTRL_TCP_DISABLE | | ||
756 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
757 | COH901318_CX_CTRL_HSP_ENABLE | | ||
758 | COH901318_CX_CTRL_HSS_DISABLE | | ||
759 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
760 | COH901318_CX_CTRL_PRDD_DEST, | ||
761 | .param.ctrl_lli = 0 | | ||
762 | COH901318_CX_CTRL_TC_ENABLE | | ||
763 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
764 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
765 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
766 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
767 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
768 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
769 | COH901318_CX_CTRL_TCP_DISABLE | | ||
770 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
771 | COH901318_CX_CTRL_HSP_ENABLE | | ||
772 | COH901318_CX_CTRL_HSS_DISABLE | | ||
773 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
774 | COH901318_CX_CTRL_PRDD_DEST, | ||
775 | .param.ctrl_lli_last = 0 | | ||
776 | COH901318_CX_CTRL_TC_ENABLE | | ||
777 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
778 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
779 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
780 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
781 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
782 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
783 | COH901318_CX_CTRL_TCP_DISABLE | | ||
784 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
785 | COH901318_CX_CTRL_HSP_ENABLE | | ||
786 | COH901318_CX_CTRL_HSS_DISABLE | | ||
787 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
788 | COH901318_CX_CTRL_PRDD_DEST, | ||
789 | }, | ||
790 | { | ||
791 | .number = U300_DMA_MSL_RX_3, | ||
792 | .name = "MSL RX 3", | ||
793 | .priority_high = 0, | ||
794 | .dev_addr = U300_MSL_BASE + 3 * 0x40 + 0x220, | ||
795 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
796 | COH901318_CX_CFG_LCR_DISABLE | | ||
797 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
798 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
799 | .param.ctrl_lli_chained = 0 | | ||
800 | COH901318_CX_CTRL_TC_ENABLE | | ||
801 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
802 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
803 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
804 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
805 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
806 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
807 | COH901318_CX_CTRL_TCP_DISABLE | | ||
808 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
809 | COH901318_CX_CTRL_HSP_ENABLE | | ||
810 | COH901318_CX_CTRL_HSS_DISABLE | | ||
811 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
812 | COH901318_CX_CTRL_PRDD_DEST, | ||
813 | .param.ctrl_lli = 0 | | ||
814 | COH901318_CX_CTRL_TC_ENABLE | | ||
815 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
816 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
817 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
818 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
819 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
820 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
821 | COH901318_CX_CTRL_TCP_DISABLE | | ||
822 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
823 | COH901318_CX_CTRL_HSP_ENABLE | | ||
824 | COH901318_CX_CTRL_HSS_DISABLE | | ||
825 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
826 | COH901318_CX_CTRL_PRDD_DEST, | ||
827 | .param.ctrl_lli_last = 0 | | ||
828 | COH901318_CX_CTRL_TC_ENABLE | | ||
829 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
830 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
831 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
832 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
833 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
834 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
835 | COH901318_CX_CTRL_TCP_DISABLE | | ||
836 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
837 | COH901318_CX_CTRL_HSP_ENABLE | | ||
838 | COH901318_CX_CTRL_HSS_DISABLE | | ||
839 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
840 | COH901318_CX_CTRL_PRDD_DEST, | ||
841 | }, | ||
842 | { | ||
843 | .number = U300_DMA_MSL_RX_4, | ||
844 | .name = "MSL RX 4", | ||
845 | .priority_high = 0, | ||
846 | .dev_addr = U300_MSL_BASE + 4 * 0x40 + 0x220, | ||
847 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
848 | COH901318_CX_CFG_LCR_DISABLE | | ||
849 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
850 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
851 | .param.ctrl_lli_chained = 0 | | ||
852 | COH901318_CX_CTRL_TC_ENABLE | | ||
853 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
854 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
855 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
856 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
857 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
858 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
859 | COH901318_CX_CTRL_TCP_DISABLE | | ||
860 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
861 | COH901318_CX_CTRL_HSP_ENABLE | | ||
862 | COH901318_CX_CTRL_HSS_DISABLE | | ||
863 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
864 | COH901318_CX_CTRL_PRDD_DEST, | ||
865 | .param.ctrl_lli = 0 | | ||
866 | COH901318_CX_CTRL_TC_ENABLE | | ||
867 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
868 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
869 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
870 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
871 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
872 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
873 | COH901318_CX_CTRL_TCP_DISABLE | | ||
874 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
875 | COH901318_CX_CTRL_HSP_ENABLE | | ||
876 | COH901318_CX_CTRL_HSS_DISABLE | | ||
877 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
878 | COH901318_CX_CTRL_PRDD_DEST, | ||
879 | .param.ctrl_lli_last = 0 | | ||
880 | COH901318_CX_CTRL_TC_ENABLE | | ||
881 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
882 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
883 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
884 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
885 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
886 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
887 | COH901318_CX_CTRL_TCP_DISABLE | | ||
888 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
889 | COH901318_CX_CTRL_HSP_ENABLE | | ||
890 | COH901318_CX_CTRL_HSS_DISABLE | | ||
891 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
892 | COH901318_CX_CTRL_PRDD_DEST, | ||
893 | }, | ||
894 | { | ||
895 | .number = U300_DMA_MSL_RX_5, | ||
896 | .name = "MSL RX 5", | ||
897 | .priority_high = 0, | ||
898 | .dev_addr = U300_MSL_BASE + 5 * 0x40 + 0x220, | ||
899 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
900 | COH901318_CX_CFG_LCR_DISABLE | | ||
901 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
902 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
903 | .param.ctrl_lli_chained = 0 | | ||
904 | COH901318_CX_CTRL_TC_ENABLE | | ||
905 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
906 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
907 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
908 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
909 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
910 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
911 | COH901318_CX_CTRL_TCP_DISABLE | | ||
912 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
913 | COH901318_CX_CTRL_HSP_ENABLE | | ||
914 | COH901318_CX_CTRL_HSS_DISABLE | | ||
915 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
916 | COH901318_CX_CTRL_PRDD_DEST, | ||
917 | .param.ctrl_lli = 0 | | ||
918 | COH901318_CX_CTRL_TC_ENABLE | | ||
919 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
920 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
921 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
922 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
923 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
924 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
925 | COH901318_CX_CTRL_TCP_DISABLE | | ||
926 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
927 | COH901318_CX_CTRL_HSP_ENABLE | | ||
928 | COH901318_CX_CTRL_HSS_DISABLE | | ||
929 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
930 | COH901318_CX_CTRL_PRDD_DEST, | ||
931 | .param.ctrl_lli_last = 0 | | ||
932 | COH901318_CX_CTRL_TC_ENABLE | | ||
933 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
934 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
935 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
936 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
937 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
938 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
939 | COH901318_CX_CTRL_TCP_DISABLE | | ||
940 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
941 | COH901318_CX_CTRL_HSP_ENABLE | | ||
942 | COH901318_CX_CTRL_HSS_DISABLE | | ||
943 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
944 | COH901318_CX_CTRL_PRDD_DEST, | ||
945 | }, | ||
946 | { | ||
947 | .number = U300_DMA_MSL_RX_6, | ||
948 | .name = "MSL RX 6", | ||
949 | .priority_high = 0, | ||
950 | .dev_addr = U300_MSL_BASE + 6 * 0x40 + 0x220, | ||
951 | }, | ||
952 | { | ||
953 | .number = U300_DMA_MMCSD_RX_TX, | ||
954 | .name = "MMCSD RX TX", | ||
955 | .priority_high = 0, | ||
956 | .dev_addr = U300_MMCSD_BASE + 0x080, | ||
957 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
958 | COH901318_CX_CFG_LCR_DISABLE | | ||
959 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
960 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
961 | .param.ctrl_lli_chained = 0 | | ||
962 | COH901318_CX_CTRL_TC_ENABLE | | ||
963 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
964 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
965 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
966 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
967 | COH901318_CX_CTRL_TCP_ENABLE | | ||
968 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
969 | COH901318_CX_CTRL_HSP_ENABLE | | ||
970 | COH901318_CX_CTRL_HSS_DISABLE | | ||
971 | COH901318_CX_CTRL_DDMA_LEGACY, | ||
972 | .param.ctrl_lli = 0 | | ||
973 | COH901318_CX_CTRL_TC_ENABLE | | ||
974 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
975 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
976 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
977 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
978 | COH901318_CX_CTRL_TCP_ENABLE | | ||
979 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
980 | COH901318_CX_CTRL_HSP_ENABLE | | ||
981 | COH901318_CX_CTRL_HSS_DISABLE | | ||
982 | COH901318_CX_CTRL_DDMA_LEGACY, | ||
983 | .param.ctrl_lli_last = 0 | | ||
984 | COH901318_CX_CTRL_TC_ENABLE | | ||
985 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
986 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
987 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
988 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
989 | COH901318_CX_CTRL_TCP_DISABLE | | ||
990 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
991 | COH901318_CX_CTRL_HSP_ENABLE | | ||
992 | COH901318_CX_CTRL_HSS_DISABLE | | ||
993 | COH901318_CX_CTRL_DDMA_LEGACY, | ||
994 | |||
995 | }, | ||
996 | { | ||
997 | .number = U300_DMA_MSPRO_TX, | ||
998 | .name = "MSPRO TX", | ||
999 | .priority_high = 0, | ||
1000 | }, | ||
1001 | { | ||
1002 | .number = U300_DMA_MSPRO_RX, | ||
1003 | .name = "MSPRO RX", | ||
1004 | .priority_high = 0, | ||
1005 | }, | ||
1006 | { | ||
1007 | .number = U300_DMA_UART0_TX, | ||
1008 | .name = "UART0 TX", | ||
1009 | .priority_high = 0, | ||
1010 | }, | ||
1011 | { | ||
1012 | .number = U300_DMA_UART0_RX, | ||
1013 | .name = "UART0 RX", | ||
1014 | .priority_high = 0, | ||
1015 | }, | ||
1016 | { | ||
1017 | .number = U300_DMA_APEX_TX, | ||
1018 | .name = "APEX TX", | ||
1019 | .priority_high = 0, | ||
1020 | }, | ||
1021 | { | ||
1022 | .number = U300_DMA_APEX_RX, | ||
1023 | .name = "APEX RX", | ||
1024 | .priority_high = 0, | ||
1025 | }, | ||
1026 | { | ||
1027 | .number = U300_DMA_PCM_I2S0_TX, | ||
1028 | .name = "PCM I2S0 TX", | ||
1029 | .priority_high = 1, | ||
1030 | .dev_addr = U300_PCM_I2S0_BASE + 0x14, | ||
1031 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
1032 | COH901318_CX_CFG_LCR_DISABLE | | ||
1033 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
1034 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
1035 | .param.ctrl_lli_chained = 0 | | ||
1036 | COH901318_CX_CTRL_TC_ENABLE | | ||
1037 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1038 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1039 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
1040 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1041 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
1042 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1043 | COH901318_CX_CTRL_TCP_DISABLE | | ||
1044 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1045 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1046 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1047 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1048 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
1049 | .param.ctrl_lli = 0 | | ||
1050 | COH901318_CX_CTRL_TC_ENABLE | | ||
1051 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1052 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1053 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
1054 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1055 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
1056 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1057 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1058 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1059 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1060 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1061 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1062 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
1063 | .param.ctrl_lli_last = 0 | | ||
1064 | COH901318_CX_CTRL_TC_ENABLE | | ||
1065 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1066 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1067 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
1068 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1069 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
1070 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1071 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1072 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
1073 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1074 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1075 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1076 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
1077 | }, | ||
1078 | { | ||
1079 | .number = U300_DMA_PCM_I2S0_RX, | ||
1080 | .name = "PCM I2S0 RX", | ||
1081 | .priority_high = 1, | ||
1082 | .dev_addr = U300_PCM_I2S0_BASE + 0x10, | ||
1083 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
1084 | COH901318_CX_CFG_LCR_DISABLE | | ||
1085 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
1086 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
1087 | .param.ctrl_lli_chained = 0 | | ||
1088 | COH901318_CX_CTRL_TC_ENABLE | | ||
1089 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1090 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1091 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
1092 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1093 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
1094 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1095 | COH901318_CX_CTRL_TCP_DISABLE | | ||
1096 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1097 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1098 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1099 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1100 | COH901318_CX_CTRL_PRDD_DEST, | ||
1101 | .param.ctrl_lli = 0 | | ||
1102 | COH901318_CX_CTRL_TC_ENABLE | | ||
1103 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1104 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1105 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
1106 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1107 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
1108 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1109 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1110 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1111 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1112 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1113 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1114 | COH901318_CX_CTRL_PRDD_DEST, | ||
1115 | .param.ctrl_lli_last = 0 | | ||
1116 | COH901318_CX_CTRL_TC_ENABLE | | ||
1117 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1118 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1119 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
1120 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1121 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
1122 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1123 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1124 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
1125 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1126 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1127 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1128 | COH901318_CX_CTRL_PRDD_DEST, | ||
1129 | }, | ||
1130 | { | ||
1131 | .number = U300_DMA_PCM_I2S1_TX, | ||
1132 | .name = "PCM I2S1 TX", | ||
1133 | .priority_high = 1, | ||
1134 | .dev_addr = U300_PCM_I2S1_BASE + 0x14, | ||
1135 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
1136 | COH901318_CX_CFG_LCR_DISABLE | | ||
1137 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
1138 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
1139 | .param.ctrl_lli_chained = 0 | | ||
1140 | COH901318_CX_CTRL_TC_ENABLE | | ||
1141 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1142 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1143 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
1144 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1145 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
1146 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1147 | COH901318_CX_CTRL_TCP_DISABLE | | ||
1148 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1149 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1150 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1151 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1152 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
1153 | .param.ctrl_lli = 0 | | ||
1154 | COH901318_CX_CTRL_TC_ENABLE | | ||
1155 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1156 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1157 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
1158 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1159 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
1160 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1161 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1162 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1163 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1164 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1165 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1166 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
1167 | .param.ctrl_lli_last = 0 | | ||
1168 | COH901318_CX_CTRL_TC_ENABLE | | ||
1169 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1170 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1171 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
1172 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1173 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
1174 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1175 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1176 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
1177 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1178 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1179 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1180 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
1181 | }, | ||
1182 | { | ||
1183 | .number = U300_DMA_PCM_I2S1_RX, | ||
1184 | .name = "PCM I2S1 RX", | ||
1185 | .priority_high = 1, | ||
1186 | .dev_addr = U300_PCM_I2S1_BASE + 0x10, | ||
1187 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
1188 | COH901318_CX_CFG_LCR_DISABLE | | ||
1189 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
1190 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
1191 | .param.ctrl_lli_chained = 0 | | ||
1192 | COH901318_CX_CTRL_TC_ENABLE | | ||
1193 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1194 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1195 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
1196 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1197 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
1198 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1199 | COH901318_CX_CTRL_TCP_DISABLE | | ||
1200 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1201 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1202 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1203 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1204 | COH901318_CX_CTRL_PRDD_DEST, | ||
1205 | .param.ctrl_lli = 0 | | ||
1206 | COH901318_CX_CTRL_TC_ENABLE | | ||
1207 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1208 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1209 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
1210 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1211 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
1212 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1213 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1214 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1215 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1216 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1217 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1218 | COH901318_CX_CTRL_PRDD_DEST, | ||
1219 | .param.ctrl_lli_last = 0 | | ||
1220 | COH901318_CX_CTRL_TC_ENABLE | | ||
1221 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1222 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1223 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
1224 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1225 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
1226 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1227 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1228 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
1229 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1230 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1231 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1232 | COH901318_CX_CTRL_PRDD_DEST, | ||
1233 | }, | ||
1234 | { | ||
1235 | .number = U300_DMA_XGAM_CDI, | ||
1236 | .name = "XGAM CDI", | ||
1237 | .priority_high = 0, | ||
1238 | }, | ||
1239 | { | ||
1240 | .number = U300_DMA_XGAM_PDI, | ||
1241 | .name = "XGAM PDI", | ||
1242 | .priority_high = 0, | ||
1243 | }, | ||
1244 | { | ||
1245 | .number = U300_DMA_SPI_TX, | ||
1246 | .name = "SPI TX", | ||
1247 | .priority_high = 0, | ||
1248 | }, | ||
1249 | { | ||
1250 | .number = U300_DMA_SPI_RX, | ||
1251 | .name = "SPI RX", | ||
1252 | .priority_high = 0, | ||
1253 | }, | ||
1254 | { | ||
1255 | .number = U300_DMA_GENERAL_PURPOSE_0, | ||
1256 | .name = "GENERAL 00", | ||
1257 | .priority_high = 0, | ||
1258 | |||
1259 | .param.config = flags_memcpy_config, | ||
1260 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1261 | .param.ctrl_lli = flags_memcpy_lli, | ||
1262 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1263 | }, | ||
1264 | { | ||
1265 | .number = U300_DMA_GENERAL_PURPOSE_1, | ||
1266 | .name = "GENERAL 01", | ||
1267 | .priority_high = 0, | ||
1268 | |||
1269 | .param.config = flags_memcpy_config, | ||
1270 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1271 | .param.ctrl_lli = flags_memcpy_lli, | ||
1272 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1273 | }, | ||
1274 | { | ||
1275 | .number = U300_DMA_GENERAL_PURPOSE_2, | ||
1276 | .name = "GENERAL 02", | ||
1277 | .priority_high = 0, | ||
1278 | |||
1279 | .param.config = flags_memcpy_config, | ||
1280 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1281 | .param.ctrl_lli = flags_memcpy_lli, | ||
1282 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1283 | }, | ||
1284 | { | ||
1285 | .number = U300_DMA_GENERAL_PURPOSE_3, | ||
1286 | .name = "GENERAL 03", | ||
1287 | .priority_high = 0, | ||
1288 | |||
1289 | .param.config = flags_memcpy_config, | ||
1290 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1291 | .param.ctrl_lli = flags_memcpy_lli, | ||
1292 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1293 | }, | ||
1294 | { | ||
1295 | .number = U300_DMA_GENERAL_PURPOSE_4, | ||
1296 | .name = "GENERAL 04", | ||
1297 | .priority_high = 0, | ||
1298 | |||
1299 | .param.config = flags_memcpy_config, | ||
1300 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1301 | .param.ctrl_lli = flags_memcpy_lli, | ||
1302 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1303 | }, | ||
1304 | { | ||
1305 | .number = U300_DMA_GENERAL_PURPOSE_5, | ||
1306 | .name = "GENERAL 05", | ||
1307 | .priority_high = 0, | ||
1308 | |||
1309 | .param.config = flags_memcpy_config, | ||
1310 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1311 | .param.ctrl_lli = flags_memcpy_lli, | ||
1312 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1313 | }, | ||
1314 | { | ||
1315 | .number = U300_DMA_GENERAL_PURPOSE_6, | ||
1316 | .name = "GENERAL 06", | ||
1317 | .priority_high = 0, | ||
1318 | |||
1319 | .param.config = flags_memcpy_config, | ||
1320 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1321 | .param.ctrl_lli = flags_memcpy_lli, | ||
1322 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1323 | }, | ||
1324 | { | ||
1325 | .number = U300_DMA_GENERAL_PURPOSE_7, | ||
1326 | .name = "GENERAL 07", | ||
1327 | .priority_high = 0, | ||
1328 | |||
1329 | .param.config = flags_memcpy_config, | ||
1330 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1331 | .param.ctrl_lli = flags_memcpy_lli, | ||
1332 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1333 | }, | ||
1334 | { | ||
1335 | .number = U300_DMA_GENERAL_PURPOSE_8, | ||
1336 | .name = "GENERAL 08", | ||
1337 | .priority_high = 0, | ||
1338 | |||
1339 | .param.config = flags_memcpy_config, | ||
1340 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1341 | .param.ctrl_lli = flags_memcpy_lli, | ||
1342 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1343 | }, | ||
1344 | #ifdef CONFIG_MACH_U300_BS335 | ||
1345 | { | ||
1346 | .number = U300_DMA_UART1_TX, | ||
1347 | .name = "UART1 TX", | ||
1348 | .priority_high = 0, | ||
1349 | }, | ||
1350 | { | ||
1351 | .number = U300_DMA_UART1_RX, | ||
1352 | .name = "UART1 RX", | ||
1353 | .priority_high = 0, | ||
1354 | } | ||
1355 | #else | ||
1356 | { | ||
1357 | .number = U300_DMA_GENERAL_PURPOSE_9, | ||
1358 | .name = "GENERAL 09", | ||
1359 | .priority_high = 0, | ||
1360 | |||
1361 | .param.config = flags_memcpy_config, | ||
1362 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1363 | .param.ctrl_lli = flags_memcpy_lli, | ||
1364 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1365 | }, | ||
1366 | { | ||
1367 | .number = U300_DMA_GENERAL_PURPOSE_10, | ||
1368 | .name = "GENERAL 10", | ||
1369 | .priority_high = 0, | ||
1370 | |||
1371 | .param.config = flags_memcpy_config, | ||
1372 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1373 | .param.ctrl_lli = flags_memcpy_lli, | ||
1374 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1375 | } | ||
1376 | #endif | ||
1377 | }; | ||
1378 | |||
1379 | |||
1380 | static struct coh901318_platform coh901318_platform = { | ||
1381 | .chans_slave = dma_slave_channels, | ||
1382 | .chans_memcpy = dma_memcpy_channels, | ||
1383 | .access_memory_state = coh901318_access_memory_state, | ||
1384 | .chan_conf = chan_config, | ||
1385 | .max_channels = U300_DMA_CHANNELS, | ||
1386 | }; | ||
1387 | |||
375 | static struct platform_device wdog_device = { | 1388 | static struct platform_device wdog_device = { |
376 | .name = "wdog", | 1389 | .name = "coh901327_wdog", |
377 | .id = -1, | 1390 | .id = -1, |
378 | .num_resources = ARRAY_SIZE(wdog_resources), | 1391 | .num_resources = ARRAY_SIZE(wdog_resources), |
379 | .resource = wdog_resources, | 1392 | .resource = wdog_resources, |
@@ -428,11 +1441,23 @@ static struct platform_device ave_device = { | |||
428 | .resource = ave_resources, | 1441 | .resource = ave_resources, |
429 | }; | 1442 | }; |
430 | 1443 | ||
1444 | static struct platform_device dma_device = { | ||
1445 | .name = "coh901318", | ||
1446 | .id = -1, | ||
1447 | .resource = dma_resource, | ||
1448 | .num_resources = ARRAY_SIZE(dma_resource), | ||
1449 | .dev = { | ||
1450 | .platform_data = &coh901318_platform, | ||
1451 | .coherent_dma_mask = ~0, | ||
1452 | }, | ||
1453 | }; | ||
1454 | |||
431 | /* | 1455 | /* |
432 | * Notice that AMBA devices are initialized before platform devices. | 1456 | * Notice that AMBA devices are initialized before platform devices. |
433 | * | 1457 | * |
434 | */ | 1458 | */ |
435 | static struct platform_device *platform_devs[] __initdata = { | 1459 | static struct platform_device *platform_devs[] __initdata = { |
1460 | &dma_device, | ||
436 | &i2c0_device, | 1461 | &i2c0_device, |
437 | &i2c1_device, | 1462 | &i2c1_device, |
438 | &keypad_device, | 1463 | &keypad_device, |
diff --git a/arch/arm/mach-u300/gpio.c b/arch/arm/mach-u300/gpio.c index 0b35826b7d1d..5f61fd45a0c8 100644 --- a/arch/arm/mach-u300/gpio.c +++ b/arch/arm/mach-u300/gpio.c | |||
@@ -546,7 +546,7 @@ static void gpio_set_initial_values(void) | |||
546 | for (i = 0; i < U300_GPIO_MAX; i++) { | 546 | for (i = 0; i < U300_GPIO_MAX; i++) { |
547 | val = 0; | 547 | val = 0; |
548 | for (j = 0; j < 8; j++) | 548 | for (j = 0; j < 8; j++) |
549 | val |= (u32)((u300_gpio_config[i][j].pull_up == DISABLE_PULL_UP)) << j; | 549 | val |= (u32)((u300_gpio_config[i][j].pull_up == DISABLE_PULL_UP) << j); |
550 | local_irq_save(flags); | 550 | local_irq_save(flags); |
551 | writel(val, virtbase + U300_GPIO_PXPER + i * U300_GPIO_PORTX_SPACING); | 551 | writel(val, virtbase + U300_GPIO_PXPER + i * U300_GPIO_PORTX_SPACING); |
552 | local_irq_restore(flags); | 552 | local_irq_restore(flags); |
diff --git a/arch/arm/mach-u300/include/mach/dma_channels.h b/arch/arm/mach-u300/include/mach/dma_channels.h new file mode 100644 index 000000000000..b239149ba0d0 --- /dev/null +++ b/arch/arm/mach-u300/include/mach/dma_channels.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * | ||
3 | * arch/arm/mach-u300/include/mach/dma_channels.h | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 2007-2009 ST-Ericsson | ||
7 | * License terms: GNU General Public License (GPL) version 2 | ||
8 | * Map file for the U300 dma driver. | ||
9 | * Author: Per Friden <per.friden@stericsson.com> | ||
10 | */ | ||
11 | |||
12 | #ifndef DMA_CHANNELS_H | ||
13 | #define DMA_CHANNELS_H | ||
14 | |||
15 | #define U300_DMA_MSL_TX_0 0 | ||
16 | #define U300_DMA_MSL_TX_1 1 | ||
17 | #define U300_DMA_MSL_TX_2 2 | ||
18 | #define U300_DMA_MSL_TX_3 3 | ||
19 | #define U300_DMA_MSL_TX_4 4 | ||
20 | #define U300_DMA_MSL_TX_5 5 | ||
21 | #define U300_DMA_MSL_TX_6 6 | ||
22 | #define U300_DMA_MSL_RX_0 7 | ||
23 | #define U300_DMA_MSL_RX_1 8 | ||
24 | #define U300_DMA_MSL_RX_2 9 | ||
25 | #define U300_DMA_MSL_RX_3 10 | ||
26 | #define U300_DMA_MSL_RX_4 11 | ||
27 | #define U300_DMA_MSL_RX_5 12 | ||
28 | #define U300_DMA_MSL_RX_6 13 | ||
29 | #define U300_DMA_MMCSD_RX_TX 14 | ||
30 | #define U300_DMA_MSPRO_TX 15 | ||
31 | #define U300_DMA_MSPRO_RX 16 | ||
32 | #define U300_DMA_UART0_TX 17 | ||
33 | #define U300_DMA_UART0_RX 18 | ||
34 | #define U300_DMA_APEX_TX 19 | ||
35 | #define U300_DMA_APEX_RX 20 | ||
36 | #define U300_DMA_PCM_I2S0_TX 21 | ||
37 | #define U300_DMA_PCM_I2S0_RX 22 | ||
38 | #define U300_DMA_PCM_I2S1_TX 23 | ||
39 | #define U300_DMA_PCM_I2S1_RX 24 | ||
40 | #define U300_DMA_XGAM_CDI 25 | ||
41 | #define U300_DMA_XGAM_PDI 26 | ||
42 | #define U300_DMA_SPI_TX 27 | ||
43 | #define U300_DMA_SPI_RX 28 | ||
44 | #define U300_DMA_GENERAL_PURPOSE_0 29 | ||
45 | #define U300_DMA_GENERAL_PURPOSE_1 30 | ||
46 | #define U300_DMA_GENERAL_PURPOSE_2 31 | ||
47 | #define U300_DMA_GENERAL_PURPOSE_3 32 | ||
48 | #define U300_DMA_GENERAL_PURPOSE_4 33 | ||
49 | #define U300_DMA_GENERAL_PURPOSE_5 34 | ||
50 | #define U300_DMA_GENERAL_PURPOSE_6 35 | ||
51 | #define U300_DMA_GENERAL_PURPOSE_7 36 | ||
52 | #define U300_DMA_GENERAL_PURPOSE_8 37 | ||
53 | #ifdef CONFIG_MACH_U300_BS335 | ||
54 | #define U300_DMA_UART1_TX 38 | ||
55 | #define U300_DMA_UART1_RX 39 | ||
56 | #else | ||
57 | #define U300_DMA_GENERAL_PURPOSE_9 38 | ||
58 | #define U300_DMA_GENERAL_PURPOSE_10 39 | ||
59 | #endif | ||
60 | |||
61 | #ifdef CONFIG_MACH_U300_BS335 | ||
62 | #define U300_DMA_DEVICE_CHANNELS 32 | ||
63 | #else | ||
64 | #define U300_DMA_DEVICE_CHANNELS 30 | ||
65 | #endif | ||
66 | #define U300_DMA_CHANNELS 40 | ||
67 | |||
68 | |||
69 | #endif /* DMA_CHANNELS_H */ | ||
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index aa5afbcc90f9..803aec1d6728 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
23 | 23 | ||
24 | #include <plat/mtu.h> | 24 | #include <plat/mtu.h> |
25 | #include <plat/i2c.h> | ||
25 | 26 | ||
26 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
27 | #include <mach/setup.h> | 28 | #include <mach/setup.h> |
@@ -108,11 +109,96 @@ static struct amba_device pl022_device = { | |||
108 | .periphid = SSP_PER_ID, | 109 | .periphid = SSP_PER_ID, |
109 | }; | 110 | }; |
110 | 111 | ||
112 | static struct amba_device pl031_device = { | ||
113 | .dev = { | ||
114 | .init_name = "pl031", | ||
115 | }, | ||
116 | .res = { | ||
117 | .start = U8500_RTC_BASE, | ||
118 | .end = U8500_RTC_BASE + SZ_4K - 1, | ||
119 | .flags = IORESOURCE_MEM, | ||
120 | }, | ||
121 | .irq = {IRQ_RTC_RTT, NO_IRQ}, | ||
122 | }; | ||
123 | |||
124 | #define U8500_I2C_RESOURCES(id, size) \ | ||
125 | static struct resource u8500_i2c_resources_##id[] = { \ | ||
126 | [0] = { \ | ||
127 | .start = U8500_I2C##id##_BASE, \ | ||
128 | .end = U8500_I2C##id##_BASE + size - 1, \ | ||
129 | .flags = IORESOURCE_MEM, \ | ||
130 | }, \ | ||
131 | [1] = { \ | ||
132 | .start = IRQ_I2C##id, \ | ||
133 | .end = IRQ_I2C##id, \ | ||
134 | .flags = IORESOURCE_IRQ \ | ||
135 | } \ | ||
136 | } | ||
137 | |||
138 | U8500_I2C_RESOURCES(0, SZ_4K); | ||
139 | U8500_I2C_RESOURCES(1, SZ_4K); | ||
140 | U8500_I2C_RESOURCES(2, SZ_4K); | ||
141 | U8500_I2C_RESOURCES(3, SZ_4K); | ||
142 | |||
143 | #define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, _sm) \ | ||
144 | static struct nmk_i2c_controller u8500_i2c_##id = { \ | ||
145 | /* \ | ||
146 | * slave data setup time, which is \ | ||
147 | * 250 ns,100ns,10ns which is 14,6,2 \ | ||
148 | * respectively for a 48 Mhz \ | ||
149 | * i2c clock \ | ||
150 | */ \ | ||
151 | .slsu = _slsu, \ | ||
152 | /* Tx FIFO threshold */ \ | ||
153 | .tft = _tft, \ | ||
154 | /* Rx FIFO threshold */ \ | ||
155 | .rft = _rft, \ | ||
156 | /* std. mode operation */ \ | ||
157 | .clk_freq = clk, \ | ||
158 | .sm = _sm, \ | ||
159 | } | ||
160 | |||
161 | /* | ||
162 | * The board uses 4 i2c controllers, initialize all of | ||
163 | * them with slave data setup time of 250 ns, | ||
164 | * Tx & Rx FIFO threshold values as 1 and standard | ||
165 | * mode of operation | ||
166 | */ | ||
167 | U8500_I2C_CONTROLLER(0, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD); | ||
168 | U8500_I2C_CONTROLLER(1, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD); | ||
169 | U8500_I2C_CONTROLLER(2, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD); | ||
170 | U8500_I2C_CONTROLLER(3, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD); | ||
171 | |||
172 | #define U8500_I2C_PDEVICE(cid) \ | ||
173 | static struct platform_device i2c_controller##cid = { \ | ||
174 | .name = "nmk-i2c", \ | ||
175 | .id = cid, \ | ||
176 | .num_resources = 2, \ | ||
177 | .resource = u8500_i2c_resources_##cid, \ | ||
178 | .dev = { \ | ||
179 | .platform_data = &u8500_i2c_##cid \ | ||
180 | } \ | ||
181 | } | ||
182 | |||
183 | U8500_I2C_PDEVICE(0); | ||
184 | U8500_I2C_PDEVICE(1); | ||
185 | U8500_I2C_PDEVICE(2); | ||
186 | U8500_I2C_PDEVICE(3); | ||
187 | |||
111 | static struct amba_device *amba_devs[] __initdata = { | 188 | static struct amba_device *amba_devs[] __initdata = { |
112 | &uart0_device, | 189 | &uart0_device, |
113 | &uart1_device, | 190 | &uart1_device, |
114 | &uart2_device, | 191 | &uart2_device, |
115 | &pl022_device, | 192 | &pl022_device, |
193 | &pl031_device, | ||
194 | }; | ||
195 | |||
196 | /* add any platform devices here - TODO */ | ||
197 | static struct platform_device *platform_devs[] __initdata = { | ||
198 | &i2c_controller0, | ||
199 | &i2c_controller1, | ||
200 | &i2c_controller2, | ||
201 | &i2c_controller3, | ||
116 | }; | 202 | }; |
117 | 203 | ||
118 | static void __init u8500_timer_init(void) | 204 | static void __init u8500_timer_init(void) |
@@ -139,6 +225,8 @@ static void __init u8500_init_machine(void) | |||
139 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) | 225 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) |
140 | amba_device_register(amba_devs[i], &iomem_resource); | 226 | amba_device_register(amba_devs[i], &iomem_resource); |
141 | 227 | ||
228 | platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); | ||
229 | |||
142 | spi_register_board_info(u8500_spi_devices, | 230 | spi_register_board_info(u8500_spi_devices, |
143 | ARRAY_SIZE(u8500_spi_devices)); | 231 | ARRAY_SIZE(u8500_spi_devices)); |
144 | 232 | ||
diff --git a/arch/arm/mach-ux500/cpu-u8500.c b/arch/arm/mach-ux500/cpu-u8500.c index 5f05e5850f71..397bc1f9ed94 100644 --- a/arch/arm/mach-ux500/cpu-u8500.c +++ b/arch/arm/mach-ux500/cpu-u8500.c | |||
@@ -33,6 +33,7 @@ static struct platform_device *platform_devs[] __initdata = { | |||
33 | 33 | ||
34 | /* minimum static i/o mapping required to boot U8500 platforms */ | 34 | /* minimum static i/o mapping required to boot U8500 platforms */ |
35 | static struct map_desc u8500_io_desc[] __initdata = { | 35 | static struct map_desc u8500_io_desc[] __initdata = { |
36 | __IO_DEV_DESC(U8500_UART2_BASE, SZ_4K), | ||
36 | __IO_DEV_DESC(U8500_GIC_CPU_BASE, SZ_4K), | 37 | __IO_DEV_DESC(U8500_GIC_CPU_BASE, SZ_4K), |
37 | __IO_DEV_DESC(U8500_GIC_DIST_BASE, SZ_4K), | 38 | __IO_DEV_DESC(U8500_GIC_DIST_BASE, SZ_4K), |
38 | __IO_DEV_DESC(U8500_MTU0_BASE, SZ_4K), | 39 | __IO_DEV_DESC(U8500_MTU0_BASE, SZ_4K), |
diff --git a/arch/arm/mach-ux500/include/mach/debug-macro.S b/arch/arm/mach-ux500/include/mach/debug-macro.S index 8f21b6a95dce..8de225e02235 100644 --- a/arch/arm/mach-ux500/include/mach/debug-macro.S +++ b/arch/arm/mach-ux500/include/mach/debug-macro.S | |||
@@ -8,12 +8,13 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | #include <mach/hardware.h> | ||
12 | |||
11 | .macro addruart,rx | 13 | .macro addruart,rx |
12 | mrc p15, 0, \rx, c1, c0 | 14 | mrc p15, 0, \rx, c1, c0 |
13 | tst \rx, #1 @MMU enabled? | 15 | tst \rx, #1 @ MMU enabled? |
14 | moveq \rx, #0x80000000 @MMU off, Physical address | 16 | ldreq \rx, =U8500_UART2_BASE @ no, physical address |
15 | movne \rx, #0xF0000000 @MMU on, Virtual address | 17 | ldrne \rx, =IO_ADDRESS(U8500_UART2_BASE) @ yes, virtual address |
16 | orr \rx, \rx, #0x7000 | ||
17 | .endm | 18 | .endm |
18 | 19 | ||
19 | #include <asm/hardware/debug-pl01x.S> | 20 | #include <asm/hardware/debug-pl01x.S> |
diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h index 940640066857..ce228bdc66dd 100644 --- a/arch/arm/mach-w90x900/include/mach/system.h +++ b/arch/arm/mach-w90x900/include/mach/system.h | |||
@@ -15,7 +15,15 @@ | |||
15 | * | 15 | * |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/io.h> | ||
18 | #include <asm/proc-fns.h> | 19 | #include <asm/proc-fns.h> |
20 | #include <mach/map.h> | ||
21 | #include <mach/regs-timer.h> | ||
22 | |||
23 | #define WTCR (TMR_BA + 0x1C) | ||
24 | #define WTCLK (1 << 10) | ||
25 | #define WTE (1 << 7) | ||
26 | #define WTRE (1 << 1) | ||
19 | 27 | ||
20 | static void arch_idle(void) | 28 | static void arch_idle(void) |
21 | { | 29 | { |
@@ -23,6 +31,11 @@ static void arch_idle(void) | |||
23 | 31 | ||
24 | static void arch_reset(char mode, const char *cmd) | 32 | static void arch_reset(char mode, const char *cmd) |
25 | { | 33 | { |
26 | cpu_reset(0); | 34 | if (mode == 's') { |
35 | /* Jump into ROM at address 0 */ | ||
36 | cpu_reset(0); | ||
37 | } else { | ||
38 | __raw_writel(WTE | WTRE | WTCLK, WTCR); | ||
39 | } | ||
27 | } | 40 | } |
28 | 41 | ||
diff --git a/arch/arm/mach-w90x900/time.c b/arch/arm/mach-w90x900/time.c index 4128af870b41..b80f769bc135 100644 --- a/arch/arm/mach-w90x900/time.c +++ b/arch/arm/mach-w90x900/time.c | |||
@@ -42,7 +42,10 @@ | |||
42 | #define TICKS_PER_SEC 100 | 42 | #define TICKS_PER_SEC 100 |
43 | #define PRESCALE 0x63 /* Divider = prescale + 1 */ | 43 | #define PRESCALE 0x63 /* Divider = prescale + 1 */ |
44 | 44 | ||
45 | unsigned int timer0_load; | 45 | #define TDR_SHIFT 24 |
46 | #define TDR_MASK ((1 << TDR_SHIFT) - 1) | ||
47 | |||
48 | static unsigned int timer0_load; | ||
46 | 49 | ||
47 | static void nuc900_clockevent_setmode(enum clock_event_mode mode, | 50 | static void nuc900_clockevent_setmode(enum clock_event_mode mode, |
48 | struct clock_event_device *clk) | 51 | struct clock_event_device *clk) |
@@ -88,7 +91,7 @@ static int nuc900_clockevent_setnextevent(unsigned long evt, | |||
88 | static struct clock_event_device nuc900_clockevent_device = { | 91 | static struct clock_event_device nuc900_clockevent_device = { |
89 | .name = "nuc900-timer0", | 92 | .name = "nuc900-timer0", |
90 | .shift = 32, | 93 | .shift = 32, |
91 | .features = CLOCK_EVT_MODE_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | 94 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, |
92 | .set_mode = nuc900_clockevent_setmode, | 95 | .set_mode = nuc900_clockevent_setmode, |
93 | .set_next_event = nuc900_clockevent_setnextevent, | 96 | .set_next_event = nuc900_clockevent_setnextevent, |
94 | .rating = 300, | 97 | .rating = 300, |
@@ -112,8 +115,23 @@ static struct irqaction nuc900_timer0_irq = { | |||
112 | .handler = nuc900_timer0_interrupt, | 115 | .handler = nuc900_timer0_interrupt, |
113 | }; | 116 | }; |
114 | 117 | ||
115 | static void __init nuc900_clockevents_init(unsigned int rate) | 118 | static void __init nuc900_clockevents_init(void) |
116 | { | 119 | { |
120 | unsigned int rate; | ||
121 | struct clk *clk = clk_get(NULL, "timer0"); | ||
122 | |||
123 | BUG_ON(IS_ERR(clk)); | ||
124 | |||
125 | __raw_writel(0x00, REG_TCSR0); | ||
126 | |||
127 | clk_enable(clk); | ||
128 | rate = clk_get_rate(clk) / (PRESCALE + 1); | ||
129 | |||
130 | timer0_load = (rate / TICKS_PER_SEC); | ||
131 | |||
132 | __raw_writel(RESETINT, REG_TISR); | ||
133 | setup_irq(IRQ_TIMER0, &nuc900_timer0_irq); | ||
134 | |||
117 | nuc900_clockevent_device.mult = div_sc(rate, NSEC_PER_SEC, | 135 | nuc900_clockevent_device.mult = div_sc(rate, NSEC_PER_SEC, |
118 | nuc900_clockevent_device.shift); | 136 | nuc900_clockevent_device.shift); |
119 | nuc900_clockevent_device.max_delta_ns = clockevent_delta2ns(0xffffffff, | 137 | nuc900_clockevent_device.max_delta_ns = clockevent_delta2ns(0xffffffff, |
@@ -127,26 +145,35 @@ static void __init nuc900_clockevents_init(unsigned int rate) | |||
127 | 145 | ||
128 | static cycle_t nuc900_get_cycles(struct clocksource *cs) | 146 | static cycle_t nuc900_get_cycles(struct clocksource *cs) |
129 | { | 147 | { |
130 | return ~__raw_readl(REG_TDR1); | 148 | return (~__raw_readl(REG_TDR1)) & TDR_MASK; |
131 | } | 149 | } |
132 | 150 | ||
133 | static struct clocksource clocksource_nuc900 = { | 151 | static struct clocksource clocksource_nuc900 = { |
134 | .name = "nuc900-timer1", | 152 | .name = "nuc900-timer1", |
135 | .rating = 200, | 153 | .rating = 200, |
136 | .read = nuc900_get_cycles, | 154 | .read = nuc900_get_cycles, |
137 | .mask = CLOCKSOURCE_MASK(32), | 155 | .mask = CLOCKSOURCE_MASK(TDR_SHIFT), |
138 | .shift = 20, | 156 | .shift = 10, |
139 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 157 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
140 | }; | 158 | }; |
141 | 159 | ||
142 | static void __init nuc900_clocksource_init(unsigned int rate) | 160 | static void __init nuc900_clocksource_init(void) |
143 | { | 161 | { |
144 | unsigned int val; | 162 | unsigned int val; |
163 | unsigned int rate; | ||
164 | struct clk *clk = clk_get(NULL, "timer1"); | ||
165 | |||
166 | BUG_ON(IS_ERR(clk)); | ||
167 | |||
168 | __raw_writel(0x00, REG_TCSR1); | ||
169 | |||
170 | clk_enable(clk); | ||
171 | rate = clk_get_rate(clk) / (PRESCALE + 1); | ||
145 | 172 | ||
146 | __raw_writel(0xffffffff, REG_TICR1); | 173 | __raw_writel(0xffffffff, REG_TICR1); |
147 | 174 | ||
148 | val = __raw_readl(REG_TCSR1); | 175 | val = __raw_readl(REG_TCSR1); |
149 | val |= (COUNTEN | PERIOD); | 176 | val |= (COUNTEN | PERIOD | PRESCALE); |
150 | __raw_writel(val, REG_TCSR1); | 177 | __raw_writel(val, REG_TCSR1); |
151 | 178 | ||
152 | clocksource_nuc900.mult = | 179 | clocksource_nuc900.mult = |
@@ -156,25 +183,8 @@ static void __init nuc900_clocksource_init(unsigned int rate) | |||
156 | 183 | ||
157 | static void __init nuc900_timer_init(void) | 184 | static void __init nuc900_timer_init(void) |
158 | { | 185 | { |
159 | struct clk *ck_ext = clk_get(NULL, "ext"); | 186 | nuc900_clocksource_init(); |
160 | unsigned int rate; | 187 | nuc900_clockevents_init(); |
161 | |||
162 | BUG_ON(IS_ERR(ck_ext)); | ||
163 | |||
164 | rate = clk_get_rate(ck_ext); | ||
165 | clk_put(ck_ext); | ||
166 | rate = rate / (PRESCALE + 0x01); | ||
167 | |||
168 | /* set a known state */ | ||
169 | __raw_writel(0x00, REG_TCSR0); | ||
170 | __raw_writel(0x00, REG_TCSR1); | ||
171 | __raw_writel(RESETINT, REG_TISR); | ||
172 | timer0_load = (rate / TICKS_PER_SEC); | ||
173 | |||
174 | setup_irq(IRQ_TIMER0, &nuc900_timer0_irq); | ||
175 | |||
176 | nuc900_clocksource_init(rate); | ||
177 | nuc900_clockevents_init(rate); | ||
178 | } | 188 | } |
179 | 189 | ||
180 | struct sys_timer nuc900_timer = { | 190 | struct sys_timer nuc900_timer = { |
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile index 827e238e5d4a..e8d34a80851c 100644 --- a/arch/arm/mm/Makefile +++ b/arch/arm/mm/Makefile | |||
@@ -27,6 +27,9 @@ obj-$(CONFIG_CPU_ABRT_EV5TJ) += abort-ev5tj.o | |||
27 | obj-$(CONFIG_CPU_ABRT_EV6) += abort-ev6.o | 27 | obj-$(CONFIG_CPU_ABRT_EV6) += abort-ev6.o |
28 | obj-$(CONFIG_CPU_ABRT_EV7) += abort-ev7.o | 28 | obj-$(CONFIG_CPU_ABRT_EV7) += abort-ev7.o |
29 | 29 | ||
30 | AFLAGS_abort-ev6.o :=-Wa,-march=armv6k | ||
31 | AFLAGS_abort-ev7.o :=-Wa,-march=armv7-a | ||
32 | |||
30 | obj-$(CONFIG_CPU_PABRT_LEGACY) += pabort-legacy.o | 33 | obj-$(CONFIG_CPU_PABRT_LEGACY) += pabort-legacy.o |
31 | obj-$(CONFIG_CPU_PABRT_V6) += pabort-v6.o | 34 | obj-$(CONFIG_CPU_PABRT_V6) += pabort-v6.o |
32 | obj-$(CONFIG_CPU_PABRT_V7) += pabort-v7.o | 35 | obj-$(CONFIG_CPU_PABRT_V7) += pabort-v7.o |
@@ -39,6 +42,9 @@ obj-$(CONFIG_CPU_CACHE_V6) += cache-v6.o | |||
39 | obj-$(CONFIG_CPU_CACHE_V7) += cache-v7.o | 42 | obj-$(CONFIG_CPU_CACHE_V7) += cache-v7.o |
40 | obj-$(CONFIG_CPU_CACHE_FA) += cache-fa.o | 43 | obj-$(CONFIG_CPU_CACHE_FA) += cache-fa.o |
41 | 44 | ||
45 | AFLAGS_cache-v6.o :=-Wa,-march=armv6 | ||
46 | AFLAGS_cache-v7.o :=-Wa,-march=armv7-a | ||
47 | |||
42 | obj-$(CONFIG_CPU_COPY_V3) += copypage-v3.o | 48 | obj-$(CONFIG_CPU_COPY_V3) += copypage-v3.o |
43 | obj-$(CONFIG_CPU_COPY_V4WT) += copypage-v4wt.o | 49 | obj-$(CONFIG_CPU_COPY_V4WT) += copypage-v4wt.o |
44 | obj-$(CONFIG_CPU_COPY_V4WB) += copypage-v4wb.o | 50 | obj-$(CONFIG_CPU_COPY_V4WB) += copypage-v4wb.o |
@@ -58,6 +64,9 @@ obj-$(CONFIG_CPU_TLB_V6) += tlb-v6.o | |||
58 | obj-$(CONFIG_CPU_TLB_V7) += tlb-v7.o | 64 | obj-$(CONFIG_CPU_TLB_V7) += tlb-v7.o |
59 | obj-$(CONFIG_CPU_TLB_FA) += tlb-fa.o | 65 | obj-$(CONFIG_CPU_TLB_FA) += tlb-fa.o |
60 | 66 | ||
67 | AFLAGS_tlb-v6.o :=-Wa,-march=armv6 | ||
68 | AFLAGS_tlb-v7.o :=-Wa,-march=armv7-a | ||
69 | |||
61 | obj-$(CONFIG_CPU_ARM610) += proc-arm6_7.o | 70 | obj-$(CONFIG_CPU_ARM610) += proc-arm6_7.o |
62 | obj-$(CONFIG_CPU_ARM710) += proc-arm6_7.o | 71 | obj-$(CONFIG_CPU_ARM710) += proc-arm6_7.o |
63 | obj-$(CONFIG_CPU_ARM7TDMI) += proc-arm7tdmi.o | 72 | obj-$(CONFIG_CPU_ARM7TDMI) += proc-arm7tdmi.o |
@@ -84,6 +93,9 @@ obj-$(CONFIG_CPU_FEROCEON) += proc-feroceon.o | |||
84 | obj-$(CONFIG_CPU_V6) += proc-v6.o | 93 | obj-$(CONFIG_CPU_V6) += proc-v6.o |
85 | obj-$(CONFIG_CPU_V7) += proc-v7.o | 94 | obj-$(CONFIG_CPU_V7) += proc-v7.o |
86 | 95 | ||
96 | AFLAGS_proc-v6.o :=-Wa,-march=armv6 | ||
97 | AFLAGS_proc-v7.o :=-Wa,-march=armv7-a | ||
98 | |||
87 | obj-$(CONFIG_CACHE_FEROCEON_L2) += cache-feroceon-l2.o | 99 | obj-$(CONFIG_CACHE_FEROCEON_L2) += cache-feroceon-l2.o |
88 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o | 100 | obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o |
89 | obj-$(CONFIG_CACHE_XSC3L2) += cache-xsc3l2.o | 101 | obj-$(CONFIG_CACHE_XSC3L2) += cache-xsc3l2.o |
diff --git a/arch/arm/mm/cache-fa.S b/arch/arm/mm/cache-fa.S index a89444a3c016..7148e53e6078 100644 --- a/arch/arm/mm/cache-fa.S +++ b/arch/arm/mm/cache-fa.S | |||
@@ -157,7 +157,7 @@ ENTRY(fa_flush_kern_dcache_area) | |||
157 | * - start - virtual start address | 157 | * - start - virtual start address |
158 | * - end - virtual end address | 158 | * - end - virtual end address |
159 | */ | 159 | */ |
160 | ENTRY(fa_dma_inv_range) | 160 | fa_dma_inv_range: |
161 | tst r0, #CACHE_DLINESIZE - 1 | 161 | tst r0, #CACHE_DLINESIZE - 1 |
162 | bic r0, r0, #CACHE_DLINESIZE - 1 | 162 | bic r0, r0, #CACHE_DLINESIZE - 1 |
163 | mcrne p15, 0, r0, c7, c14, 1 @ clean & invalidate D entry | 163 | mcrne p15, 0, r0, c7, c14, 1 @ clean & invalidate D entry |
@@ -180,7 +180,7 @@ ENTRY(fa_dma_inv_range) | |||
180 | * - start - virtual start address | 180 | * - start - virtual start address |
181 | * - end - virtual end address | 181 | * - end - virtual end address |
182 | */ | 182 | */ |
183 | ENTRY(fa_dma_clean_range) | 183 | fa_dma_clean_range: |
184 | bic r0, r0, #CACHE_DLINESIZE - 1 | 184 | bic r0, r0, #CACHE_DLINESIZE - 1 |
185 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 185 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
186 | add r0, r0, #CACHE_DLINESIZE | 186 | add r0, r0, #CACHE_DLINESIZE |
@@ -205,6 +205,30 @@ ENTRY(fa_dma_flush_range) | |||
205 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer | 205 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer |
206 | mov pc, lr | 206 | mov pc, lr |
207 | 207 | ||
208 | /* | ||
209 | * dma_map_area(start, size, dir) | ||
210 | * - start - kernel virtual start address | ||
211 | * - size - size of region | ||
212 | * - dir - DMA direction | ||
213 | */ | ||
214 | ENTRY(fa_dma_map_area) | ||
215 | add r1, r1, r0 | ||
216 | cmp r2, #DMA_TO_DEVICE | ||
217 | beq fa_dma_clean_range | ||
218 | bcs fa_dma_inv_range | ||
219 | b fa_dma_flush_range | ||
220 | ENDPROC(fa_dma_map_area) | ||
221 | |||
222 | /* | ||
223 | * dma_unmap_area(start, size, dir) | ||
224 | * - start - kernel virtual start address | ||
225 | * - size - size of region | ||
226 | * - dir - DMA direction | ||
227 | */ | ||
228 | ENTRY(fa_dma_unmap_area) | ||
229 | mov pc, lr | ||
230 | ENDPROC(fa_dma_unmap_area) | ||
231 | |||
208 | __INITDATA | 232 | __INITDATA |
209 | 233 | ||
210 | .type fa_cache_fns, #object | 234 | .type fa_cache_fns, #object |
@@ -215,7 +239,7 @@ ENTRY(fa_cache_fns) | |||
215 | .long fa_coherent_kern_range | 239 | .long fa_coherent_kern_range |
216 | .long fa_coherent_user_range | 240 | .long fa_coherent_user_range |
217 | .long fa_flush_kern_dcache_area | 241 | .long fa_flush_kern_dcache_area |
218 | .long fa_dma_inv_range | 242 | .long fa_dma_map_area |
219 | .long fa_dma_clean_range | 243 | .long fa_dma_unmap_area |
220 | .long fa_dma_flush_range | 244 | .long fa_dma_flush_range |
221 | .size fa_cache_fns, . - fa_cache_fns | 245 | .size fa_cache_fns, . - fa_cache_fns |
diff --git a/arch/arm/mm/cache-v3.S b/arch/arm/mm/cache-v3.S index 2a482731ea36..c2ff3c599fee 100644 --- a/arch/arm/mm/cache-v3.S +++ b/arch/arm/mm/cache-v3.S | |||
@@ -84,20 +84,6 @@ ENTRY(v3_flush_kern_dcache_area) | |||
84 | /* FALLTHROUGH */ | 84 | /* FALLTHROUGH */ |
85 | 85 | ||
86 | /* | 86 | /* |
87 | * dma_inv_range(start, end) | ||
88 | * | ||
89 | * Invalidate (discard) the specified virtual address range. | ||
90 | * May not write back any entries. If 'start' or 'end' | ||
91 | * are not cache line aligned, those lines must be written | ||
92 | * back. | ||
93 | * | ||
94 | * - start - virtual start address | ||
95 | * - end - virtual end address | ||
96 | */ | ||
97 | ENTRY(v3_dma_inv_range) | ||
98 | /* FALLTHROUGH */ | ||
99 | |||
100 | /* | ||
101 | * dma_flush_range(start, end) | 87 | * dma_flush_range(start, end) |
102 | * | 88 | * |
103 | * Clean and invalidate the specified virtual address range. | 89 | * Clean and invalidate the specified virtual address range. |
@@ -108,18 +94,29 @@ ENTRY(v3_dma_inv_range) | |||
108 | ENTRY(v3_dma_flush_range) | 94 | ENTRY(v3_dma_flush_range) |
109 | mov r0, #0 | 95 | mov r0, #0 |
110 | mcr p15, 0, r0, c7, c0, 0 @ flush ID cache | 96 | mcr p15, 0, r0, c7, c0, 0 @ flush ID cache |
97 | mov pc, lr | ||
98 | |||
99 | /* | ||
100 | * dma_unmap_area(start, size, dir) | ||
101 | * - start - kernel virtual start address | ||
102 | * - size - size of region | ||
103 | * - dir - DMA direction | ||
104 | */ | ||
105 | ENTRY(v3_dma_unmap_area) | ||
106 | teq r2, #DMA_TO_DEVICE | ||
107 | bne v3_dma_flush_range | ||
111 | /* FALLTHROUGH */ | 108 | /* FALLTHROUGH */ |
112 | 109 | ||
113 | /* | 110 | /* |
114 | * dma_clean_range(start, end) | 111 | * dma_map_area(start, size, dir) |
115 | * | 112 | * - start - kernel virtual start address |
116 | * Clean (write back) the specified virtual address range. | 113 | * - size - size of region |
117 | * | 114 | * - dir - DMA direction |
118 | * - start - virtual start address | ||
119 | * - end - virtual end address | ||
120 | */ | 115 | */ |
121 | ENTRY(v3_dma_clean_range) | 116 | ENTRY(v3_dma_map_area) |
122 | mov pc, lr | 117 | mov pc, lr |
118 | ENDPROC(v3_dma_unmap_area) | ||
119 | ENDPROC(v3_dma_map_area) | ||
123 | 120 | ||
124 | __INITDATA | 121 | __INITDATA |
125 | 122 | ||
@@ -131,7 +128,7 @@ ENTRY(v3_cache_fns) | |||
131 | .long v3_coherent_kern_range | 128 | .long v3_coherent_kern_range |
132 | .long v3_coherent_user_range | 129 | .long v3_coherent_user_range |
133 | .long v3_flush_kern_dcache_area | 130 | .long v3_flush_kern_dcache_area |
134 | .long v3_dma_inv_range | 131 | .long v3_dma_map_area |
135 | .long v3_dma_clean_range | 132 | .long v3_dma_unmap_area |
136 | .long v3_dma_flush_range | 133 | .long v3_dma_flush_range |
137 | .size v3_cache_fns, . - v3_cache_fns | 134 | .size v3_cache_fns, . - v3_cache_fns |
diff --git a/arch/arm/mm/cache-v4.S b/arch/arm/mm/cache-v4.S index 5c7da3e372e9..4810f7e3e813 100644 --- a/arch/arm/mm/cache-v4.S +++ b/arch/arm/mm/cache-v4.S | |||
@@ -94,20 +94,6 @@ ENTRY(v4_flush_kern_dcache_area) | |||
94 | /* FALLTHROUGH */ | 94 | /* FALLTHROUGH */ |
95 | 95 | ||
96 | /* | 96 | /* |
97 | * dma_inv_range(start, end) | ||
98 | * | ||
99 | * Invalidate (discard) the specified virtual address range. | ||
100 | * May not write back any entries. If 'start' or 'end' | ||
101 | * are not cache line aligned, those lines must be written | ||
102 | * back. | ||
103 | * | ||
104 | * - start - virtual start address | ||
105 | * - end - virtual end address | ||
106 | */ | ||
107 | ENTRY(v4_dma_inv_range) | ||
108 | /* FALLTHROUGH */ | ||
109 | |||
110 | /* | ||
111 | * dma_flush_range(start, end) | 97 | * dma_flush_range(start, end) |
112 | * | 98 | * |
113 | * Clean and invalidate the specified virtual address range. | 99 | * Clean and invalidate the specified virtual address range. |
@@ -120,18 +106,29 @@ ENTRY(v4_dma_flush_range) | |||
120 | mov r0, #0 | 106 | mov r0, #0 |
121 | mcr p15, 0, r0, c7, c7, 0 @ flush ID cache | 107 | mcr p15, 0, r0, c7, c7, 0 @ flush ID cache |
122 | #endif | 108 | #endif |
109 | mov pc, lr | ||
110 | |||
111 | /* | ||
112 | * dma_unmap_area(start, size, dir) | ||
113 | * - start - kernel virtual start address | ||
114 | * - size - size of region | ||
115 | * - dir - DMA direction | ||
116 | */ | ||
117 | ENTRY(v4_dma_unmap_area) | ||
118 | teq r2, #DMA_TO_DEVICE | ||
119 | bne v4_dma_flush_range | ||
123 | /* FALLTHROUGH */ | 120 | /* FALLTHROUGH */ |
124 | 121 | ||
125 | /* | 122 | /* |
126 | * dma_clean_range(start, end) | 123 | * dma_map_area(start, size, dir) |
127 | * | 124 | * - start - kernel virtual start address |
128 | * Clean (write back) the specified virtual address range. | 125 | * - size - size of region |
129 | * | 126 | * - dir - DMA direction |
130 | * - start - virtual start address | ||
131 | * - end - virtual end address | ||
132 | */ | 127 | */ |
133 | ENTRY(v4_dma_clean_range) | 128 | ENTRY(v4_dma_map_area) |
134 | mov pc, lr | 129 | mov pc, lr |
130 | ENDPROC(v4_dma_unmap_area) | ||
131 | ENDPROC(v4_dma_map_area) | ||
135 | 132 | ||
136 | __INITDATA | 133 | __INITDATA |
137 | 134 | ||
@@ -143,7 +140,7 @@ ENTRY(v4_cache_fns) | |||
143 | .long v4_coherent_kern_range | 140 | .long v4_coherent_kern_range |
144 | .long v4_coherent_user_range | 141 | .long v4_coherent_user_range |
145 | .long v4_flush_kern_dcache_area | 142 | .long v4_flush_kern_dcache_area |
146 | .long v4_dma_inv_range | 143 | .long v4_dma_map_area |
147 | .long v4_dma_clean_range | 144 | .long v4_dma_unmap_area |
148 | .long v4_dma_flush_range | 145 | .long v4_dma_flush_range |
149 | .size v4_cache_fns, . - v4_cache_fns | 146 | .size v4_cache_fns, . - v4_cache_fns |
diff --git a/arch/arm/mm/cache-v4wb.S b/arch/arm/mm/cache-v4wb.S index 3dbedf1ec0e7..df8368afa102 100644 --- a/arch/arm/mm/cache-v4wb.S +++ b/arch/arm/mm/cache-v4wb.S | |||
@@ -173,7 +173,7 @@ ENTRY(v4wb_coherent_user_range) | |||
173 | * - start - virtual start address | 173 | * - start - virtual start address |
174 | * - end - virtual end address | 174 | * - end - virtual end address |
175 | */ | 175 | */ |
176 | ENTRY(v4wb_dma_inv_range) | 176 | v4wb_dma_inv_range: |
177 | tst r0, #CACHE_DLINESIZE - 1 | 177 | tst r0, #CACHE_DLINESIZE - 1 |
178 | bic r0, r0, #CACHE_DLINESIZE - 1 | 178 | bic r0, r0, #CACHE_DLINESIZE - 1 |
179 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry | 179 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry |
@@ -194,7 +194,7 @@ ENTRY(v4wb_dma_inv_range) | |||
194 | * - start - virtual start address | 194 | * - start - virtual start address |
195 | * - end - virtual end address | 195 | * - end - virtual end address |
196 | */ | 196 | */ |
197 | ENTRY(v4wb_dma_clean_range) | 197 | v4wb_dma_clean_range: |
198 | bic r0, r0, #CACHE_DLINESIZE - 1 | 198 | bic r0, r0, #CACHE_DLINESIZE - 1 |
199 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 199 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
200 | add r0, r0, #CACHE_DLINESIZE | 200 | add r0, r0, #CACHE_DLINESIZE |
@@ -216,6 +216,30 @@ ENTRY(v4wb_dma_clean_range) | |||
216 | .globl v4wb_dma_flush_range | 216 | .globl v4wb_dma_flush_range |
217 | .set v4wb_dma_flush_range, v4wb_coherent_kern_range | 217 | .set v4wb_dma_flush_range, v4wb_coherent_kern_range |
218 | 218 | ||
219 | /* | ||
220 | * dma_map_area(start, size, dir) | ||
221 | * - start - kernel virtual start address | ||
222 | * - size - size of region | ||
223 | * - dir - DMA direction | ||
224 | */ | ||
225 | ENTRY(v4wb_dma_map_area) | ||
226 | add r1, r1, r0 | ||
227 | cmp r2, #DMA_TO_DEVICE | ||
228 | beq v4wb_dma_clean_range | ||
229 | bcs v4wb_dma_inv_range | ||
230 | b v4wb_dma_flush_range | ||
231 | ENDPROC(v4wb_dma_map_area) | ||
232 | |||
233 | /* | ||
234 | * dma_unmap_area(start, size, dir) | ||
235 | * - start - kernel virtual start address | ||
236 | * - size - size of region | ||
237 | * - dir - DMA direction | ||
238 | */ | ||
239 | ENTRY(v4wb_dma_unmap_area) | ||
240 | mov pc, lr | ||
241 | ENDPROC(v4wb_dma_unmap_area) | ||
242 | |||
219 | __INITDATA | 243 | __INITDATA |
220 | 244 | ||
221 | .type v4wb_cache_fns, #object | 245 | .type v4wb_cache_fns, #object |
@@ -226,7 +250,7 @@ ENTRY(v4wb_cache_fns) | |||
226 | .long v4wb_coherent_kern_range | 250 | .long v4wb_coherent_kern_range |
227 | .long v4wb_coherent_user_range | 251 | .long v4wb_coherent_user_range |
228 | .long v4wb_flush_kern_dcache_area | 252 | .long v4wb_flush_kern_dcache_area |
229 | .long v4wb_dma_inv_range | 253 | .long v4wb_dma_map_area |
230 | .long v4wb_dma_clean_range | 254 | .long v4wb_dma_unmap_area |
231 | .long v4wb_dma_flush_range | 255 | .long v4wb_dma_flush_range |
232 | .size v4wb_cache_fns, . - v4wb_cache_fns | 256 | .size v4wb_cache_fns, . - v4wb_cache_fns |
diff --git a/arch/arm/mm/cache-v4wt.S b/arch/arm/mm/cache-v4wt.S index b3b7410270b4..45c70312f43b 100644 --- a/arch/arm/mm/cache-v4wt.S +++ b/arch/arm/mm/cache-v4wt.S | |||
@@ -142,23 +142,12 @@ ENTRY(v4wt_flush_kern_dcache_area) | |||
142 | * - start - virtual start address | 142 | * - start - virtual start address |
143 | * - end - virtual end address | 143 | * - end - virtual end address |
144 | */ | 144 | */ |
145 | ENTRY(v4wt_dma_inv_range) | 145 | v4wt_dma_inv_range: |
146 | bic r0, r0, #CACHE_DLINESIZE - 1 | 146 | bic r0, r0, #CACHE_DLINESIZE - 1 |
147 | 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry | 147 | 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate D entry |
148 | add r0, r0, #CACHE_DLINESIZE | 148 | add r0, r0, #CACHE_DLINESIZE |
149 | cmp r0, r1 | 149 | cmp r0, r1 |
150 | blo 1b | 150 | blo 1b |
151 | /* FALLTHROUGH */ | ||
152 | |||
153 | /* | ||
154 | * dma_clean_range(start, end) | ||
155 | * | ||
156 | * Clean the specified virtual address range. | ||
157 | * | ||
158 | * - start - virtual start address | ||
159 | * - end - virtual end address | ||
160 | */ | ||
161 | ENTRY(v4wt_dma_clean_range) | ||
162 | mov pc, lr | 151 | mov pc, lr |
163 | 152 | ||
164 | /* | 153 | /* |
@@ -172,6 +161,29 @@ ENTRY(v4wt_dma_clean_range) | |||
172 | .globl v4wt_dma_flush_range | 161 | .globl v4wt_dma_flush_range |
173 | .equ v4wt_dma_flush_range, v4wt_dma_inv_range | 162 | .equ v4wt_dma_flush_range, v4wt_dma_inv_range |
174 | 163 | ||
164 | /* | ||
165 | * dma_unmap_area(start, size, dir) | ||
166 | * - start - kernel virtual start address | ||
167 | * - size - size of region | ||
168 | * - dir - DMA direction | ||
169 | */ | ||
170 | ENTRY(v4wt_dma_unmap_area) | ||
171 | add r1, r1, r0 | ||
172 | teq r2, #DMA_TO_DEVICE | ||
173 | bne v4wt_dma_inv_range | ||
174 | /* FALLTHROUGH */ | ||
175 | |||
176 | /* | ||
177 | * dma_map_area(start, size, dir) | ||
178 | * - start - kernel virtual start address | ||
179 | * - size - size of region | ||
180 | * - dir - DMA direction | ||
181 | */ | ||
182 | ENTRY(v4wt_dma_map_area) | ||
183 | mov pc, lr | ||
184 | ENDPROC(v4wt_dma_unmap_area) | ||
185 | ENDPROC(v4wt_dma_map_area) | ||
186 | |||
175 | __INITDATA | 187 | __INITDATA |
176 | 188 | ||
177 | .type v4wt_cache_fns, #object | 189 | .type v4wt_cache_fns, #object |
@@ -182,7 +194,7 @@ ENTRY(v4wt_cache_fns) | |||
182 | .long v4wt_coherent_kern_range | 194 | .long v4wt_coherent_kern_range |
183 | .long v4wt_coherent_user_range | 195 | .long v4wt_coherent_user_range |
184 | .long v4wt_flush_kern_dcache_area | 196 | .long v4wt_flush_kern_dcache_area |
185 | .long v4wt_dma_inv_range | 197 | .long v4wt_dma_map_area |
186 | .long v4wt_dma_clean_range | 198 | .long v4wt_dma_unmap_area |
187 | .long v4wt_dma_flush_range | 199 | .long v4wt_dma_flush_range |
188 | .size v4wt_cache_fns, . - v4wt_cache_fns | 200 | .size v4wt_cache_fns, . - v4wt_cache_fns |
diff --git a/arch/arm/mm/cache-v6.S b/arch/arm/mm/cache-v6.S index 4ba0a24ce6f5..9d89c67a1cc3 100644 --- a/arch/arm/mm/cache-v6.S +++ b/arch/arm/mm/cache-v6.S | |||
@@ -195,7 +195,7 @@ ENTRY(v6_flush_kern_dcache_area) | |||
195 | * - start - virtual start address of region | 195 | * - start - virtual start address of region |
196 | * - end - virtual end address of region | 196 | * - end - virtual end address of region |
197 | */ | 197 | */ |
198 | ENTRY(v6_dma_inv_range) | 198 | v6_dma_inv_range: |
199 | tst r0, #D_CACHE_LINE_SIZE - 1 | 199 | tst r0, #D_CACHE_LINE_SIZE - 1 |
200 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 | 200 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 |
201 | #ifdef HARVARD_CACHE | 201 | #ifdef HARVARD_CACHE |
@@ -228,7 +228,7 @@ ENTRY(v6_dma_inv_range) | |||
228 | * - start - virtual start address of region | 228 | * - start - virtual start address of region |
229 | * - end - virtual end address of region | 229 | * - end - virtual end address of region |
230 | */ | 230 | */ |
231 | ENTRY(v6_dma_clean_range) | 231 | v6_dma_clean_range: |
232 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 | 232 | bic r0, r0, #D_CACHE_LINE_SIZE - 1 |
233 | 1: | 233 | 1: |
234 | #ifdef HARVARD_CACHE | 234 | #ifdef HARVARD_CACHE |
@@ -263,6 +263,32 @@ ENTRY(v6_dma_flush_range) | |||
263 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer | 263 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer |
264 | mov pc, lr | 264 | mov pc, lr |
265 | 265 | ||
266 | /* | ||
267 | * dma_map_area(start, size, dir) | ||
268 | * - start - kernel virtual start address | ||
269 | * - size - size of region | ||
270 | * - dir - DMA direction | ||
271 | */ | ||
272 | ENTRY(v6_dma_map_area) | ||
273 | add r1, r1, r0 | ||
274 | teq r2, #DMA_FROM_DEVICE | ||
275 | beq v6_dma_inv_range | ||
276 | b v6_dma_clean_range | ||
277 | ENDPROC(v6_dma_map_area) | ||
278 | |||
279 | /* | ||
280 | * dma_unmap_area(start, size, dir) | ||
281 | * - start - kernel virtual start address | ||
282 | * - size - size of region | ||
283 | * - dir - DMA direction | ||
284 | */ | ||
285 | ENTRY(v6_dma_unmap_area) | ||
286 | add r1, r1, r0 | ||
287 | teq r2, #DMA_TO_DEVICE | ||
288 | bne v6_dma_inv_range | ||
289 | mov pc, lr | ||
290 | ENDPROC(v6_dma_unmap_area) | ||
291 | |||
266 | __INITDATA | 292 | __INITDATA |
267 | 293 | ||
268 | .type v6_cache_fns, #object | 294 | .type v6_cache_fns, #object |
@@ -273,7 +299,7 @@ ENTRY(v6_cache_fns) | |||
273 | .long v6_coherent_kern_range | 299 | .long v6_coherent_kern_range |
274 | .long v6_coherent_user_range | 300 | .long v6_coherent_user_range |
275 | .long v6_flush_kern_dcache_area | 301 | .long v6_flush_kern_dcache_area |
276 | .long v6_dma_inv_range | 302 | .long v6_dma_map_area |
277 | .long v6_dma_clean_range | 303 | .long v6_dma_unmap_area |
278 | .long v6_dma_flush_range | 304 | .long v6_dma_flush_range |
279 | .size v6_cache_fns, . - v6_cache_fns | 305 | .size v6_cache_fns, . - v6_cache_fns |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index 9073db849fb4..bcd64f265870 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -216,7 +216,7 @@ ENDPROC(v7_flush_kern_dcache_area) | |||
216 | * - start - virtual start address of region | 216 | * - start - virtual start address of region |
217 | * - end - virtual end address of region | 217 | * - end - virtual end address of region |
218 | */ | 218 | */ |
219 | ENTRY(v7_dma_inv_range) | 219 | v7_dma_inv_range: |
220 | dcache_line_size r2, r3 | 220 | dcache_line_size r2, r3 |
221 | sub r3, r2, #1 | 221 | sub r3, r2, #1 |
222 | tst r0, r3 | 222 | tst r0, r3 |
@@ -240,7 +240,7 @@ ENDPROC(v7_dma_inv_range) | |||
240 | * - start - virtual start address of region | 240 | * - start - virtual start address of region |
241 | * - end - virtual end address of region | 241 | * - end - virtual end address of region |
242 | */ | 242 | */ |
243 | ENTRY(v7_dma_clean_range) | 243 | v7_dma_clean_range: |
244 | dcache_line_size r2, r3 | 244 | dcache_line_size r2, r3 |
245 | sub r3, r2, #1 | 245 | sub r3, r2, #1 |
246 | bic r0, r0, r3 | 246 | bic r0, r0, r3 |
@@ -271,6 +271,32 @@ ENTRY(v7_dma_flush_range) | |||
271 | mov pc, lr | 271 | mov pc, lr |
272 | ENDPROC(v7_dma_flush_range) | 272 | ENDPROC(v7_dma_flush_range) |
273 | 273 | ||
274 | /* | ||
275 | * dma_map_area(start, size, dir) | ||
276 | * - start - kernel virtual start address | ||
277 | * - size - size of region | ||
278 | * - dir - DMA direction | ||
279 | */ | ||
280 | ENTRY(v7_dma_map_area) | ||
281 | add r1, r1, r0 | ||
282 | teq r2, #DMA_FROM_DEVICE | ||
283 | beq v7_dma_inv_range | ||
284 | b v7_dma_clean_range | ||
285 | ENDPROC(v7_dma_map_area) | ||
286 | |||
287 | /* | ||
288 | * dma_unmap_area(start, size, dir) | ||
289 | * - start - kernel virtual start address | ||
290 | * - size - size of region | ||
291 | * - dir - DMA direction | ||
292 | */ | ||
293 | ENTRY(v7_dma_unmap_area) | ||
294 | add r1, r1, r0 | ||
295 | teq r2, #DMA_TO_DEVICE | ||
296 | bne v7_dma_inv_range | ||
297 | mov pc, lr | ||
298 | ENDPROC(v7_dma_unmap_area) | ||
299 | |||
274 | __INITDATA | 300 | __INITDATA |
275 | 301 | ||
276 | .type v7_cache_fns, #object | 302 | .type v7_cache_fns, #object |
@@ -281,7 +307,7 @@ ENTRY(v7_cache_fns) | |||
281 | .long v7_coherent_kern_range | 307 | .long v7_coherent_kern_range |
282 | .long v7_coherent_user_range | 308 | .long v7_coherent_user_range |
283 | .long v7_flush_kern_dcache_area | 309 | .long v7_flush_kern_dcache_area |
284 | .long v7_dma_inv_range | 310 | .long v7_dma_map_area |
285 | .long v7_dma_clean_range | 311 | .long v7_dma_unmap_area |
286 | .long v7_dma_flush_range | 312 | .long v7_dma_flush_range |
287 | .size v7_cache_fns, . - v7_cache_fns | 313 | .size v7_cache_fns, . - v7_cache_fns |
diff --git a/arch/arm/mm/cache-xsc3l2.c b/arch/arm/mm/cache-xsc3l2.c index 5d180cb0bd94..c3154928bccd 100644 --- a/arch/arm/mm/cache-xsc3l2.c +++ b/arch/arm/mm/cache-xsc3l2.c | |||
@@ -221,15 +221,14 @@ static int __init xsc3_l2_init(void) | |||
221 | if (!cpu_is_xsc3() || !xsc3_l2_present()) | 221 | if (!cpu_is_xsc3() || !xsc3_l2_present()) |
222 | return 0; | 222 | return 0; |
223 | 223 | ||
224 | if (!(get_cr() & CR_L2)) { | 224 | if (get_cr() & CR_L2) { |
225 | pr_info("XScale3 L2 cache enabled.\n"); | 225 | pr_info("XScale3 L2 cache enabled.\n"); |
226 | adjust_cr(CR_L2, CR_L2); | ||
227 | xsc3_l2_inv_all(); | 226 | xsc3_l2_inv_all(); |
228 | } | ||
229 | 227 | ||
230 | outer_cache.inv_range = xsc3_l2_inv_range; | 228 | outer_cache.inv_range = xsc3_l2_inv_range; |
231 | outer_cache.clean_range = xsc3_l2_clean_range; | 229 | outer_cache.clean_range = xsc3_l2_clean_range; |
232 | outer_cache.flush_range = xsc3_l2_flush_range; | 230 | outer_cache.flush_range = xsc3_l2_flush_range; |
231 | } | ||
233 | 232 | ||
234 | return 0; | 233 | return 0; |
235 | } | 234 | } |
diff --git a/arch/arm/mm/copypage-feroceon.c b/arch/arm/mm/copypage-feroceon.c index 70997d5bee2d..5eb4fd93893d 100644 --- a/arch/arm/mm/copypage-feroceon.c +++ b/arch/arm/mm/copypage-feroceon.c | |||
@@ -68,12 +68,13 @@ feroceon_copy_user_page(void *kto, const void *kfrom) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | void feroceon_copy_user_highpage(struct page *to, struct page *from, | 70 | void feroceon_copy_user_highpage(struct page *to, struct page *from, |
71 | unsigned long vaddr) | 71 | unsigned long vaddr, struct vm_area_struct *vma) |
72 | { | 72 | { |
73 | void *kto, *kfrom; | 73 | void *kto, *kfrom; |
74 | 74 | ||
75 | kto = kmap_atomic(to, KM_USER0); | 75 | kto = kmap_atomic(to, KM_USER0); |
76 | kfrom = kmap_atomic(from, KM_USER1); | 76 | kfrom = kmap_atomic(from, KM_USER1); |
77 | flush_cache_page(vma, vaddr, page_to_pfn(from)); | ||
77 | feroceon_copy_user_page(kto, kfrom); | 78 | feroceon_copy_user_page(kto, kfrom); |
78 | kunmap_atomic(kfrom, KM_USER1); | 79 | kunmap_atomic(kfrom, KM_USER1); |
79 | kunmap_atomic(kto, KM_USER0); | 80 | kunmap_atomic(kto, KM_USER0); |
diff --git a/arch/arm/mm/copypage-v3.c b/arch/arm/mm/copypage-v3.c index de9c06854ad7..f72303e1d804 100644 --- a/arch/arm/mm/copypage-v3.c +++ b/arch/arm/mm/copypage-v3.c | |||
@@ -38,7 +38,7 @@ v3_copy_user_page(void *kto, const void *kfrom) | |||
38 | } | 38 | } |
39 | 39 | ||
40 | void v3_copy_user_highpage(struct page *to, struct page *from, | 40 | void v3_copy_user_highpage(struct page *to, struct page *from, |
41 | unsigned long vaddr) | 41 | unsigned long vaddr, struct vm_area_struct *vma) |
42 | { | 42 | { |
43 | void *kto, *kfrom; | 43 | void *kto, *kfrom; |
44 | 44 | ||
diff --git a/arch/arm/mm/copypage-v4mc.c b/arch/arm/mm/copypage-v4mc.c index 7370a7142b04..598c51ad5071 100644 --- a/arch/arm/mm/copypage-v4mc.c +++ b/arch/arm/mm/copypage-v4mc.c | |||
@@ -69,7 +69,7 @@ mc_copy_user_page(void *from, void *to) | |||
69 | } | 69 | } |
70 | 70 | ||
71 | void v4_mc_copy_user_highpage(struct page *to, struct page *from, | 71 | void v4_mc_copy_user_highpage(struct page *to, struct page *from, |
72 | unsigned long vaddr) | 72 | unsigned long vaddr, struct vm_area_struct *vma) |
73 | { | 73 | { |
74 | void *kto = kmap_atomic(to, KM_USER1); | 74 | void *kto = kmap_atomic(to, KM_USER1); |
75 | 75 | ||
diff --git a/arch/arm/mm/copypage-v4wb.c b/arch/arm/mm/copypage-v4wb.c index 9ab098414227..7c2eb55cd4a9 100644 --- a/arch/arm/mm/copypage-v4wb.c +++ b/arch/arm/mm/copypage-v4wb.c | |||
@@ -48,12 +48,13 @@ v4wb_copy_user_page(void *kto, const void *kfrom) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | void v4wb_copy_user_highpage(struct page *to, struct page *from, | 50 | void v4wb_copy_user_highpage(struct page *to, struct page *from, |
51 | unsigned long vaddr) | 51 | unsigned long vaddr, struct vm_area_struct *vma) |
52 | { | 52 | { |
53 | void *kto, *kfrom; | 53 | void *kto, *kfrom; |
54 | 54 | ||
55 | kto = kmap_atomic(to, KM_USER0); | 55 | kto = kmap_atomic(to, KM_USER0); |
56 | kfrom = kmap_atomic(from, KM_USER1); | 56 | kfrom = kmap_atomic(from, KM_USER1); |
57 | flush_cache_page(vma, vaddr, page_to_pfn(from)); | ||
57 | v4wb_copy_user_page(kto, kfrom); | 58 | v4wb_copy_user_page(kto, kfrom); |
58 | kunmap_atomic(kfrom, KM_USER1); | 59 | kunmap_atomic(kfrom, KM_USER1); |
59 | kunmap_atomic(kto, KM_USER0); | 60 | kunmap_atomic(kto, KM_USER0); |
diff --git a/arch/arm/mm/copypage-v4wt.c b/arch/arm/mm/copypage-v4wt.c index 300efafd6643..172e6a55458e 100644 --- a/arch/arm/mm/copypage-v4wt.c +++ b/arch/arm/mm/copypage-v4wt.c | |||
@@ -44,7 +44,7 @@ v4wt_copy_user_page(void *kto, const void *kfrom) | |||
44 | } | 44 | } |
45 | 45 | ||
46 | void v4wt_copy_user_highpage(struct page *to, struct page *from, | 46 | void v4wt_copy_user_highpage(struct page *to, struct page *from, |
47 | unsigned long vaddr) | 47 | unsigned long vaddr, struct vm_area_struct *vma) |
48 | { | 48 | { |
49 | void *kto, *kfrom; | 49 | void *kto, *kfrom; |
50 | 50 | ||
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c index 0fa1319273de..8bca4dea6dfa 100644 --- a/arch/arm/mm/copypage-v6.c +++ b/arch/arm/mm/copypage-v6.c | |||
@@ -34,7 +34,7 @@ static DEFINE_SPINLOCK(v6_lock); | |||
34 | * attack the kernel's existing mapping of these pages. | 34 | * attack the kernel's existing mapping of these pages. |
35 | */ | 35 | */ |
36 | static void v6_copy_user_highpage_nonaliasing(struct page *to, | 36 | static void v6_copy_user_highpage_nonaliasing(struct page *to, |
37 | struct page *from, unsigned long vaddr) | 37 | struct page *from, unsigned long vaddr, struct vm_area_struct *vma) |
38 | { | 38 | { |
39 | void *kto, *kfrom; | 39 | void *kto, *kfrom; |
40 | 40 | ||
@@ -81,7 +81,7 @@ static void discard_old_kernel_data(void *kto) | |||
81 | * Copy the page, taking account of the cache colour. | 81 | * Copy the page, taking account of the cache colour. |
82 | */ | 82 | */ |
83 | static void v6_copy_user_highpage_aliasing(struct page *to, | 83 | static void v6_copy_user_highpage_aliasing(struct page *to, |
84 | struct page *from, unsigned long vaddr) | 84 | struct page *from, unsigned long vaddr, struct vm_area_struct *vma) |
85 | { | 85 | { |
86 | unsigned int offset = CACHE_COLOUR(vaddr); | 86 | unsigned int offset = CACHE_COLOUR(vaddr); |
87 | unsigned long kfrom, kto; | 87 | unsigned long kfrom, kto; |
diff --git a/arch/arm/mm/copypage-xsc3.c b/arch/arm/mm/copypage-xsc3.c index bc4525f5ab23..747ad4140fc7 100644 --- a/arch/arm/mm/copypage-xsc3.c +++ b/arch/arm/mm/copypage-xsc3.c | |||
@@ -71,12 +71,13 @@ xsc3_mc_copy_user_page(void *kto, const void *kfrom) | |||
71 | } | 71 | } |
72 | 72 | ||
73 | void xsc3_mc_copy_user_highpage(struct page *to, struct page *from, | 73 | void xsc3_mc_copy_user_highpage(struct page *to, struct page *from, |
74 | unsigned long vaddr) | 74 | unsigned long vaddr, struct vm_area_struct *vma) |
75 | { | 75 | { |
76 | void *kto, *kfrom; | 76 | void *kto, *kfrom; |
77 | 77 | ||
78 | kto = kmap_atomic(to, KM_USER0); | 78 | kto = kmap_atomic(to, KM_USER0); |
79 | kfrom = kmap_atomic(from, KM_USER1); | 79 | kfrom = kmap_atomic(from, KM_USER1); |
80 | flush_cache_page(vma, vaddr, page_to_pfn(from)); | ||
80 | xsc3_mc_copy_user_page(kto, kfrom); | 81 | xsc3_mc_copy_user_page(kto, kfrom); |
81 | kunmap_atomic(kfrom, KM_USER1); | 82 | kunmap_atomic(kfrom, KM_USER1); |
82 | kunmap_atomic(kto, KM_USER0); | 83 | kunmap_atomic(kto, KM_USER0); |
diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c index 76824d3e966a..9920c0ae2096 100644 --- a/arch/arm/mm/copypage-xscale.c +++ b/arch/arm/mm/copypage-xscale.c | |||
@@ -91,7 +91,7 @@ mc_copy_user_page(void *from, void *to) | |||
91 | } | 91 | } |
92 | 92 | ||
93 | void xscale_mc_copy_user_highpage(struct page *to, struct page *from, | 93 | void xscale_mc_copy_user_highpage(struct page *to, struct page *from, |
94 | unsigned long vaddr) | 94 | unsigned long vaddr, struct vm_area_struct *vma) |
95 | { | 95 | { |
96 | void *kto = kmap_atomic(to, KM_USER1); | 96 | void *kto = kmap_atomic(to, KM_USER1); |
97 | 97 | ||
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 26325cb5d368..64daef2173bd 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -404,78 +404,44 @@ EXPORT_SYMBOL(dma_free_coherent); | |||
404 | * platforms with CONFIG_DMABOUNCE. | 404 | * platforms with CONFIG_DMABOUNCE. |
405 | * Use the driver DMA support - see dma-mapping.h (dma_sync_*) | 405 | * Use the driver DMA support - see dma-mapping.h (dma_sync_*) |
406 | */ | 406 | */ |
407 | void dma_cache_maint(const void *start, size_t size, int direction) | 407 | void ___dma_single_cpu_to_dev(const void *kaddr, size_t size, |
408 | enum dma_data_direction dir) | ||
408 | { | 409 | { |
409 | void (*inner_op)(const void *, const void *); | 410 | unsigned long paddr; |
410 | void (*outer_op)(unsigned long, unsigned long); | 411 | |
411 | 412 | BUG_ON(!virt_addr_valid(kaddr) || !virt_addr_valid(kaddr + size - 1)); | |
412 | BUG_ON(!virt_addr_valid(start) || !virt_addr_valid(start + size - 1)); | 413 | |
413 | 414 | dmac_map_area(kaddr, size, dir); | |
414 | switch (direction) { | ||
415 | case DMA_FROM_DEVICE: /* invalidate only */ | ||
416 | inner_op = dmac_inv_range; | ||
417 | outer_op = outer_inv_range; | ||
418 | break; | ||
419 | case DMA_TO_DEVICE: /* writeback only */ | ||
420 | inner_op = dmac_clean_range; | ||
421 | outer_op = outer_clean_range; | ||
422 | break; | ||
423 | case DMA_BIDIRECTIONAL: /* writeback and invalidate */ | ||
424 | inner_op = dmac_flush_range; | ||
425 | outer_op = outer_flush_range; | ||
426 | break; | ||
427 | default: | ||
428 | BUG(); | ||
429 | } | ||
430 | 415 | ||
431 | inner_op(start, start + size); | 416 | paddr = __pa(kaddr); |
432 | outer_op(__pa(start), __pa(start) + size); | 417 | if (dir == DMA_FROM_DEVICE) { |
418 | outer_inv_range(paddr, paddr + size); | ||
419 | } else { | ||
420 | outer_clean_range(paddr, paddr + size); | ||
421 | } | ||
422 | /* FIXME: non-speculating: flush on bidirectional mappings? */ | ||
433 | } | 423 | } |
434 | EXPORT_SYMBOL(dma_cache_maint); | 424 | EXPORT_SYMBOL(___dma_single_cpu_to_dev); |
435 | 425 | ||
436 | static void dma_cache_maint_contiguous(struct page *page, unsigned long offset, | 426 | void ___dma_single_dev_to_cpu(const void *kaddr, size_t size, |
437 | size_t size, int direction) | 427 | enum dma_data_direction dir) |
438 | { | 428 | { |
439 | void *vaddr; | 429 | BUG_ON(!virt_addr_valid(kaddr) || !virt_addr_valid(kaddr + size - 1)); |
440 | unsigned long paddr; | ||
441 | void (*inner_op)(const void *, const void *); | ||
442 | void (*outer_op)(unsigned long, unsigned long); | ||
443 | |||
444 | switch (direction) { | ||
445 | case DMA_FROM_DEVICE: /* invalidate only */ | ||
446 | inner_op = dmac_inv_range; | ||
447 | outer_op = outer_inv_range; | ||
448 | break; | ||
449 | case DMA_TO_DEVICE: /* writeback only */ | ||
450 | inner_op = dmac_clean_range; | ||
451 | outer_op = outer_clean_range; | ||
452 | break; | ||
453 | case DMA_BIDIRECTIONAL: /* writeback and invalidate */ | ||
454 | inner_op = dmac_flush_range; | ||
455 | outer_op = outer_flush_range; | ||
456 | break; | ||
457 | default: | ||
458 | BUG(); | ||
459 | } | ||
460 | 430 | ||
461 | if (!PageHighMem(page)) { | 431 | /* FIXME: non-speculating: not required */ |
462 | vaddr = page_address(page) + offset; | 432 | /* don't bother invalidating if DMA to device */ |
463 | inner_op(vaddr, vaddr + size); | 433 | if (dir != DMA_TO_DEVICE) { |
464 | } else { | 434 | unsigned long paddr = __pa(kaddr); |
465 | vaddr = kmap_high_get(page); | 435 | outer_inv_range(paddr, paddr + size); |
466 | if (vaddr) { | ||
467 | vaddr += offset; | ||
468 | inner_op(vaddr, vaddr + size); | ||
469 | kunmap_high(page); | ||
470 | } | ||
471 | } | 436 | } |
472 | 437 | ||
473 | paddr = page_to_phys(page) + offset; | 438 | dmac_unmap_area(kaddr, size, dir); |
474 | outer_op(paddr, paddr + size); | ||
475 | } | 439 | } |
440 | EXPORT_SYMBOL(___dma_single_dev_to_cpu); | ||
476 | 441 | ||
477 | void dma_cache_maint_page(struct page *page, unsigned long offset, | 442 | static void dma_cache_maint_page(struct page *page, unsigned long offset, |
478 | size_t size, int dir) | 443 | size_t size, enum dma_data_direction dir, |
444 | void (*op)(const void *, size_t, int)) | ||
479 | { | 445 | { |
480 | /* | 446 | /* |
481 | * A single sg entry may refer to multiple physically contiguous | 447 | * A single sg entry may refer to multiple physically contiguous |
@@ -486,20 +452,62 @@ void dma_cache_maint_page(struct page *page, unsigned long offset, | |||
486 | size_t left = size; | 452 | size_t left = size; |
487 | do { | 453 | do { |
488 | size_t len = left; | 454 | size_t len = left; |
489 | if (PageHighMem(page) && len + offset > PAGE_SIZE) { | 455 | void *vaddr; |
490 | if (offset >= PAGE_SIZE) { | 456 | |
491 | page += offset / PAGE_SIZE; | 457 | if (PageHighMem(page)) { |
492 | offset %= PAGE_SIZE; | 458 | if (len + offset > PAGE_SIZE) { |
459 | if (offset >= PAGE_SIZE) { | ||
460 | page += offset / PAGE_SIZE; | ||
461 | offset %= PAGE_SIZE; | ||
462 | } | ||
463 | len = PAGE_SIZE - offset; | ||
493 | } | 464 | } |
494 | len = PAGE_SIZE - offset; | 465 | vaddr = kmap_high_get(page); |
466 | if (vaddr) { | ||
467 | vaddr += offset; | ||
468 | op(vaddr, len, dir); | ||
469 | kunmap_high(page); | ||
470 | } | ||
471 | } else { | ||
472 | vaddr = page_address(page) + offset; | ||
473 | op(vaddr, len, dir); | ||
495 | } | 474 | } |
496 | dma_cache_maint_contiguous(page, offset, len, dir); | ||
497 | offset = 0; | 475 | offset = 0; |
498 | page++; | 476 | page++; |
499 | left -= len; | 477 | left -= len; |
500 | } while (left); | 478 | } while (left); |
501 | } | 479 | } |
502 | EXPORT_SYMBOL(dma_cache_maint_page); | 480 | |
481 | void ___dma_page_cpu_to_dev(struct page *page, unsigned long off, | ||
482 | size_t size, enum dma_data_direction dir) | ||
483 | { | ||
484 | unsigned long paddr; | ||
485 | |||
486 | dma_cache_maint_page(page, off, size, dir, dmac_map_area); | ||
487 | |||
488 | paddr = page_to_phys(page) + off; | ||
489 | if (dir == DMA_FROM_DEVICE) { | ||
490 | outer_inv_range(paddr, paddr + size); | ||
491 | } else { | ||
492 | outer_clean_range(paddr, paddr + size); | ||
493 | } | ||
494 | /* FIXME: non-speculating: flush on bidirectional mappings? */ | ||
495 | } | ||
496 | EXPORT_SYMBOL(___dma_page_cpu_to_dev); | ||
497 | |||
498 | void ___dma_page_dev_to_cpu(struct page *page, unsigned long off, | ||
499 | size_t size, enum dma_data_direction dir) | ||
500 | { | ||
501 | unsigned long paddr = page_to_phys(page) + off; | ||
502 | |||
503 | /* FIXME: non-speculating: not required */ | ||
504 | /* don't bother invalidating if DMA to device */ | ||
505 | if (dir != DMA_TO_DEVICE) | ||
506 | outer_inv_range(paddr, paddr + size); | ||
507 | |||
508 | dma_cache_maint_page(page, off, size, dir, dmac_unmap_area); | ||
509 | } | ||
510 | EXPORT_SYMBOL(___dma_page_dev_to_cpu); | ||
503 | 511 | ||
504 | /** | 512 | /** |
505 | * dma_map_sg - map a set of SG buffers for streaming mode DMA | 513 | * dma_map_sg - map a set of SG buffers for streaming mode DMA |
@@ -573,8 +581,12 @@ void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, | |||
573 | int i; | 581 | int i; |
574 | 582 | ||
575 | for_each_sg(sg, s, nents, i) { | 583 | for_each_sg(sg, s, nents, i) { |
576 | dmabounce_sync_for_cpu(dev, sg_dma_address(s), 0, | 584 | if (!dmabounce_sync_for_cpu(dev, sg_dma_address(s), 0, |
577 | sg_dma_len(s), dir); | 585 | sg_dma_len(s), dir)) |
586 | continue; | ||
587 | |||
588 | __dma_page_dev_to_cpu(sg_page(s), s->offset, | ||
589 | s->length, dir); | ||
578 | } | 590 | } |
579 | } | 591 | } |
580 | EXPORT_SYMBOL(dma_sync_sg_for_cpu); | 592 | EXPORT_SYMBOL(dma_sync_sg_for_cpu); |
@@ -597,9 +609,8 @@ void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, | |||
597 | sg_dma_len(s), dir)) | 609 | sg_dma_len(s), dir)) |
598 | continue; | 610 | continue; |
599 | 611 | ||
600 | if (!arch_is_coherent()) | 612 | __dma_page_cpu_to_dev(sg_page(s), s->offset, |
601 | dma_cache_maint_page(sg_page(s), s->offset, | 613 | s->length, dir); |
602 | s->length, dir); | ||
603 | } | 614 | } |
604 | } | 615 | } |
605 | EXPORT_SYMBOL(dma_sync_sg_for_device); | 616 | EXPORT_SYMBOL(dma_sync_sg_for_device); |
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index 56ee15321b00..c9b97e9836a2 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c | |||
@@ -36,28 +36,12 @@ static unsigned long shared_pte_mask = L_PTE_MT_BUFFERABLE; | |||
36 | * Therefore those configurations which might call adjust_pte (those | 36 | * Therefore those configurations which might call adjust_pte (those |
37 | * without CONFIG_CPU_CACHE_VIPT) cannot support split page_table_lock. | 37 | * without CONFIG_CPU_CACHE_VIPT) cannot support split page_table_lock. |
38 | */ | 38 | */ |
39 | static int adjust_pte(struct vm_area_struct *vma, unsigned long address) | 39 | static int do_adjust_pte(struct vm_area_struct *vma, unsigned long address, |
40 | unsigned long pfn, pte_t *ptep) | ||
40 | { | 41 | { |
41 | pgd_t *pgd; | 42 | pte_t entry = *ptep; |
42 | pmd_t *pmd; | ||
43 | pte_t *pte, entry; | ||
44 | int ret; | 43 | int ret; |
45 | 44 | ||
46 | pgd = pgd_offset(vma->vm_mm, address); | ||
47 | if (pgd_none(*pgd)) | ||
48 | goto no_pgd; | ||
49 | if (pgd_bad(*pgd)) | ||
50 | goto bad_pgd; | ||
51 | |||
52 | pmd = pmd_offset(pgd, address); | ||
53 | if (pmd_none(*pmd)) | ||
54 | goto no_pmd; | ||
55 | if (pmd_bad(*pmd)) | ||
56 | goto bad_pmd; | ||
57 | |||
58 | pte = pte_offset_map(pmd, address); | ||
59 | entry = *pte; | ||
60 | |||
61 | /* | 45 | /* |
62 | * If this page is present, it's actually being shared. | 46 | * If this page is present, it's actually being shared. |
63 | */ | 47 | */ |
@@ -68,33 +52,55 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address) | |||
68 | * fault (ie, is old), we can safely ignore any issues. | 52 | * fault (ie, is old), we can safely ignore any issues. |
69 | */ | 53 | */ |
70 | if (ret && (pte_val(entry) & L_PTE_MT_MASK) != shared_pte_mask) { | 54 | if (ret && (pte_val(entry) & L_PTE_MT_MASK) != shared_pte_mask) { |
71 | unsigned long pfn = pte_pfn(entry); | ||
72 | flush_cache_page(vma, address, pfn); | 55 | flush_cache_page(vma, address, pfn); |
73 | outer_flush_range((pfn << PAGE_SHIFT), | 56 | outer_flush_range((pfn << PAGE_SHIFT), |
74 | (pfn << PAGE_SHIFT) + PAGE_SIZE); | 57 | (pfn << PAGE_SHIFT) + PAGE_SIZE); |
75 | pte_val(entry) &= ~L_PTE_MT_MASK; | 58 | pte_val(entry) &= ~L_PTE_MT_MASK; |
76 | pte_val(entry) |= shared_pte_mask; | 59 | pte_val(entry) |= shared_pte_mask; |
77 | set_pte_at(vma->vm_mm, address, pte, entry); | 60 | set_pte_at(vma->vm_mm, address, ptep, entry); |
78 | flush_tlb_page(vma, address); | 61 | flush_tlb_page(vma, address); |
79 | } | 62 | } |
80 | pte_unmap(pte); | 63 | |
81 | return ret; | 64 | return ret; |
65 | } | ||
66 | |||
67 | static int adjust_pte(struct vm_area_struct *vma, unsigned long address, | ||
68 | unsigned long pfn) | ||
69 | { | ||
70 | spinlock_t *ptl; | ||
71 | pgd_t *pgd; | ||
72 | pmd_t *pmd; | ||
73 | pte_t *pte; | ||
74 | int ret; | ||
75 | |||
76 | pgd = pgd_offset(vma->vm_mm, address); | ||
77 | if (pgd_none_or_clear_bad(pgd)) | ||
78 | return 0; | ||
79 | |||
80 | pmd = pmd_offset(pgd, address); | ||
81 | if (pmd_none_or_clear_bad(pmd)) | ||
82 | return 0; | ||
82 | 83 | ||
83 | bad_pgd: | 84 | /* |
84 | pgd_ERROR(*pgd); | 85 | * This is called while another page table is mapped, so we |
85 | pgd_clear(pgd); | 86 | * must use the nested version. This also means we need to |
86 | no_pgd: | 87 | * open-code the spin-locking. |
87 | return 0; | 88 | */ |
88 | 89 | ptl = pte_lockptr(vma->vm_mm, pmd); | |
89 | bad_pmd: | 90 | pte = pte_offset_map_nested(pmd, address); |
90 | pmd_ERROR(*pmd); | 91 | spin_lock(ptl); |
91 | pmd_clear(pmd); | 92 | |
92 | no_pmd: | 93 | ret = do_adjust_pte(vma, address, pfn, pte); |
93 | return 0; | 94 | |
95 | spin_unlock(ptl); | ||
96 | pte_unmap_nested(pte); | ||
97 | |||
98 | return ret; | ||
94 | } | 99 | } |
95 | 100 | ||
96 | static void | 101 | static void |
97 | make_coherent(struct address_space *mapping, struct vm_area_struct *vma, unsigned long addr, unsigned long pfn) | 102 | make_coherent(struct address_space *mapping, struct vm_area_struct *vma, |
103 | unsigned long addr, pte_t *ptep, unsigned long pfn) | ||
98 | { | 104 | { |
99 | struct mm_struct *mm = vma->vm_mm; | 105 | struct mm_struct *mm = vma->vm_mm; |
100 | struct vm_area_struct *mpnt; | 106 | struct vm_area_struct *mpnt; |
@@ -122,11 +128,11 @@ make_coherent(struct address_space *mapping, struct vm_area_struct *vma, unsigne | |||
122 | if (!(mpnt->vm_flags & VM_MAYSHARE)) | 128 | if (!(mpnt->vm_flags & VM_MAYSHARE)) |
123 | continue; | 129 | continue; |
124 | offset = (pgoff - mpnt->vm_pgoff) << PAGE_SHIFT; | 130 | offset = (pgoff - mpnt->vm_pgoff) << PAGE_SHIFT; |
125 | aliases += adjust_pte(mpnt, mpnt->vm_start + offset); | 131 | aliases += adjust_pte(mpnt, mpnt->vm_start + offset, pfn); |
126 | } | 132 | } |
127 | flush_dcache_mmap_unlock(mapping); | 133 | flush_dcache_mmap_unlock(mapping); |
128 | if (aliases) | 134 | if (aliases) |
129 | adjust_pte(vma, addr); | 135 | do_adjust_pte(vma, addr, pfn, ptep); |
130 | else | 136 | else |
131 | flush_cache_page(vma, addr, pfn); | 137 | flush_cache_page(vma, addr, pfn); |
132 | } | 138 | } |
@@ -144,9 +150,10 @@ make_coherent(struct address_space *mapping, struct vm_area_struct *vma, unsigne | |||
144 | * | 150 | * |
145 | * Note that the pte lock will be held. | 151 | * Note that the pte lock will be held. |
146 | */ | 152 | */ |
147 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte) | 153 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, |
154 | pte_t *ptep) | ||
148 | { | 155 | { |
149 | unsigned long pfn = pte_pfn(pte); | 156 | unsigned long pfn = pte_pfn(*ptep); |
150 | struct address_space *mapping; | 157 | struct address_space *mapping; |
151 | struct page *page; | 158 | struct page *page; |
152 | 159 | ||
@@ -168,7 +175,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte) | |||
168 | #endif | 175 | #endif |
169 | if (mapping) { | 176 | if (mapping) { |
170 | if (cache_is_vivt()) | 177 | if (cache_is_vivt()) |
171 | make_coherent(mapping, vma, addr, pfn); | 178 | make_coherent(mapping, vma, addr, ptep, pfn); |
172 | else if (vma->vm_flags & VM_EXEC) | 179 | else if (vma->vm_flags & VM_EXEC) |
173 | __flush_icache_all(); | 180 | __flush_icache_all(); |
174 | } | 181 | } |
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index 6f3a4b7a3b82..e34f095e2090 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <asm/cacheflush.h> | 14 | #include <asm/cacheflush.h> |
15 | #include <asm/cachetype.h> | 15 | #include <asm/cachetype.h> |
16 | #include <asm/smp_plat.h> | ||
16 | #include <asm/system.h> | 17 | #include <asm/system.h> |
17 | #include <asm/tlbflush.h> | 18 | #include <asm/tlbflush.h> |
18 | 19 | ||
@@ -87,13 +88,26 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsig | |||
87 | if (vma->vm_flags & VM_EXEC && icache_is_vivt_asid_tagged()) | 88 | if (vma->vm_flags & VM_EXEC && icache_is_vivt_asid_tagged()) |
88 | __flush_icache_all(); | 89 | __flush_icache_all(); |
89 | } | 90 | } |
91 | #else | ||
92 | #define flush_pfn_alias(pfn,vaddr) do { } while (0) | ||
93 | #endif | ||
90 | 94 | ||
95 | #ifdef CONFIG_SMP | ||
96 | static void flush_ptrace_access_other(void *args) | ||
97 | { | ||
98 | __flush_icache_all(); | ||
99 | } | ||
100 | #endif | ||
101 | |||
102 | static | ||
91 | void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, | 103 | void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, |
92 | unsigned long uaddr, void *kaddr, | 104 | unsigned long uaddr, void *kaddr, unsigned long len) |
93 | unsigned long len, int write) | ||
94 | { | 105 | { |
95 | if (cache_is_vivt()) { | 106 | if (cache_is_vivt()) { |
96 | vivt_flush_ptrace_access(vma, page, uaddr, kaddr, len, write); | 107 | if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) { |
108 | unsigned long addr = (unsigned long)kaddr; | ||
109 | __cpuc_coherent_kern_range(addr, addr + len); | ||
110 | } | ||
97 | return; | 111 | return; |
98 | } | 112 | } |
99 | 113 | ||
@@ -104,16 +118,37 @@ void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, | |||
104 | } | 118 | } |
105 | 119 | ||
106 | /* VIPT non-aliasing cache */ | 120 | /* VIPT non-aliasing cache */ |
107 | if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm)) && | 121 | if (vma->vm_flags & VM_EXEC) { |
108 | vma->vm_flags & VM_EXEC) { | ||
109 | unsigned long addr = (unsigned long)kaddr; | 122 | unsigned long addr = (unsigned long)kaddr; |
110 | /* only flushing the kernel mapping on non-aliasing VIPT */ | ||
111 | __cpuc_coherent_kern_range(addr, addr + len); | 123 | __cpuc_coherent_kern_range(addr, addr + len); |
124 | #ifdef CONFIG_SMP | ||
125 | if (cache_ops_need_broadcast()) | ||
126 | smp_call_function(flush_ptrace_access_other, | ||
127 | NULL, 1); | ||
128 | #endif | ||
112 | } | 129 | } |
113 | } | 130 | } |
114 | #else | 131 | |
115 | #define flush_pfn_alias(pfn,vaddr) do { } while (0) | 132 | /* |
133 | * Copy user data from/to a page which is mapped into a different | ||
134 | * processes address space. Really, we want to allow our "user | ||
135 | * space" model to handle this. | ||
136 | * | ||
137 | * Note that this code needs to run on the current CPU. | ||
138 | */ | ||
139 | void copy_to_user_page(struct vm_area_struct *vma, struct page *page, | ||
140 | unsigned long uaddr, void *dst, const void *src, | ||
141 | unsigned long len) | ||
142 | { | ||
143 | #ifdef CONFIG_SMP | ||
144 | preempt_disable(); | ||
116 | #endif | 145 | #endif |
146 | memcpy(dst, src, len); | ||
147 | flush_ptrace_access(vma, page, uaddr, dst, len); | ||
148 | #ifdef CONFIG_SMP | ||
149 | preempt_enable(); | ||
150 | #endif | ||
151 | } | ||
117 | 152 | ||
118 | void __flush_dcache_page(struct address_space *mapping, struct page *page) | 153 | void __flush_dcache_page(struct address_space *mapping, struct page *page) |
119 | { | 154 | { |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 52c40d155672..a04ffbbbe253 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -616,7 +616,7 @@ void __init mem_init(void) | |||
616 | "%dK data, %dK init, %luK highmem)\n", | 616 | "%dK data, %dK init, %luK highmem)\n", |
617 | nr_free_pages() << (PAGE_SHIFT-10), codesize >> 10, | 617 | nr_free_pages() << (PAGE_SHIFT-10), codesize >> 10, |
618 | datasize >> 10, initsize >> 10, | 618 | datasize >> 10, initsize >> 10, |
619 | (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10))); | 619 | totalhigh_pages << (PAGE_SHIFT-10)); |
620 | 620 | ||
621 | if (PAGE_SIZE >= 16384 && num_physpages <= 128) { | 621 | if (PAGE_SIZE >= 16384 && num_physpages <= 128) { |
622 | extern int sysctl_overcommit_memory; | 622 | extern int sysctl_overcommit_memory; |
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index 8012e24282b2..72507c630ceb 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S | |||
@@ -265,7 +265,7 @@ ENTRY(arm1020_flush_kern_dcache_area) | |||
265 | * | 265 | * |
266 | * (same as v4wb) | 266 | * (same as v4wb) |
267 | */ | 267 | */ |
268 | ENTRY(arm1020_dma_inv_range) | 268 | arm1020_dma_inv_range: |
269 | mov ip, #0 | 269 | mov ip, #0 |
270 | #ifndef CONFIG_CPU_DCACHE_DISABLE | 270 | #ifndef CONFIG_CPU_DCACHE_DISABLE |
271 | tst r0, #CACHE_DLINESIZE - 1 | 271 | tst r0, #CACHE_DLINESIZE - 1 |
@@ -295,7 +295,7 @@ ENTRY(arm1020_dma_inv_range) | |||
295 | * | 295 | * |
296 | * (same as v4wb) | 296 | * (same as v4wb) |
297 | */ | 297 | */ |
298 | ENTRY(arm1020_dma_clean_range) | 298 | arm1020_dma_clean_range: |
299 | mov ip, #0 | 299 | mov ip, #0 |
300 | #ifndef CONFIG_CPU_DCACHE_DISABLE | 300 | #ifndef CONFIG_CPU_DCACHE_DISABLE |
301 | bic r0, r0, #CACHE_DLINESIZE - 1 | 301 | bic r0, r0, #CACHE_DLINESIZE - 1 |
@@ -330,6 +330,30 @@ ENTRY(arm1020_dma_flush_range) | |||
330 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 330 | mcr p15, 0, ip, c7, c10, 4 @ drain WB |
331 | mov pc, lr | 331 | mov pc, lr |
332 | 332 | ||
333 | /* | ||
334 | * dma_map_area(start, size, dir) | ||
335 | * - start - kernel virtual start address | ||
336 | * - size - size of region | ||
337 | * - dir - DMA direction | ||
338 | */ | ||
339 | ENTRY(arm1020_dma_map_area) | ||
340 | add r1, r1, r0 | ||
341 | cmp r2, #DMA_TO_DEVICE | ||
342 | beq arm1020_dma_clean_range | ||
343 | bcs arm1020_dma_inv_range | ||
344 | b arm1020_dma_flush_range | ||
345 | ENDPROC(arm1020_dma_map_area) | ||
346 | |||
347 | /* | ||
348 | * dma_unmap_area(start, size, dir) | ||
349 | * - start - kernel virtual start address | ||
350 | * - size - size of region | ||
351 | * - dir - DMA direction | ||
352 | */ | ||
353 | ENTRY(arm1020_dma_unmap_area) | ||
354 | mov pc, lr | ||
355 | ENDPROC(arm1020_dma_unmap_area) | ||
356 | |||
333 | ENTRY(arm1020_cache_fns) | 357 | ENTRY(arm1020_cache_fns) |
334 | .long arm1020_flush_kern_cache_all | 358 | .long arm1020_flush_kern_cache_all |
335 | .long arm1020_flush_user_cache_all | 359 | .long arm1020_flush_user_cache_all |
@@ -337,8 +361,8 @@ ENTRY(arm1020_cache_fns) | |||
337 | .long arm1020_coherent_kern_range | 361 | .long arm1020_coherent_kern_range |
338 | .long arm1020_coherent_user_range | 362 | .long arm1020_coherent_user_range |
339 | .long arm1020_flush_kern_dcache_area | 363 | .long arm1020_flush_kern_dcache_area |
340 | .long arm1020_dma_inv_range | 364 | .long arm1020_dma_map_area |
341 | .long arm1020_dma_clean_range | 365 | .long arm1020_dma_unmap_area |
342 | .long arm1020_dma_flush_range | 366 | .long arm1020_dma_flush_range |
343 | 367 | ||
344 | .align 5 | 368 | .align 5 |
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S index 41fe25d234f5..d27829805609 100644 --- a/arch/arm/mm/proc-arm1020e.S +++ b/arch/arm/mm/proc-arm1020e.S | |||
@@ -258,7 +258,7 @@ ENTRY(arm1020e_flush_kern_dcache_area) | |||
258 | * | 258 | * |
259 | * (same as v4wb) | 259 | * (same as v4wb) |
260 | */ | 260 | */ |
261 | ENTRY(arm1020e_dma_inv_range) | 261 | arm1020e_dma_inv_range: |
262 | mov ip, #0 | 262 | mov ip, #0 |
263 | #ifndef CONFIG_CPU_DCACHE_DISABLE | 263 | #ifndef CONFIG_CPU_DCACHE_DISABLE |
264 | tst r0, #CACHE_DLINESIZE - 1 | 264 | tst r0, #CACHE_DLINESIZE - 1 |
@@ -284,7 +284,7 @@ ENTRY(arm1020e_dma_inv_range) | |||
284 | * | 284 | * |
285 | * (same as v4wb) | 285 | * (same as v4wb) |
286 | */ | 286 | */ |
287 | ENTRY(arm1020e_dma_clean_range) | 287 | arm1020e_dma_clean_range: |
288 | mov ip, #0 | 288 | mov ip, #0 |
289 | #ifndef CONFIG_CPU_DCACHE_DISABLE | 289 | #ifndef CONFIG_CPU_DCACHE_DISABLE |
290 | bic r0, r0, #CACHE_DLINESIZE - 1 | 290 | bic r0, r0, #CACHE_DLINESIZE - 1 |
@@ -316,6 +316,30 @@ ENTRY(arm1020e_dma_flush_range) | |||
316 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 316 | mcr p15, 0, ip, c7, c10, 4 @ drain WB |
317 | mov pc, lr | 317 | mov pc, lr |
318 | 318 | ||
319 | /* | ||
320 | * dma_map_area(start, size, dir) | ||
321 | * - start - kernel virtual start address | ||
322 | * - size - size of region | ||
323 | * - dir - DMA direction | ||
324 | */ | ||
325 | ENTRY(arm1020e_dma_map_area) | ||
326 | add r1, r1, r0 | ||
327 | cmp r2, #DMA_TO_DEVICE | ||
328 | beq arm1020e_dma_clean_range | ||
329 | bcs arm1020e_dma_inv_range | ||
330 | b arm1020e_dma_flush_range | ||
331 | ENDPROC(arm1020e_dma_map_area) | ||
332 | |||
333 | /* | ||
334 | * dma_unmap_area(start, size, dir) | ||
335 | * - start - kernel virtual start address | ||
336 | * - size - size of region | ||
337 | * - dir - DMA direction | ||
338 | */ | ||
339 | ENTRY(arm1020e_dma_unmap_area) | ||
340 | mov pc, lr | ||
341 | ENDPROC(arm1020e_dma_unmap_area) | ||
342 | |||
319 | ENTRY(arm1020e_cache_fns) | 343 | ENTRY(arm1020e_cache_fns) |
320 | .long arm1020e_flush_kern_cache_all | 344 | .long arm1020e_flush_kern_cache_all |
321 | .long arm1020e_flush_user_cache_all | 345 | .long arm1020e_flush_user_cache_all |
@@ -323,8 +347,8 @@ ENTRY(arm1020e_cache_fns) | |||
323 | .long arm1020e_coherent_kern_range | 347 | .long arm1020e_coherent_kern_range |
324 | .long arm1020e_coherent_user_range | 348 | .long arm1020e_coherent_user_range |
325 | .long arm1020e_flush_kern_dcache_area | 349 | .long arm1020e_flush_kern_dcache_area |
326 | .long arm1020e_dma_inv_range | 350 | .long arm1020e_dma_map_area |
327 | .long arm1020e_dma_clean_range | 351 | .long arm1020e_dma_unmap_area |
328 | .long arm1020e_dma_flush_range | 352 | .long arm1020e_dma_flush_range |
329 | 353 | ||
330 | .align 5 | 354 | .align 5 |
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S index 20a5b1b31a70..ce13e4a827de 100644 --- a/arch/arm/mm/proc-arm1022.S +++ b/arch/arm/mm/proc-arm1022.S | |||
@@ -247,7 +247,7 @@ ENTRY(arm1022_flush_kern_dcache_area) | |||
247 | * | 247 | * |
248 | * (same as v4wb) | 248 | * (same as v4wb) |
249 | */ | 249 | */ |
250 | ENTRY(arm1022_dma_inv_range) | 250 | arm1022_dma_inv_range: |
251 | mov ip, #0 | 251 | mov ip, #0 |
252 | #ifndef CONFIG_CPU_DCACHE_DISABLE | 252 | #ifndef CONFIG_CPU_DCACHE_DISABLE |
253 | tst r0, #CACHE_DLINESIZE - 1 | 253 | tst r0, #CACHE_DLINESIZE - 1 |
@@ -273,7 +273,7 @@ ENTRY(arm1022_dma_inv_range) | |||
273 | * | 273 | * |
274 | * (same as v4wb) | 274 | * (same as v4wb) |
275 | */ | 275 | */ |
276 | ENTRY(arm1022_dma_clean_range) | 276 | arm1022_dma_clean_range: |
277 | mov ip, #0 | 277 | mov ip, #0 |
278 | #ifndef CONFIG_CPU_DCACHE_DISABLE | 278 | #ifndef CONFIG_CPU_DCACHE_DISABLE |
279 | bic r0, r0, #CACHE_DLINESIZE - 1 | 279 | bic r0, r0, #CACHE_DLINESIZE - 1 |
@@ -305,6 +305,30 @@ ENTRY(arm1022_dma_flush_range) | |||
305 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 305 | mcr p15, 0, ip, c7, c10, 4 @ drain WB |
306 | mov pc, lr | 306 | mov pc, lr |
307 | 307 | ||
308 | /* | ||
309 | * dma_map_area(start, size, dir) | ||
310 | * - start - kernel virtual start address | ||
311 | * - size - size of region | ||
312 | * - dir - DMA direction | ||
313 | */ | ||
314 | ENTRY(arm1022_dma_map_area) | ||
315 | add r1, r1, r0 | ||
316 | cmp r2, #DMA_TO_DEVICE | ||
317 | beq arm1022_dma_clean_range | ||
318 | bcs arm1022_dma_inv_range | ||
319 | b arm1022_dma_flush_range | ||
320 | ENDPROC(arm1022_dma_map_area) | ||
321 | |||
322 | /* | ||
323 | * dma_unmap_area(start, size, dir) | ||
324 | * - start - kernel virtual start address | ||
325 | * - size - size of region | ||
326 | * - dir - DMA direction | ||
327 | */ | ||
328 | ENTRY(arm1022_dma_unmap_area) | ||
329 | mov pc, lr | ||
330 | ENDPROC(arm1022_dma_unmap_area) | ||
331 | |||
308 | ENTRY(arm1022_cache_fns) | 332 | ENTRY(arm1022_cache_fns) |
309 | .long arm1022_flush_kern_cache_all | 333 | .long arm1022_flush_kern_cache_all |
310 | .long arm1022_flush_user_cache_all | 334 | .long arm1022_flush_user_cache_all |
@@ -312,8 +336,8 @@ ENTRY(arm1022_cache_fns) | |||
312 | .long arm1022_coherent_kern_range | 336 | .long arm1022_coherent_kern_range |
313 | .long arm1022_coherent_user_range | 337 | .long arm1022_coherent_user_range |
314 | .long arm1022_flush_kern_dcache_area | 338 | .long arm1022_flush_kern_dcache_area |
315 | .long arm1022_dma_inv_range | 339 | .long arm1022_dma_map_area |
316 | .long arm1022_dma_clean_range | 340 | .long arm1022_dma_unmap_area |
317 | .long arm1022_dma_flush_range | 341 | .long arm1022_dma_flush_range |
318 | 342 | ||
319 | .align 5 | 343 | .align 5 |
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S index 96aedb10fcc4..636672a29c6d 100644 --- a/arch/arm/mm/proc-arm1026.S +++ b/arch/arm/mm/proc-arm1026.S | |||
@@ -241,7 +241,7 @@ ENTRY(arm1026_flush_kern_dcache_area) | |||
241 | * | 241 | * |
242 | * (same as v4wb) | 242 | * (same as v4wb) |
243 | */ | 243 | */ |
244 | ENTRY(arm1026_dma_inv_range) | 244 | arm1026_dma_inv_range: |
245 | mov ip, #0 | 245 | mov ip, #0 |
246 | #ifndef CONFIG_CPU_DCACHE_DISABLE | 246 | #ifndef CONFIG_CPU_DCACHE_DISABLE |
247 | tst r0, #CACHE_DLINESIZE - 1 | 247 | tst r0, #CACHE_DLINESIZE - 1 |
@@ -267,7 +267,7 @@ ENTRY(arm1026_dma_inv_range) | |||
267 | * | 267 | * |
268 | * (same as v4wb) | 268 | * (same as v4wb) |
269 | */ | 269 | */ |
270 | ENTRY(arm1026_dma_clean_range) | 270 | arm1026_dma_clean_range: |
271 | mov ip, #0 | 271 | mov ip, #0 |
272 | #ifndef CONFIG_CPU_DCACHE_DISABLE | 272 | #ifndef CONFIG_CPU_DCACHE_DISABLE |
273 | bic r0, r0, #CACHE_DLINESIZE - 1 | 273 | bic r0, r0, #CACHE_DLINESIZE - 1 |
@@ -299,6 +299,30 @@ ENTRY(arm1026_dma_flush_range) | |||
299 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 299 | mcr p15, 0, ip, c7, c10, 4 @ drain WB |
300 | mov pc, lr | 300 | mov pc, lr |
301 | 301 | ||
302 | /* | ||
303 | * dma_map_area(start, size, dir) | ||
304 | * - start - kernel virtual start address | ||
305 | * - size - size of region | ||
306 | * - dir - DMA direction | ||
307 | */ | ||
308 | ENTRY(arm1026_dma_map_area) | ||
309 | add r1, r1, r0 | ||
310 | cmp r2, #DMA_TO_DEVICE | ||
311 | beq arm1026_dma_clean_range | ||
312 | bcs arm1026_dma_inv_range | ||
313 | b arm1026_dma_flush_range | ||
314 | ENDPROC(arm1026_dma_map_area) | ||
315 | |||
316 | /* | ||
317 | * dma_unmap_area(start, size, dir) | ||
318 | * - start - kernel virtual start address | ||
319 | * - size - size of region | ||
320 | * - dir - DMA direction | ||
321 | */ | ||
322 | ENTRY(arm1026_dma_unmap_area) | ||
323 | mov pc, lr | ||
324 | ENDPROC(arm1026_dma_unmap_area) | ||
325 | |||
302 | ENTRY(arm1026_cache_fns) | 326 | ENTRY(arm1026_cache_fns) |
303 | .long arm1026_flush_kern_cache_all | 327 | .long arm1026_flush_kern_cache_all |
304 | .long arm1026_flush_user_cache_all | 328 | .long arm1026_flush_user_cache_all |
@@ -306,8 +330,8 @@ ENTRY(arm1026_cache_fns) | |||
306 | .long arm1026_coherent_kern_range | 330 | .long arm1026_coherent_kern_range |
307 | .long arm1026_coherent_user_range | 331 | .long arm1026_coherent_user_range |
308 | .long arm1026_flush_kern_dcache_area | 332 | .long arm1026_flush_kern_dcache_area |
309 | .long arm1026_dma_inv_range | 333 | .long arm1026_dma_map_area |
310 | .long arm1026_dma_clean_range | 334 | .long arm1026_dma_unmap_area |
311 | .long arm1026_dma_flush_range | 335 | .long arm1026_dma_flush_range |
312 | 336 | ||
313 | .align 5 | 337 | .align 5 |
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index 471669e2d7cb..8be81992645d 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S | |||
@@ -239,7 +239,7 @@ ENTRY(arm920_flush_kern_dcache_area) | |||
239 | * | 239 | * |
240 | * (same as v4wb) | 240 | * (same as v4wb) |
241 | */ | 241 | */ |
242 | ENTRY(arm920_dma_inv_range) | 242 | arm920_dma_inv_range: |
243 | tst r0, #CACHE_DLINESIZE - 1 | 243 | tst r0, #CACHE_DLINESIZE - 1 |
244 | bic r0, r0, #CACHE_DLINESIZE - 1 | 244 | bic r0, r0, #CACHE_DLINESIZE - 1 |
245 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry | 245 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry |
@@ -262,7 +262,7 @@ ENTRY(arm920_dma_inv_range) | |||
262 | * | 262 | * |
263 | * (same as v4wb) | 263 | * (same as v4wb) |
264 | */ | 264 | */ |
265 | ENTRY(arm920_dma_clean_range) | 265 | arm920_dma_clean_range: |
266 | bic r0, r0, #CACHE_DLINESIZE - 1 | 266 | bic r0, r0, #CACHE_DLINESIZE - 1 |
267 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 267 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
268 | add r0, r0, #CACHE_DLINESIZE | 268 | add r0, r0, #CACHE_DLINESIZE |
@@ -288,6 +288,30 @@ ENTRY(arm920_dma_flush_range) | |||
288 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 288 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
289 | mov pc, lr | 289 | mov pc, lr |
290 | 290 | ||
291 | /* | ||
292 | * dma_map_area(start, size, dir) | ||
293 | * - start - kernel virtual start address | ||
294 | * - size - size of region | ||
295 | * - dir - DMA direction | ||
296 | */ | ||
297 | ENTRY(arm920_dma_map_area) | ||
298 | add r1, r1, r0 | ||
299 | cmp r2, #DMA_TO_DEVICE | ||
300 | beq arm920_dma_clean_range | ||
301 | bcs arm920_dma_inv_range | ||
302 | b arm920_dma_flush_range | ||
303 | ENDPROC(arm920_dma_map_area) | ||
304 | |||
305 | /* | ||
306 | * dma_unmap_area(start, size, dir) | ||
307 | * - start - kernel virtual start address | ||
308 | * - size - size of region | ||
309 | * - dir - DMA direction | ||
310 | */ | ||
311 | ENTRY(arm920_dma_unmap_area) | ||
312 | mov pc, lr | ||
313 | ENDPROC(arm920_dma_unmap_area) | ||
314 | |||
291 | ENTRY(arm920_cache_fns) | 315 | ENTRY(arm920_cache_fns) |
292 | .long arm920_flush_kern_cache_all | 316 | .long arm920_flush_kern_cache_all |
293 | .long arm920_flush_user_cache_all | 317 | .long arm920_flush_user_cache_all |
@@ -295,8 +319,8 @@ ENTRY(arm920_cache_fns) | |||
295 | .long arm920_coherent_kern_range | 319 | .long arm920_coherent_kern_range |
296 | .long arm920_coherent_user_range | 320 | .long arm920_coherent_user_range |
297 | .long arm920_flush_kern_dcache_area | 321 | .long arm920_flush_kern_dcache_area |
298 | .long arm920_dma_inv_range | 322 | .long arm920_dma_map_area |
299 | .long arm920_dma_clean_range | 323 | .long arm920_dma_unmap_area |
300 | .long arm920_dma_flush_range | 324 | .long arm920_dma_flush_range |
301 | 325 | ||
302 | #endif | 326 | #endif |
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S index ee111b00fa41..c0ff8e4b1074 100644 --- a/arch/arm/mm/proc-arm922.S +++ b/arch/arm/mm/proc-arm922.S | |||
@@ -241,7 +241,7 @@ ENTRY(arm922_flush_kern_dcache_area) | |||
241 | * | 241 | * |
242 | * (same as v4wb) | 242 | * (same as v4wb) |
243 | */ | 243 | */ |
244 | ENTRY(arm922_dma_inv_range) | 244 | arm922_dma_inv_range: |
245 | tst r0, #CACHE_DLINESIZE - 1 | 245 | tst r0, #CACHE_DLINESIZE - 1 |
246 | bic r0, r0, #CACHE_DLINESIZE - 1 | 246 | bic r0, r0, #CACHE_DLINESIZE - 1 |
247 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry | 247 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry |
@@ -264,7 +264,7 @@ ENTRY(arm922_dma_inv_range) | |||
264 | * | 264 | * |
265 | * (same as v4wb) | 265 | * (same as v4wb) |
266 | */ | 266 | */ |
267 | ENTRY(arm922_dma_clean_range) | 267 | arm922_dma_clean_range: |
268 | bic r0, r0, #CACHE_DLINESIZE - 1 | 268 | bic r0, r0, #CACHE_DLINESIZE - 1 |
269 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 269 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
270 | add r0, r0, #CACHE_DLINESIZE | 270 | add r0, r0, #CACHE_DLINESIZE |
@@ -290,6 +290,30 @@ ENTRY(arm922_dma_flush_range) | |||
290 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 290 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
291 | mov pc, lr | 291 | mov pc, lr |
292 | 292 | ||
293 | /* | ||
294 | * dma_map_area(start, size, dir) | ||
295 | * - start - kernel virtual start address | ||
296 | * - size - size of region | ||
297 | * - dir - DMA direction | ||
298 | */ | ||
299 | ENTRY(arm922_dma_map_area) | ||
300 | add r1, r1, r0 | ||
301 | cmp r2, #DMA_TO_DEVICE | ||
302 | beq arm922_dma_clean_range | ||
303 | bcs arm922_dma_inv_range | ||
304 | b arm922_dma_flush_range | ||
305 | ENDPROC(arm922_dma_map_area) | ||
306 | |||
307 | /* | ||
308 | * dma_unmap_area(start, size, dir) | ||
309 | * - start - kernel virtual start address | ||
310 | * - size - size of region | ||
311 | * - dir - DMA direction | ||
312 | */ | ||
313 | ENTRY(arm922_dma_unmap_area) | ||
314 | mov pc, lr | ||
315 | ENDPROC(arm922_dma_unmap_area) | ||
316 | |||
293 | ENTRY(arm922_cache_fns) | 317 | ENTRY(arm922_cache_fns) |
294 | .long arm922_flush_kern_cache_all | 318 | .long arm922_flush_kern_cache_all |
295 | .long arm922_flush_user_cache_all | 319 | .long arm922_flush_user_cache_all |
@@ -297,8 +321,8 @@ ENTRY(arm922_cache_fns) | |||
297 | .long arm922_coherent_kern_range | 321 | .long arm922_coherent_kern_range |
298 | .long arm922_coherent_user_range | 322 | .long arm922_coherent_user_range |
299 | .long arm922_flush_kern_dcache_area | 323 | .long arm922_flush_kern_dcache_area |
300 | .long arm922_dma_inv_range | 324 | .long arm922_dma_map_area |
301 | .long arm922_dma_clean_range | 325 | .long arm922_dma_unmap_area |
302 | .long arm922_dma_flush_range | 326 | .long arm922_dma_flush_range |
303 | 327 | ||
304 | #endif | 328 | #endif |
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S index 8deb5bde58e4..3c6cffe400f6 100644 --- a/arch/arm/mm/proc-arm925.S +++ b/arch/arm/mm/proc-arm925.S | |||
@@ -283,7 +283,7 @@ ENTRY(arm925_flush_kern_dcache_area) | |||
283 | * | 283 | * |
284 | * (same as v4wb) | 284 | * (same as v4wb) |
285 | */ | 285 | */ |
286 | ENTRY(arm925_dma_inv_range) | 286 | arm925_dma_inv_range: |
287 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | 287 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH |
288 | tst r0, #CACHE_DLINESIZE - 1 | 288 | tst r0, #CACHE_DLINESIZE - 1 |
289 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry | 289 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry |
@@ -308,7 +308,7 @@ ENTRY(arm925_dma_inv_range) | |||
308 | * | 308 | * |
309 | * (same as v4wb) | 309 | * (same as v4wb) |
310 | */ | 310 | */ |
311 | ENTRY(arm925_dma_clean_range) | 311 | arm925_dma_clean_range: |
312 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | 312 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH |
313 | bic r0, r0, #CACHE_DLINESIZE - 1 | 313 | bic r0, r0, #CACHE_DLINESIZE - 1 |
314 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 314 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
@@ -341,6 +341,30 @@ ENTRY(arm925_dma_flush_range) | |||
341 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 341 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
342 | mov pc, lr | 342 | mov pc, lr |
343 | 343 | ||
344 | /* | ||
345 | * dma_map_area(start, size, dir) | ||
346 | * - start - kernel virtual start address | ||
347 | * - size - size of region | ||
348 | * - dir - DMA direction | ||
349 | */ | ||
350 | ENTRY(arm925_dma_map_area) | ||
351 | add r1, r1, r0 | ||
352 | cmp r2, #DMA_TO_DEVICE | ||
353 | beq arm925_dma_clean_range | ||
354 | bcs arm925_dma_inv_range | ||
355 | b arm925_dma_flush_range | ||
356 | ENDPROC(arm925_dma_map_area) | ||
357 | |||
358 | /* | ||
359 | * dma_unmap_area(start, size, dir) | ||
360 | * - start - kernel virtual start address | ||
361 | * - size - size of region | ||
362 | * - dir - DMA direction | ||
363 | */ | ||
364 | ENTRY(arm925_dma_unmap_area) | ||
365 | mov pc, lr | ||
366 | ENDPROC(arm925_dma_unmap_area) | ||
367 | |||
344 | ENTRY(arm925_cache_fns) | 368 | ENTRY(arm925_cache_fns) |
345 | .long arm925_flush_kern_cache_all | 369 | .long arm925_flush_kern_cache_all |
346 | .long arm925_flush_user_cache_all | 370 | .long arm925_flush_user_cache_all |
@@ -348,8 +372,8 @@ ENTRY(arm925_cache_fns) | |||
348 | .long arm925_coherent_kern_range | 372 | .long arm925_coherent_kern_range |
349 | .long arm925_coherent_user_range | 373 | .long arm925_coherent_user_range |
350 | .long arm925_flush_kern_dcache_area | 374 | .long arm925_flush_kern_dcache_area |
351 | .long arm925_dma_inv_range | 375 | .long arm925_dma_map_area |
352 | .long arm925_dma_clean_range | 376 | .long arm925_dma_unmap_area |
353 | .long arm925_dma_flush_range | 377 | .long arm925_dma_flush_range |
354 | 378 | ||
355 | ENTRY(cpu_arm925_dcache_clean_area) | 379 | ENTRY(cpu_arm925_dcache_clean_area) |
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 64db6e275a44..75b707c9cce1 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
@@ -246,7 +246,7 @@ ENTRY(arm926_flush_kern_dcache_area) | |||
246 | * | 246 | * |
247 | * (same as v4wb) | 247 | * (same as v4wb) |
248 | */ | 248 | */ |
249 | ENTRY(arm926_dma_inv_range) | 249 | arm926_dma_inv_range: |
250 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | 250 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH |
251 | tst r0, #CACHE_DLINESIZE - 1 | 251 | tst r0, #CACHE_DLINESIZE - 1 |
252 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry | 252 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry |
@@ -271,7 +271,7 @@ ENTRY(arm926_dma_inv_range) | |||
271 | * | 271 | * |
272 | * (same as v4wb) | 272 | * (same as v4wb) |
273 | */ | 273 | */ |
274 | ENTRY(arm926_dma_clean_range) | 274 | arm926_dma_clean_range: |
275 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | 275 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH |
276 | bic r0, r0, #CACHE_DLINESIZE - 1 | 276 | bic r0, r0, #CACHE_DLINESIZE - 1 |
277 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 277 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
@@ -304,6 +304,30 @@ ENTRY(arm926_dma_flush_range) | |||
304 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 304 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
305 | mov pc, lr | 305 | mov pc, lr |
306 | 306 | ||
307 | /* | ||
308 | * dma_map_area(start, size, dir) | ||
309 | * - start - kernel virtual start address | ||
310 | * - size - size of region | ||
311 | * - dir - DMA direction | ||
312 | */ | ||
313 | ENTRY(arm926_dma_map_area) | ||
314 | add r1, r1, r0 | ||
315 | cmp r2, #DMA_TO_DEVICE | ||
316 | beq arm926_dma_clean_range | ||
317 | bcs arm926_dma_inv_range | ||
318 | b arm926_dma_flush_range | ||
319 | ENDPROC(arm926_dma_map_area) | ||
320 | |||
321 | /* | ||
322 | * dma_unmap_area(start, size, dir) | ||
323 | * - start - kernel virtual start address | ||
324 | * - size - size of region | ||
325 | * - dir - DMA direction | ||
326 | */ | ||
327 | ENTRY(arm926_dma_unmap_area) | ||
328 | mov pc, lr | ||
329 | ENDPROC(arm926_dma_unmap_area) | ||
330 | |||
307 | ENTRY(arm926_cache_fns) | 331 | ENTRY(arm926_cache_fns) |
308 | .long arm926_flush_kern_cache_all | 332 | .long arm926_flush_kern_cache_all |
309 | .long arm926_flush_user_cache_all | 333 | .long arm926_flush_user_cache_all |
@@ -311,8 +335,8 @@ ENTRY(arm926_cache_fns) | |||
311 | .long arm926_coherent_kern_range | 335 | .long arm926_coherent_kern_range |
312 | .long arm926_coherent_user_range | 336 | .long arm926_coherent_user_range |
313 | .long arm926_flush_kern_dcache_area | 337 | .long arm926_flush_kern_dcache_area |
314 | .long arm926_dma_inv_range | 338 | .long arm926_dma_map_area |
315 | .long arm926_dma_clean_range | 339 | .long arm926_dma_unmap_area |
316 | .long arm926_dma_flush_range | 340 | .long arm926_dma_flush_range |
317 | 341 | ||
318 | ENTRY(cpu_arm926_dcache_clean_area) | 342 | ENTRY(cpu_arm926_dcache_clean_area) |
diff --git a/arch/arm/mm/proc-arm940.S b/arch/arm/mm/proc-arm940.S index 8196b9f401fb..1af1657819eb 100644 --- a/arch/arm/mm/proc-arm940.S +++ b/arch/arm/mm/proc-arm940.S | |||
@@ -171,7 +171,7 @@ ENTRY(arm940_flush_kern_dcache_area) | |||
171 | * - start - virtual start address | 171 | * - start - virtual start address |
172 | * - end - virtual end address | 172 | * - end - virtual end address |
173 | */ | 173 | */ |
174 | ENTRY(arm940_dma_inv_range) | 174 | arm940_dma_inv_range: |
175 | mov ip, #0 | 175 | mov ip, #0 |
176 | mov r1, #(CACHE_DSEGMENTS - 1) << 4 @ 4 segments | 176 | mov r1, #(CACHE_DSEGMENTS - 1) << 4 @ 4 segments |
177 | 1: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries | 177 | 1: orr r3, r1, #(CACHE_DENTRIES - 1) << 26 @ 64 entries |
@@ -192,7 +192,7 @@ ENTRY(arm940_dma_inv_range) | |||
192 | * - start - virtual start address | 192 | * - start - virtual start address |
193 | * - end - virtual end address | 193 | * - end - virtual end address |
194 | */ | 194 | */ |
195 | ENTRY(arm940_dma_clean_range) | 195 | arm940_dma_clean_range: |
196 | ENTRY(cpu_arm940_dcache_clean_area) | 196 | ENTRY(cpu_arm940_dcache_clean_area) |
197 | mov ip, #0 | 197 | mov ip, #0 |
198 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | 198 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH |
@@ -233,6 +233,30 @@ ENTRY(arm940_dma_flush_range) | |||
233 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | 233 | mcr p15, 0, ip, c7, c10, 4 @ drain WB |
234 | mov pc, lr | 234 | mov pc, lr |
235 | 235 | ||
236 | /* | ||
237 | * dma_map_area(start, size, dir) | ||
238 | * - start - kernel virtual start address | ||
239 | * - size - size of region | ||
240 | * - dir - DMA direction | ||
241 | */ | ||
242 | ENTRY(arm940_dma_map_area) | ||
243 | add r1, r1, r0 | ||
244 | cmp r2, #DMA_TO_DEVICE | ||
245 | beq arm940_dma_clean_range | ||
246 | bcs arm940_dma_inv_range | ||
247 | b arm940_dma_flush_range | ||
248 | ENDPROC(arm940_dma_map_area) | ||
249 | |||
250 | /* | ||
251 | * dma_unmap_area(start, size, dir) | ||
252 | * - start - kernel virtual start address | ||
253 | * - size - size of region | ||
254 | * - dir - DMA direction | ||
255 | */ | ||
256 | ENTRY(arm940_dma_unmap_area) | ||
257 | mov pc, lr | ||
258 | ENDPROC(arm940_dma_unmap_area) | ||
259 | |||
236 | ENTRY(arm940_cache_fns) | 260 | ENTRY(arm940_cache_fns) |
237 | .long arm940_flush_kern_cache_all | 261 | .long arm940_flush_kern_cache_all |
238 | .long arm940_flush_user_cache_all | 262 | .long arm940_flush_user_cache_all |
@@ -240,8 +264,8 @@ ENTRY(arm940_cache_fns) | |||
240 | .long arm940_coherent_kern_range | 264 | .long arm940_coherent_kern_range |
241 | .long arm940_coherent_user_range | 265 | .long arm940_coherent_user_range |
242 | .long arm940_flush_kern_dcache_area | 266 | .long arm940_flush_kern_dcache_area |
243 | .long arm940_dma_inv_range | 267 | .long arm940_dma_map_area |
244 | .long arm940_dma_clean_range | 268 | .long arm940_dma_unmap_area |
245 | .long arm940_dma_flush_range | 269 | .long arm940_dma_flush_range |
246 | 270 | ||
247 | __INIT | 271 | __INIT |
diff --git a/arch/arm/mm/proc-arm946.S b/arch/arm/mm/proc-arm946.S index 9a951239c86c..1664b6aaff79 100644 --- a/arch/arm/mm/proc-arm946.S +++ b/arch/arm/mm/proc-arm946.S | |||
@@ -215,7 +215,7 @@ ENTRY(arm946_flush_kern_dcache_area) | |||
215 | * - end - virtual end address | 215 | * - end - virtual end address |
216 | * (same as arm926) | 216 | * (same as arm926) |
217 | */ | 217 | */ |
218 | ENTRY(arm946_dma_inv_range) | 218 | arm946_dma_inv_range: |
219 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | 219 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH |
220 | tst r0, #CACHE_DLINESIZE - 1 | 220 | tst r0, #CACHE_DLINESIZE - 1 |
221 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry | 221 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry |
@@ -240,7 +240,7 @@ ENTRY(arm946_dma_inv_range) | |||
240 | * | 240 | * |
241 | * (same as arm926) | 241 | * (same as arm926) |
242 | */ | 242 | */ |
243 | ENTRY(arm946_dma_clean_range) | 243 | arm946_dma_clean_range: |
244 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH | 244 | #ifndef CONFIG_CPU_DCACHE_WRITETHROUGH |
245 | bic r0, r0, #CACHE_DLINESIZE - 1 | 245 | bic r0, r0, #CACHE_DLINESIZE - 1 |
246 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 246 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
@@ -275,6 +275,30 @@ ENTRY(arm946_dma_flush_range) | |||
275 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 275 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
276 | mov pc, lr | 276 | mov pc, lr |
277 | 277 | ||
278 | /* | ||
279 | * dma_map_area(start, size, dir) | ||
280 | * - start - kernel virtual start address | ||
281 | * - size - size of region | ||
282 | * - dir - DMA direction | ||
283 | */ | ||
284 | ENTRY(arm946_dma_map_area) | ||
285 | add r1, r1, r0 | ||
286 | cmp r2, #DMA_TO_DEVICE | ||
287 | beq arm946_dma_clean_range | ||
288 | bcs arm946_dma_inv_range | ||
289 | b arm946_dma_flush_range | ||
290 | ENDPROC(arm946_dma_map_area) | ||
291 | |||
292 | /* | ||
293 | * dma_unmap_area(start, size, dir) | ||
294 | * - start - kernel virtual start address | ||
295 | * - size - size of region | ||
296 | * - dir - DMA direction | ||
297 | */ | ||
298 | ENTRY(arm946_dma_unmap_area) | ||
299 | mov pc, lr | ||
300 | ENDPROC(arm946_dma_unmap_area) | ||
301 | |||
278 | ENTRY(arm946_cache_fns) | 302 | ENTRY(arm946_cache_fns) |
279 | .long arm946_flush_kern_cache_all | 303 | .long arm946_flush_kern_cache_all |
280 | .long arm946_flush_user_cache_all | 304 | .long arm946_flush_user_cache_all |
@@ -282,8 +306,8 @@ ENTRY(arm946_cache_fns) | |||
282 | .long arm946_coherent_kern_range | 306 | .long arm946_coherent_kern_range |
283 | .long arm946_coherent_user_range | 307 | .long arm946_coherent_user_range |
284 | .long arm946_flush_kern_dcache_area | 308 | .long arm946_flush_kern_dcache_area |
285 | .long arm946_dma_inv_range | 309 | .long arm946_dma_map_area |
286 | .long arm946_dma_clean_range | 310 | .long arm946_dma_unmap_area |
287 | .long arm946_dma_flush_range | 311 | .long arm946_dma_flush_range |
288 | 312 | ||
289 | 313 | ||
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S index dbc39383e66a..53e632343849 100644 --- a/arch/arm/mm/proc-feroceon.S +++ b/arch/arm/mm/proc-feroceon.S | |||
@@ -274,7 +274,7 @@ ENTRY(feroceon_range_flush_kern_dcache_area) | |||
274 | * (same as v4wb) | 274 | * (same as v4wb) |
275 | */ | 275 | */ |
276 | .align 5 | 276 | .align 5 |
277 | ENTRY(feroceon_dma_inv_range) | 277 | feroceon_dma_inv_range: |
278 | tst r0, #CACHE_DLINESIZE - 1 | 278 | tst r0, #CACHE_DLINESIZE - 1 |
279 | bic r0, r0, #CACHE_DLINESIZE - 1 | 279 | bic r0, r0, #CACHE_DLINESIZE - 1 |
280 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry | 280 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry |
@@ -288,7 +288,7 @@ ENTRY(feroceon_dma_inv_range) | |||
288 | mov pc, lr | 288 | mov pc, lr |
289 | 289 | ||
290 | .align 5 | 290 | .align 5 |
291 | ENTRY(feroceon_range_dma_inv_range) | 291 | feroceon_range_dma_inv_range: |
292 | mrs r2, cpsr | 292 | mrs r2, cpsr |
293 | tst r0, #CACHE_DLINESIZE - 1 | 293 | tst r0, #CACHE_DLINESIZE - 1 |
294 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry | 294 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry |
@@ -314,7 +314,7 @@ ENTRY(feroceon_range_dma_inv_range) | |||
314 | * (same as v4wb) | 314 | * (same as v4wb) |
315 | */ | 315 | */ |
316 | .align 5 | 316 | .align 5 |
317 | ENTRY(feroceon_dma_clean_range) | 317 | feroceon_dma_clean_range: |
318 | bic r0, r0, #CACHE_DLINESIZE - 1 | 318 | bic r0, r0, #CACHE_DLINESIZE - 1 |
319 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 319 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
320 | add r0, r0, #CACHE_DLINESIZE | 320 | add r0, r0, #CACHE_DLINESIZE |
@@ -324,7 +324,7 @@ ENTRY(feroceon_dma_clean_range) | |||
324 | mov pc, lr | 324 | mov pc, lr |
325 | 325 | ||
326 | .align 5 | 326 | .align 5 |
327 | ENTRY(feroceon_range_dma_clean_range) | 327 | feroceon_range_dma_clean_range: |
328 | mrs r2, cpsr | 328 | mrs r2, cpsr |
329 | cmp r1, r0 | 329 | cmp r1, r0 |
330 | subne r1, r1, #1 @ top address is inclusive | 330 | subne r1, r1, #1 @ top address is inclusive |
@@ -367,6 +367,44 @@ ENTRY(feroceon_range_dma_flush_range) | |||
367 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 367 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
368 | mov pc, lr | 368 | mov pc, lr |
369 | 369 | ||
370 | /* | ||
371 | * dma_map_area(start, size, dir) | ||
372 | * - start - kernel virtual start address | ||
373 | * - size - size of region | ||
374 | * - dir - DMA direction | ||
375 | */ | ||
376 | ENTRY(feroceon_dma_map_area) | ||
377 | add r1, r1, r0 | ||
378 | cmp r2, #DMA_TO_DEVICE | ||
379 | beq feroceon_dma_clean_range | ||
380 | bcs feroceon_dma_inv_range | ||
381 | b feroceon_dma_flush_range | ||
382 | ENDPROC(feroceon_dma_map_area) | ||
383 | |||
384 | /* | ||
385 | * dma_map_area(start, size, dir) | ||
386 | * - start - kernel virtual start address | ||
387 | * - size - size of region | ||
388 | * - dir - DMA direction | ||
389 | */ | ||
390 | ENTRY(feroceon_range_dma_map_area) | ||
391 | add r1, r1, r0 | ||
392 | cmp r2, #DMA_TO_DEVICE | ||
393 | beq feroceon_range_dma_clean_range | ||
394 | bcs feroceon_range_dma_inv_range | ||
395 | b feroceon_range_dma_flush_range | ||
396 | ENDPROC(feroceon_range_dma_map_area) | ||
397 | |||
398 | /* | ||
399 | * dma_unmap_area(start, size, dir) | ||
400 | * - start - kernel virtual start address | ||
401 | * - size - size of region | ||
402 | * - dir - DMA direction | ||
403 | */ | ||
404 | ENTRY(feroceon_dma_unmap_area) | ||
405 | mov pc, lr | ||
406 | ENDPROC(feroceon_dma_unmap_area) | ||
407 | |||
370 | ENTRY(feroceon_cache_fns) | 408 | ENTRY(feroceon_cache_fns) |
371 | .long feroceon_flush_kern_cache_all | 409 | .long feroceon_flush_kern_cache_all |
372 | .long feroceon_flush_user_cache_all | 410 | .long feroceon_flush_user_cache_all |
@@ -374,8 +412,8 @@ ENTRY(feroceon_cache_fns) | |||
374 | .long feroceon_coherent_kern_range | 412 | .long feroceon_coherent_kern_range |
375 | .long feroceon_coherent_user_range | 413 | .long feroceon_coherent_user_range |
376 | .long feroceon_flush_kern_dcache_area | 414 | .long feroceon_flush_kern_dcache_area |
377 | .long feroceon_dma_inv_range | 415 | .long feroceon_dma_map_area |
378 | .long feroceon_dma_clean_range | 416 | .long feroceon_dma_unmap_area |
379 | .long feroceon_dma_flush_range | 417 | .long feroceon_dma_flush_range |
380 | 418 | ||
381 | ENTRY(feroceon_range_cache_fns) | 419 | ENTRY(feroceon_range_cache_fns) |
@@ -385,8 +423,8 @@ ENTRY(feroceon_range_cache_fns) | |||
385 | .long feroceon_coherent_kern_range | 423 | .long feroceon_coherent_kern_range |
386 | .long feroceon_coherent_user_range | 424 | .long feroceon_coherent_user_range |
387 | .long feroceon_range_flush_kern_dcache_area | 425 | .long feroceon_range_flush_kern_dcache_area |
388 | .long feroceon_range_dma_inv_range | 426 | .long feroceon_range_dma_map_area |
389 | .long feroceon_range_dma_clean_range | 427 | .long feroceon_dma_unmap_area |
390 | .long feroceon_range_dma_flush_range | 428 | .long feroceon_range_dma_flush_range |
391 | 429 | ||
392 | .align 5 | 430 | .align 5 |
diff --git a/arch/arm/mm/proc-mohawk.S b/arch/arm/mm/proc-mohawk.S index 9674d36cc97d..caa31154e7db 100644 --- a/arch/arm/mm/proc-mohawk.S +++ b/arch/arm/mm/proc-mohawk.S | |||
@@ -218,7 +218,7 @@ ENTRY(mohawk_flush_kern_dcache_area) | |||
218 | * | 218 | * |
219 | * (same as v4wb) | 219 | * (same as v4wb) |
220 | */ | 220 | */ |
221 | ENTRY(mohawk_dma_inv_range) | 221 | mohawk_dma_inv_range: |
222 | tst r0, #CACHE_DLINESIZE - 1 | 222 | tst r0, #CACHE_DLINESIZE - 1 |
223 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry | 223 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry |
224 | tst r1, #CACHE_DLINESIZE - 1 | 224 | tst r1, #CACHE_DLINESIZE - 1 |
@@ -241,7 +241,7 @@ ENTRY(mohawk_dma_inv_range) | |||
241 | * | 241 | * |
242 | * (same as v4wb) | 242 | * (same as v4wb) |
243 | */ | 243 | */ |
244 | ENTRY(mohawk_dma_clean_range) | 244 | mohawk_dma_clean_range: |
245 | bic r0, r0, #CACHE_DLINESIZE - 1 | 245 | bic r0, r0, #CACHE_DLINESIZE - 1 |
246 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 246 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
247 | add r0, r0, #CACHE_DLINESIZE | 247 | add r0, r0, #CACHE_DLINESIZE |
@@ -268,6 +268,30 @@ ENTRY(mohawk_dma_flush_range) | |||
268 | mcr p15, 0, r0, c7, c10, 4 @ drain WB | 268 | mcr p15, 0, r0, c7, c10, 4 @ drain WB |
269 | mov pc, lr | 269 | mov pc, lr |
270 | 270 | ||
271 | /* | ||
272 | * dma_map_area(start, size, dir) | ||
273 | * - start - kernel virtual start address | ||
274 | * - size - size of region | ||
275 | * - dir - DMA direction | ||
276 | */ | ||
277 | ENTRY(mohawk_dma_map_area) | ||
278 | add r1, r1, r0 | ||
279 | cmp r2, #DMA_TO_DEVICE | ||
280 | beq mohawk_dma_clean_range | ||
281 | bcs mohawk_dma_inv_range | ||
282 | b mohawk_dma_flush_range | ||
283 | ENDPROC(mohawk_dma_map_area) | ||
284 | |||
285 | /* | ||
286 | * dma_unmap_area(start, size, dir) | ||
287 | * - start - kernel virtual start address | ||
288 | * - size - size of region | ||
289 | * - dir - DMA direction | ||
290 | */ | ||
291 | ENTRY(mohawk_dma_unmap_area) | ||
292 | mov pc, lr | ||
293 | ENDPROC(mohawk_dma_unmap_area) | ||
294 | |||
271 | ENTRY(mohawk_cache_fns) | 295 | ENTRY(mohawk_cache_fns) |
272 | .long mohawk_flush_kern_cache_all | 296 | .long mohawk_flush_kern_cache_all |
273 | .long mohawk_flush_user_cache_all | 297 | .long mohawk_flush_user_cache_all |
@@ -275,8 +299,8 @@ ENTRY(mohawk_cache_fns) | |||
275 | .long mohawk_coherent_kern_range | 299 | .long mohawk_coherent_kern_range |
276 | .long mohawk_coherent_user_range | 300 | .long mohawk_coherent_user_range |
277 | .long mohawk_flush_kern_dcache_area | 301 | .long mohawk_flush_kern_dcache_area |
278 | .long mohawk_dma_inv_range | 302 | .long mohawk_dma_map_area |
279 | .long mohawk_dma_clean_range | 303 | .long mohawk_dma_unmap_area |
280 | .long mohawk_dma_flush_range | 304 | .long mohawk_dma_flush_range |
281 | 305 | ||
282 | ENTRY(cpu_mohawk_dcache_clean_area) | 306 | ENTRY(cpu_mohawk_dcache_clean_area) |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index 96456f548798..e5797f1c1db7 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -257,7 +257,7 @@ ENTRY(xsc3_flush_kern_dcache_area) | |||
257 | * - start - virtual start address | 257 | * - start - virtual start address |
258 | * - end - virtual end address | 258 | * - end - virtual end address |
259 | */ | 259 | */ |
260 | ENTRY(xsc3_dma_inv_range) | 260 | xsc3_dma_inv_range: |
261 | tst r0, #CACHELINESIZE - 1 | 261 | tst r0, #CACHELINESIZE - 1 |
262 | bic r0, r0, #CACHELINESIZE - 1 | 262 | bic r0, r0, #CACHELINESIZE - 1 |
263 | mcrne p15, 0, r0, c7, c10, 1 @ clean L1 D line | 263 | mcrne p15, 0, r0, c7, c10, 1 @ clean L1 D line |
@@ -278,7 +278,7 @@ ENTRY(xsc3_dma_inv_range) | |||
278 | * - start - virtual start address | 278 | * - start - virtual start address |
279 | * - end - virtual end address | 279 | * - end - virtual end address |
280 | */ | 280 | */ |
281 | ENTRY(xsc3_dma_clean_range) | 281 | xsc3_dma_clean_range: |
282 | bic r0, r0, #CACHELINESIZE - 1 | 282 | bic r0, r0, #CACHELINESIZE - 1 |
283 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line | 283 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean L1 D line |
284 | add r0, r0, #CACHELINESIZE | 284 | add r0, r0, #CACHELINESIZE |
@@ -304,6 +304,30 @@ ENTRY(xsc3_dma_flush_range) | |||
304 | mcr p15, 0, r0, c7, c10, 4 @ data write barrier | 304 | mcr p15, 0, r0, c7, c10, 4 @ data write barrier |
305 | mov pc, lr | 305 | mov pc, lr |
306 | 306 | ||
307 | /* | ||
308 | * dma_map_area(start, size, dir) | ||
309 | * - start - kernel virtual start address | ||
310 | * - size - size of region | ||
311 | * - dir - DMA direction | ||
312 | */ | ||
313 | ENTRY(xsc3_dma_map_area) | ||
314 | add r1, r1, r0 | ||
315 | cmp r2, #DMA_TO_DEVICE | ||
316 | beq xsc3_dma_clean_range | ||
317 | bcs xsc3_dma_inv_range | ||
318 | b xsc3_dma_flush_range | ||
319 | ENDPROC(xsc3_dma_map_area) | ||
320 | |||
321 | /* | ||
322 | * dma_unmap_area(start, size, dir) | ||
323 | * - start - kernel virtual start address | ||
324 | * - size - size of region | ||
325 | * - dir - DMA direction | ||
326 | */ | ||
327 | ENTRY(xsc3_dma_unmap_area) | ||
328 | mov pc, lr | ||
329 | ENDPROC(xsc3_dma_unmap_area) | ||
330 | |||
307 | ENTRY(xsc3_cache_fns) | 331 | ENTRY(xsc3_cache_fns) |
308 | .long xsc3_flush_kern_cache_all | 332 | .long xsc3_flush_kern_cache_all |
309 | .long xsc3_flush_user_cache_all | 333 | .long xsc3_flush_user_cache_all |
@@ -311,8 +335,8 @@ ENTRY(xsc3_cache_fns) | |||
311 | .long xsc3_coherent_kern_range | 335 | .long xsc3_coherent_kern_range |
312 | .long xsc3_coherent_user_range | 336 | .long xsc3_coherent_user_range |
313 | .long xsc3_flush_kern_dcache_area | 337 | .long xsc3_flush_kern_dcache_area |
314 | .long xsc3_dma_inv_range | 338 | .long xsc3_dma_map_area |
315 | .long xsc3_dma_clean_range | 339 | .long xsc3_dma_unmap_area |
316 | .long xsc3_dma_flush_range | 340 | .long xsc3_dma_flush_range |
317 | 341 | ||
318 | ENTRY(cpu_xsc3_dcache_clean_area) | 342 | ENTRY(cpu_xsc3_dcache_clean_area) |
@@ -407,6 +431,13 @@ __xsc3_setup: | |||
407 | 431 | ||
408 | adr r5, xsc3_crval | 432 | adr r5, xsc3_crval |
409 | ldmia r5, {r5, r6} | 433 | ldmia r5, {r5, r6} |
434 | |||
435 | #ifdef CONFIG_CACHE_XSC3L2 | ||
436 | mrc p15, 1, r0, c0, c0, 1 @ get L2 present information | ||
437 | ands r0, r0, #0xf8 | ||
438 | orrne r6, r6, #(1 << 26) @ enable L2 if present | ||
439 | #endif | ||
440 | |||
410 | mrc p15, 0, r0, c1, c0, 0 @ get control register | 441 | mrc p15, 0, r0, c1, c0, 0 @ get control register |
411 | bic r0, r0, r5 @ ..V. ..R. .... ..A. | 442 | bic r0, r0, r5 @ ..V. ..R. .... ..A. |
412 | orr r0, r0, r6 @ ..VI Z..S .... .C.M (mmu) | 443 | orr r0, r0, r6 @ ..VI Z..S .... .C.M (mmu) |
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index 93df47265f2d..63037e2162f2 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S | |||
@@ -315,7 +315,7 @@ ENTRY(xscale_flush_kern_dcache_area) | |||
315 | * - start - virtual start address | 315 | * - start - virtual start address |
316 | * - end - virtual end address | 316 | * - end - virtual end address |
317 | */ | 317 | */ |
318 | ENTRY(xscale_dma_inv_range) | 318 | xscale_dma_inv_range: |
319 | tst r0, #CACHELINESIZE - 1 | 319 | tst r0, #CACHELINESIZE - 1 |
320 | bic r0, r0, #CACHELINESIZE - 1 | 320 | bic r0, r0, #CACHELINESIZE - 1 |
321 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry | 321 | mcrne p15, 0, r0, c7, c10, 1 @ clean D entry |
@@ -336,7 +336,7 @@ ENTRY(xscale_dma_inv_range) | |||
336 | * - start - virtual start address | 336 | * - start - virtual start address |
337 | * - end - virtual end address | 337 | * - end - virtual end address |
338 | */ | 338 | */ |
339 | ENTRY(xscale_dma_clean_range) | 339 | xscale_dma_clean_range: |
340 | bic r0, r0, #CACHELINESIZE - 1 | 340 | bic r0, r0, #CACHELINESIZE - 1 |
341 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry | 341 | 1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry |
342 | add r0, r0, #CACHELINESIZE | 342 | add r0, r0, #CACHELINESIZE |
@@ -363,6 +363,43 @@ ENTRY(xscale_dma_flush_range) | |||
363 | mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer | 363 | mcr p15, 0, r0, c7, c10, 4 @ Drain Write (& Fill) Buffer |
364 | mov pc, lr | 364 | mov pc, lr |
365 | 365 | ||
366 | /* | ||
367 | * dma_map_area(start, size, dir) | ||
368 | * - start - kernel virtual start address | ||
369 | * - size - size of region | ||
370 | * - dir - DMA direction | ||
371 | */ | ||
372 | ENTRY(xscale_dma_map_area) | ||
373 | add r1, r1, r0 | ||
374 | cmp r2, #DMA_TO_DEVICE | ||
375 | beq xscale_dma_clean_range | ||
376 | bcs xscale_dma_inv_range | ||
377 | b xscale_dma_flush_range | ||
378 | ENDPROC(xscale_dma_map_area) | ||
379 | |||
380 | /* | ||
381 | * dma_map_area(start, size, dir) | ||
382 | * - start - kernel virtual start address | ||
383 | * - size - size of region | ||
384 | * - dir - DMA direction | ||
385 | */ | ||
386 | ENTRY(xscale_dma_a0_map_area) | ||
387 | add r1, r1, r0 | ||
388 | teq r2, #DMA_TO_DEVICE | ||
389 | beq xscale_dma_clean_range | ||
390 | b xscale_dma_flush_range | ||
391 | ENDPROC(xscsale_dma_a0_map_area) | ||
392 | |||
393 | /* | ||
394 | * dma_unmap_area(start, size, dir) | ||
395 | * - start - kernel virtual start address | ||
396 | * - size - size of region | ||
397 | * - dir - DMA direction | ||
398 | */ | ||
399 | ENTRY(xscale_dma_unmap_area) | ||
400 | mov pc, lr | ||
401 | ENDPROC(xscale_dma_unmap_area) | ||
402 | |||
366 | ENTRY(xscale_cache_fns) | 403 | ENTRY(xscale_cache_fns) |
367 | .long xscale_flush_kern_cache_all | 404 | .long xscale_flush_kern_cache_all |
368 | .long xscale_flush_user_cache_all | 405 | .long xscale_flush_user_cache_all |
@@ -370,8 +407,8 @@ ENTRY(xscale_cache_fns) | |||
370 | .long xscale_coherent_kern_range | 407 | .long xscale_coherent_kern_range |
371 | .long xscale_coherent_user_range | 408 | .long xscale_coherent_user_range |
372 | .long xscale_flush_kern_dcache_area | 409 | .long xscale_flush_kern_dcache_area |
373 | .long xscale_dma_inv_range | 410 | .long xscale_dma_map_area |
374 | .long xscale_dma_clean_range | 411 | .long xscale_dma_unmap_area |
375 | .long xscale_dma_flush_range | 412 | .long xscale_dma_flush_range |
376 | 413 | ||
377 | /* | 414 | /* |
@@ -394,8 +431,8 @@ ENTRY(xscale_80200_A0_A1_cache_fns) | |||
394 | .long xscale_coherent_kern_range | 431 | .long xscale_coherent_kern_range |
395 | .long xscale_coherent_user_range | 432 | .long xscale_coherent_user_range |
396 | .long xscale_flush_kern_dcache_area | 433 | .long xscale_flush_kern_dcache_area |
397 | .long xscale_dma_flush_range | 434 | .long xscale_dma_a0_map_area |
398 | .long xscale_dma_clean_range | 435 | .long xscale_dma_unmap_area |
399 | .long xscale_dma_flush_range | 436 | .long xscale_dma_flush_range |
400 | 437 | ||
401 | ENTRY(cpu_xscale_dcache_clean_area) | 438 | ENTRY(cpu_xscale_dcache_clean_area) |
diff --git a/arch/arm/mm/tlb-v7.S b/arch/arm/mm/tlb-v7.S index a26a605b73bd..0cb1848bd876 100644 --- a/arch/arm/mm/tlb-v7.S +++ b/arch/arm/mm/tlb-v7.S | |||
@@ -40,7 +40,6 @@ ENTRY(v7wbi_flush_user_tlb_range) | |||
40 | asid r3, r3 @ mask ASID | 40 | asid r3, r3 @ mask ASID |
41 | orr r0, r3, r0, lsl #PAGE_SHIFT @ Create initial MVA | 41 | orr r0, r3, r0, lsl #PAGE_SHIFT @ Create initial MVA |
42 | mov r1, r1, lsl #PAGE_SHIFT | 42 | mov r1, r1, lsl #PAGE_SHIFT |
43 | vma_vm_flags r2, r2 @ get vma->vm_flags | ||
44 | 1: | 43 | 1: |
45 | #ifdef CONFIG_SMP | 44 | #ifdef CONFIG_SMP |
46 | mcr p15, 0, r0, c8, c3, 1 @ TLB invalidate U MVA (shareable) | 45 | mcr p15, 0, r0, c8, c3, 1 @ TLB invalidate U MVA (shareable) |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx25.h b/arch/arm/plat-mxc/include/mach/iomux-mx25.h index 810c47f56e77..9af494f0ab3d 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx25.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx25.h | |||
@@ -58,19 +58,19 @@ | |||
58 | 58 | ||
59 | #define MX25_PAD_A18__A18 IOMUX_PAD(0x23c, 0x020, 0x10, 0, 0, NO_PAD_CTRL) | 59 | #define MX25_PAD_A18__A18 IOMUX_PAD(0x23c, 0x020, 0x10, 0, 0, NO_PAD_CTRL) |
60 | #define MX25_PAD_A18__GPIO_2_4 IOMUX_PAD(0x23c, 0x020, 0x15, 0, 0, NO_PAD_CTRL) | 60 | #define MX25_PAD_A18__GPIO_2_4 IOMUX_PAD(0x23c, 0x020, 0x15, 0, 0, NO_PAD_CTRL) |
61 | #define MX25_PAD_A18__FEC_COL IOMUX_PAD(0x23c, 0x020, 0x17, 0x504, 0, NO_PAD_CTL) | 61 | #define MX25_PAD_A18__FEC_COL IOMUX_PAD(0x23c, 0x020, 0x17, 0x504, 0, NO_PAD_CTRL) |
62 | 62 | ||
63 | #define MX25_PAD_A19__A19 IOMUX_PAD(0x240, 0x024, 0x10, 0, 0, NO_PAD_CTRL) | 63 | #define MX25_PAD_A19__A19 IOMUX_PAD(0x240, 0x024, 0x10, 0, 0, NO_PAD_CTRL) |
64 | #define MX25_PAD_A19__FEC_RX_ER IOMUX_PAD(0x240, 0x024, 0x17, 0x518, 0, NO_PAD_CTL) | 64 | #define MX25_PAD_A19__FEC_RX_ER IOMUX_PAD(0x240, 0x024, 0x17, 0x518, 0, NO_PAD_CTRL) |
65 | #define MX25_PAD_A19__GPIO_2_5 IOMUX_PAD(0x240, 0x024, 0x15, 0, 0, NO_PAD_CTRL) | 65 | #define MX25_PAD_A19__GPIO_2_5 IOMUX_PAD(0x240, 0x024, 0x15, 0, 0, NO_PAD_CTRL) |
66 | 66 | ||
67 | #define MX25_PAD_A20__A20 IOMUX_PAD(0x244, 0x028, 0x10, 0, 0, NO_PAD_CTRL) | 67 | #define MX25_PAD_A20__A20 IOMUX_PAD(0x244, 0x028, 0x10, 0, 0, NO_PAD_CTRL) |
68 | #define MX25_PAD_A20__GPIO_2_6 IOMUX_PAD(0x244, 0x028, 0x15, 0, 0, NO_PAD_CTRL) | 68 | #define MX25_PAD_A20__GPIO_2_6 IOMUX_PAD(0x244, 0x028, 0x15, 0, 0, NO_PAD_CTRL) |
69 | #define MX25_PAD_A20__FEC_RDATA2 IOMUX_PAD(0x244, 0x028, 0x17, 0x50c, 0, NO_PAD_CTL) | 69 | #define MX25_PAD_A20__FEC_RDATA2 IOMUX_PAD(0x244, 0x028, 0x17, 0x50c, 0, NO_PAD_CTRL) |
70 | 70 | ||
71 | #define MX25_PAD_A21__A21 IOMUX_PAD(0x248, 0x02c, 0x10, 0, 0, NO_PAD_CTRL) | 71 | #define MX25_PAD_A21__A21 IOMUX_PAD(0x248, 0x02c, 0x10, 0, 0, NO_PAD_CTRL) |
72 | #define MX25_PAD_A21__GPIO_2_7 IOMUX_PAD(0x248, 0x02c, 0x15, 0, 0, NO_PAD_CTRL) | 72 | #define MX25_PAD_A21__GPIO_2_7 IOMUX_PAD(0x248, 0x02c, 0x15, 0, 0, NO_PAD_CTRL) |
73 | #define MX25_PAD_A21__FEC_RDATA3 IOMUX_PAD(0x248, 0x02c, 0x17, 0x510, 0, NO_PAD_CTL) | 73 | #define MX25_PAD_A21__FEC_RDATA3 IOMUX_PAD(0x248, 0x02c, 0x17, 0x510, 0, NO_PAD_CTRL) |
74 | 74 | ||
75 | #define MX25_PAD_A22__A22 IOMUX_PAD(0x000, 0x030, 0x10, 0, 0, NO_PAD_CTRL) | 75 | #define MX25_PAD_A22__A22 IOMUX_PAD(0x000, 0x030, 0x10, 0, 0, NO_PAD_CTRL) |
76 | #define MX25_PAD_A22__GPIO_2_8 IOMUX_PAD(0x000, 0x030, 0x15, 0, 0, NO_PAD_CTRL) | 76 | #define MX25_PAD_A22__GPIO_2_8 IOMUX_PAD(0x000, 0x030, 0x15, 0, 0, NO_PAD_CTRL) |
@@ -80,11 +80,11 @@ | |||
80 | 80 | ||
81 | #define MX25_PAD_A24__A24 IOMUX_PAD(0x250, 0x038, 0x10, 0, 0, NO_PAD_CTRL) | 81 | #define MX25_PAD_A24__A24 IOMUX_PAD(0x250, 0x038, 0x10, 0, 0, NO_PAD_CTRL) |
82 | #define MX25_PAD_A24__GPIO_2_10 IOMUX_PAD(0x250, 0x038, 0x15, 0, 0, NO_PAD_CTRL) | 82 | #define MX25_PAD_A24__GPIO_2_10 IOMUX_PAD(0x250, 0x038, 0x15, 0, 0, NO_PAD_CTRL) |
83 | #define MX25_PAD_A24__FEC_RX_CLK IOMUX_PAD(0x250, 0x038, 0x17, 0x514, 0, NO_PAD_CTL) | 83 | #define MX25_PAD_A24__FEC_RX_CLK IOMUX_PAD(0x250, 0x038, 0x17, 0x514, 0, NO_PAD_CTRL) |
84 | 84 | ||
85 | #define MX25_PAD_A25__A25 IOMUX_PAD(0x254, 0x03c, 0x10, 0, 0, NO_PAD_CTRL) | 85 | #define MX25_PAD_A25__A25 IOMUX_PAD(0x254, 0x03c, 0x10, 0, 0, NO_PAD_CTRL) |
86 | #define MX25_PAD_A25__GPIO_2_11 IOMUX_PAD(0x254, 0x03c, 0x15, 0, 0, NO_PAD_CTRL) | 86 | #define MX25_PAD_A25__GPIO_2_11 IOMUX_PAD(0x254, 0x03c, 0x15, 0, 0, NO_PAD_CTRL) |
87 | #define MX25_PAD_A25__FEC_CRS IOMUX_PAD(0x254, 0x03c, 0x17, 0x508, 0, NO_PAD_CTL) | 87 | #define MX25_PAD_A25__FEC_CRS IOMUX_PAD(0x254, 0x03c, 0x17, 0x508, 0, NO_PAD_CTRL) |
88 | 88 | ||
89 | #define MX25_PAD_EB0__EB0 IOMUX_PAD(0x258, 0x040, 0x10, 0, 0, NO_PAD_CTRL) | 89 | #define MX25_PAD_EB0__EB0 IOMUX_PAD(0x258, 0x040, 0x10, 0, 0, NO_PAD_CTRL) |
90 | #define MX25_PAD_EB0__AUD4_TXD IOMUX_PAD(0x258, 0x040, 0x14, 0x464, 0, NO_PAD_CTRL) | 90 | #define MX25_PAD_EB0__AUD4_TXD IOMUX_PAD(0x258, 0x040, 0x14, 0x464, 0, NO_PAD_CTRL) |
@@ -112,7 +112,7 @@ | |||
112 | #define MX25_PAD_CS5__UART5_RTS IOMUX_PAD(0x268, 0x058, 0x13, 0x574, 0, NO_PAD_CTRL) | 112 | #define MX25_PAD_CS5__UART5_RTS IOMUX_PAD(0x268, 0x058, 0x13, 0x574, 0, NO_PAD_CTRL) |
113 | #define MX25_PAD_CS5__GPIO_3_21 IOMUX_PAD(0x268, 0x058, 0x15, 0, 0, NO_PAD_CTRL) | 113 | #define MX25_PAD_CS5__GPIO_3_21 IOMUX_PAD(0x268, 0x058, 0x15, 0, 0, NO_PAD_CTRL) |
114 | 114 | ||
115 | #define MX25_PAD_NF_CE0__NF_CE0 IOMUX_PAD(0x26c, 0x05c, 0x10, 0, 0, NO_PAD_CTL) | 115 | #define MX25_PAD_NF_CE0__NF_CE0 IOMUX_PAD(0x26c, 0x05c, 0x10, 0, 0, NO_PAD_CTRL) |
116 | #define MX25_PAD_NF_CE0__GPIO_3_22 IOMUX_PAD(0x26c, 0x05c, 0x15, 0, 0, NO_PAD_CTRL) | 116 | #define MX25_PAD_NF_CE0__GPIO_3_22 IOMUX_PAD(0x26c, 0x05c, 0x15, 0, 0, NO_PAD_CTRL) |
117 | 117 | ||
118 | #define MX25_PAD_ECB__ECB IOMUX_PAD(0x270, 0x060, 0x10, 0, 0, NO_PAD_CTRL) | 118 | #define MX25_PAD_ECB__ECB IOMUX_PAD(0x270, 0x060, 0x10, 0, 0, NO_PAD_CTRL) |
@@ -229,28 +229,28 @@ | |||
229 | #define MX25_PAD_LD7__GPIO_1_21 IOMUX_PAD(0x2dc, 0x0e4, 0x15, 0, 0, NO_PAD_CTRL) | 229 | #define MX25_PAD_LD7__GPIO_1_21 IOMUX_PAD(0x2dc, 0x0e4, 0x15, 0, 0, NO_PAD_CTRL) |
230 | 230 | ||
231 | #define MX25_PAD_LD8__LD8 IOMUX_PAD(0x2e0, 0x0e8, 0x10, 0, 0, NO_PAD_CTRL) | 231 | #define MX25_PAD_LD8__LD8 IOMUX_PAD(0x2e0, 0x0e8, 0x10, 0, 0, NO_PAD_CTRL) |
232 | #define MX25_PAD_LD8__FEC_TX_ERR IOMUX_PAD(0x2e0, 0x0e8, 0x15, 0, 0, NO_PAD_CTL) | 232 | #define MX25_PAD_LD8__FEC_TX_ERR IOMUX_PAD(0x2e0, 0x0e8, 0x15, 0, 0, NO_PAD_CTRL) |
233 | 233 | ||
234 | #define MX25_PAD_LD9__LD9 IOMUX_PAD(0x2e4, 0x0ec, 0x10, 0, 0, NO_PAD_CTRL) | 234 | #define MX25_PAD_LD9__LD9 IOMUX_PAD(0x2e4, 0x0ec, 0x10, 0, 0, NO_PAD_CTRL) |
235 | #define MX25_PAD_LD9__FEC_COL IOMUX_PAD(0x2e4, 0x0ec, 0x15, 0x504, 1, NO_PAD_CTL) | 235 | #define MX25_PAD_LD9__FEC_COL IOMUX_PAD(0x2e4, 0x0ec, 0x15, 0x504, 1, NO_PAD_CTRL) |
236 | 236 | ||
237 | #define MX25_PAD_LD10__LD10 IOMUX_PAD(0x2e8, 0x0f0, 0x10, 0, 0, NO_PAD_CTRL) | 237 | #define MX25_PAD_LD10__LD10 IOMUX_PAD(0x2e8, 0x0f0, 0x10, 0, 0, NO_PAD_CTRL) |
238 | #define MX25_PAD_LD10__FEC_RX_ER IOMUX_PAD(0x2e8, 0x0f0, 0x15, 0x518, 1, NO_PAD_CTL) | 238 | #define MX25_PAD_LD10__FEC_RX_ER IOMUX_PAD(0x2e8, 0x0f0, 0x15, 0x518, 1, NO_PAD_CTRL) |
239 | 239 | ||
240 | #define MX25_PAD_LD11__LD11 IOMUX_PAD(0x2ec, 0x0f4, 0x10, 0, 0, NO_PAD_CTRL) | 240 | #define MX25_PAD_LD11__LD11 IOMUX_PAD(0x2ec, 0x0f4, 0x10, 0, 0, NO_PAD_CTRL) |
241 | #define MX25_PAD_LD11__FEC_RDATA2 IOMUX_PAD(0x2ec, 0x0f4, 0x15, 0x50c, 1, NO_PAD_CTL) | 241 | #define MX25_PAD_LD11__FEC_RDATA2 IOMUX_PAD(0x2ec, 0x0f4, 0x15, 0x50c, 1, NO_PAD_CTRL) |
242 | 242 | ||
243 | #define MX25_PAD_LD12__LD12 IOMUX_PAD(0x2f0, 0x0f8, 0x10, 0, 0, NO_PAD_CTRL) | 243 | #define MX25_PAD_LD12__LD12 IOMUX_PAD(0x2f0, 0x0f8, 0x10, 0, 0, NO_PAD_CTRL) |
244 | #define MX25_PAD_LD12__FEC_RDATA3 IOMUX_PAD(0x2f0, 0x0f8, 0x15, 0x510, 1, NO_PAD_CTL) | 244 | #define MX25_PAD_LD12__FEC_RDATA3 IOMUX_PAD(0x2f0, 0x0f8, 0x15, 0x510, 1, NO_PAD_CTRL) |
245 | 245 | ||
246 | #define MX25_PAD_LD13__LD13 IOMUX_PAD(0x2f4, 0x0fc, 0x10, 0, 0, NO_PAD_CTRL) | 246 | #define MX25_PAD_LD13__LD13 IOMUX_PAD(0x2f4, 0x0fc, 0x10, 0, 0, NO_PAD_CTRL) |
247 | #define MX25_PAD_LD13__FEC_TDATA2 IOMUX_PAD(0x2f4, 0x0fc, 0x15, 0, 0, NO_PAD_CTL) | 247 | #define MX25_PAD_LD13__FEC_TDATA2 IOMUX_PAD(0x2f4, 0x0fc, 0x15, 0, 0, NO_PAD_CTRL) |
248 | 248 | ||
249 | #define MX25_PAD_LD14__LD14 IOMUX_PAD(0x2f8, 0x100, 0x10, 0, 0, NO_PAD_CTRL) | 249 | #define MX25_PAD_LD14__LD14 IOMUX_PAD(0x2f8, 0x100, 0x10, 0, 0, NO_PAD_CTRL) |
250 | #define MX25_PAD_LD14__FEC_TDATA3 IOMUX_PAD(0x2f8, 0x100, 0x15, 0, 0, NO_PAD_CTL) | 250 | #define MX25_PAD_LD14__FEC_TDATA3 IOMUX_PAD(0x2f8, 0x100, 0x15, 0, 0, NO_PAD_CTRL) |
251 | 251 | ||
252 | #define MX25_PAD_LD15__LD15 IOMUX_PAD(0x2fc, 0x104, 0x10, 0, 0, NO_PAD_CTRL) | 252 | #define MX25_PAD_LD15__LD15 IOMUX_PAD(0x2fc, 0x104, 0x10, 0, 0, NO_PAD_CTRL) |
253 | #define MX25_PAD_LD15__FEC_RX_CLK IOMUX_PAD(0x2fc, 0x104, 0x15, 0x514, 1, NO_PAD_CTL) | 253 | #define MX25_PAD_LD15__FEC_RX_CLK IOMUX_PAD(0x2fc, 0x104, 0x15, 0x514, 1, NO_PAD_CTRL) |
254 | 254 | ||
255 | #define MX25_PAD_HSYNC__HSYNC IOMUX_PAD(0x300, 0x108, 0x10, 0, 0, NO_PAD_CTRL) | 255 | #define MX25_PAD_HSYNC__HSYNC IOMUX_PAD(0x300, 0x108, 0x10, 0, 0, NO_PAD_CTRL) |
256 | #define MX25_PAD_HSYNC__GPIO_1_22 IOMUX_PAD(0x300, 0x108, 0x15, 0, 0, NO_PAD_CTRL) | 256 | #define MX25_PAD_HSYNC__GPIO_1_22 IOMUX_PAD(0x300, 0x108, 0x15, 0, 0, NO_PAD_CTRL) |
@@ -265,7 +265,7 @@ | |||
265 | #define MX25_PAD_OE_ACD__GPIO_1_25 IOMUX_PAD(0x30c, 0x114, 0x15, 0, 0, NO_PAD_CTRL) | 265 | #define MX25_PAD_OE_ACD__GPIO_1_25 IOMUX_PAD(0x30c, 0x114, 0x15, 0, 0, NO_PAD_CTRL) |
266 | 266 | ||
267 | #define MX25_PAD_CONTRAST__CONTRAST IOMUX_PAD(0x310, 0x118, 0x10, 0, 0, NO_PAD_CTRL) | 267 | #define MX25_PAD_CONTRAST__CONTRAST IOMUX_PAD(0x310, 0x118, 0x10, 0, 0, NO_PAD_CTRL) |
268 | #define MX25_PAD_CONTRAST__FEC_CRS IOMUX_PAD(0x310, 0x118, 0x15, 0x508, 1, NO_PAD_CTL) | 268 | #define MX25_PAD_CONTRAST__FEC_CRS IOMUX_PAD(0x310, 0x118, 0x15, 0x508, 1, NO_PAD_CTRL) |
269 | 269 | ||
270 | #define MX25_PAD_PWM__PWM IOMUX_PAD(0x314, 0x11c, 0x10, 0, 0, NO_PAD_CTRL) | 270 | #define MX25_PAD_PWM__PWM IOMUX_PAD(0x314, 0x11c, 0x10, 0, 0, NO_PAD_CTRL) |
271 | #define MX25_PAD_PWM__GPIO_1_26 IOMUX_PAD(0x314, 0x11c, 0x15, 0, 0, NO_PAD_CTRL) | 271 | #define MX25_PAD_PWM__GPIO_1_26 IOMUX_PAD(0x314, 0x11c, 0x15, 0, 0, NO_PAD_CTRL) |
@@ -354,19 +354,19 @@ | |||
354 | #define MX25_PAD_UART2_TXD__GPIO_4_27 IOMUX_PAD(0x37c, 0x184, 0x15, 0, 0, NO_PAD_CTRL) | 354 | #define MX25_PAD_UART2_TXD__GPIO_4_27 IOMUX_PAD(0x37c, 0x184, 0x15, 0, 0, NO_PAD_CTRL) |
355 | 355 | ||
356 | #define MX25_PAD_UART2_RTS__UART2_RTS IOMUX_PAD(0x380, 0x188, 0x10, 0, 0, NO_PAD_CTRL) | 356 | #define MX25_PAD_UART2_RTS__UART2_RTS IOMUX_PAD(0x380, 0x188, 0x10, 0, 0, NO_PAD_CTRL) |
357 | #define MX25_PAD_UART2_RTS__FEC_COL IOMUX_PAD(0x380, 0x188, 0x12, 0x504, 2, NO_PAD_CTL) | 357 | #define MX25_PAD_UART2_RTS__FEC_COL IOMUX_PAD(0x380, 0x188, 0x12, 0x504, 2, NO_PAD_CTRL) |
358 | #define MX25_PAD_UART2_RTS__GPIO_4_28 IOMUX_PAD(0x380, 0x188, 0x15, 0, 0, NO_PAD_CTRL) | 358 | #define MX25_PAD_UART2_RTS__GPIO_4_28 IOMUX_PAD(0x380, 0x188, 0x15, 0, 0, NO_PAD_CTRL) |
359 | 359 | ||
360 | #define MX25_PAD_UART2_CTS__FEC_RX_ER IOMUX_PAD(0x384, 0x18c, 0x12, 0x518, 2, NO_PAD_CTL) | 360 | #define MX25_PAD_UART2_CTS__FEC_RX_ER IOMUX_PAD(0x384, 0x18c, 0x12, 0x518, 2, NO_PAD_CTRL) |
361 | #define MX25_PAD_UART2_CTS__UART2_CTS IOMUX_PAD(0x384, 0x18c, 0x10, 0, 0, NO_PAD_CTRL) | 361 | #define MX25_PAD_UART2_CTS__UART2_CTS IOMUX_PAD(0x384, 0x18c, 0x10, 0, 0, NO_PAD_CTRL) |
362 | #define MX25_PAD_UART2_CTS__GPIO_4_29 IOMUX_PAD(0x384, 0x18c, 0x15, 0, 0, NO_PAD_CTRL) | 362 | #define MX25_PAD_UART2_CTS__GPIO_4_29 IOMUX_PAD(0x384, 0x18c, 0x15, 0, 0, NO_PAD_CTRL) |
363 | 363 | ||
364 | #define MX25_PAD_SD1_CMD__SD1_CMD IOMUX_PAD(0x388, 0x190, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) | 364 | #define MX25_PAD_SD1_CMD__SD1_CMD IOMUX_PAD(0x388, 0x190, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) |
365 | #define MX25_PAD_SD1_CMD__FEC_RDATA2 IOMUX_PAD(0x388, 0x190, 0x12, 0x50c, 2, NO_PAD_CTL) | 365 | #define MX25_PAD_SD1_CMD__FEC_RDATA2 IOMUX_PAD(0x388, 0x190, 0x12, 0x50c, 2, NO_PAD_CTRL) |
366 | #define MX25_PAD_SD1_CMD__GPIO_2_23 IOMUX_PAD(0x388, 0x190, 0x15, 0, 0, NO_PAD_CTRL) | 366 | #define MX25_PAD_SD1_CMD__GPIO_2_23 IOMUX_PAD(0x388, 0x190, 0x15, 0, 0, NO_PAD_CTRL) |
367 | 367 | ||
368 | #define MX25_PAD_SD1_CLK__SD1_CLK IOMUX_PAD(0x38c, 0x194, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) | 368 | #define MX25_PAD_SD1_CLK__SD1_CLK IOMUX_PAD(0x38c, 0x194, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) |
369 | #define MX25_PAD_SD1_CLK__FEC_RDATA3 IOMUX_PAD(0x38c, 0x194, 0x12, 0x510, 2, NO_PAD_CTL) | 369 | #define MX25_PAD_SD1_CLK__FEC_RDATA3 IOMUX_PAD(0x38c, 0x194, 0x12, 0x510, 2, NO_PAD_CTRL) |
370 | #define MX25_PAD_SD1_CLK__GPIO_2_24 IOMUX_PAD(0x38c, 0x194, 0x15, 0, 0, NO_PAD_CTRL) | 370 | #define MX25_PAD_SD1_CLK__GPIO_2_24 IOMUX_PAD(0x38c, 0x194, 0x15, 0, 0, NO_PAD_CTRL) |
371 | 371 | ||
372 | #define MX25_PAD_SD1_DATA0__SD1_DATA0 IOMUX_PAD(0x390, 0x198, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) | 372 | #define MX25_PAD_SD1_DATA0__SD1_DATA0 IOMUX_PAD(0x390, 0x198, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) |
@@ -377,11 +377,11 @@ | |||
377 | #define MX25_PAD_SD1_DATA1__GPIO_2_26 IOMUX_PAD(0x394, 0x19c, 0x15, 0, 0, NO_PAD_CTRL) | 377 | #define MX25_PAD_SD1_DATA1__GPIO_2_26 IOMUX_PAD(0x394, 0x19c, 0x15, 0, 0, NO_PAD_CTRL) |
378 | 378 | ||
379 | #define MX25_PAD_SD1_DATA2__SD1_DATA2 IOMUX_PAD(0x398, 0x1a0, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) | 379 | #define MX25_PAD_SD1_DATA2__SD1_DATA2 IOMUX_PAD(0x398, 0x1a0, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) |
380 | #define MX25_PAD_SD1_DATA2__FEC_RX_CLK IOMUX_PAD(0x398, 0x1a0, 0x15, 0x514, 2, NO_PAD_CTL) | 380 | #define MX25_PAD_SD1_DATA2__FEC_RX_CLK IOMUX_PAD(0x398, 0x1a0, 0x15, 0x514, 2, NO_PAD_CTRL) |
381 | #define MX25_PAD_SD1_DATA2__GPIO_2_27 IOMUX_PAD(0x398, 0x1a0, 0x15, 0, 0, NO_PAD_CTRL) | 381 | #define MX25_PAD_SD1_DATA2__GPIO_2_27 IOMUX_PAD(0x398, 0x1a0, 0x15, 0, 0, NO_PAD_CTRL) |
382 | 382 | ||
383 | #define MX25_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(0x39c, 0x1a4, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) | 383 | #define MX25_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(0x39c, 0x1a4, 0x10, 0, 0, PAD_CTL_PUS_47K_UP) |
384 | #define MX25_PAD_SD1_DATA3__FEC_CRS IOMUX_PAD(0x39c, 0x1a4, 0x10, 0x508, 2, NO_PAD_CTL) | 384 | #define MX25_PAD_SD1_DATA3__FEC_CRS IOMUX_PAD(0x39c, 0x1a4, 0x10, 0x508, 2, NO_PAD_CTRL) |
385 | #define MX25_PAD_SD1_DATA3__GPIO_2_28 IOMUX_PAD(0x39c, 0x1a4, 0x15, 0, 0, NO_PAD_CTRL) | 385 | #define MX25_PAD_SD1_DATA3__GPIO_2_28 IOMUX_PAD(0x39c, 0x1a4, 0x15, 0, 0, NO_PAD_CTRL) |
386 | 386 | ||
387 | #define MX25_PAD_KPP_ROW0__KPP_ROW0 IOMUX_PAD(0x3a0, 0x1a8, 0x10, 0, 0, PAD_CTL_PKE) | 387 | #define MX25_PAD_KPP_ROW0__KPP_ROW0 IOMUX_PAD(0x3a0, 0x1a8, 0x10, 0, 0, PAD_CTL_PKE) |
@@ -410,7 +410,7 @@ | |||
410 | #define MX25_PAD_KPP_COL3__KPP_COL3 IOMUX_PAD(0x3bc, 0x1c4, 0x10, 0, 0, PAD_CTL_PKE | PAD_CTL_ODE) | 410 | #define MX25_PAD_KPP_COL3__KPP_COL3 IOMUX_PAD(0x3bc, 0x1c4, 0x10, 0, 0, PAD_CTL_PKE | PAD_CTL_ODE) |
411 | #define MX25_PAD_KPP_COL3__GPIO_3_4 IOMUX_PAD(0x3bc, 0x1c4, 0x15, 0, 0, NO_PAD_CTRL) | 411 | #define MX25_PAD_KPP_COL3__GPIO_3_4 IOMUX_PAD(0x3bc, 0x1c4, 0x15, 0, 0, NO_PAD_CTRL) |
412 | 412 | ||
413 | #define MX25_PAD_FEC_MDC__FEC_MDC IOMUX_PAD(0x3c0, 0x1c8, 0x10, 0, 0, NO_PAD_CTL) | 413 | #define MX25_PAD_FEC_MDC__FEC_MDC IOMUX_PAD(0x3c0, 0x1c8, 0x10, 0, 0, NO_PAD_CTRL) |
414 | #define MX25_PAD_FEC_MDC__AUD4_TXD IOMUX_PAD(0x3c0, 0x1c8, 0x12, 0x464, 1, NO_PAD_CTRL) | 414 | #define MX25_PAD_FEC_MDC__AUD4_TXD IOMUX_PAD(0x3c0, 0x1c8, 0x12, 0x464, 1, NO_PAD_CTRL) |
415 | #define MX25_PAD_FEC_MDC__GPIO_3_5 IOMUX_PAD(0x3c0, 0x1c8, 0x15, 0, 0, NO_PAD_CTRL) | 415 | #define MX25_PAD_FEC_MDC__GPIO_3_5 IOMUX_PAD(0x3c0, 0x1c8, 0x15, 0, 0, NO_PAD_CTRL) |
416 | 416 | ||
@@ -418,23 +418,23 @@ | |||
418 | #define MX25_PAD_FEC_MDIO__AUD4_RXD IOMUX_PAD(0x3c4, 0x1cc, 0x12, 0x460, 1, NO_PAD_CTRL) | 418 | #define MX25_PAD_FEC_MDIO__AUD4_RXD IOMUX_PAD(0x3c4, 0x1cc, 0x12, 0x460, 1, NO_PAD_CTRL) |
419 | #define MX25_PAD_FEC_MDIO__GPIO_3_6 IOMUX_PAD(0x3c4, 0x1cc, 0x15, 0, 0, NO_PAD_CTRL) | 419 | #define MX25_PAD_FEC_MDIO__GPIO_3_6 IOMUX_PAD(0x3c4, 0x1cc, 0x15, 0, 0, NO_PAD_CTRL) |
420 | 420 | ||
421 | #define MX25_PAD_FEC_TDATA0__FEC_TDATA0 IOMUX_PAD(0x3c8, 0x1d0, 0x10, 0, 0, NO_PAD_CTL) | 421 | #define MX25_PAD_FEC_TDATA0__FEC_TDATA0 IOMUX_PAD(0x3c8, 0x1d0, 0x10, 0, 0, NO_PAD_CTRL) |
422 | #define MX25_PAD_FEC_TDATA0__GPIO_3_7 IOMUX_PAD(0x3c8, 0x1d0, 0x15, 0, 0, NO_PAD_CTRL) | 422 | #define MX25_PAD_FEC_TDATA0__GPIO_3_7 IOMUX_PAD(0x3c8, 0x1d0, 0x15, 0, 0, NO_PAD_CTRL) |
423 | 423 | ||
424 | #define MX25_PAD_FEC_TDATA1__FEC_TDATA1 IOMUX_PAD(0x3cc, 0x1d4, 0x10, 0, 0, NO_PAD_CTL) | 424 | #define MX25_PAD_FEC_TDATA1__FEC_TDATA1 IOMUX_PAD(0x3cc, 0x1d4, 0x10, 0, 0, NO_PAD_CTRL) |
425 | #define MX25_PAD_FEC_TDATA1__AUD4_TXFS IOMUX_PAD(0x3cc, 0x1d4, 0x12, 0x474, 1, NO_PAD_CTRL) | 425 | #define MX25_PAD_FEC_TDATA1__AUD4_TXFS IOMUX_PAD(0x3cc, 0x1d4, 0x12, 0x474, 1, NO_PAD_CTRL) |
426 | #define MX25_PAD_FEC_TDATA1__GPIO_3_8 IOMUX_PAD(0x3cc, 0x1d4, 0x15, 0, 0, NO_PAD_CTRL) | 426 | #define MX25_PAD_FEC_TDATA1__GPIO_3_8 IOMUX_PAD(0x3cc, 0x1d4, 0x15, 0, 0, NO_PAD_CTRL) |
427 | 427 | ||
428 | #define MX25_PAD_FEC_TX_EN__FEC_TX_EN IOMUX_PAD(0x3d0, 0x1d8, 0x10, 0, 0, NO_PAD_CTL) | 428 | #define MX25_PAD_FEC_TX_EN__FEC_TX_EN IOMUX_PAD(0x3d0, 0x1d8, 0x10, 0, 0, NO_PAD_CTRL) |
429 | #define MX25_PAD_FEC_TX_EN__GPIO_3_9 IOMUX_PAD(0x3d0, 0x1d8, 0x15, 0, 0, NO_PAD_CTRL) | 429 | #define MX25_PAD_FEC_TX_EN__GPIO_3_9 IOMUX_PAD(0x3d0, 0x1d8, 0x15, 0, 0, NO_PAD_CTRL) |
430 | 430 | ||
431 | #define MX25_PAD_FEC_RDATA0__FEC_RDATA0 IOMUX_PAD(0x3d4, 0x1dc, 0x10, 0, 0, PAD_CTL_PUS_100K_DOWN | NO_PAD_CTL) | 431 | #define MX25_PAD_FEC_RDATA0__FEC_RDATA0 IOMUX_PAD(0x3d4, 0x1dc, 0x10, 0, 0, PAD_CTL_PUS_100K_DOWN | NO_PAD_CTRL) |
432 | #define MX25_PAD_FEC_RDATA0__GPIO_3_10 IOMUX_PAD(0x3d4, 0x1dc, 0x15, 0, 0, NO_PAD_CTRL) | 432 | #define MX25_PAD_FEC_RDATA0__GPIO_3_10 IOMUX_PAD(0x3d4, 0x1dc, 0x15, 0, 0, NO_PAD_CTRL) |
433 | 433 | ||
434 | #define MX25_PAD_FEC_RDATA1__FEC_RDATA1 IOMUX_PAD(0x3d8, 0x1e0, 0x10, 0, 0, PAD_CTL_PUS_100K_DOWN | NO_PAD_CTL) | 434 | #define MX25_PAD_FEC_RDATA1__FEC_RDATA1 IOMUX_PAD(0x3d8, 0x1e0, 0x10, 0, 0, PAD_CTL_PUS_100K_DOWN | NO_PAD_CTRL) |
435 | #define MX25_PAD_FEC_RDATA1__GPIO_3_11 IOMUX_PAD(0x3d8, 0x1e0, 0x15, 0, 0, NO_PAD_CTRL) | 435 | #define MX25_PAD_FEC_RDATA1__GPIO_3_11 IOMUX_PAD(0x3d8, 0x1e0, 0x15, 0, 0, NO_PAD_CTRL) |
436 | 436 | ||
437 | #define MX25_PAD_FEC_RX_DV__FEC_RX_DV IOMUX_PAD(0x3dc, 0x1e4, 0x10, 0, 0, PAD_CTL_PUS_100K_DOWN | NO_PAD_CTL) | 437 | #define MX25_PAD_FEC_RX_DV__FEC_RX_DV IOMUX_PAD(0x3dc, 0x1e4, 0x10, 0, 0, PAD_CTL_PUS_100K_DOWN | NO_PAD_CTRL) |
438 | #define MX25_PAD_FEC_RX_DV__CAN2_RX IOMUX_PAD(0x3dc, 0x1e4, 0x14, 0x484, 0, PAD_CTL_PUS_22K_UP) | 438 | #define MX25_PAD_FEC_RX_DV__CAN2_RX IOMUX_PAD(0x3dc, 0x1e4, 0x14, 0x484, 0, PAD_CTL_PUS_22K_UP) |
439 | #define MX25_PAD_FEC_RX_DV__GPIO_3_12 IOMUX_PAD(0x3dc, 0x1e4, 0x15, 0, 0, NO_PAD_CTRL) | 439 | #define MX25_PAD_FEC_RX_DV__GPIO_3_12 IOMUX_PAD(0x3dc, 0x1e4, 0x15, 0, 0, NO_PAD_CTRL) |
440 | 440 | ||
diff --git a/arch/arm/plat-mxc/include/mach/mx25.h b/arch/arm/plat-mxc/include/mach/mx25.h index 91e738144804..854e2dc58481 100644 --- a/arch/arm/plat-mxc/include/mach/mx25.h +++ b/arch/arm/plat-mxc/include/mach/mx25.h | |||
@@ -41,4 +41,8 @@ | |||
41 | #define UART1_BASE_ADDR 0x43f90000 | 41 | #define UART1_BASE_ADDR 0x43f90000 |
42 | #define UART2_BASE_ADDR 0x43f94000 | 42 | #define UART2_BASE_ADDR 0x43f94000 |
43 | 43 | ||
44 | #define MX25_FEC_BASE_ADDR 0x50038000 | ||
45 | |||
46 | #define MX25_INT_FEC 57 | ||
47 | |||
44 | #endif /* __MACH_MX25_H__ */ | 48 | #endif /* __MACH_MX25_H__ */ |
diff --git a/arch/arm/plat-nomadik/include/plat/i2c.h b/arch/arm/plat-nomadik/include/plat/i2c.h new file mode 100644 index 000000000000..1621db67a53d --- /dev/null +++ b/arch/arm/plat-nomadik/include/plat/i2c.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 ST-Ericsson | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2, as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | #ifndef __PLAT_I2C_H | ||
9 | #define __PLAT_I2C_H | ||
10 | |||
11 | enum i2c_freq_mode { | ||
12 | I2C_FREQ_MODE_STANDARD, /* up to 100 Kb/s */ | ||
13 | I2C_FREQ_MODE_FAST, /* up to 400 Kb/s */ | ||
14 | I2C_FREQ_MODE_FAST_PLUS, /* up to 1 Mb/s */ | ||
15 | I2C_FREQ_MODE_HIGH_SPEED /* up to 3.4 Mb/s */ | ||
16 | }; | ||
17 | |||
18 | /** | ||
19 | * struct nmk_i2c_controller - client specific controller configuration | ||
20 | * @clk_freq: clock frequency for the operation mode | ||
21 | * @slsu: Slave data setup time in ns. | ||
22 | * The needed setup time for three modes of operation | ||
23 | * are 250ns, 100ns and 10ns respectively thus leading | ||
24 | * to the values of 14, 6, 2 for a 48 MHz i2c clk | ||
25 | * @tft: Tx FIFO Threshold in bytes | ||
26 | * @rft: Rx FIFO Threshold in bytes | ||
27 | * @sm: speed mode | ||
28 | */ | ||
29 | struct nmk_i2c_controller { | ||
30 | unsigned long clk_freq; | ||
31 | unsigned short slsu; | ||
32 | unsigned char tft; | ||
33 | unsigned char rft; | ||
34 | enum i2c_freq_mode sm; | ||
35 | }; | ||
36 | |||
37 | #endif /* __PLAT_I2C_H */ | ||
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 89cafc937249..d9f8c844c385 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -36,10 +36,6 @@ static struct clk_functions *arch_clock; | |||
36 | * Standard clock functions defined in include/linux/clk.h | 36 | * Standard clock functions defined in include/linux/clk.h |
37 | *-------------------------------------------------------------------------*/ | 37 | *-------------------------------------------------------------------------*/ |
38 | 38 | ||
39 | /* This functions is moved to arch/arm/common/clkdev.c. For OMAP4 since | ||
40 | * clock framework is not up , it is defined here to avoid rework in | ||
41 | * every driver. Also dummy prcm reset function is added */ | ||
42 | |||
43 | int clk_enable(struct clk *clk) | 39 | int clk_enable(struct clk *clk) |
44 | { | 40 | { |
45 | unsigned long flags; | 41 | unsigned long flags; |
@@ -305,7 +301,6 @@ void clk_enable_init_clocks(void) | |||
305 | clk_enable(clkp); | 301 | clk_enable(clkp); |
306 | } | 302 | } |
307 | } | 303 | } |
308 | EXPORT_SYMBOL(clk_enable_init_clocks); | ||
309 | 304 | ||
310 | /* | 305 | /* |
311 | * Low level helpers | 306 | * Low level helpers |
@@ -334,7 +329,16 @@ void clk_init_cpufreq_table(struct cpufreq_frequency_table **table) | |||
334 | arch_clock->clk_init_cpufreq_table(table); | 329 | arch_clock->clk_init_cpufreq_table(table); |
335 | spin_unlock_irqrestore(&clockfw_lock, flags); | 330 | spin_unlock_irqrestore(&clockfw_lock, flags); |
336 | } | 331 | } |
337 | EXPORT_SYMBOL(clk_init_cpufreq_table); | 332 | |
333 | void clk_exit_cpufreq_table(struct cpufreq_frequency_table **table) | ||
334 | { | ||
335 | unsigned long flags; | ||
336 | |||
337 | spin_lock_irqsave(&clockfw_lock, flags); | ||
338 | if (arch_clock->clk_exit_cpufreq_table) | ||
339 | arch_clock->clk_exit_cpufreq_table(table); | ||
340 | spin_unlock_irqrestore(&clockfw_lock, flags); | ||
341 | } | ||
338 | #endif | 342 | #endif |
339 | 343 | ||
340 | /*-------------------------------------------------------------------------*/ | 344 | /*-------------------------------------------------------------------------*/ |
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c index f8ddbdd8b076..6d3d33360056 100644 --- a/arch/arm/plat-omap/cpu-omap.c +++ b/arch/arm/plat-omap/cpu-omap.c | |||
@@ -134,6 +134,7 @@ static int __init omap_cpu_init(struct cpufreq_policy *policy) | |||
134 | 134 | ||
135 | static int omap_cpu_exit(struct cpufreq_policy *policy) | 135 | static int omap_cpu_exit(struct cpufreq_policy *policy) |
136 | { | 136 | { |
137 | clk_exit_cpufreq_table(&freq_table); | ||
137 | clk_put(mpu_clk); | 138 | clk_put(mpu_clk); |
138 | return 0; | 139 | return 0; |
139 | } | 140 | } |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 04846811d0aa..d17620c50c28 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -192,6 +192,7 @@ struct gpio_bank { | |||
192 | u32 saved_risingdetect; | 192 | u32 saved_risingdetect; |
193 | #endif | 193 | #endif |
194 | u32 level_mask; | 194 | u32 level_mask; |
195 | u32 toggle_mask; | ||
195 | spinlock_t lock; | 196 | spinlock_t lock; |
196 | struct gpio_chip chip; | 197 | struct gpio_chip chip; |
197 | struct clk *dbck; | 198 | struct clk *dbck; |
@@ -749,6 +750,44 @@ static inline void set_24xx_gpio_triggering(struct gpio_bank *bank, int gpio, | |||
749 | } | 750 | } |
750 | #endif | 751 | #endif |
751 | 752 | ||
753 | /* | ||
754 | * This only applies to chips that can't do both rising and falling edge | ||
755 | * detection at once. For all other chips, this function is a noop. | ||
756 | */ | ||
757 | static void _toggle_gpio_edge_triggering(struct gpio_bank *bank, int gpio) | ||
758 | { | ||
759 | void __iomem *reg = bank->base; | ||
760 | u32 l = 0; | ||
761 | |||
762 | switch (bank->method) { | ||
763 | #ifdef CONFIG_ARCH_OMAP1 | ||
764 | case METHOD_MPUIO: | ||
765 | reg += OMAP_MPUIO_GPIO_INT_EDGE; | ||
766 | break; | ||
767 | #endif | ||
768 | #ifdef CONFIG_ARCH_OMAP15XX | ||
769 | case METHOD_GPIO_1510: | ||
770 | reg += OMAP1510_GPIO_INT_CONTROL; | ||
771 | break; | ||
772 | #endif | ||
773 | #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) | ||
774 | case METHOD_GPIO_7XX: | ||
775 | reg += OMAP7XX_GPIO_INT_CONTROL; | ||
776 | break; | ||
777 | #endif | ||
778 | default: | ||
779 | return; | ||
780 | } | ||
781 | |||
782 | l = __raw_readl(reg); | ||
783 | if ((l >> gpio) & 1) | ||
784 | l &= ~(1 << gpio); | ||
785 | else | ||
786 | l |= 1 << gpio; | ||
787 | |||
788 | __raw_writel(l, reg); | ||
789 | } | ||
790 | |||
752 | static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) | 791 | static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) |
753 | { | 792 | { |
754 | void __iomem *reg = bank->base; | 793 | void __iomem *reg = bank->base; |
@@ -759,6 +798,8 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) | |||
759 | case METHOD_MPUIO: | 798 | case METHOD_MPUIO: |
760 | reg += OMAP_MPUIO_GPIO_INT_EDGE; | 799 | reg += OMAP_MPUIO_GPIO_INT_EDGE; |
761 | l = __raw_readl(reg); | 800 | l = __raw_readl(reg); |
801 | if (trigger & IRQ_TYPE_EDGE_BOTH) | ||
802 | bank->toggle_mask |= 1 << gpio; | ||
762 | if (trigger & IRQ_TYPE_EDGE_RISING) | 803 | if (trigger & IRQ_TYPE_EDGE_RISING) |
763 | l |= 1 << gpio; | 804 | l |= 1 << gpio; |
764 | else if (trigger & IRQ_TYPE_EDGE_FALLING) | 805 | else if (trigger & IRQ_TYPE_EDGE_FALLING) |
@@ -771,6 +812,8 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) | |||
771 | case METHOD_GPIO_1510: | 812 | case METHOD_GPIO_1510: |
772 | reg += OMAP1510_GPIO_INT_CONTROL; | 813 | reg += OMAP1510_GPIO_INT_CONTROL; |
773 | l = __raw_readl(reg); | 814 | l = __raw_readl(reg); |
815 | if (trigger & IRQ_TYPE_EDGE_BOTH) | ||
816 | bank->toggle_mask |= 1 << gpio; | ||
774 | if (trigger & IRQ_TYPE_EDGE_RISING) | 817 | if (trigger & IRQ_TYPE_EDGE_RISING) |
775 | l |= 1 << gpio; | 818 | l |= 1 << gpio; |
776 | else if (trigger & IRQ_TYPE_EDGE_FALLING) | 819 | else if (trigger & IRQ_TYPE_EDGE_FALLING) |
@@ -803,6 +846,8 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) | |||
803 | case METHOD_GPIO_7XX: | 846 | case METHOD_GPIO_7XX: |
804 | reg += OMAP7XX_GPIO_INT_CONTROL; | 847 | reg += OMAP7XX_GPIO_INT_CONTROL; |
805 | l = __raw_readl(reg); | 848 | l = __raw_readl(reg); |
849 | if (trigger & IRQ_TYPE_EDGE_BOTH) | ||
850 | bank->toggle_mask |= 1 << gpio; | ||
806 | if (trigger & IRQ_TYPE_EDGE_RISING) | 851 | if (trigger & IRQ_TYPE_EDGE_RISING) |
807 | l |= 1 << gpio; | 852 | l |= 1 << gpio; |
808 | else if (trigger & IRQ_TYPE_EDGE_FALLING) | 853 | else if (trigger & IRQ_TYPE_EDGE_FALLING) |
@@ -1072,7 +1117,7 @@ static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int ena | |||
1072 | */ | 1117 | */ |
1073 | static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) | 1118 | static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) |
1074 | { | 1119 | { |
1075 | unsigned long flags; | 1120 | unsigned long uninitialized_var(flags); |
1076 | 1121 | ||
1077 | switch (bank->method) { | 1122 | switch (bank->method) { |
1078 | #ifdef CONFIG_ARCH_OMAP16XX | 1123 | #ifdef CONFIG_ARCH_OMAP16XX |
@@ -1217,7 +1262,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
1217 | { | 1262 | { |
1218 | void __iomem *isr_reg = NULL; | 1263 | void __iomem *isr_reg = NULL; |
1219 | u32 isr; | 1264 | u32 isr; |
1220 | unsigned int gpio_irq; | 1265 | unsigned int gpio_irq, gpio_index; |
1221 | struct gpio_bank *bank; | 1266 | struct gpio_bank *bank; |
1222 | u32 retrigger = 0; | 1267 | u32 retrigger = 0; |
1223 | int unmasked = 0; | 1268 | int unmasked = 0; |
@@ -1284,9 +1329,23 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
1284 | 1329 | ||
1285 | gpio_irq = bank->virtual_irq_start; | 1330 | gpio_irq = bank->virtual_irq_start; |
1286 | for (; isr != 0; isr >>= 1, gpio_irq++) { | 1331 | for (; isr != 0; isr >>= 1, gpio_irq++) { |
1332 | gpio_index = get_gpio_index(irq_to_gpio(gpio_irq)); | ||
1333 | |||
1287 | if (!(isr & 1)) | 1334 | if (!(isr & 1)) |
1288 | continue; | 1335 | continue; |
1289 | 1336 | ||
1337 | #ifdef CONFIG_ARCH_OMAP1 | ||
1338 | /* | ||
1339 | * Some chips can't respond to both rising and falling | ||
1340 | * at the same time. If this irq was requested with | ||
1341 | * both flags, we need to flip the ICR data for the IRQ | ||
1342 | * to respond to the IRQ for the opposite direction. | ||
1343 | * This will be indicated in the bank toggle_mask. | ||
1344 | */ | ||
1345 | if (bank->toggle_mask & (1 << gpio_index)) | ||
1346 | _toggle_gpio_edge_triggering(bank, gpio_index); | ||
1347 | #endif | ||
1348 | |||
1290 | generic_handle_irq(gpio_irq); | 1349 | generic_handle_irq(gpio_irq); |
1291 | } | 1350 | } |
1292 | } | 1351 | } |
diff --git a/arch/arm/plat-omap/include/plat/board.h b/arch/arm/plat-omap/include/plat/board.h index 376ce18216ff..5cd622039da0 100644 --- a/arch/arm/plat-omap/include/plat/board.h +++ b/arch/arm/plat-omap/include/plat/board.h | |||
@@ -99,7 +99,6 @@ struct fb_info; | |||
99 | struct omap_backlight_config { | 99 | struct omap_backlight_config { |
100 | int default_intensity; | 100 | int default_intensity; |
101 | int (*set_power)(struct device *dev, int state); | 101 | int (*set_power)(struct device *dev, int state); |
102 | int (*check_fb)(struct fb_info *fb); | ||
103 | }; | 102 | }; |
104 | 103 | ||
105 | struct omap_fbmem_config { | 104 | struct omap_fbmem_config { |
diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h index 309b6d1dccdb..94fe2a0ce40a 100644 --- a/arch/arm/plat-omap/include/plat/clock.h +++ b/arch/arm/plat-omap/include/plat/clock.h | |||
@@ -119,6 +119,7 @@ struct clk_functions { | |||
119 | void (*clk_disable_unused)(struct clk *clk); | 119 | void (*clk_disable_unused)(struct clk *clk); |
120 | #ifdef CONFIG_CPU_FREQ | 120 | #ifdef CONFIG_CPU_FREQ |
121 | void (*clk_init_cpufreq_table)(struct cpufreq_frequency_table **); | 121 | void (*clk_init_cpufreq_table)(struct cpufreq_frequency_table **); |
122 | void (*clk_exit_cpufreq_table)(struct cpufreq_frequency_table **); | ||
122 | #endif | 123 | #endif |
123 | }; | 124 | }; |
124 | 125 | ||
@@ -135,6 +136,7 @@ extern unsigned long followparent_recalc(struct clk *clk); | |||
135 | extern void clk_enable_init_clocks(void); | 136 | extern void clk_enable_init_clocks(void); |
136 | #ifdef CONFIG_CPU_FREQ | 137 | #ifdef CONFIG_CPU_FREQ |
137 | extern void clk_init_cpufreq_table(struct cpufreq_frequency_table **table); | 138 | extern void clk_init_cpufreq_table(struct cpufreq_frequency_table **table); |
139 | extern void clk_exit_cpufreq_table(struct cpufreq_frequency_table **table); | ||
138 | #endif | 140 | #endif |
139 | 141 | ||
140 | extern const struct clkops clkops_null; | 142 | extern const struct clkops clkops_null; |
diff --git a/arch/arm/plat-omap/include/plat/control.h b/arch/arm/plat-omap/include/plat/control.h index 2ae884378638..a745d62fad0d 100644 --- a/arch/arm/plat-omap/include/plat/control.h +++ b/arch/arm/plat-omap/include/plat/control.h | |||
@@ -147,7 +147,7 @@ | |||
147 | #define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) | 147 | #define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) |
148 | #define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) | 148 | #define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) |
149 | #define OMAP343X_CONTROL_DEBOBS(i) (OMAP2_CONTROL_GENERAL + 0x01B0 \ | 149 | #define OMAP343X_CONTROL_DEBOBS(i) (OMAP2_CONTROL_GENERAL + 0x01B0 \ |
150 | + ((i) >> 1) * 4 + (!(i) & 1) * 2) | 150 | + ((i) >> 1) * 4 + (!((i) & 1)) * 2) |
151 | #define OMAP343X_CONTROL_PROG_IO0 (OMAP2_CONTROL_GENERAL + 0x01D4) | 151 | #define OMAP343X_CONTROL_PROG_IO0 (OMAP2_CONTROL_GENERAL + 0x01D4) |
152 | #define OMAP343X_CONTROL_PROG_IO1 (OMAP2_CONTROL_GENERAL + 0x01D8) | 152 | #define OMAP343X_CONTROL_PROG_IO1 (OMAP2_CONTROL_GENERAL + 0x01D8) |
153 | #define OMAP343X_CONTROL_DSS_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E0) | 153 | #define OMAP343X_CONTROL_DSS_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E0) |
diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h index 7e5319f907d1..a3e7b471bcba 100644 --- a/arch/arm/plat-omap/include/plat/io.h +++ b/arch/arm/plat-omap/include/plat/io.h | |||
@@ -122,16 +122,21 @@ | |||
122 | #define OMAP243X_SMS_VIRT (OMAP243X_SMS_PHYS + OMAP2_L3_IO_OFFSET) | 122 | #define OMAP243X_SMS_VIRT (OMAP243X_SMS_PHYS + OMAP2_L3_IO_OFFSET) |
123 | #define OMAP243X_SMS_SIZE SZ_1M | 123 | #define OMAP243X_SMS_SIZE SZ_1M |
124 | 124 | ||
125 | /* DSP */ | 125 | /* 2420 IVA */ |
126 | #define DSP_MEM_24XX_PHYS OMAP2420_DSP_MEM_BASE /* 0x58000000 */ | 126 | #define DSP_MEM_2420_PHYS OMAP2420_DSP_MEM_BASE |
127 | #define DSP_MEM_24XX_VIRT 0xe0000000 | 127 | /* 0x58000000 --> 0xfc100000 */ |
128 | #define DSP_MEM_24XX_SIZE 0x28000 | 128 | #define DSP_MEM_2420_VIRT 0xfc100000 |
129 | #define DSP_IPI_24XX_PHYS OMAP2420_DSP_IPI_BASE /* 0x59000000 */ | 129 | #define DSP_MEM_2420_SIZE 0x28000 |
130 | #define DSP_IPI_24XX_VIRT 0xe1000000 | 130 | #define DSP_IPI_2420_PHYS OMAP2420_DSP_IPI_BASE |
131 | #define DSP_IPI_24XX_SIZE SZ_4K | 131 | /* 0x59000000 --> 0xfc128000 */ |
132 | #define DSP_MMU_24XX_PHYS OMAP2420_DSP_MMU_BASE /* 0x5a000000 */ | 132 | #define DSP_IPI_2420_VIRT 0xfc128000 |
133 | #define DSP_MMU_24XX_VIRT 0xe2000000 | 133 | #define DSP_IPI_2420_SIZE SZ_4K |
134 | #define DSP_MMU_24XX_SIZE SZ_4K | 134 | #define DSP_MMU_2420_PHYS OMAP2420_DSP_MMU_BASE |
135 | /* 0x5a000000 --> 0xfc129000 */ | ||
136 | #define DSP_MMU_2420_VIRT 0xfc129000 | ||
137 | #define DSP_MMU_2420_SIZE SZ_4K | ||
138 | |||
139 | /* 2430 IVA2.1 - currently unmapped */ | ||
135 | 140 | ||
136 | /* | 141 | /* |
137 | * ---------------------------------------------------------------------------- | 142 | * ---------------------------------------------------------------------------- |
@@ -182,16 +187,7 @@ | |||
182 | #define OMAP343X_SDRC_VIRT (OMAP343X_SDRC_PHYS + OMAP2_L3_IO_OFFSET) | 187 | #define OMAP343X_SDRC_VIRT (OMAP343X_SDRC_PHYS + OMAP2_L3_IO_OFFSET) |
183 | #define OMAP343X_SDRC_SIZE SZ_1M | 188 | #define OMAP343X_SDRC_SIZE SZ_1M |
184 | 189 | ||
185 | /* DSP */ | 190 | /* 3430 IVA - currently unmapped */ |
186 | #define DSP_MEM_34XX_PHYS OMAP34XX_DSP_MEM_BASE /* 0x58000000 */ | ||
187 | #define DSP_MEM_34XX_VIRT 0xe0000000 | ||
188 | #define DSP_MEM_34XX_SIZE 0x28000 | ||
189 | #define DSP_IPI_34XX_PHYS OMAP34XX_DSP_IPI_BASE /* 0x59000000 */ | ||
190 | #define DSP_IPI_34XX_VIRT 0xe1000000 | ||
191 | #define DSP_IPI_34XX_SIZE SZ_4K | ||
192 | #define DSP_MMU_34XX_PHYS OMAP34XX_DSP_MMU_BASE /* 0x5a000000 */ | ||
193 | #define DSP_MMU_34XX_VIRT 0xe2000000 | ||
194 | #define DSP_MMU_34XX_SIZE SZ_4K | ||
195 | 191 | ||
196 | /* | 192 | /* |
197 | * ---------------------------------------------------------------------------- | 193 | * ---------------------------------------------------------------------------- |
diff --git a/arch/arm/plat-omap/include/plat/mux.h b/arch/arm/plat-omap/include/plat/mux.h index 8f069cc80350..692c90e89ac3 100644 --- a/arch/arm/plat-omap/include/plat/mux.h +++ b/arch/arm/plat-omap/include/plat/mux.h | |||
@@ -183,6 +183,14 @@ enum omap7xx_index { | |||
183 | /* I2C */ | 183 | /* I2C */ |
184 | I2C_7XX_SCL, | 184 | I2C_7XX_SCL, |
185 | I2C_7XX_SDA, | 185 | I2C_7XX_SDA, |
186 | |||
187 | /* SPI */ | ||
188 | SPI_7XX_1, | ||
189 | SPI_7XX_2, | ||
190 | SPI_7XX_3, | ||
191 | SPI_7XX_4, | ||
192 | SPI_7XX_5, | ||
193 | SPI_7XX_6, | ||
186 | }; | 194 | }; |
187 | 195 | ||
188 | enum omap1xxx_index { | 196 | enum omap1xxx_index { |
diff --git a/arch/arm/plat-omap/include/plat/omap7xx.h b/arch/arm/plat-omap/include/plat/omap7xx.h index 53f52414b0e9..48e4757e1e30 100644 --- a/arch/arm/plat-omap/include/plat/omap7xx.h +++ b/arch/arm/plat-omap/include/plat/omap7xx.h | |||
@@ -46,6 +46,9 @@ | |||
46 | #define OMAP7XX_DSPREG_SIZE SZ_128K | 46 | #define OMAP7XX_DSPREG_SIZE SZ_128K |
47 | #define OMAP7XX_DSPREG_START 0xE1000000 | 47 | #define OMAP7XX_DSPREG_START 0xE1000000 |
48 | 48 | ||
49 | #define OMAP7XX_SPI1_BASE 0xfffc0800 | ||
50 | #define OMAP7XX_SPI2_BASE 0xfffc1000 | ||
51 | |||
49 | /* | 52 | /* |
50 | * ---------------------------------------------------------------------------- | 53 | * ---------------------------------------------------------------------------- |
51 | * OMAP7XX specific configuration registers | 54 | * OMAP7XX specific configuration registers |
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c index 11f5d7961c73..0cfd54f519c4 100644 --- a/arch/arm/plat-omap/io.c +++ b/arch/arm/plat-omap/io.c | |||
@@ -66,12 +66,12 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type) | |||
66 | return XLATE(p, L4_24XX_PHYS, L4_24XX_VIRT); | 66 | return XLATE(p, L4_24XX_PHYS, L4_24XX_VIRT); |
67 | } | 67 | } |
68 | if (cpu_is_omap2420()) { | 68 | if (cpu_is_omap2420()) { |
69 | if (BETWEEN(p, DSP_MEM_24XX_PHYS, DSP_MEM_24XX_SIZE)) | 69 | if (BETWEEN(p, DSP_MEM_2420_PHYS, DSP_MEM_2420_SIZE)) |
70 | return XLATE(p, DSP_MEM_24XX_PHYS, DSP_MEM_24XX_VIRT); | 70 | return XLATE(p, DSP_MEM_2420_PHYS, DSP_MEM_2420_VIRT); |
71 | if (BETWEEN(p, DSP_IPI_24XX_PHYS, DSP_IPI_24XX_SIZE)) | 71 | if (BETWEEN(p, DSP_IPI_2420_PHYS, DSP_IPI_2420_SIZE)) |
72 | return XLATE(p, DSP_IPI_24XX_PHYS, DSP_IPI_24XX_SIZE); | 72 | return XLATE(p, DSP_IPI_2420_PHYS, DSP_IPI_2420_SIZE); |
73 | if (BETWEEN(p, DSP_MMU_24XX_PHYS, DSP_MMU_24XX_SIZE)) | 73 | if (BETWEEN(p, DSP_MMU_2420_PHYS, DSP_MMU_2420_SIZE)) |
74 | return XLATE(p, DSP_MMU_24XX_PHYS, DSP_MMU_24XX_VIRT); | 74 | return XLATE(p, DSP_MMU_2420_PHYS, DSP_MMU_2420_VIRT); |
75 | } | 75 | } |
76 | if (cpu_is_omap2430()) { | 76 | if (cpu_is_omap2430()) { |
77 | if (BETWEEN(p, L4_WK_243X_PHYS, L4_WK_243X_SIZE)) | 77 | if (BETWEEN(p, L4_WK_243X_PHYS, L4_WK_243X_SIZE)) |
diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c index c0ff1e39d893..463d6386aff2 100644 --- a/arch/arm/plat-omap/iommu.c +++ b/arch/arm/plat-omap/iommu.c | |||
@@ -827,7 +827,7 @@ EXPORT_SYMBOL_GPL(iommu_get); | |||
827 | **/ | 827 | **/ |
828 | void iommu_put(struct iommu *obj) | 828 | void iommu_put(struct iommu *obj) |
829 | { | 829 | { |
830 | if (!obj && IS_ERR(obj)) | 830 | if (!obj || IS_ERR(obj)) |
831 | return; | 831 | return; |
832 | 832 | ||
833 | mutex_lock(&obj->iommu_lock); | 833 | mutex_lock(&obj->iommu_lock); |
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index 2cc1cc328bac..f75767278fc3 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
@@ -436,7 +436,7 @@ int omap_mcbsp_request(unsigned int id) | |||
436 | dev_err(mcbsp->dev, "Unable to request TX IRQ %d " | 436 | dev_err(mcbsp->dev, "Unable to request TX IRQ %d " |
437 | "for McBSP%d\n", mcbsp->tx_irq, | 437 | "for McBSP%d\n", mcbsp->tx_irq, |
438 | mcbsp->id); | 438 | mcbsp->id); |
439 | return err; | 439 | goto error; |
440 | } | 440 | } |
441 | 441 | ||
442 | init_completion(&mcbsp->rx_irq_completion); | 442 | init_completion(&mcbsp->rx_irq_completion); |
@@ -446,12 +446,26 @@ int omap_mcbsp_request(unsigned int id) | |||
446 | dev_err(mcbsp->dev, "Unable to request RX IRQ %d " | 446 | dev_err(mcbsp->dev, "Unable to request RX IRQ %d " |
447 | "for McBSP%d\n", mcbsp->rx_irq, | 447 | "for McBSP%d\n", mcbsp->rx_irq, |
448 | mcbsp->id); | 448 | mcbsp->id); |
449 | free_irq(mcbsp->tx_irq, (void *)mcbsp); | 449 | goto tx_irq; |
450 | return err; | ||
451 | } | 450 | } |
452 | } | 451 | } |
453 | 452 | ||
454 | return 0; | 453 | return 0; |
454 | tx_irq: | ||
455 | free_irq(mcbsp->tx_irq, (void *)mcbsp); | ||
456 | error: | ||
457 | if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->free) | ||
458 | mcbsp->pdata->ops->free(id); | ||
459 | |||
460 | /* Do procedure specific to omap34xx arch, if applicable */ | ||
461 | omap34xx_mcbsp_free(mcbsp); | ||
462 | |||
463 | clk_disable(mcbsp->fclk); | ||
464 | clk_disable(mcbsp->iclk); | ||
465 | |||
466 | mcbsp->free = 1; | ||
467 | |||
468 | return err; | ||
455 | } | 469 | } |
456 | EXPORT_SYMBOL(omap_mcbsp_request); | 470 | EXPORT_SYMBOL(omap_mcbsp_request); |
457 | 471 | ||
diff --git a/arch/arm/plat-pxa/pwm.c b/arch/arm/plat-pxa/pwm.c index a9eabdcfa163..51dc5c8106c0 100644 --- a/arch/arm/plat-pxa/pwm.c +++ b/arch/arm/plat-pxa/pwm.c | |||
@@ -204,14 +204,14 @@ static int __devinit pwm_probe(struct platform_device *pdev) | |||
204 | goto err_free_clk; | 204 | goto err_free_clk; |
205 | } | 205 | } |
206 | 206 | ||
207 | r = request_mem_region(r->start, r->end - r->start + 1, pdev->name); | 207 | r = request_mem_region(r->start, resource_size(r), pdev->name); |
208 | if (r == NULL) { | 208 | if (r == NULL) { |
209 | dev_err(&pdev->dev, "failed to request memory resource\n"); | 209 | dev_err(&pdev->dev, "failed to request memory resource\n"); |
210 | ret = -EBUSY; | 210 | ret = -EBUSY; |
211 | goto err_free_clk; | 211 | goto err_free_clk; |
212 | } | 212 | } |
213 | 213 | ||
214 | pwm->mmio_base = ioremap(r->start, r->end - r->start + 1); | 214 | pwm->mmio_base = ioremap(r->start, resource_size(r)); |
215 | if (pwm->mmio_base == NULL) { | 215 | if (pwm->mmio_base == NULL) { |
216 | dev_err(&pdev->dev, "failed to ioremap() registers\n"); | 216 | dev_err(&pdev->dev, "failed to ioremap() registers\n"); |
217 | ret = -ENODEV; | 217 | ret = -ENODEV; |
@@ -241,7 +241,7 @@ static int __devinit pwm_probe(struct platform_device *pdev) | |||
241 | return 0; | 241 | return 0; |
242 | 242 | ||
243 | err_free_mem: | 243 | err_free_mem: |
244 | release_mem_region(r->start, r->end - r->start + 1); | 244 | release_mem_region(r->start, resource_size(r)); |
245 | err_free_clk: | 245 | err_free_clk: |
246 | clk_put(pwm->clk); | 246 | clk_put(pwm->clk); |
247 | err_free: | 247 | err_free: |
@@ -271,7 +271,7 @@ static int __devexit pwm_remove(struct platform_device *pdev) | |||
271 | iounmap(pwm->mmio_base); | 271 | iounmap(pwm->mmio_base); |
272 | 272 | ||
273 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 273 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
274 | release_mem_region(r->start, r->end - r->start + 1); | 274 | release_mem_region(r->start, resource_size(r)); |
275 | 275 | ||
276 | clk_put(pwm->clk); | 276 | clk_put(pwm->clk); |
277 | kfree(pwm); | 277 | kfree(pwm); |
diff --git a/arch/arm/plat-s3c/dev-nand.c b/arch/arm/plat-s3c/dev-nand.c index 84808ccda70e..a52fb6cf618f 100644 --- a/arch/arm/plat-s3c/dev-nand.c +++ b/arch/arm/plat-s3c/dev-nand.c | |||
@@ -58,8 +58,8 @@ static int __init s3c_nand_copy_set(struct s3c2410_nand_set *set) | |||
58 | return -ENOMEM; | 58 | return -ENOMEM; |
59 | } | 59 | } |
60 | 60 | ||
61 | size = sizeof(int) * set->nr_chips; | 61 | if (set->nr_map && set->nr_chips) { |
62 | if (size) { | 62 | size = sizeof(int) * set->nr_chips; |
63 | ptr = kmemdup(set->nr_map, size, GFP_KERNEL); | 63 | ptr = kmemdup(set->nr_map, size, GFP_KERNEL); |
64 | set->nr_map = ptr; | 64 | set->nr_map = ptr; |
65 | 65 | ||
diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c index 6ffa21eb1b91..ffd56deb9e81 100644 --- a/arch/arm/plat-s3c64xx/s3c6400-clock.c +++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c | |||
@@ -46,6 +46,7 @@ static struct clk clk_ext_xtal_mux = { | |||
46 | #define clk_fin_epll clk_ext_xtal_mux | 46 | #define clk_fin_epll clk_ext_xtal_mux |
47 | 47 | ||
48 | #define clk_fout_mpll clk_mpll | 48 | #define clk_fout_mpll clk_mpll |
49 | #define clk_fout_epll clk_epll | ||
49 | 50 | ||
50 | struct clk_sources { | 51 | struct clk_sources { |
51 | unsigned int nr_sources; | 52 | unsigned int nr_sources; |
@@ -88,11 +89,6 @@ static struct clksrc_clk clk_mout_apll = { | |||
88 | .sources = &clk_src_apll, | 89 | .sources = &clk_src_apll, |
89 | }; | 90 | }; |
90 | 91 | ||
91 | static struct clk clk_fout_epll = { | ||
92 | .name = "fout_epll", | ||
93 | .id = -1, | ||
94 | }; | ||
95 | |||
96 | static struct clk *clk_src_epll_list[] = { | 92 | static struct clk *clk_src_epll_list[] = { |
97 | [0] = &clk_fin_epll, | 93 | [0] = &clk_fin_epll, |
98 | [1] = &clk_fout_epll, | 94 | [1] = &clk_fout_epll, |
@@ -715,7 +711,6 @@ static struct clk *clks[] __initdata = { | |||
715 | &clk_iis_cd1, | 711 | &clk_iis_cd1, |
716 | &clk_pcm_cd, | 712 | &clk_pcm_cd, |
717 | &clk_mout_epll.clk, | 713 | &clk_mout_epll.clk, |
718 | &clk_fout_epll, | ||
719 | &clk_mout_mpll.clk, | 714 | &clk_mout_mpll.clk, |
720 | &clk_dout_mpll, | 715 | &clk_dout_mpll, |
721 | &clk_mmc0.clk, | 716 | &clk_mmc0.clk, |
@@ -760,7 +755,4 @@ void __init s3c6400_register_clocks(unsigned armclk_divlimit) | |||
760 | clkp->name, ret); | 755 | clkp->name, ret); |
761 | } | 756 | } |
762 | } | 757 | } |
763 | |||
764 | clk_mpll.parent = &clk_mout_mpll.clk; | ||
765 | clk_epll.parent = &clk_mout_epll.clk; | ||
766 | } | 758 | } |