diff options
Diffstat (limited to 'arch/arm')
128 files changed, 3825 insertions, 1424 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 11fff042aa81..682367bd0f65 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -204,6 +204,7 @@ config ARCH_H720X | |||
204 | 204 | ||
205 | config ARCH_AAEC2000 | 205 | config ARCH_AAEC2000 |
206 | bool "Agilent AAEC-2000 based" | 206 | bool "Agilent AAEC-2000 based" |
207 | select ARM_AMBA | ||
207 | help | 208 | help |
208 | This enables support for systems based on the Agilent AAEC-2000 | 209 | This enables support for systems based on the Agilent AAEC-2000 |
209 | 210 | ||
@@ -687,7 +688,8 @@ source "drivers/acorn/block/Kconfig" | |||
687 | 688 | ||
688 | if PCMCIA || ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX \ | 689 | if PCMCIA || ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX \ |
689 | || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \ | 690 | || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \ |
690 | || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE | 691 | || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE \ |
692 | || MACH_MP1000 | ||
691 | source "drivers/ide/Kconfig" | 693 | source "drivers/ide/Kconfig" |
692 | endif | 694 | endif |
693 | 695 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 299bc0468702..64cf480b0b02 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -8,7 +8,7 @@ | |||
8 | # Copyright (C) 1995-2001 by Russell King | 8 | # Copyright (C) 1995-2001 by Russell King |
9 | 9 | ||
10 | LDFLAGS_vmlinux :=-p --no-undefined -X | 10 | LDFLAGS_vmlinux :=-p --no-undefined -X |
11 | CPPFLAGS_vmlinux.lds = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR) | 11 | CPPFLAGS_vmlinux.lds = -DKERNEL_RAM_ADDR=$(TEXTADDR) |
12 | OBJCOPYFLAGS :=-O binary -R .note -R .comment -S | 12 | OBJCOPYFLAGS :=-O binary -R .note -R .comment -S |
13 | GZFLAGS :=-9 | 13 | GZFLAGS :=-9 |
14 | #CFLAGS +=-pipe | 14 | #CFLAGS +=-pipe |
@@ -108,27 +108,19 @@ export CFLAGS_3c589_cs.o | |||
108 | endif | 108 | endif |
109 | 109 | ||
110 | TEXTADDR := $(textaddr-y) | 110 | TEXTADDR := $(textaddr-y) |
111 | ifeq ($(CONFIG_XIP_KERNEL),y) | ||
112 | DATAADDR := $(TEXTADDR) | ||
113 | xipaddr-$(CONFIG_ARCH_CO285) := 0x5f000000 | ||
114 | xipaddr-y ?= 0xbf000000 | ||
115 | # Replace phys addr with virt addr while keeping offset from base. | ||
116 | TEXTADDR := $(shell echo $(CONFIG_XIP_PHYS_ADDR) $(xipaddr-y) | \ | ||
117 | awk --non-decimal-data '/[:xdigit:]/ \ | ||
118 | { printf("0x%x\n", and($$1, 0x000fffff) + $$2) }' ) | ||
119 | endif | ||
120 | 111 | ||
121 | ifeq ($(incdir-y),) | 112 | ifeq ($(incdir-y),) |
122 | incdir-y := $(machine-y) | 113 | incdir-y := $(machine-y) |
123 | endif | 114 | endif |
124 | INCDIR := arch-$(incdir-y) | 115 | INCDIR := arch-$(incdir-y) |
116 | |||
125 | ifneq ($(machine-y),) | 117 | ifneq ($(machine-y),) |
126 | MACHINE := arch/arm/mach-$(machine-y)/ | 118 | MACHINE := arch/arm/mach-$(machine-y)/ |
127 | else | 119 | else |
128 | MACHINE := | 120 | MACHINE := |
129 | endif | 121 | endif |
130 | 122 | ||
131 | export TEXTADDR DATAADDR GZFLAGS | 123 | export TEXTADDR GZFLAGS |
132 | 124 | ||
133 | # Do we have FASTFPE? | 125 | # Do we have FASTFPE? |
134 | FASTFPE :=arch/arm/fastfpe | 126 | FASTFPE :=arch/arm/fastfpe |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 7c7f475e213e..a54d2eb64892 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -39,7 +39,8 @@ | |||
39 | defined(CONFIG_ARCH_IXP4XX) || \ | 39 | defined(CONFIG_ARCH_IXP4XX) || \ |
40 | defined(CONFIG_ARCH_IXP2000) || \ | 40 | defined(CONFIG_ARCH_IXP2000) || \ |
41 | defined(CONFIG_ARCH_LH7A40X) || \ | 41 | defined(CONFIG_ARCH_LH7A40X) || \ |
42 | defined(CONFIG_ARCH_OMAP) | 42 | defined(CONFIG_ARCH_OMAP) || \ |
43 | defined(CONFIG_MACH_MP1000) | ||
43 | .macro loadsp, rb | 44 | .macro loadsp, rb |
44 | addruart \rb | 45 | addruart \rb |
45 | .endm | 46 | .endm |
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 23434b56786a..50f13eec6cd7 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
@@ -30,7 +30,7 @@ unsigned int __machine_arch_type; | |||
30 | #define putstr icedcc_putstr | 30 | #define putstr icedcc_putstr |
31 | #define putc icedcc_putc | 31 | #define putc icedcc_putc |
32 | 32 | ||
33 | extern void idedcc_putc(int ch); | 33 | extern void icedcc_putc(int ch); |
34 | 34 | ||
35 | static void | 35 | static void |
36 | icedcc_putstr(const char *ptr) | 36 | icedcc_putstr(const char *ptr) |
diff --git a/arch/arm/common/amba.c b/arch/arm/common/amba.c index c6beb751f2a9..e1013112c354 100644 --- a/arch/arm/common/amba.c +++ b/arch/arm/common/amba.c | |||
@@ -10,6 +10,8 @@ | |||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
13 | #include <linux/string.h> | ||
14 | #include <linux/slab.h> | ||
13 | 15 | ||
14 | #include <asm/io.h> | 16 | #include <asm/io.h> |
15 | #include <asm/irq.h> | 17 | #include <asm/irq.h> |
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index cbf2165476b0..ad6c89a555bb 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c | |||
@@ -33,8 +33,8 @@ | |||
33 | #include <asm/cacheflush.h> | 33 | #include <asm/cacheflush.h> |
34 | 34 | ||
35 | #undef DEBUG | 35 | #undef DEBUG |
36 | |||
37 | #undef STATS | 36 | #undef STATS |
37 | |||
38 | #ifdef STATS | 38 | #ifdef STATS |
39 | #define DO_STATS(X) do { X ; } while (0) | 39 | #define DO_STATS(X) do { X ; } while (0) |
40 | #else | 40 | #else |
@@ -52,26 +52,31 @@ struct safe_buffer { | |||
52 | int direction; | 52 | int direction; |
53 | 53 | ||
54 | /* safe buffer info */ | 54 | /* safe buffer info */ |
55 | struct dma_pool *pool; | 55 | struct dmabounce_pool *pool; |
56 | void *safe; | 56 | void *safe; |
57 | dma_addr_t safe_dma_addr; | 57 | dma_addr_t safe_dma_addr; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | struct dmabounce_pool { | ||
61 | unsigned long size; | ||
62 | struct dma_pool *pool; | ||
63 | #ifdef STATS | ||
64 | unsigned long allocs; | ||
65 | #endif | ||
66 | }; | ||
67 | |||
60 | struct dmabounce_device_info { | 68 | struct dmabounce_device_info { |
61 | struct list_head node; | 69 | struct list_head node; |
62 | 70 | ||
63 | struct device *dev; | 71 | struct device *dev; |
64 | struct dma_pool *small_buffer_pool; | ||
65 | struct dma_pool *large_buffer_pool; | ||
66 | struct list_head safe_buffers; | 72 | struct list_head safe_buffers; |
67 | unsigned long small_buffer_size, large_buffer_size; | ||
68 | #ifdef STATS | 73 | #ifdef STATS |
69 | unsigned long sbp_allocs; | ||
70 | unsigned long lbp_allocs; | ||
71 | unsigned long total_allocs; | 74 | unsigned long total_allocs; |
72 | unsigned long map_op_count; | 75 | unsigned long map_op_count; |
73 | unsigned long bounce_count; | 76 | unsigned long bounce_count; |
74 | #endif | 77 | #endif |
78 | struct dmabounce_pool small; | ||
79 | struct dmabounce_pool large; | ||
75 | }; | 80 | }; |
76 | 81 | ||
77 | static LIST_HEAD(dmabounce_devs); | 82 | static LIST_HEAD(dmabounce_devs); |
@@ -82,9 +87,9 @@ static void print_alloc_stats(struct dmabounce_device_info *device_info) | |||
82 | printk(KERN_INFO | 87 | printk(KERN_INFO |
83 | "%s: dmabounce: sbp: %lu, lbp: %lu, other: %lu, total: %lu\n", | 88 | "%s: dmabounce: sbp: %lu, lbp: %lu, other: %lu, total: %lu\n", |
84 | device_info->dev->bus_id, | 89 | device_info->dev->bus_id, |
85 | device_info->sbp_allocs, device_info->lbp_allocs, | 90 | device_info->small.allocs, device_info->large.allocs, |
86 | device_info->total_allocs - device_info->sbp_allocs - | 91 | device_info->total_allocs - device_info->small.allocs - |
87 | device_info->lbp_allocs, | 92 | device_info->large.allocs, |
88 | device_info->total_allocs); | 93 | device_info->total_allocs); |
89 | } | 94 | } |
90 | #endif | 95 | #endif |
@@ -106,18 +111,22 @@ find_dmabounce_dev(struct device *dev) | |||
106 | /* allocate a 'safe' buffer and keep track of it */ | 111 | /* allocate a 'safe' buffer and keep track of it */ |
107 | static inline struct safe_buffer * | 112 | static inline struct safe_buffer * |
108 | alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr, | 113 | alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr, |
109 | size_t size, enum dma_data_direction dir) | 114 | size_t size, enum dma_data_direction dir) |
110 | { | 115 | { |
111 | struct safe_buffer *buf; | 116 | struct safe_buffer *buf; |
112 | struct dma_pool *pool; | 117 | struct dmabounce_pool *pool; |
113 | struct device *dev = device_info->dev; | 118 | struct device *dev = device_info->dev; |
114 | void *safe; | ||
115 | dma_addr_t safe_dma_addr; | ||
116 | 119 | ||
117 | dev_dbg(dev, "%s(ptr=%p, size=%d, dir=%d)\n", | 120 | dev_dbg(dev, "%s(ptr=%p, size=%d, dir=%d)\n", |
118 | __func__, ptr, size, dir); | 121 | __func__, ptr, size, dir); |
119 | 122 | ||
120 | DO_STATS ( device_info->total_allocs++ ); | 123 | if (size <= device_info->small.size) { |
124 | pool = &device_info->small; | ||
125 | } else if (size <= device_info->large.size) { | ||
126 | pool = &device_info->large; | ||
127 | } else { | ||
128 | pool = NULL; | ||
129 | } | ||
121 | 130 | ||
122 | buf = kmalloc(sizeof(struct safe_buffer), GFP_ATOMIC); | 131 | buf = kmalloc(sizeof(struct safe_buffer), GFP_ATOMIC); |
123 | if (buf == NULL) { | 132 | if (buf == NULL) { |
@@ -125,41 +134,35 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr, | |||
125 | return NULL; | 134 | return NULL; |
126 | } | 135 | } |
127 | 136 | ||
128 | if (size <= device_info->small_buffer_size) { | 137 | buf->ptr = ptr; |
129 | pool = device_info->small_buffer_pool; | 138 | buf->size = size; |
130 | safe = dma_pool_alloc(pool, GFP_ATOMIC, &safe_dma_addr); | 139 | buf->direction = dir; |
131 | 140 | buf->pool = pool; | |
132 | DO_STATS ( device_info->sbp_allocs++ ); | ||
133 | } else if (size <= device_info->large_buffer_size) { | ||
134 | pool = device_info->large_buffer_pool; | ||
135 | safe = dma_pool_alloc(pool, GFP_ATOMIC, &safe_dma_addr); | ||
136 | 141 | ||
137 | DO_STATS ( device_info->lbp_allocs++ ); | 142 | if (pool) { |
143 | buf->safe = dma_pool_alloc(pool->pool, GFP_ATOMIC, | ||
144 | &buf->safe_dma_addr); | ||
138 | } else { | 145 | } else { |
139 | pool = NULL; | 146 | buf->safe = dma_alloc_coherent(dev, size, &buf->safe_dma_addr, |
140 | safe = dma_alloc_coherent(dev, size, &safe_dma_addr, GFP_ATOMIC); | 147 | GFP_ATOMIC); |
141 | } | 148 | } |
142 | 149 | ||
143 | if (safe == NULL) { | 150 | if (buf->safe == NULL) { |
144 | dev_warn(device_info->dev, | 151 | dev_warn(dev, |
145 | "%s: could not alloc dma memory (size=%d)\n", | 152 | "%s: could not alloc dma memory (size=%d)\n", |
146 | __func__, size); | 153 | __func__, size); |
147 | kfree(buf); | 154 | kfree(buf); |
148 | return NULL; | 155 | return NULL; |
149 | } | 156 | } |
150 | 157 | ||
151 | #ifdef STATS | 158 | #ifdef STATS |
159 | if (pool) | ||
160 | pool->allocs++; | ||
161 | device_info->total_allocs++; | ||
152 | if (device_info->total_allocs % 1000 == 0) | 162 | if (device_info->total_allocs % 1000 == 0) |
153 | print_alloc_stats(device_info); | 163 | print_alloc_stats(device_info); |
154 | #endif | 164 | #endif |
155 | 165 | ||
156 | buf->ptr = ptr; | ||
157 | buf->size = size; | ||
158 | buf->direction = dir; | ||
159 | buf->pool = pool; | ||
160 | buf->safe = safe; | ||
161 | buf->safe_dma_addr = safe_dma_addr; | ||
162 | |||
163 | list_add(&buf->node, &device_info->safe_buffers); | 166 | list_add(&buf->node, &device_info->safe_buffers); |
164 | 167 | ||
165 | return buf; | 168 | return buf; |
@@ -186,7 +189,7 @@ free_safe_buffer(struct dmabounce_device_info *device_info, struct safe_buffer * | |||
186 | list_del(&buf->node); | 189 | list_del(&buf->node); |
187 | 190 | ||
188 | if (buf->pool) | 191 | if (buf->pool) |
189 | dma_pool_free(buf->pool, buf->safe, buf->safe_dma_addr); | 192 | dma_pool_free(buf->pool->pool, buf->safe, buf->safe_dma_addr); |
190 | else | 193 | else |
191 | dma_free_coherent(device_info->dev, buf->size, buf->safe, | 194 | dma_free_coherent(device_info->dev, buf->size, buf->safe, |
192 | buf->safe_dma_addr); | 195 | buf->safe_dma_addr); |
@@ -197,12 +200,10 @@ free_safe_buffer(struct dmabounce_device_info *device_info, struct safe_buffer * | |||
197 | /* ************************************************** */ | 200 | /* ************************************************** */ |
198 | 201 | ||
199 | #ifdef STATS | 202 | #ifdef STATS |
200 | |||
201 | static void print_map_stats(struct dmabounce_device_info *device_info) | 203 | static void print_map_stats(struct dmabounce_device_info *device_info) |
202 | { | 204 | { |
203 | printk(KERN_INFO | 205 | dev_info(device_info->dev, |
204 | "%s: dmabounce: map_op_count=%lu, bounce_count=%lu\n", | 206 | "dmabounce: map_op_count=%lu, bounce_count=%lu\n", |
205 | device_info->dev->bus_id, | ||
206 | device_info->map_op_count, device_info->bounce_count); | 207 | device_info->map_op_count, device_info->bounce_count); |
207 | } | 208 | } |
208 | #endif | 209 | #endif |
@@ -258,13 +259,13 @@ map_single(struct device *dev, void *ptr, size_t size, | |||
258 | __func__, ptr, buf->safe, size); | 259 | __func__, ptr, buf->safe, size); |
259 | memcpy(buf->safe, ptr, size); | 260 | memcpy(buf->safe, ptr, size); |
260 | } | 261 | } |
261 | consistent_sync(buf->safe, size, dir); | 262 | ptr = buf->safe; |
262 | 263 | ||
263 | dma_addr = buf->safe_dma_addr; | 264 | dma_addr = buf->safe_dma_addr; |
264 | } else { | ||
265 | consistent_sync(ptr, size, dir); | ||
266 | } | 265 | } |
267 | 266 | ||
267 | consistent_sync(ptr, size, dir); | ||
268 | |||
268 | return dma_addr; | 269 | return dma_addr; |
269 | } | 270 | } |
270 | 271 | ||
@@ -278,7 +279,7 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | |||
278 | /* | 279 | /* |
279 | * Trying to unmap an invalid mapping | 280 | * Trying to unmap an invalid mapping |
280 | */ | 281 | */ |
281 | if (dma_addr == ~0) { | 282 | if (dma_mapping_error(dma_addr)) { |
282 | dev_err(dev, "Trying to unmap invalid mapping\n"); | 283 | dev_err(dev, "Trying to unmap invalid mapping\n"); |
283 | return; | 284 | return; |
284 | } | 285 | } |
@@ -570,11 +571,25 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents, | |||
570 | local_irq_restore(flags); | 571 | local_irq_restore(flags); |
571 | } | 572 | } |
572 | 573 | ||
574 | static int | ||
575 | dmabounce_init_pool(struct dmabounce_pool *pool, struct device *dev, const char *name, | ||
576 | unsigned long size) | ||
577 | { | ||
578 | pool->size = size; | ||
579 | DO_STATS(pool->allocs = 0); | ||
580 | pool->pool = dma_pool_create(name, dev, size, | ||
581 | 0 /* byte alignment */, | ||
582 | 0 /* no page-crossing issues */); | ||
583 | |||
584 | return pool->pool ? 0 : -ENOMEM; | ||
585 | } | ||
586 | |||
573 | int | 587 | int |
574 | dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size, | 588 | dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size, |
575 | unsigned long large_buffer_size) | 589 | unsigned long large_buffer_size) |
576 | { | 590 | { |
577 | struct dmabounce_device_info *device_info; | 591 | struct dmabounce_device_info *device_info; |
592 | int ret; | ||
578 | 593 | ||
579 | device_info = kmalloc(sizeof(struct dmabounce_device_info), GFP_ATOMIC); | 594 | device_info = kmalloc(sizeof(struct dmabounce_device_info), GFP_ATOMIC); |
580 | if (!device_info) { | 595 | if (!device_info) { |
@@ -584,45 +599,31 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size, | |||
584 | return -ENOMEM; | 599 | return -ENOMEM; |
585 | } | 600 | } |
586 | 601 | ||
587 | device_info->small_buffer_pool = | 602 | ret = dmabounce_init_pool(&device_info->small, dev, |
588 | dma_pool_create("small_dmabounce_pool", | 603 | "small_dmabounce_pool", small_buffer_size); |
589 | dev, | 604 | if (ret) { |
590 | small_buffer_size, | 605 | dev_err(dev, |
591 | 0 /* byte alignment */, | 606 | "dmabounce: could not allocate DMA pool for %ld byte objects\n", |
592 | 0 /* no page-crossing issues */); | 607 | small_buffer_size); |
593 | if (!device_info->small_buffer_pool) { | 608 | goto err_free; |
594 | printk(KERN_ERR | ||
595 | "dmabounce: could not allocate small DMA pool for %s\n", | ||
596 | dev->bus_id); | ||
597 | kfree(device_info); | ||
598 | return -ENOMEM; | ||
599 | } | 609 | } |
600 | 610 | ||
601 | if (large_buffer_size) { | 611 | if (large_buffer_size) { |
602 | device_info->large_buffer_pool = | 612 | ret = dmabounce_init_pool(&device_info->large, dev, |
603 | dma_pool_create("large_dmabounce_pool", | 613 | "large_dmabounce_pool", |
604 | dev, | 614 | large_buffer_size); |
605 | large_buffer_size, | 615 | if (ret) { |
606 | 0 /* byte alignment */, | 616 | dev_err(dev, |
607 | 0 /* no page-crossing issues */); | 617 | "dmabounce: could not allocate DMA pool for %ld byte objects\n", |
608 | if (!device_info->large_buffer_pool) { | 618 | large_buffer_size); |
609 | printk(KERN_ERR | 619 | goto err_destroy; |
610 | "dmabounce: could not allocate large DMA pool for %s\n", | ||
611 | dev->bus_id); | ||
612 | dma_pool_destroy(device_info->small_buffer_pool); | ||
613 | |||
614 | return -ENOMEM; | ||
615 | } | 620 | } |
616 | } | 621 | } |
617 | 622 | ||
618 | device_info->dev = dev; | 623 | device_info->dev = dev; |
619 | device_info->small_buffer_size = small_buffer_size; | ||
620 | device_info->large_buffer_size = large_buffer_size; | ||
621 | INIT_LIST_HEAD(&device_info->safe_buffers); | 624 | INIT_LIST_HEAD(&device_info->safe_buffers); |
622 | 625 | ||
623 | #ifdef STATS | 626 | #ifdef STATS |
624 | device_info->sbp_allocs = 0; | ||
625 | device_info->lbp_allocs = 0; | ||
626 | device_info->total_allocs = 0; | 627 | device_info->total_allocs = 0; |
627 | device_info->map_op_count = 0; | 628 | device_info->map_op_count = 0; |
628 | device_info->bounce_count = 0; | 629 | device_info->bounce_count = 0; |
@@ -634,6 +635,12 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size, | |||
634 | dev->bus_id, dev->bus->name); | 635 | dev->bus_id, dev->bus->name); |
635 | 636 | ||
636 | return 0; | 637 | return 0; |
638 | |||
639 | err_destroy: | ||
640 | dma_pool_destroy(device_info->small.pool); | ||
641 | err_free: | ||
642 | kfree(device_info); | ||
643 | return ret; | ||
637 | } | 644 | } |
638 | 645 | ||
639 | void | 646 | void |
@@ -655,10 +662,10 @@ dmabounce_unregister_dev(struct device *dev) | |||
655 | BUG(); | 662 | BUG(); |
656 | } | 663 | } |
657 | 664 | ||
658 | if (device_info->small_buffer_pool) | 665 | if (device_info->small.pool) |
659 | dma_pool_destroy(device_info->small_buffer_pool); | 666 | dma_pool_destroy(device_info->small.pool); |
660 | if (device_info->large_buffer_pool) | 667 | if (device_info->large.pool) |
661 | dma_pool_destroy(device_info->large_buffer_pool); | 668 | dma_pool_destroy(device_info->large.pool); |
662 | 669 | ||
663 | #ifdef STATS | 670 | #ifdef STATS |
664 | print_alloc_stats(device_info); | 671 | print_alloc_stats(device_info); |
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index e8053d16829b..5cdb4122f057 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c | |||
@@ -550,15 +550,12 @@ struct locomo_save_data { | |||
550 | u16 LCM_SPIMD; | 550 | u16 LCM_SPIMD; |
551 | }; | 551 | }; |
552 | 552 | ||
553 | static int locomo_suspend(struct device *dev, pm_message_t state, u32 level) | 553 | static int locomo_suspend(struct device *dev, pm_message_t state) |
554 | { | 554 | { |
555 | struct locomo *lchip = dev_get_drvdata(dev); | 555 | struct locomo *lchip = dev_get_drvdata(dev); |
556 | struct locomo_save_data *save; | 556 | struct locomo_save_data *save; |
557 | unsigned long flags; | 557 | unsigned long flags; |
558 | 558 | ||
559 | if (level != SUSPEND_DISABLE) | ||
560 | return 0; | ||
561 | |||
562 | save = kmalloc(sizeof(struct locomo_save_data), GFP_KERNEL); | 559 | save = kmalloc(sizeof(struct locomo_save_data), GFP_KERNEL); |
563 | if (!save) | 560 | if (!save) |
564 | return -ENOMEM; | 561 | return -ENOMEM; |
@@ -597,16 +594,13 @@ static int locomo_suspend(struct device *dev, pm_message_t state, u32 level) | |||
597 | return 0; | 594 | return 0; |
598 | } | 595 | } |
599 | 596 | ||
600 | static int locomo_resume(struct device *dev, u32 level) | 597 | static int locomo_resume(struct device *dev) |
601 | { | 598 | { |
602 | struct locomo *lchip = dev_get_drvdata(dev); | 599 | struct locomo *lchip = dev_get_drvdata(dev); |
603 | struct locomo_save_data *save; | 600 | struct locomo_save_data *save; |
604 | unsigned long r; | 601 | unsigned long r; |
605 | unsigned long flags; | 602 | unsigned long flags; |
606 | 603 | ||
607 | if (level != RESUME_ENABLE) | ||
608 | return 0; | ||
609 | |||
610 | save = (struct locomo_save_data *) dev->power.saved_state; | 604 | save = (struct locomo_save_data *) dev->power.saved_state; |
611 | if (!save) | 605 | if (!save) |
612 | return 0; | 606 | return 0; |
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 1a47fbf9cbbc..21e2a518ad3a 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
@@ -801,7 +801,7 @@ struct sa1111_save_data { | |||
801 | 801 | ||
802 | #ifdef CONFIG_PM | 802 | #ifdef CONFIG_PM |
803 | 803 | ||
804 | static int sa1111_suspend(struct device *dev, pm_message_t state, u32 level) | 804 | static int sa1111_suspend(struct device *dev, pm_message_t state) |
805 | { | 805 | { |
806 | struct sa1111 *sachip = dev_get_drvdata(dev); | 806 | struct sa1111 *sachip = dev_get_drvdata(dev); |
807 | struct sa1111_save_data *save; | 807 | struct sa1111_save_data *save; |
@@ -809,9 +809,6 @@ static int sa1111_suspend(struct device *dev, pm_message_t state, u32 level) | |||
809 | unsigned int val; | 809 | unsigned int val; |
810 | void __iomem *base; | 810 | void __iomem *base; |
811 | 811 | ||
812 | if (level != SUSPEND_DISABLE) | ||
813 | return 0; | ||
814 | |||
815 | save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL); | 812 | save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL); |
816 | if (!save) | 813 | if (!save) |
817 | return -ENOMEM; | 814 | return -ENOMEM; |
@@ -856,23 +853,19 @@ static int sa1111_suspend(struct device *dev, pm_message_t state, u32 level) | |||
856 | /* | 853 | /* |
857 | * sa1111_resume - Restore the SA1111 device state. | 854 | * sa1111_resume - Restore the SA1111 device state. |
858 | * @dev: device to restore | 855 | * @dev: device to restore |
859 | * @level: resume level | ||
860 | * | 856 | * |
861 | * Restore the general state of the SA1111; clock control and | 857 | * Restore the general state of the SA1111; clock control and |
862 | * interrupt controller. Other parts of the SA1111 must be | 858 | * interrupt controller. Other parts of the SA1111 must be |
863 | * restored by their respective drivers, and must be called | 859 | * restored by their respective drivers, and must be called |
864 | * via LDM after this function. | 860 | * via LDM after this function. |
865 | */ | 861 | */ |
866 | static int sa1111_resume(struct device *dev, u32 level) | 862 | static int sa1111_resume(struct device *dev) |
867 | { | 863 | { |
868 | struct sa1111 *sachip = dev_get_drvdata(dev); | 864 | struct sa1111 *sachip = dev_get_drvdata(dev); |
869 | struct sa1111_save_data *save; | 865 | struct sa1111_save_data *save; |
870 | unsigned long flags, id; | 866 | unsigned long flags, id; |
871 | void __iomem *base; | 867 | void __iomem *base; |
872 | 868 | ||
873 | if (level != RESUME_ENABLE) | ||
874 | return 0; | ||
875 | |||
876 | save = (struct sa1111_save_data *)dev->power.saved_state; | 869 | save = (struct sa1111_save_data *)dev->power.saved_state; |
877 | if (!save) | 870 | if (!save) |
878 | return 0; | 871 | return 0; |
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c index 9e5245c702de..4af0cf5f3bfb 100644 --- a/arch/arm/common/scoop.c +++ b/arch/arm/common/scoop.c | |||
@@ -12,6 +12,9 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/string.h> | ||
16 | #include <linux/slab.h> | ||
17 | |||
15 | #include <asm/io.h> | 18 | #include <asm/io.h> |
16 | #include <asm/hardware/scoop.h> | 19 | #include <asm/hardware/scoop.h> |
17 | 20 | ||
@@ -102,26 +105,24 @@ static void check_scoop_reg(struct scoop_dev *sdev) | |||
102 | } | 105 | } |
103 | 106 | ||
104 | #ifdef CONFIG_PM | 107 | #ifdef CONFIG_PM |
105 | static int scoop_suspend(struct device *dev, pm_message_t state, uint32_t level) | 108 | static int scoop_suspend(struct device *dev, pm_message_t state) |
106 | { | 109 | { |
107 | if (level == SUSPEND_POWER_DOWN) { | 110 | struct scoop_dev *sdev = dev_get_drvdata(dev); |
108 | struct scoop_dev *sdev = dev_get_drvdata(dev); | 111 | |
112 | check_scoop_reg(sdev); | ||
113 | sdev->scoop_gpwr = SCOOP_REG(sdev->base, SCOOP_GPWR); | ||
114 | SCOOP_REG(sdev->base, SCOOP_GPWR) = (sdev->scoop_gpwr & ~sdev->suspend_clr) | sdev->suspend_set; | ||
109 | 115 | ||
110 | check_scoop_reg(sdev); | ||
111 | sdev->scoop_gpwr = SCOOP_REG(sdev->base, SCOOP_GPWR); | ||
112 | SCOOP_REG(sdev->base, SCOOP_GPWR) = (sdev->scoop_gpwr & ~sdev->suspend_clr) | sdev->suspend_set; | ||
113 | } | ||
114 | return 0; | 116 | return 0; |
115 | } | 117 | } |
116 | 118 | ||
117 | static int scoop_resume(struct device *dev, uint32_t level) | 119 | static int scoop_resume(struct device *dev) |
118 | { | 120 | { |
119 | if (level == RESUME_POWER_ON) { | 121 | struct scoop_dev *sdev = dev_get_drvdata(dev); |
120 | struct scoop_dev *sdev = dev_get_drvdata(dev); | 122 | |
123 | check_scoop_reg(sdev); | ||
124 | SCOOP_REG(sdev->base,SCOOP_GPWR) = sdev->scoop_gpwr; | ||
121 | 125 | ||
122 | check_scoop_reg(sdev); | ||
123 | SCOOP_REG(sdev->base,SCOOP_GPWR) = sdev->scoop_gpwr; | ||
124 | } | ||
125 | return 0; | 126 | return 0; |
126 | } | 127 | } |
127 | #else | 128 | #else |
diff --git a/arch/arm/configs/ixdp2400_defconfig b/arch/arm/configs/ixdp2400_defconfig index 678720fa2e2e..ddeb9f99d662 100644 --- a/arch/arm/configs/ixdp2400_defconfig +++ b/arch/arm/configs/ixdp2400_defconfig | |||
@@ -559,7 +559,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
559 | # | 559 | # |
560 | CONFIG_SERIAL_8250=y | 560 | CONFIG_SERIAL_8250=y |
561 | CONFIG_SERIAL_8250_CONSOLE=y | 561 | CONFIG_SERIAL_8250_CONSOLE=y |
562 | CONFIG_SERIAL_8250_NR_UARTS=2 | 562 | CONFIG_SERIAL_8250_NR_UARTS=1 |
563 | # CONFIG_SERIAL_8250_EXTENDED is not set | 563 | # CONFIG_SERIAL_8250_EXTENDED is not set |
564 | 564 | ||
565 | # | 565 | # |
diff --git a/arch/arm/configs/ixdp2800_defconfig b/arch/arm/configs/ixdp2800_defconfig index 261e2343903b..81d3a0606f95 100644 --- a/arch/arm/configs/ixdp2800_defconfig +++ b/arch/arm/configs/ixdp2800_defconfig | |||
@@ -559,7 +559,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
559 | # | 559 | # |
560 | CONFIG_SERIAL_8250=y | 560 | CONFIG_SERIAL_8250=y |
561 | CONFIG_SERIAL_8250_CONSOLE=y | 561 | CONFIG_SERIAL_8250_CONSOLE=y |
562 | CONFIG_SERIAL_8250_NR_UARTS=2 | 562 | CONFIG_SERIAL_8250_NR_UARTS=1 |
563 | # CONFIG_SERIAL_8250_EXTENDED is not set | 563 | # CONFIG_SERIAL_8250_EXTENDED is not set |
564 | 564 | ||
565 | # | 565 | # |
diff --git a/arch/arm/configs/mp1000_defconfig b/arch/arm/configs/mp1000_defconfig new file mode 100644 index 000000000000..d2cbc6fada1d --- /dev/null +++ b/arch/arm/configs/mp1000_defconfig | |||
@@ -0,0 +1,897 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.14-rc1 | ||
4 | # Fri Sep 16 15:48:13 2005 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_MMU=y | ||
8 | CONFIG_UID16=y | ||
9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
11 | |||
12 | # | ||
13 | # Code maturity level options | ||
14 | # | ||
15 | CONFIG_EXPERIMENTAL=y | ||
16 | # CONFIG_CLEAN_COMPILE is not set | ||
17 | CONFIG_BROKEN=y | ||
18 | CONFIG_BROKEN_ON_SMP=y | ||
19 | CONFIG_LOCK_KERNEL=y | ||
20 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
21 | |||
22 | # | ||
23 | # General setup | ||
24 | # | ||
25 | CONFIG_LOCALVERSION="" | ||
26 | CONFIG_LOCALVERSION_AUTO=y | ||
27 | CONFIG_SWAP=y | ||
28 | CONFIG_SYSVIPC=y | ||
29 | # CONFIG_POSIX_MQUEUE is not set | ||
30 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
31 | CONFIG_SYSCTL=y | ||
32 | # CONFIG_AUDIT is not set | ||
33 | # CONFIG_HOTPLUG is not set | ||
34 | CONFIG_KOBJECT_UEVENT=y | ||
35 | CONFIG_IKCONFIG=y | ||
36 | CONFIG_IKCONFIG_PROC=y | ||
37 | CONFIG_INITRAMFS_SOURCE="" | ||
38 | CONFIG_EMBEDDED=y | ||
39 | CONFIG_KALLSYMS=y | ||
40 | # CONFIG_KALLSYMS_ALL is not set | ||
41 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
42 | CONFIG_PRINTK=y | ||
43 | CONFIG_BUG=y | ||
44 | CONFIG_BASE_FULL=y | ||
45 | CONFIG_FUTEX=y | ||
46 | CONFIG_EPOLL=y | ||
47 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
48 | CONFIG_SHMEM=y | ||
49 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
50 | CONFIG_CC_ALIGN_LABELS=0 | ||
51 | CONFIG_CC_ALIGN_LOOPS=0 | ||
52 | CONFIG_CC_ALIGN_JUMPS=0 | ||
53 | # CONFIG_TINY_SHMEM is not set | ||
54 | CONFIG_BASE_SMALL=0 | ||
55 | |||
56 | # | ||
57 | # Loadable module support | ||
58 | # | ||
59 | CONFIG_MODULES=y | ||
60 | CONFIG_MODULE_UNLOAD=y | ||
61 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
62 | CONFIG_OBSOLETE_MODPARM=y | ||
63 | # CONFIG_MODVERSIONS is not set | ||
64 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
65 | CONFIG_KMOD=y | ||
66 | |||
67 | # | ||
68 | # System Type | ||
69 | # | ||
70 | # CONFIG_ARCH_CLPS7500 is not set | ||
71 | CONFIG_ARCH_CLPS711X=y | ||
72 | # CONFIG_ARCH_CO285 is not set | ||
73 | # CONFIG_ARCH_EBSA110 is not set | ||
74 | # CONFIG_ARCH_CAMELOT is not set | ||
75 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
76 | # CONFIG_ARCH_INTEGRATOR is not set | ||
77 | # CONFIG_ARCH_IOP3XX is not set | ||
78 | # CONFIG_ARCH_IXP4XX is not set | ||
79 | # CONFIG_ARCH_IXP2000 is not set | ||
80 | # CONFIG_ARCH_L7200 is not set | ||
81 | # CONFIG_ARCH_PXA is not set | ||
82 | # CONFIG_ARCH_RPC is not set | ||
83 | # CONFIG_ARCH_SA1100 is not set | ||
84 | # CONFIG_ARCH_S3C2410 is not set | ||
85 | # CONFIG_ARCH_SHARK is not set | ||
86 | # CONFIG_ARCH_LH7A40X is not set | ||
87 | # CONFIG_ARCH_OMAP is not set | ||
88 | # CONFIG_ARCH_VERSATILE is not set | ||
89 | # CONFIG_ARCH_IMX is not set | ||
90 | # CONFIG_ARCH_H720X is not set | ||
91 | # CONFIG_ARCH_AAEC2000 is not set | ||
92 | |||
93 | # | ||
94 | # CLPS711X/EP721X Implementations | ||
95 | # | ||
96 | # CONFIG_ARCH_AUTCPU12 is not set | ||
97 | # CONFIG_ARCH_CDB89712 is not set | ||
98 | # CONFIG_ARCH_CEIVA is not set | ||
99 | # CONFIG_ARCH_CLEP7312 is not set | ||
100 | # CONFIG_ARCH_EDB7211 is not set | ||
101 | # CONFIG_ARCH_P720T is not set | ||
102 | # CONFIG_ARCH_FORTUNET is not set | ||
103 | CONFIG_MACH_MP1000=y | ||
104 | CONFIG_MP1000_90MHZ=y | ||
105 | |||
106 | # | ||
107 | # Processor Type | ||
108 | # | ||
109 | CONFIG_CPU_32=y | ||
110 | CONFIG_CPU_ARM720T=y | ||
111 | CONFIG_CPU_32v4=y | ||
112 | CONFIG_CPU_ABRT_LV4T=y | ||
113 | CONFIG_CPU_CACHE_V4=y | ||
114 | CONFIG_CPU_CACHE_VIVT=y | ||
115 | CONFIG_CPU_COPY_V4WT=y | ||
116 | CONFIG_CPU_TLB_V4WT=y | ||
117 | |||
118 | # | ||
119 | # Processor Features | ||
120 | # | ||
121 | CONFIG_ARM_THUMB=y | ||
122 | |||
123 | # | ||
124 | # Bus support | ||
125 | # | ||
126 | CONFIG_ISA_DMA_API=y | ||
127 | |||
128 | # | ||
129 | # PCCARD (PCMCIA/CardBus) support | ||
130 | # | ||
131 | # CONFIG_PCCARD is not set | ||
132 | |||
133 | # | ||
134 | # Kernel Features | ||
135 | # | ||
136 | # CONFIG_SMP is not set | ||
137 | CONFIG_PREEMPT=y | ||
138 | # CONFIG_NO_IDLE_HZ is not set | ||
139 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
140 | CONFIG_SELECT_MEMORY_MODEL=y | ||
141 | CONFIG_FLATMEM_MANUAL=y | ||
142 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
143 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
144 | CONFIG_FLATMEM=y | ||
145 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
146 | # CONFIG_SPARSEMEM_STATIC is not set | ||
147 | CONFIG_ALIGNMENT_TRAP=y | ||
148 | |||
149 | # | ||
150 | # Boot options | ||
151 | # | ||
152 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
153 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
154 | CONFIG_CMDLINE="console=ttyCL,38400 root=/dev/discs/disc0/part1 ip=any cs89x0_media=rj45" | ||
155 | # CONFIG_XIP_KERNEL is not set | ||
156 | |||
157 | # | ||
158 | # Floating point emulation | ||
159 | # | ||
160 | |||
161 | # | ||
162 | # At least one emulation must be selected | ||
163 | # | ||
164 | CONFIG_FPE_NWFPE=y | ||
165 | # CONFIG_FPE_NWFPE_XP is not set | ||
166 | # CONFIG_FPE_FASTFPE is not set | ||
167 | |||
168 | # | ||
169 | # Userspace binary formats | ||
170 | # | ||
171 | CONFIG_BINFMT_ELF=y | ||
172 | # CONFIG_BINFMT_AOUT is not set | ||
173 | CONFIG_BINFMT_MISC=y | ||
174 | # CONFIG_ARTHUR is not set | ||
175 | |||
176 | # | ||
177 | # Power management options | ||
178 | # | ||
179 | # CONFIG_PM is not set | ||
180 | |||
181 | # | ||
182 | # Networking | ||
183 | # | ||
184 | CONFIG_NET=y | ||
185 | |||
186 | # | ||
187 | # Networking options | ||
188 | # | ||
189 | CONFIG_PACKET=y | ||
190 | # CONFIG_PACKET_MMAP is not set | ||
191 | CONFIG_UNIX=y | ||
192 | # CONFIG_NET_KEY is not set | ||
193 | CONFIG_INET=y | ||
194 | # CONFIG_IP_MULTICAST is not set | ||
195 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
196 | CONFIG_IP_FIB_HASH=y | ||
197 | CONFIG_IP_PNP=y | ||
198 | CONFIG_IP_PNP_DHCP=y | ||
199 | CONFIG_IP_PNP_BOOTP=y | ||
200 | CONFIG_IP_PNP_RARP=y | ||
201 | # CONFIG_NET_IPIP is not set | ||
202 | # CONFIG_NET_IPGRE is not set | ||
203 | # CONFIG_ARPD is not set | ||
204 | # CONFIG_SYN_COOKIES is not set | ||
205 | # CONFIG_INET_AH is not set | ||
206 | # CONFIG_INET_ESP is not set | ||
207 | # CONFIG_INET_IPCOMP is not set | ||
208 | # CONFIG_INET_TUNNEL is not set | ||
209 | CONFIG_INET_DIAG=y | ||
210 | CONFIG_INET_TCP_DIAG=y | ||
211 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
212 | CONFIG_TCP_CONG_BIC=y | ||
213 | CONFIG_IPV6=y | ||
214 | # CONFIG_IPV6_PRIVACY is not set | ||
215 | # CONFIG_INET6_AH is not set | ||
216 | # CONFIG_INET6_ESP is not set | ||
217 | # CONFIG_INET6_IPCOMP is not set | ||
218 | # CONFIG_INET6_TUNNEL is not set | ||
219 | # CONFIG_IPV6_TUNNEL is not set | ||
220 | # CONFIG_NETFILTER is not set | ||
221 | |||
222 | # | ||
223 | # DCCP Configuration (EXPERIMENTAL) | ||
224 | # | ||
225 | # CONFIG_IP_DCCP is not set | ||
226 | |||
227 | # | ||
228 | # SCTP Configuration (EXPERIMENTAL) | ||
229 | # | ||
230 | # CONFIG_IP_SCTP is not set | ||
231 | # CONFIG_ATM is not set | ||
232 | # CONFIG_BRIDGE is not set | ||
233 | # CONFIG_VLAN_8021Q is not set | ||
234 | # CONFIG_DECNET is not set | ||
235 | # CONFIG_LLC2 is not set | ||
236 | # CONFIG_IPX is not set | ||
237 | # CONFIG_ATALK is not set | ||
238 | # CONFIG_X25 is not set | ||
239 | # CONFIG_LAPB is not set | ||
240 | # CONFIG_NET_DIVERT is not set | ||
241 | # CONFIG_ECONET is not set | ||
242 | # CONFIG_WAN_ROUTER is not set | ||
243 | # CONFIG_NET_SCHED is not set | ||
244 | # CONFIG_NET_CLS_ROUTE is not set | ||
245 | |||
246 | # | ||
247 | # Network testing | ||
248 | # | ||
249 | # CONFIG_NET_PKTGEN is not set | ||
250 | # CONFIG_NETFILTER_NETLINK is not set | ||
251 | # CONFIG_HAMRADIO is not set | ||
252 | # CONFIG_IRDA is not set | ||
253 | # CONFIG_BT is not set | ||
254 | # CONFIG_IEEE80211 is not set | ||
255 | |||
256 | # | ||
257 | # Device Drivers | ||
258 | # | ||
259 | |||
260 | # | ||
261 | # Generic Driver Options | ||
262 | # | ||
263 | CONFIG_STANDALONE=y | ||
264 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
265 | # CONFIG_FW_LOADER is not set | ||
266 | # CONFIG_DEBUG_DRIVER is not set | ||
267 | |||
268 | # | ||
269 | # Memory Technology Devices (MTD) | ||
270 | # | ||
271 | CONFIG_MTD=y | ||
272 | CONFIG_MTD_DEBUG=y | ||
273 | CONFIG_MTD_DEBUG_VERBOSE=3 | ||
274 | # CONFIG_MTD_CONCAT is not set | ||
275 | CONFIG_MTD_PARTITIONS=y | ||
276 | CONFIG_MTD_REDBOOT_PARTS=m | ||
277 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-2 | ||
278 | CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y | ||
279 | # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set | ||
280 | CONFIG_MTD_CMDLINE_PARTS=y | ||
281 | # CONFIG_MTD_AFS_PARTS is not set | ||
282 | |||
283 | # | ||
284 | # User Modules And Translation Layers | ||
285 | # | ||
286 | CONFIG_MTD_CHAR=y | ||
287 | CONFIG_MTD_BLOCK=y | ||
288 | # CONFIG_FTL is not set | ||
289 | # CONFIG_NFTL is not set | ||
290 | # CONFIG_INFTL is not set | ||
291 | |||
292 | # | ||
293 | # RAM/ROM/Flash chip drivers | ||
294 | # | ||
295 | CONFIG_MTD_CFI=m | ||
296 | # CONFIG_MTD_JEDECPROBE is not set | ||
297 | CONFIG_MTD_GEN_PROBE=m | ||
298 | CONFIG_MTD_CFI_ADV_OPTIONS=y | ||
299 | CONFIG_MTD_CFI_NOSWAP=y | ||
300 | # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set | ||
301 | # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set | ||
302 | CONFIG_MTD_CFI_GEOMETRY=y | ||
303 | # CONFIG_MTD_MAP_BANK_WIDTH_1 is not set | ||
304 | # CONFIG_MTD_MAP_BANK_WIDTH_2 is not set | ||
305 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
306 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
307 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
308 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
309 | # CONFIG_MTD_CFI_I1 is not set | ||
310 | CONFIG_MTD_CFI_I2=y | ||
311 | # CONFIG_MTD_CFI_I4 is not set | ||
312 | # CONFIG_MTD_CFI_I8 is not set | ||
313 | # CONFIG_MTD_OTP is not set | ||
314 | CONFIG_MTD_CFI_INTELEXT=m | ||
315 | # CONFIG_MTD_CFI_AMDSTD is not set | ||
316 | # CONFIG_MTD_CFI_STAA is not set | ||
317 | CONFIG_MTD_CFI_UTIL=m | ||
318 | # CONFIG_MTD_RAM is not set | ||
319 | # CONFIG_MTD_ROM is not set | ||
320 | # CONFIG_MTD_ABSENT is not set | ||
321 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
322 | # CONFIG_MTD_XIP is not set | ||
323 | |||
324 | # | ||
325 | # Mapping drivers for chip access | ||
326 | # | ||
327 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
328 | CONFIG_MTD_PHYSMAP=m | ||
329 | CONFIG_MTD_PHYSMAP_START=0x0000000 | ||
330 | CONFIG_MTD_PHYSMAP_LEN=0x4000000 | ||
331 | CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | ||
332 | # CONFIG_MTD_ARM_INTEGRATOR is not set | ||
333 | CONFIG_MTD_EDB7312=m | ||
334 | # CONFIG_MTD_PLATRAM is not set | ||
335 | |||
336 | # | ||
337 | # Self-contained MTD device drivers | ||
338 | # | ||
339 | # CONFIG_MTD_SLRAM is not set | ||
340 | # CONFIG_MTD_PHRAM is not set | ||
341 | # CONFIG_MTD_MTDRAM is not set | ||
342 | # CONFIG_MTD_BLKMTD is not set | ||
343 | # CONFIG_MTD_BLOCK2MTD is not set | ||
344 | |||
345 | # | ||
346 | # Disk-On-Chip Device Drivers | ||
347 | # | ||
348 | # CONFIG_MTD_DOC2000 is not set | ||
349 | # CONFIG_MTD_DOC2001 is not set | ||
350 | # CONFIG_MTD_DOC2001PLUS is not set | ||
351 | |||
352 | # | ||
353 | # NAND Flash Device Drivers | ||
354 | # | ||
355 | CONFIG_MTD_NAND=y | ||
356 | # CONFIG_MTD_NAND_VERIFY_WRITE is not set | ||
357 | CONFIG_MTD_NAND_MP1000=y | ||
358 | CONFIG_MTD_NAND_IDS=y | ||
359 | # CONFIG_MTD_NAND_DISKONCHIP is not set | ||
360 | # CONFIG_MTD_NAND_NANDSIM is not set | ||
361 | |||
362 | # | ||
363 | # Parallel port support | ||
364 | # | ||
365 | # CONFIG_PARPORT is not set | ||
366 | |||
367 | # | ||
368 | # Plug and Play support | ||
369 | # | ||
370 | |||
371 | # | ||
372 | # Block devices | ||
373 | # | ||
374 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
375 | CONFIG_BLK_DEV_LOOP=m | ||
376 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
377 | # CONFIG_BLK_DEV_NBD is not set | ||
378 | CONFIG_BLK_DEV_RAM=y | ||
379 | CONFIG_BLK_DEV_RAM_COUNT=2 | ||
380 | CONFIG_BLK_DEV_RAM_SIZE=16384 | ||
381 | CONFIG_BLK_DEV_INITRD=y | ||
382 | # CONFIG_CDROM_PKTCDVD is not set | ||
383 | |||
384 | # | ||
385 | # IO Schedulers | ||
386 | # | ||
387 | CONFIG_IOSCHED_NOOP=y | ||
388 | CONFIG_IOSCHED_AS=y | ||
389 | CONFIG_IOSCHED_DEADLINE=y | ||
390 | CONFIG_IOSCHED_CFQ=y | ||
391 | # CONFIG_ATA_OVER_ETH is not set | ||
392 | |||
393 | # | ||
394 | # ATA/ATAPI/MFM/RLL support | ||
395 | # | ||
396 | CONFIG_IDE=y | ||
397 | CONFIG_BLK_DEV_IDE=y | ||
398 | |||
399 | # | ||
400 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
401 | # | ||
402 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
403 | # CONFIG_BLK_DEV_HD_IDE is not set | ||
404 | CONFIG_BLK_DEV_IDEDISK=y | ||
405 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
406 | # CONFIG_BLK_DEV_IDECD is not set | ||
407 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
408 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
409 | # CONFIG_IDE_TASK_IOCTL is not set | ||
410 | |||
411 | # | ||
412 | # IDE chipset support/bugfixes | ||
413 | # | ||
414 | # CONFIG_IDE_GENERIC is not set | ||
415 | CONFIG_IDE_ARM=y | ||
416 | CONFIG_BLK_DEV_IDE_MP1000=y | ||
417 | # CONFIG_BLK_DEV_IDEDMA is not set | ||
418 | # CONFIG_IDEDMA_AUTO is not set | ||
419 | # CONFIG_BLK_DEV_HD is not set | ||
420 | |||
421 | # | ||
422 | # SCSI device support | ||
423 | # | ||
424 | # CONFIG_RAID_ATTRS is not set | ||
425 | # CONFIG_SCSI is not set | ||
426 | |||
427 | # | ||
428 | # Multi-device support (RAID and LVM) | ||
429 | # | ||
430 | CONFIG_MD=y | ||
431 | # CONFIG_BLK_DEV_MD is not set | ||
432 | CONFIG_BLK_DEV_DM=y | ||
433 | # CONFIG_DM_CRYPT is not set | ||
434 | # CONFIG_DM_SNAPSHOT is not set | ||
435 | # CONFIG_DM_MIRROR is not set | ||
436 | # CONFIG_DM_ZERO is not set | ||
437 | # CONFIG_DM_MULTIPATH is not set | ||
438 | |||
439 | # | ||
440 | # Fusion MPT device support | ||
441 | # | ||
442 | # CONFIG_FUSION is not set | ||
443 | |||
444 | # | ||
445 | # IEEE 1394 (FireWire) support | ||
446 | # | ||
447 | # CONFIG_IEEE1394 is not set | ||
448 | |||
449 | # | ||
450 | # I2O device support | ||
451 | # | ||
452 | |||
453 | # | ||
454 | # Network device support | ||
455 | # | ||
456 | CONFIG_NETDEVICES=y | ||
457 | # CONFIG_DUMMY is not set | ||
458 | # CONFIG_BONDING is not set | ||
459 | # CONFIG_EQUALIZER is not set | ||
460 | # CONFIG_TUN is not set | ||
461 | |||
462 | # | ||
463 | # PHY device support | ||
464 | # | ||
465 | # CONFIG_PHYLIB is not set | ||
466 | |||
467 | # | ||
468 | # Ethernet (10 or 100Mbit) | ||
469 | # | ||
470 | CONFIG_NET_ETHERNET=y | ||
471 | # CONFIG_MII is not set | ||
472 | # CONFIG_SMC91X is not set | ||
473 | # CONFIG_DM9000 is not set | ||
474 | CONFIG_CS89x0=y | ||
475 | |||
476 | # | ||
477 | # Ethernet (1000 Mbit) | ||
478 | # | ||
479 | |||
480 | # | ||
481 | # Ethernet (10000 Mbit) | ||
482 | # | ||
483 | |||
484 | # | ||
485 | # Token Ring devices | ||
486 | # | ||
487 | |||
488 | # | ||
489 | # Wireless LAN (non-hamradio) | ||
490 | # | ||
491 | # CONFIG_NET_RADIO is not set | ||
492 | |||
493 | # | ||
494 | # Wan interfaces | ||
495 | # | ||
496 | # CONFIG_WAN is not set | ||
497 | # CONFIG_PPP is not set | ||
498 | # CONFIG_SLIP is not set | ||
499 | # CONFIG_SHAPER is not set | ||
500 | # CONFIG_NETCONSOLE is not set | ||
501 | # CONFIG_NETPOLL is not set | ||
502 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
503 | |||
504 | # | ||
505 | # ISDN subsystem | ||
506 | # | ||
507 | # CONFIG_ISDN is not set | ||
508 | |||
509 | # | ||
510 | # Input device support | ||
511 | # | ||
512 | CONFIG_INPUT=y | ||
513 | |||
514 | # | ||
515 | # Userland interfaces | ||
516 | # | ||
517 | # CONFIG_INPUT_MOUSEDEV is not set | ||
518 | # CONFIG_INPUT_JOYDEV is not set | ||
519 | # CONFIG_INPUT_TSDEV is not set | ||
520 | # CONFIG_INPUT_EVDEV is not set | ||
521 | CONFIG_INPUT_EVBUG=y | ||
522 | |||
523 | # | ||
524 | # Input Device Drivers | ||
525 | # | ||
526 | # CONFIG_INPUT_KEYBOARD is not set | ||
527 | # CONFIG_INPUT_MOUSE is not set | ||
528 | # CONFIG_INPUT_JOYSTICK is not set | ||
529 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
530 | # CONFIG_INPUT_MISC is not set | ||
531 | |||
532 | # | ||
533 | # Hardware I/O ports | ||
534 | # | ||
535 | CONFIG_SERIO=y | ||
536 | CONFIG_SERIO_SERPORT=y | ||
537 | # CONFIG_SERIO_LIBPS2 is not set | ||
538 | # CONFIG_SERIO_RAW is not set | ||
539 | # CONFIG_GAMEPORT is not set | ||
540 | |||
541 | # | ||
542 | # Character devices | ||
543 | # | ||
544 | CONFIG_VT=y | ||
545 | CONFIG_VT_CONSOLE=y | ||
546 | CONFIG_HW_CONSOLE=y | ||
547 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
548 | |||
549 | # | ||
550 | # Serial drivers | ||
551 | # | ||
552 | CONFIG_SERIAL_8250=y | ||
553 | CONFIG_SERIAL_8250_CONSOLE=y | ||
554 | CONFIG_SERIAL_8250_NR_UARTS=2 | ||
555 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
556 | |||
557 | # | ||
558 | # Non-8250 serial port support | ||
559 | # | ||
560 | CONFIG_SERIAL_CLPS711X=y | ||
561 | CONFIG_SERIAL_CLPS711X_CONSOLE=y | ||
562 | CONFIG_SERIAL_CORE=y | ||
563 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
564 | CONFIG_UNIX98_PTYS=y | ||
565 | CONFIG_LEGACY_PTYS=y | ||
566 | CONFIG_LEGACY_PTY_COUNT=256 | ||
567 | |||
568 | # | ||
569 | # IPMI | ||
570 | # | ||
571 | # CONFIG_IPMI_HANDLER is not set | ||
572 | |||
573 | # | ||
574 | # Watchdog Cards | ||
575 | # | ||
576 | # CONFIG_WATCHDOG is not set | ||
577 | CONFIG_NVRAM=y | ||
578 | CONFIG_RTC=y | ||
579 | # CONFIG_DTLK is not set | ||
580 | # CONFIG_R3964 is not set | ||
581 | |||
582 | # | ||
583 | # Ftape, the floppy tape device driver | ||
584 | # | ||
585 | # CONFIG_RAW_DRIVER is not set | ||
586 | |||
587 | # | ||
588 | # TPM devices | ||
589 | # | ||
590 | |||
591 | # | ||
592 | # I2C support | ||
593 | # | ||
594 | # CONFIG_I2C is not set | ||
595 | |||
596 | # | ||
597 | # Hardware Monitoring support | ||
598 | # | ||
599 | CONFIG_HWMON=y | ||
600 | # CONFIG_HWMON_VID is not set | ||
601 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
602 | |||
603 | # | ||
604 | # Misc devices | ||
605 | # | ||
606 | |||
607 | # | ||
608 | # Multimedia Capabilities Port drivers | ||
609 | # | ||
610 | |||
611 | # | ||
612 | # Multimedia devices | ||
613 | # | ||
614 | # CONFIG_VIDEO_DEV is not set | ||
615 | |||
616 | # | ||
617 | # Digital Video Broadcasting Devices | ||
618 | # | ||
619 | # CONFIG_DVB is not set | ||
620 | |||
621 | # | ||
622 | # Graphics support | ||
623 | # | ||
624 | # CONFIG_FB is not set | ||
625 | |||
626 | # | ||
627 | # Console display driver support | ||
628 | # | ||
629 | # CONFIG_VGA_CONSOLE is not set | ||
630 | CONFIG_DUMMY_CONSOLE=y | ||
631 | |||
632 | # | ||
633 | # Sound | ||
634 | # | ||
635 | # CONFIG_SOUND is not set | ||
636 | |||
637 | # | ||
638 | # USB support | ||
639 | # | ||
640 | CONFIG_USB_ARCH_HAS_HCD=y | ||
641 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
642 | # CONFIG_USB is not set | ||
643 | |||
644 | # | ||
645 | # USB Gadget Support | ||
646 | # | ||
647 | # CONFIG_USB_GADGET is not set | ||
648 | |||
649 | # | ||
650 | # MMC/SD Card support | ||
651 | # | ||
652 | # CONFIG_MMC is not set | ||
653 | |||
654 | # | ||
655 | # File systems | ||
656 | # | ||
657 | CONFIG_EXT2_FS=y | ||
658 | CONFIG_EXT2_FS_XATTR=y | ||
659 | # CONFIG_EXT2_FS_POSIX_ACL is not set | ||
660 | # CONFIG_EXT2_FS_SECURITY is not set | ||
661 | # CONFIG_EXT2_FS_XIP is not set | ||
662 | CONFIG_EXT3_FS=y | ||
663 | CONFIG_EXT3_FS_XATTR=y | ||
664 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
665 | # CONFIG_EXT3_FS_SECURITY is not set | ||
666 | CONFIG_JBD=y | ||
667 | # CONFIG_JBD_DEBUG is not set | ||
668 | CONFIG_FS_MBCACHE=y | ||
669 | CONFIG_REISERFS_FS=m | ||
670 | # CONFIG_REISERFS_CHECK is not set | ||
671 | # CONFIG_REISERFS_PROC_INFO is not set | ||
672 | # CONFIG_REISERFS_FS_XATTR is not set | ||
673 | # CONFIG_JFS_FS is not set | ||
674 | CONFIG_FS_POSIX_ACL=y | ||
675 | # CONFIG_XFS_FS is not set | ||
676 | # CONFIG_MINIX_FS is not set | ||
677 | # CONFIG_ROMFS_FS is not set | ||
678 | CONFIG_INOTIFY=y | ||
679 | CONFIG_QUOTA=y | ||
680 | # CONFIG_QFMT_V1 is not set | ||
681 | # CONFIG_QFMT_V2 is not set | ||
682 | CONFIG_QUOTACTL=y | ||
683 | CONFIG_DNOTIFY=y | ||
684 | # CONFIG_AUTOFS_FS is not set | ||
685 | # CONFIG_AUTOFS4_FS is not set | ||
686 | # CONFIG_FUSE_FS is not set | ||
687 | |||
688 | # | ||
689 | # CD-ROM/DVD Filesystems | ||
690 | # | ||
691 | # CONFIG_ISO9660_FS is not set | ||
692 | # CONFIG_UDF_FS is not set | ||
693 | |||
694 | # | ||
695 | # DOS/FAT/NT Filesystems | ||
696 | # | ||
697 | # CONFIG_MSDOS_FS is not set | ||
698 | # CONFIG_VFAT_FS is not set | ||
699 | # CONFIG_NTFS_FS is not set | ||
700 | |||
701 | # | ||
702 | # Pseudo filesystems | ||
703 | # | ||
704 | CONFIG_PROC_FS=y | ||
705 | CONFIG_SYSFS=y | ||
706 | CONFIG_TMPFS=y | ||
707 | # CONFIG_HUGETLBFS is not set | ||
708 | # CONFIG_HUGETLB_PAGE is not set | ||
709 | CONFIG_RAMFS=y | ||
710 | # CONFIG_RELAYFS_FS is not set | ||
711 | |||
712 | # | ||
713 | # Miscellaneous filesystems | ||
714 | # | ||
715 | # CONFIG_ADFS_FS is not set | ||
716 | # CONFIG_AFFS_FS is not set | ||
717 | # CONFIG_HFS_FS is not set | ||
718 | # CONFIG_HFSPLUS_FS is not set | ||
719 | # CONFIG_BEFS_FS is not set | ||
720 | # CONFIG_BFS_FS is not set | ||
721 | # CONFIG_EFS_FS is not set | ||
722 | # CONFIG_JFFS_FS is not set | ||
723 | CONFIG_JFFS2_FS=m | ||
724 | CONFIG_JFFS2_FS_DEBUG=0 | ||
725 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
726 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
727 | CONFIG_JFFS2_ZLIB=y | ||
728 | CONFIG_JFFS2_RTIME=y | ||
729 | # CONFIG_JFFS2_RUBIN is not set | ||
730 | CONFIG_CRAMFS=m | ||
731 | # CONFIG_VXFS_FS is not set | ||
732 | # CONFIG_HPFS_FS is not set | ||
733 | # CONFIG_QNX4FS_FS is not set | ||
734 | # CONFIG_SYSV_FS is not set | ||
735 | # CONFIG_UFS_FS is not set | ||
736 | |||
737 | # | ||
738 | # Network File Systems | ||
739 | # | ||
740 | CONFIG_NFS_FS=y | ||
741 | CONFIG_NFS_V3=y | ||
742 | # CONFIG_NFS_V3_ACL is not set | ||
743 | CONFIG_NFS_V4=y | ||
744 | # CONFIG_NFS_DIRECTIO is not set | ||
745 | CONFIG_NFSD=y | ||
746 | CONFIG_NFSD_V3=y | ||
747 | # CONFIG_NFSD_V3_ACL is not set | ||
748 | CONFIG_NFSD_V4=y | ||
749 | CONFIG_NFSD_TCP=y | ||
750 | CONFIG_ROOT_NFS=y | ||
751 | CONFIG_LOCKD=y | ||
752 | CONFIG_LOCKD_V4=y | ||
753 | CONFIG_EXPORTFS=y | ||
754 | CONFIG_NFS_COMMON=y | ||
755 | CONFIG_SUNRPC=y | ||
756 | CONFIG_SUNRPC_GSS=y | ||
757 | CONFIG_RPCSEC_GSS_KRB5=y | ||
758 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
759 | CONFIG_SMB_FS=m | ||
760 | # CONFIG_SMB_NLS_DEFAULT is not set | ||
761 | CONFIG_CIFS=m | ||
762 | # CONFIG_CIFS_STATS is not set | ||
763 | # CONFIG_CIFS_XATTR is not set | ||
764 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
765 | # CONFIG_NCP_FS is not set | ||
766 | # CONFIG_CODA_FS is not set | ||
767 | # CONFIG_AFS_FS is not set | ||
768 | # CONFIG_9P_FS is not set | ||
769 | |||
770 | # | ||
771 | # Partition Types | ||
772 | # | ||
773 | # CONFIG_PARTITION_ADVANCED is not set | ||
774 | CONFIG_MSDOS_PARTITION=y | ||
775 | |||
776 | # | ||
777 | # Native Language Support | ||
778 | # | ||
779 | CONFIG_NLS=y | ||
780 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
781 | CONFIG_NLS_CODEPAGE_437=y | ||
782 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
783 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
784 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
785 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
786 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
787 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
788 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
789 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
790 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
791 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
792 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
793 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
794 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
795 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
796 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
797 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
798 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
799 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
800 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
801 | # CONFIG_NLS_ISO8859_8 is not set | ||
802 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
803 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
804 | # CONFIG_NLS_ASCII is not set | ||
805 | # CONFIG_NLS_ISO8859_1 is not set | ||
806 | # CONFIG_NLS_ISO8859_2 is not set | ||
807 | # CONFIG_NLS_ISO8859_3 is not set | ||
808 | # CONFIG_NLS_ISO8859_4 is not set | ||
809 | # CONFIG_NLS_ISO8859_5 is not set | ||
810 | # CONFIG_NLS_ISO8859_6 is not set | ||
811 | # CONFIG_NLS_ISO8859_7 is not set | ||
812 | # CONFIG_NLS_ISO8859_9 is not set | ||
813 | # CONFIG_NLS_ISO8859_13 is not set | ||
814 | # CONFIG_NLS_ISO8859_14 is not set | ||
815 | # CONFIG_NLS_ISO8859_15 is not set | ||
816 | # CONFIG_NLS_KOI8_R is not set | ||
817 | # CONFIG_NLS_KOI8_U is not set | ||
818 | # CONFIG_NLS_UTF8 is not set | ||
819 | |||
820 | # | ||
821 | # Profiling support | ||
822 | # | ||
823 | # CONFIG_PROFILING is not set | ||
824 | |||
825 | # | ||
826 | # Kernel hacking | ||
827 | # | ||
828 | CONFIG_PRINTK_TIME=y | ||
829 | CONFIG_DEBUG_KERNEL=y | ||
830 | # CONFIG_MAGIC_SYSRQ is not set | ||
831 | CONFIG_LOG_BUF_SHIFT=14 | ||
832 | CONFIG_DETECT_SOFTLOCKUP=y | ||
833 | # CONFIG_SCHEDSTATS is not set | ||
834 | # CONFIG_DEBUG_SLAB is not set | ||
835 | CONFIG_DEBUG_PREEMPT=y | ||
836 | # CONFIG_DEBUG_SPINLOCK is not set | ||
837 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
838 | # CONFIG_DEBUG_KOBJECT is not set | ||
839 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
840 | CONFIG_DEBUG_INFO=y | ||
841 | # CONFIG_DEBUG_FS is not set | ||
842 | CONFIG_FRAME_POINTER=y | ||
843 | CONFIG_DEBUG_USER=y | ||
844 | CONFIG_DEBUG_WAITQ=y | ||
845 | CONFIG_DEBUG_ERRORS=y | ||
846 | CONFIG_DEBUG_LL=y | ||
847 | # CONFIG_DEBUG_ICEDCC is not set | ||
848 | # CONFIG_DEBUG_CLPS711X_UART2 is not set | ||
849 | |||
850 | # | ||
851 | # Security options | ||
852 | # | ||
853 | # CONFIG_KEYS is not set | ||
854 | # CONFIG_SECURITY is not set | ||
855 | |||
856 | # | ||
857 | # Cryptographic options | ||
858 | # | ||
859 | CONFIG_CRYPTO=y | ||
860 | # CONFIG_CRYPTO_HMAC is not set | ||
861 | # CONFIG_CRYPTO_NULL is not set | ||
862 | # CONFIG_CRYPTO_MD4 is not set | ||
863 | CONFIG_CRYPTO_MD5=y | ||
864 | # CONFIG_CRYPTO_SHA1 is not set | ||
865 | # CONFIG_CRYPTO_SHA256 is not set | ||
866 | # CONFIG_CRYPTO_SHA512 is not set | ||
867 | # CONFIG_CRYPTO_WP512 is not set | ||
868 | # CONFIG_CRYPTO_TGR192 is not set | ||
869 | CONFIG_CRYPTO_DES=y | ||
870 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
871 | # CONFIG_CRYPTO_TWOFISH is not set | ||
872 | # CONFIG_CRYPTO_SERPENT is not set | ||
873 | # CONFIG_CRYPTO_AES is not set | ||
874 | # CONFIG_CRYPTO_CAST5 is not set | ||
875 | # CONFIG_CRYPTO_CAST6 is not set | ||
876 | # CONFIG_CRYPTO_TEA is not set | ||
877 | # CONFIG_CRYPTO_ARC4 is not set | ||
878 | # CONFIG_CRYPTO_KHAZAD is not set | ||
879 | # CONFIG_CRYPTO_ANUBIS is not set | ||
880 | # CONFIG_CRYPTO_DEFLATE is not set | ||
881 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
882 | # CONFIG_CRYPTO_CRC32C is not set | ||
883 | # CONFIG_CRYPTO_TEST is not set | ||
884 | |||
885 | # | ||
886 | # Hardware crypto devices | ||
887 | # | ||
888 | |||
889 | # | ||
890 | # Library routines | ||
891 | # | ||
892 | # CONFIG_CRC_CCITT is not set | ||
893 | # CONFIG_CRC16 is not set | ||
894 | CONFIG_CRC32=y | ||
895 | # CONFIG_LIBCRC32C is not set | ||
896 | CONFIG_ZLIB_INFLATE=m | ||
897 | CONFIG_ZLIB_DEFLATE=m | ||
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 3e1b0327e4d7..c11169b5ed9a 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | AFLAGS_head.o := -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR) | 5 | AFLAGS_head.o := -DKERNEL_RAM_ADDR=$(TEXTADDR) |
6 | 6 | ||
7 | # Object file lists. | 7 | # Object file lists. |
8 | 8 | ||
diff --git a/arch/arm/kernel/arthur.c b/arch/arm/kernel/arthur.c index a418dad6692c..0ee2e9819631 100644 --- a/arch/arm/kernel/arthur.c +++ b/arch/arm/kernel/arthur.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/stddef.h> | 18 | #include <linux/stddef.h> |
19 | #include <linux/signal.h> | 19 | #include <linux/signal.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/sched.h> | ||
21 | 22 | ||
22 | #include <asm/ptrace.h> | 23 | #include <asm/ptrace.h> |
23 | 24 | ||
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index c1ff4d1f1bfd..04d3082a7b94 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c | |||
@@ -94,7 +94,6 @@ int main(void) | |||
94 | DEFINE(VM_EXEC, VM_EXEC); | 94 | DEFINE(VM_EXEC, VM_EXEC); |
95 | BLANK(); | 95 | BLANK(); |
96 | DEFINE(PAGE_SZ, PAGE_SIZE); | 96 | DEFINE(PAGE_SZ, PAGE_SIZE); |
97 | DEFINE(VIRT_OFFSET, PAGE_OFFSET); | ||
98 | BLANK(); | 97 | BLANK(); |
99 | DEFINE(SYS_ERROR0, 0x9f0000); | 98 | DEFINE(SYS_ERROR0, 0x9f0000); |
100 | BLANK(); | 99 | BLANK(); |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 93b5e8e5292e..be439cab92c6 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | #include <linux/config.h> | 16 | #include <linux/config.h> |
17 | 17 | ||
18 | #include <asm/memory.h> | ||
18 | #include <asm/glue.h> | 19 | #include <asm/glue.h> |
19 | #include <asm/vfpmacros.h> | 20 | #include <asm/vfpmacros.h> |
20 | #include <asm/hardware.h> /* should be moved into entry-macro.S */ | 21 | #include <asm/hardware.h> /* should be moved into entry-macro.S */ |
@@ -310,7 +311,7 @@ __pabt_svc: | |||
310 | 311 | ||
311 | #if __LINUX_ARM_ARCH__ < 6 && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG) | 312 | #if __LINUX_ARM_ARCH__ < 6 && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG) |
312 | @ make sure our user space atomic helper is aborted | 313 | @ make sure our user space atomic helper is aborted |
313 | cmp r2, #VIRT_OFFSET | 314 | cmp r2, #TASK_SIZE |
314 | bichs r3, r3, #PSR_Z_BIT | 315 | bichs r3, r3, #PSR_Z_BIT |
315 | #endif | 316 | #endif |
316 | 317 | ||
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 539626351348..8d8748407cbe 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <asm/procinfo.h> | 21 | #include <asm/procinfo.h> |
22 | #include <asm/ptrace.h> | 22 | #include <asm/ptrace.h> |
23 | #include <asm/asm-offsets.h> | 23 | #include <asm/asm-offsets.h> |
24 | #include <asm/memory.h> | ||
24 | #include <asm/thread_info.h> | 25 | #include <asm/thread_info.h> |
25 | #include <asm/system.h> | 26 | #include <asm/system.h> |
26 | 27 | ||
@@ -33,52 +34,28 @@ | |||
33 | #define MACHINFO_PGOFFIO 12 | 34 | #define MACHINFO_PGOFFIO 12 |
34 | #define MACHINFO_NAME 16 | 35 | #define MACHINFO_NAME 16 |
35 | 36 | ||
36 | #ifndef CONFIG_XIP_KERNEL | ||
37 | /* | 37 | /* |
38 | * We place the page tables 16K below TEXTADDR. Therefore, we must make sure | 38 | * swapper_pg_dir is the virtual address of the initial page table. |
39 | * that TEXTADDR is correctly set. Currently, we expect the least significant | 39 | * We place the page tables 16K below KERNEL_RAM_ADDR. Therefore, we must |
40 | * 16 bits to be 0x8000, but we could probably relax this restriction to | 40 | * make sure that KERNEL_RAM_ADDR is correctly set. Currently, we expect |
41 | * TEXTADDR >= PAGE_OFFSET + 0x4000 | 41 | * the least significant 16 bits to be 0x8000, but we could probably |
42 | * | 42 | * relax this restriction to KERNEL_RAM_ADDR >= PAGE_OFFSET + 0x4000. |
43 | * Note that swapper_pg_dir is the virtual address of the page tables, and | ||
44 | * pgtbl gives us a position-independent reference to these tables. We can | ||
45 | * do this because stext == TEXTADDR | ||
46 | */ | 43 | */ |
47 | #if (TEXTADDR & 0xffff) != 0x8000 | 44 | #if (KERNEL_RAM_ADDR & 0xffff) != 0x8000 |
48 | #error TEXTADDR must start at 0xXXXX8000 | 45 | #error KERNEL_RAM_ADDR must start at 0xXXXX8000 |
49 | #endif | 46 | #endif |
50 | 47 | ||
51 | .globl swapper_pg_dir | 48 | .globl swapper_pg_dir |
52 | .equ swapper_pg_dir, TEXTADDR - 0x4000 | 49 | .equ swapper_pg_dir, KERNEL_RAM_ADDR - 0x4000 |
53 | 50 | ||
54 | .macro pgtbl, rd, phys | 51 | .macro pgtbl, rd |
55 | adr \rd, stext | 52 | ldr \rd, =(__virt_to_phys(KERNEL_RAM_ADDR - 0x4000)) |
56 | sub \rd, \rd, #0x4000 | ||
57 | .endm | 53 | .endm |
58 | #else | ||
59 | /* | ||
60 | * XIP Kernel: | ||
61 | * | ||
62 | * We place the page tables 16K below DATAADDR. Therefore, we must make sure | ||
63 | * that DATAADDR is correctly set. Currently, we expect the least significant | ||
64 | * 16 bits to be 0x8000, but we could probably relax this restriction to | ||
65 | * DATAADDR >= PAGE_OFFSET + 0x4000 | ||
66 | * | ||
67 | * Note that pgtbl is meant to return the physical address of swapper_pg_dir. | ||
68 | * We can't make it relative to the kernel position in this case since | ||
69 | * the kernel can physically be anywhere. | ||
70 | */ | ||
71 | #if (DATAADDR & 0xffff) != 0x8000 | ||
72 | #error DATAADDR must start at 0xXXXX8000 | ||
73 | #endif | ||
74 | |||
75 | .globl swapper_pg_dir | ||
76 | .equ swapper_pg_dir, DATAADDR - 0x4000 | ||
77 | 54 | ||
78 | .macro pgtbl, rd, phys | 55 | #ifdef CONFIG_XIP_KERNEL |
79 | ldr \rd, =((DATAADDR - 0x4000) - VIRT_OFFSET) | 56 | #define TEXTADDR XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR) |
80 | add \rd, \rd, \phys | 57 | #else |
81 | .endm | 58 | #define TEXTADDR KERNEL_RAM_ADDR |
82 | #endif | 59 | #endif |
83 | 60 | ||
84 | /* | 61 | /* |
@@ -279,7 +256,7 @@ __turn_mmu_on: | |||
279 | .type __create_page_tables, %function | 256 | .type __create_page_tables, %function |
280 | __create_page_tables: | 257 | __create_page_tables: |
281 | ldr r5, [r8, #MACHINFO_PHYSRAM] @ physram | 258 | ldr r5, [r8, #MACHINFO_PHYSRAM] @ physram |
282 | pgtbl r4, r5 @ page table address | 259 | pgtbl r4 @ page table address |
283 | 260 | ||
284 | /* | 261 | /* |
285 | * Clear the 16K level 1 swapper page table | 262 | * Clear the 16K level 1 swapper page table |
@@ -324,7 +301,7 @@ __create_page_tables: | |||
324 | /* | 301 | /* |
325 | * Then map first 1MB of ram in case it contains our boot params. | 302 | * Then map first 1MB of ram in case it contains our boot params. |
326 | */ | 303 | */ |
327 | add r0, r4, #VIRT_OFFSET >> 18 | 304 | add r0, r4, #PAGE_OFFSET >> 18 |
328 | orr r6, r5, r7 | 305 | orr r6, r5, r7 |
329 | str r6, [r0] | 306 | str r6, [r0] |
330 | 307 | ||
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 1a85cfdad5ac..6055e1427ba3 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
@@ -11,6 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/config.h> | 12 | #include <linux/config.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/moduleloader.h> | ||
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
15 | #include <linux/elf.h> | 16 | #include <linux/elf.h> |
16 | #include <linux/vmalloc.h> | 17 | #include <linux/vmalloc.h> |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index cd99b83f14c2..9bd8609a2926 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -782,7 +782,7 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat | |||
782 | return ret; | 782 | return ret; |
783 | } | 783 | } |
784 | 784 | ||
785 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data) | 785 | asmlinkage long sys_ptrace(long request, long pid, long addr, long data) |
786 | { | 786 | { |
787 | struct task_struct *child; | 787 | struct task_struct *child; |
788 | int ret; | 788 | int ret; |
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index a94d75fef598..a917e3dd3666 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -139,93 +139,33 @@ struct iwmmxt_sigframe { | |||
139 | unsigned long storage[0x98/4]; | 139 | unsigned long storage[0x98/4]; |
140 | }; | 140 | }; |
141 | 141 | ||
142 | static int page_present(struct mm_struct *mm, void __user *uptr, int wr) | ||
143 | { | ||
144 | unsigned long addr = (unsigned long)uptr; | ||
145 | pgd_t *pgd = pgd_offset(mm, addr); | ||
146 | if (pgd_present(*pgd)) { | ||
147 | pmd_t *pmd = pmd_offset(pgd, addr); | ||
148 | if (pmd_present(*pmd)) { | ||
149 | pte_t *pte = pte_offset_map(pmd, addr); | ||
150 | return (pte_present(*pte) && (!wr || pte_write(*pte))); | ||
151 | } | ||
152 | } | ||
153 | return 0; | ||
154 | } | ||
155 | |||
156 | static int copy_locked(void __user *uptr, void *kptr, size_t size, int write, | ||
157 | void (*copyfn)(void *, void __user *)) | ||
158 | { | ||
159 | unsigned char v, __user *userptr = uptr; | ||
160 | int err = 0; | ||
161 | |||
162 | do { | ||
163 | struct mm_struct *mm; | ||
164 | |||
165 | if (write) { | ||
166 | __put_user_error(0, userptr, err); | ||
167 | __put_user_error(0, userptr + size - 1, err); | ||
168 | } else { | ||
169 | __get_user_error(v, userptr, err); | ||
170 | __get_user_error(v, userptr + size - 1, err); | ||
171 | } | ||
172 | |||
173 | if (err) | ||
174 | break; | ||
175 | |||
176 | mm = current->mm; | ||
177 | spin_lock(&mm->page_table_lock); | ||
178 | if (page_present(mm, userptr, write) && | ||
179 | page_present(mm, userptr + size - 1, write)) { | ||
180 | copyfn(kptr, uptr); | ||
181 | } else | ||
182 | err = 1; | ||
183 | spin_unlock(&mm->page_table_lock); | ||
184 | } while (err); | ||
185 | |||
186 | return err; | ||
187 | } | ||
188 | |||
189 | static int preserve_iwmmxt_context(struct iwmmxt_sigframe *frame) | 142 | static int preserve_iwmmxt_context(struct iwmmxt_sigframe *frame) |
190 | { | 143 | { |
191 | int err = 0; | 144 | char kbuf[sizeof(*frame) + 8]; |
145 | struct iwmmxt_sigframe *kframe; | ||
192 | 146 | ||
193 | /* the iWMMXt context must be 64 bit aligned */ | 147 | /* the iWMMXt context must be 64 bit aligned */ |
194 | WARN_ON((unsigned long)frame & 7); | 148 | kframe = (struct iwmmxt_sigframe *)((unsigned long)(kbuf + 8) & ~7); |
195 | 149 | kframe->magic0 = IWMMXT_MAGIC0; | |
196 | __put_user_error(IWMMXT_MAGIC0, &frame->magic0, err); | 150 | kframe->magic1 = IWMMXT_MAGIC1; |
197 | __put_user_error(IWMMXT_MAGIC1, &frame->magic1, err); | 151 | iwmmxt_task_copy(current_thread_info(), &kframe->storage); |
198 | 152 | return __copy_to_user(frame, kframe, sizeof(*frame)); | |
199 | /* | ||
200 | * iwmmxt_task_copy() doesn't check user permissions. | ||
201 | * Let's do a dummy write on the upper boundary to ensure | ||
202 | * access to user mem is OK all way up. | ||
203 | */ | ||
204 | err |= copy_locked(&frame->storage, current_thread_info(), | ||
205 | sizeof(frame->storage), 1, iwmmxt_task_copy); | ||
206 | return err; | ||
207 | } | 153 | } |
208 | 154 | ||
209 | static int restore_iwmmxt_context(struct iwmmxt_sigframe *frame) | 155 | static int restore_iwmmxt_context(struct iwmmxt_sigframe *frame) |
210 | { | 156 | { |
211 | unsigned long magic0, magic1; | 157 | char kbuf[sizeof(*frame) + 8]; |
212 | int err = 0; | 158 | struct iwmmxt_sigframe *kframe; |
213 | 159 | ||
214 | /* the iWMMXt context is 64 bit aligned */ | 160 | /* the iWMMXt context must be 64 bit aligned */ |
215 | WARN_ON((unsigned long)frame & 7); | 161 | kframe = (struct iwmmxt_sigframe *)((unsigned long)(kbuf + 8) & ~7); |
216 | 162 | if (__copy_from_user(kframe, frame, sizeof(*frame))) | |
217 | /* | 163 | return -1; |
218 | * Validate iWMMXt context signature. | 164 | if (kframe->magic0 != IWMMXT_MAGIC0 || |
219 | * Also, iwmmxt_task_restore() doesn't check user permissions. | 165 | kframe->magic1 != IWMMXT_MAGIC1) |
220 | * Let's do a dummy write on the upper boundary to ensure | 166 | return -1; |
221 | * access to user mem is OK all way up. | 167 | iwmmxt_task_restore(current_thread_info(), &kframe->storage); |
222 | */ | 168 | return 0; |
223 | __get_user_error(magic0, &frame->magic0, err); | ||
224 | __get_user_error(magic1, &frame->magic1, err); | ||
225 | if (!err && magic0 == IWMMXT_MAGIC0 && magic1 == IWMMXT_MAGIC1) | ||
226 | err = copy_locked(&frame->storage, current_thread_info(), | ||
227 | sizeof(frame->storage), 0, iwmmxt_task_restore); | ||
228 | return err; | ||
229 | } | 169 | } |
230 | 170 | ||
231 | #endif | 171 | #endif |
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 69449a818dcc..fc4729106a32 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -36,10 +36,6 @@ | |||
36 | #include <asm/thread_info.h> | 36 | #include <asm/thread_info.h> |
37 | #include <asm/mach/time.h> | 37 | #include <asm/mach/time.h> |
38 | 38 | ||
39 | u64 jiffies_64 = INITIAL_JIFFIES; | ||
40 | |||
41 | EXPORT_SYMBOL(jiffies_64); | ||
42 | |||
43 | /* | 39 | /* |
44 | * Our system timer. | 40 | * Our system timer. |
45 | */ | 41 | */ |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index f6de76e0a45d..45e9ea6cd2a5 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -198,25 +198,16 @@ void show_stack(struct task_struct *tsk, unsigned long *sp) | |||
198 | barrier(); | 198 | barrier(); |
199 | } | 199 | } |
200 | 200 | ||
201 | DEFINE_SPINLOCK(die_lock); | 201 | static void __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs) |
202 | |||
203 | /* | ||
204 | * This function is protected against re-entrancy. | ||
205 | */ | ||
206 | NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) | ||
207 | { | 202 | { |
208 | struct task_struct *tsk = current; | 203 | struct task_struct *tsk = thread->task; |
209 | static int die_counter; | 204 | static int die_counter; |
210 | 205 | ||
211 | console_verbose(); | ||
212 | spin_lock_irq(&die_lock); | ||
213 | bust_spinlocks(1); | ||
214 | |||
215 | printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter); | 206 | printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter); |
216 | print_modules(); | 207 | print_modules(); |
217 | __show_regs(regs); | 208 | __show_regs(regs); |
218 | printk("Process %s (pid: %d, stack limit = 0x%p)\n", | 209 | printk("Process %s (pid: %d, stack limit = 0x%p)\n", |
219 | tsk->comm, tsk->pid, tsk->thread_info + 1); | 210 | tsk->comm, tsk->pid, thread + 1); |
220 | 211 | ||
221 | if (!user_mode(regs) || in_interrupt()) { | 212 | if (!user_mode(regs) || in_interrupt()) { |
222 | dump_mem("Stack: ", regs->ARM_sp, | 213 | dump_mem("Stack: ", regs->ARM_sp, |
@@ -224,7 +215,21 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) | |||
224 | dump_backtrace(regs, tsk); | 215 | dump_backtrace(regs, tsk); |
225 | dump_instr(regs); | 216 | dump_instr(regs); |
226 | } | 217 | } |
218 | } | ||
219 | |||
220 | DEFINE_SPINLOCK(die_lock); | ||
221 | |||
222 | /* | ||
223 | * This function is protected against re-entrancy. | ||
224 | */ | ||
225 | NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) | ||
226 | { | ||
227 | struct thread_info *thread = current_thread_info(); | ||
227 | 228 | ||
229 | console_verbose(); | ||
230 | spin_lock_irq(&die_lock); | ||
231 | bust_spinlocks(1); | ||
232 | __die(str, err, thread, regs); | ||
228 | bust_spinlocks(0); | 233 | bust_spinlocks(0); |
229 | spin_unlock_irq(&die_lock); | 234 | spin_unlock_irq(&die_lock); |
230 | do_exit(SIGSEGV); | 235 | do_exit(SIGSEGV); |
@@ -345,7 +350,9 @@ static int bad_syscall(int n, struct pt_regs *regs) | |||
345 | struct thread_info *thread = current_thread_info(); | 350 | struct thread_info *thread = current_thread_info(); |
346 | siginfo_t info; | 351 | siginfo_t info; |
347 | 352 | ||
348 | if (current->personality != PER_LINUX && thread->exec_domain->handler) { | 353 | if (current->personality != PER_LINUX && |
354 | current->personality != PER_LINUX_32BIT && | ||
355 | thread->exec_domain->handler) { | ||
349 | thread->exec_domain->handler(n, regs); | 356 | thread->exec_domain->handler(n, regs); |
350 | return regs->ARM_r0; | 357 | return regs->ARM_r0; |
351 | } | 358 | } |
@@ -481,29 +488,33 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) | |||
481 | unsigned long addr = regs->ARM_r2; | 488 | unsigned long addr = regs->ARM_r2; |
482 | struct mm_struct *mm = current->mm; | 489 | struct mm_struct *mm = current->mm; |
483 | pgd_t *pgd; pmd_t *pmd; pte_t *pte; | 490 | pgd_t *pgd; pmd_t *pmd; pte_t *pte; |
491 | spinlock_t *ptl; | ||
484 | 492 | ||
485 | regs->ARM_cpsr &= ~PSR_C_BIT; | 493 | regs->ARM_cpsr &= ~PSR_C_BIT; |
486 | spin_lock(&mm->page_table_lock); | 494 | down_read(&mm->mmap_sem); |
487 | pgd = pgd_offset(mm, addr); | 495 | pgd = pgd_offset(mm, addr); |
488 | if (!pgd_present(*pgd)) | 496 | if (!pgd_present(*pgd)) |
489 | goto bad_access; | 497 | goto bad_access; |
490 | pmd = pmd_offset(pgd, addr); | 498 | pmd = pmd_offset(pgd, addr); |
491 | if (!pmd_present(*pmd)) | 499 | if (!pmd_present(*pmd)) |
492 | goto bad_access; | 500 | goto bad_access; |
493 | pte = pte_offset_map(pmd, addr); | 501 | pte = pte_offset_map_lock(mm, pmd, addr, &ptl); |
494 | if (!pte_present(*pte) || !pte_write(*pte)) | 502 | if (!pte_present(*pte) || !pte_write(*pte)) { |
503 | pte_unmap_unlock(pte, ptl); | ||
495 | goto bad_access; | 504 | goto bad_access; |
505 | } | ||
496 | val = *(unsigned long *)addr; | 506 | val = *(unsigned long *)addr; |
497 | val -= regs->ARM_r0; | 507 | val -= regs->ARM_r0; |
498 | if (val == 0) { | 508 | if (val == 0) { |
499 | *(unsigned long *)addr = regs->ARM_r1; | 509 | *(unsigned long *)addr = regs->ARM_r1; |
500 | regs->ARM_cpsr |= PSR_C_BIT; | 510 | regs->ARM_cpsr |= PSR_C_BIT; |
501 | } | 511 | } |
502 | spin_unlock(&mm->page_table_lock); | 512 | pte_unmap_unlock(pte, ptl); |
513 | up_read(&mm->mmap_sem); | ||
503 | return val; | 514 | return val; |
504 | 515 | ||
505 | bad_access: | 516 | bad_access: |
506 | spin_unlock(&mm->page_table_lock); | 517 | up_read(&mm->mmap_sem); |
507 | /* simulate a write access fault */ | 518 | /* simulate a write access fault */ |
508 | do_DataAbort(addr, 15 + (1 << 11), regs); | 519 | do_DataAbort(addr, 15 + (1 << 11), regs); |
509 | return -1; | 520 | return -1; |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 0d5db5279c5c..80c8e4c8cefa 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -6,14 +6,23 @@ | |||
6 | #include <asm-generic/vmlinux.lds.h> | 6 | #include <asm-generic/vmlinux.lds.h> |
7 | #include <linux/config.h> | 7 | #include <linux/config.h> |
8 | #include <asm/thread_info.h> | 8 | #include <asm/thread_info.h> |
9 | #include <asm/memory.h> | ||
9 | 10 | ||
10 | OUTPUT_ARCH(arm) | 11 | OUTPUT_ARCH(arm) |
11 | ENTRY(stext) | 12 | ENTRY(stext) |
13 | |||
12 | #ifndef __ARMEB__ | 14 | #ifndef __ARMEB__ |
13 | jiffies = jiffies_64; | 15 | jiffies = jiffies_64; |
14 | #else | 16 | #else |
15 | jiffies = jiffies_64 + 4; | 17 | jiffies = jiffies_64 + 4; |
16 | #endif | 18 | #endif |
19 | |||
20 | #ifdef CONFIG_XIP_KERNEL | ||
21 | #define TEXTADDR XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR) | ||
22 | #else | ||
23 | #define TEXTADDR KERNEL_RAM_ADDR | ||
24 | #endif | ||
25 | |||
17 | SECTIONS | 26 | SECTIONS |
18 | { | 27 | { |
19 | . = TEXTADDR; | 28 | . = TEXTADDR; |
@@ -95,7 +104,7 @@ SECTIONS | |||
95 | 104 | ||
96 | #ifdef CONFIG_XIP_KERNEL | 105 | #ifdef CONFIG_XIP_KERNEL |
97 | __data_loc = ALIGN(4); /* location in binary */ | 106 | __data_loc = ALIGN(4); /* location in binary */ |
98 | . = DATAADDR; | 107 | . = KERNEL_RAM_ADDR; |
99 | #else | 108 | #else |
100 | . = ALIGN(THREAD_SIZE); | 109 | . = ALIGN(THREAD_SIZE); |
101 | __data_loc = .; | 110 | __data_loc = .; |
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 8725d63e4219..71e5b99e519e 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile | |||
@@ -11,7 +11,7 @@ lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \ | |||
11 | strnlen_user.o strchr.o strrchr.o testchangebit.o \ | 11 | strnlen_user.o strchr.o strrchr.o testchangebit.o \ |
12 | testclearbit.o testsetbit.o uaccess.o getuser.o \ | 12 | testclearbit.o testsetbit.o uaccess.o getuser.o \ |
13 | putuser.o ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ | 13 | putuser.o ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ |
14 | ucmpdi2.o lib1funcs.o div64.o \ | 14 | ucmpdi2.o lib1funcs.o div64.o sha1.o \ |
15 | io-readsb.o io-writesb.o io-readsl.o io-writesl.o | 15 | io-readsb.o io-writesb.o io-readsl.o io-writesl.o |
16 | 16 | ||
17 | ifeq ($(CONFIG_CPU_32v3),y) | 17 | ifeq ($(CONFIG_CPU_32v3),y) |
diff --git a/arch/arm/lib/ashldi3.S b/arch/arm/lib/ashldi3.S new file mode 100644 index 000000000000..561e20717b30 --- /dev/null +++ b/arch/arm/lib/ashldi3.S | |||
@@ -0,0 +1,48 @@ | |||
1 | /* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005 | ||
2 | Free Software Foundation, Inc. | ||
3 | |||
4 | This file is free software; you can redistribute it and/or modify it | ||
5 | under the terms of the GNU General Public License as published by the | ||
6 | Free Software Foundation; either version 2, or (at your option) any | ||
7 | later version. | ||
8 | |||
9 | In addition to the permissions in the GNU General Public License, the | ||
10 | Free Software Foundation gives you unlimited permission to link the | ||
11 | compiled version of this file into combinations with other programs, | ||
12 | and to distribute those combinations without any restriction coming | ||
13 | from the use of this file. (The General Public License restrictions | ||
14 | do apply in other respects; for example, they cover modification of | ||
15 | the file, and distribution when not linked into a combine | ||
16 | executable.) | ||
17 | |||
18 | This file is distributed in the hope that it will be useful, but | ||
19 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
21 | General Public License for more details. | ||
22 | |||
23 | You should have received a copy of the GNU General Public License | ||
24 | along with this program; see the file COPYING. If not, write to | ||
25 | the Free Software Foundation, 51 Franklin Street, Fifth Floor, | ||
26 | Boston, MA 02110-1301, USA. */ | ||
27 | |||
28 | |||
29 | #include <linux/linkage.h> | ||
30 | |||
31 | #ifdef __ARMEB__ | ||
32 | #define al r1 | ||
33 | #define ah r0 | ||
34 | #else | ||
35 | #define al r0 | ||
36 | #define ah r1 | ||
37 | #endif | ||
38 | |||
39 | ENTRY(__ashldi3) | ||
40 | |||
41 | subs r3, r2, #32 | ||
42 | rsb ip, r2, #32 | ||
43 | movmi ah, ah, lsl r2 | ||
44 | movpl ah, al, lsl r3 | ||
45 | orrmi ah, ah, al, lsr ip | ||
46 | mov al, al, lsl r2 | ||
47 | mov pc, lr | ||
48 | |||
diff --git a/arch/arm/lib/ashldi3.c b/arch/arm/lib/ashldi3.c deleted file mode 100644 index b62875cfd8f8..000000000000 --- a/arch/arm/lib/ashldi3.c +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* More subroutines needed by GCC output code on some machines. */ | ||
2 | /* Compile this one with gcc. */ | ||
3 | /* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. | ||
4 | |||
5 | This file is part of GNU CC. | ||
6 | |||
7 | GNU CC 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, or (at your option) | ||
10 | any later version. | ||
11 | |||
12 | GNU CC 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 GNU CC; see the file COPYING. If not, write to | ||
19 | the Free Software Foundation, 59 Temple Place - Suite 330, | ||
20 | Boston, MA 02111-1307, USA. */ | ||
21 | |||
22 | /* As a special exception, if you link this library with other files, | ||
23 | some of which are compiled with GCC, to produce an executable, | ||
24 | this library does not by itself cause the resulting executable | ||
25 | to be covered by the GNU General Public License. | ||
26 | This exception does not however invalidate any other reasons why | ||
27 | the executable file might be covered by the GNU General Public License. | ||
28 | */ | ||
29 | /* support functions required by the kernel. based on code from gcc-2.95.3 */ | ||
30 | /* I Molton 29/07/01 */ | ||
31 | |||
32 | #include "gcclib.h" | ||
33 | |||
34 | s64 __ashldi3(s64 u, int b) | ||
35 | { | ||
36 | DIunion w; | ||
37 | int bm; | ||
38 | DIunion uu; | ||
39 | |||
40 | if (b == 0) | ||
41 | return u; | ||
42 | |||
43 | uu.ll = u; | ||
44 | |||
45 | bm = (sizeof(s32) * BITS_PER_UNIT) - b; | ||
46 | if (bm <= 0) { | ||
47 | w.s.low = 0; | ||
48 | w.s.high = (u32) uu.s.low << -bm; | ||
49 | } else { | ||
50 | u32 carries = (u32) uu.s.low >> bm; | ||
51 | w.s.low = (u32) uu.s.low << b; | ||
52 | w.s.high = ((u32) uu.s.high << b) | carries; | ||
53 | } | ||
54 | |||
55 | return w.ll; | ||
56 | } | ||
diff --git a/arch/arm/lib/ashrdi3.S b/arch/arm/lib/ashrdi3.S new file mode 100644 index 000000000000..86fb2a90c301 --- /dev/null +++ b/arch/arm/lib/ashrdi3.S | |||
@@ -0,0 +1,48 @@ | |||
1 | /* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005 | ||
2 | Free Software Foundation, Inc. | ||
3 | |||
4 | This file is free software; you can redistribute it and/or modify it | ||
5 | under the terms of the GNU General Public License as published by the | ||
6 | Free Software Foundation; either version 2, or (at your option) any | ||
7 | later version. | ||
8 | |||
9 | In addition to the permissions in the GNU General Public License, the | ||
10 | Free Software Foundation gives you unlimited permission to link the | ||
11 | compiled version of this file into combinations with other programs, | ||
12 | and to distribute those combinations without any restriction coming | ||
13 | from the use of this file. (The General Public License restrictions | ||
14 | do apply in other respects; for example, they cover modification of | ||
15 | the file, and distribution when not linked into a combine | ||
16 | executable.) | ||
17 | |||
18 | This file is distributed in the hope that it will be useful, but | ||
19 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
21 | General Public License for more details. | ||
22 | |||
23 | You should have received a copy of the GNU General Public License | ||
24 | along with this program; see the file COPYING. If not, write to | ||
25 | the Free Software Foundation, 51 Franklin Street, Fifth Floor, | ||
26 | Boston, MA 02110-1301, USA. */ | ||
27 | |||
28 | |||
29 | #include <linux/linkage.h> | ||
30 | |||
31 | #ifdef __ARMEB__ | ||
32 | #define al r1 | ||
33 | #define ah r0 | ||
34 | #else | ||
35 | #define al r0 | ||
36 | #define ah r1 | ||
37 | #endif | ||
38 | |||
39 | ENTRY(__ashrdi3) | ||
40 | |||
41 | subs r3, r2, #32 | ||
42 | rsb ip, r2, #32 | ||
43 | movmi al, al, lsr r2 | ||
44 | movpl al, ah, asr r3 | ||
45 | orrmi al, al, ah, lsl ip | ||
46 | mov ah, ah, asr r2 | ||
47 | mov pc, lr | ||
48 | |||
diff --git a/arch/arm/lib/ashrdi3.c b/arch/arm/lib/ashrdi3.c deleted file mode 100644 index 9a8600a7543f..000000000000 --- a/arch/arm/lib/ashrdi3.c +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* More subroutines needed by GCC output code on some machines. */ | ||
2 | /* Compile this one with gcc. */ | ||
3 | /* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. | ||
4 | |||
5 | This file is part of GNU CC. | ||
6 | |||
7 | GNU CC 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, or (at your option) | ||
10 | any later version. | ||
11 | |||
12 | GNU CC 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 GNU CC; see the file COPYING. If not, write to | ||
19 | the Free Software Foundation, 59 Temple Place - Suite 330, | ||
20 | Boston, MA 02111-1307, USA. */ | ||
21 | |||
22 | /* As a special exception, if you link this library with other files, | ||
23 | some of which are compiled with GCC, to produce an executable, | ||
24 | this library does not by itself cause the resulting executable | ||
25 | to be covered by the GNU General Public License. | ||
26 | This exception does not however invalidate any other reasons why | ||
27 | the executable file might be covered by the GNU General Public License. | ||
28 | */ | ||
29 | /* support functions required by the kernel. based on code from gcc-2.95.3 */ | ||
30 | /* I Molton 29/07/01 */ | ||
31 | |||
32 | #include "gcclib.h" | ||
33 | |||
34 | s64 __ashrdi3(s64 u, int b) | ||
35 | { | ||
36 | DIunion w; | ||
37 | int bm; | ||
38 | DIunion uu; | ||
39 | |||
40 | if (b == 0) | ||
41 | return u; | ||
42 | |||
43 | uu.ll = u; | ||
44 | |||
45 | bm = (sizeof(s32) * BITS_PER_UNIT) - b; | ||
46 | if (bm <= 0) { | ||
47 | /* w.s.high = 1..1 or 0..0 */ | ||
48 | w.s.high = uu.s.high >> (sizeof(s32) * BITS_PER_UNIT - 1); | ||
49 | w.s.low = uu.s.high >> -bm; | ||
50 | } else { | ||
51 | u32 carries = (u32) uu.s.high << bm; | ||
52 | w.s.high = uu.s.high >> b; | ||
53 | w.s.low = ((u32) uu.s.low >> b) | carries; | ||
54 | } | ||
55 | |||
56 | return w.ll; | ||
57 | } | ||
diff --git a/arch/arm/lib/gcclib.h b/arch/arm/lib/gcclib.h deleted file mode 100644 index 8b6dcc656de7..000000000000 --- a/arch/arm/lib/gcclib.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* gcclib.h -- definitions for various functions 'borrowed' from gcc-2.95.3 */ | ||
2 | /* I Molton 29/07/01 */ | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | #define BITS_PER_UNIT 8 | ||
7 | #define SI_TYPE_SIZE (sizeof(s32) * BITS_PER_UNIT) | ||
8 | |||
9 | #ifdef __ARMEB__ | ||
10 | struct DIstruct { | ||
11 | s32 high, low; | ||
12 | }; | ||
13 | #else | ||
14 | struct DIstruct { | ||
15 | s32 low, high; | ||
16 | }; | ||
17 | #endif | ||
18 | |||
19 | typedef union { | ||
20 | struct DIstruct s; | ||
21 | s64 ll; | ||
22 | } DIunion; | ||
diff --git a/arch/arm/lib/lshrdi3.S b/arch/arm/lib/lshrdi3.S new file mode 100644 index 000000000000..46c2ed19ec95 --- /dev/null +++ b/arch/arm/lib/lshrdi3.S | |||
@@ -0,0 +1,48 @@ | |||
1 | /* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005 | ||
2 | Free Software Foundation, Inc. | ||
3 | |||
4 | This file is free software; you can redistribute it and/or modify it | ||
5 | under the terms of the GNU General Public License as published by the | ||
6 | Free Software Foundation; either version 2, or (at your option) any | ||
7 | later version. | ||
8 | |||
9 | In addition to the permissions in the GNU General Public License, the | ||
10 | Free Software Foundation gives you unlimited permission to link the | ||
11 | compiled version of this file into combinations with other programs, | ||
12 | and to distribute those combinations without any restriction coming | ||
13 | from the use of this file. (The General Public License restrictions | ||
14 | do apply in other respects; for example, they cover modification of | ||
15 | the file, and distribution when not linked into a combine | ||
16 | executable.) | ||
17 | |||
18 | This file is distributed in the hope that it will be useful, but | ||
19 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
21 | General Public License for more details. | ||
22 | |||
23 | You should have received a copy of the GNU General Public License | ||
24 | along with this program; see the file COPYING. If not, write to | ||
25 | the Free Software Foundation, 51 Franklin Street, Fifth Floor, | ||
26 | Boston, MA 02110-1301, USA. */ | ||
27 | |||
28 | |||
29 | #include <linux/linkage.h> | ||
30 | |||
31 | #ifdef __ARMEB__ | ||
32 | #define al r1 | ||
33 | #define ah r0 | ||
34 | #else | ||
35 | #define al r0 | ||
36 | #define ah r1 | ||
37 | #endif | ||
38 | |||
39 | ENTRY(__lshrdi3) | ||
40 | |||
41 | subs r3, r2, #32 | ||
42 | rsb ip, r2, #32 | ||
43 | movmi al, al, lsr r2 | ||
44 | movpl al, ah, lsr r3 | ||
45 | orrmi al, al, ah, lsl ip | ||
46 | mov ah, ah, lsr r2 | ||
47 | mov pc, lr | ||
48 | |||
diff --git a/arch/arm/lib/lshrdi3.c b/arch/arm/lib/lshrdi3.c deleted file mode 100644 index 3681f49d2b6e..000000000000 --- a/arch/arm/lib/lshrdi3.c +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* More subroutines needed by GCC output code on some machines. */ | ||
2 | /* Compile this one with gcc. */ | ||
3 | /* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. | ||
4 | |||
5 | This file is part of GNU CC. | ||
6 | |||
7 | GNU CC 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, or (at your option) | ||
10 | any later version. | ||
11 | |||
12 | GNU CC 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 GNU CC; see the file COPYING. If not, write to | ||
19 | the Free Software Foundation, 59 Temple Place - Suite 330, | ||
20 | Boston, MA 02111-1307, USA. */ | ||
21 | |||
22 | /* As a special exception, if you link this library with other files, | ||
23 | some of which are compiled with GCC, to produce an executable, | ||
24 | this library does not by itself cause the resulting executable | ||
25 | to be covered by the GNU General Public License. | ||
26 | This exception does not however invalidate any other reasons why | ||
27 | the executable file might be covered by the GNU General Public License. | ||
28 | */ | ||
29 | /* support functions required by the kernel. based on code from gcc-2.95.3 */ | ||
30 | /* I Molton 29/07/01 */ | ||
31 | |||
32 | #include "gcclib.h" | ||
33 | |||
34 | s64 __lshrdi3(s64 u, int b) | ||
35 | { | ||
36 | DIunion w; | ||
37 | int bm; | ||
38 | DIunion uu; | ||
39 | |||
40 | if (b == 0) | ||
41 | return u; | ||
42 | |||
43 | uu.ll = u; | ||
44 | |||
45 | bm = (sizeof(s32) * BITS_PER_UNIT) - b; | ||
46 | if (bm <= 0) { | ||
47 | w.s.high = 0; | ||
48 | w.s.low = (u32) uu.s.high >> -bm; | ||
49 | } else { | ||
50 | u32 carries = (u32) uu.s.high << bm; | ||
51 | w.s.high = (u32) uu.s.high >> b; | ||
52 | w.s.low = ((u32) uu.s.low >> b) | carries; | ||
53 | } | ||
54 | |||
55 | return w.ll; | ||
56 | } | ||
diff --git a/arch/arm/lib/muldi3.S b/arch/arm/lib/muldi3.S new file mode 100644 index 000000000000..c7fbdf005319 --- /dev/null +++ b/arch/arm/lib/muldi3.S | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/muldi3.S | ||
3 | * | ||
4 | * Author: Nicolas Pitre | ||
5 | * Created: Oct 19, 2005 | ||
6 | * Copyright: Monta Vista Software, Inc. | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/linkage.h> | ||
14 | |||
15 | #ifdef __ARMEB__ | ||
16 | #define xh r0 | ||
17 | #define xl r1 | ||
18 | #define yh r2 | ||
19 | #define yl r3 | ||
20 | #else | ||
21 | #define xl r0 | ||
22 | #define xh r1 | ||
23 | #define yl r2 | ||
24 | #define yh r3 | ||
25 | #endif | ||
26 | |||
27 | ENTRY(__muldi3) | ||
28 | |||
29 | mul xh, yl, xh | ||
30 | mla xh, xl, yh, xh | ||
31 | mov ip, xl, asr #16 | ||
32 | mov yh, yl, asr #16 | ||
33 | bic xl, xl, ip, lsl #16 | ||
34 | bic yl, yl, yh, lsl #16 | ||
35 | mla xh, yh, ip, xh | ||
36 | mul yh, xl, yh | ||
37 | mul xl, yl, xl | ||
38 | mul ip, yl, ip | ||
39 | adds xl, xl, yh, lsl #16 | ||
40 | adc xh, xh, yh, lsr #16 | ||
41 | adds xl, xl, ip, lsl #16 | ||
42 | adc xh, xh, ip, lsr #16 | ||
43 | mov pc, lr | ||
44 | |||
diff --git a/arch/arm/lib/muldi3.c b/arch/arm/lib/muldi3.c deleted file mode 100644 index 0a3b93313f18..000000000000 --- a/arch/arm/lib/muldi3.c +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* More subroutines needed by GCC output code on some machines. */ | ||
2 | /* Compile this one with gcc. */ | ||
3 | /* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. | ||
4 | |||
5 | This file is part of GNU CC. | ||
6 | |||
7 | GNU CC 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, or (at your option) | ||
10 | any later version. | ||
11 | |||
12 | GNU CC 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 GNU CC; see the file COPYING. If not, write to | ||
19 | the Free Software Foundation, 59 Temple Place - Suite 330, | ||
20 | Boston, MA 02111-1307, USA. */ | ||
21 | |||
22 | /* As a special exception, if you link this library with other files, | ||
23 | some of which are compiled with GCC, to produce an executable, | ||
24 | this library does not by itself cause the resulting executable | ||
25 | to be covered by the GNU General Public License. | ||
26 | This exception does not however invalidate any other reasons why | ||
27 | the executable file might be covered by the GNU General Public License. | ||
28 | */ | ||
29 | /* support functions required by the kernel. based on code from gcc-2.95.3 */ | ||
30 | /* I Molton 29/07/01 */ | ||
31 | |||
32 | #include "gcclib.h" | ||
33 | |||
34 | #define umul_ppmm(xh, xl, a, b) \ | ||
35 | {register u32 __t0, __t1, __t2; \ | ||
36 | __asm__ ("%@ Inlined umul_ppmm \n\ | ||
37 | mov %2, %5, lsr #16 \n\ | ||
38 | mov %0, %6, lsr #16 \n\ | ||
39 | bic %3, %5, %2, lsl #16 \n\ | ||
40 | bic %4, %6, %0, lsl #16 \n\ | ||
41 | mul %1, %3, %4 \n\ | ||
42 | mul %4, %2, %4 \n\ | ||
43 | mul %3, %0, %3 \n\ | ||
44 | mul %0, %2, %0 \n\ | ||
45 | adds %3, %4, %3 \n\ | ||
46 | addcs %0, %0, #65536 \n\ | ||
47 | adds %1, %1, %3, lsl #16 \n\ | ||
48 | adc %0, %0, %3, lsr #16" \ | ||
49 | : "=&r" ((u32) (xh)), \ | ||
50 | "=r" ((u32) (xl)), \ | ||
51 | "=&r" (__t0), "=&r" (__t1), "=r" (__t2) \ | ||
52 | : "r" ((u32) (a)), \ | ||
53 | "r" ((u32) (b)));} | ||
54 | |||
55 | #define __umulsidi3(u, v) \ | ||
56 | ({DIunion __w; \ | ||
57 | umul_ppmm (__w.s.high, __w.s.low, u, v); \ | ||
58 | __w.ll; }) | ||
59 | |||
60 | s64 __muldi3(s64 u, s64 v) | ||
61 | { | ||
62 | DIunion w; | ||
63 | DIunion uu, vv; | ||
64 | |||
65 | uu.ll = u, vv.ll = v; | ||
66 | |||
67 | w.ll = __umulsidi3(uu.s.low, vv.s.low); | ||
68 | w.s.high += ((u32) uu.s.low * (u32) vv.s.high | ||
69 | + (u32) uu.s.high * (u32) vv.s.low); | ||
70 | |||
71 | return w.ll; | ||
72 | } | ||
diff --git a/arch/arm/lib/sha1.S b/arch/arm/lib/sha1.S new file mode 100644 index 000000000000..ff6ece487ffc --- /dev/null +++ b/arch/arm/lib/sha1.S | |||
@@ -0,0 +1,206 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/sha1.S | ||
3 | * | ||
4 | * SHA transform optimized for ARM | ||
5 | * | ||
6 | * Copyright: (C) 2005 by Nicolas Pitre <nico@cam.org> | ||
7 | * Created: September 17, 2005 | ||
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 version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * The reference implementation for this code is linux/lib/sha1.c | ||
14 | */ | ||
15 | |||
16 | #include <linux/linkage.h> | ||
17 | |||
18 | .text | ||
19 | |||
20 | |||
21 | /* | ||
22 | * void sha_transform(__u32 *digest, const char *in, __u32 *W) | ||
23 | * | ||
24 | * Note: the "in" ptr may be unaligned. | ||
25 | */ | ||
26 | |||
27 | ENTRY(sha_transform) | ||
28 | |||
29 | stmfd sp!, {r4 - r8, lr} | ||
30 | |||
31 | @ for (i = 0; i < 16; i++) | ||
32 | @ W[i] = be32_to_cpu(in[i]); */ | ||
33 | |||
34 | #ifdef __ARMEB__ | ||
35 | mov r4, r0 | ||
36 | mov r0, r2 | ||
37 | mov r2, #64 | ||
38 | bl memcpy | ||
39 | mov r2, r0 | ||
40 | mov r0, r4 | ||
41 | #else | ||
42 | mov r3, r2 | ||
43 | mov lr, #16 | ||
44 | 1: ldrb r4, [r1], #1 | ||
45 | ldrb r5, [r1], #1 | ||
46 | ldrb r6, [r1], #1 | ||
47 | ldrb r7, [r1], #1 | ||
48 | subs lr, lr, #1 | ||
49 | orr r5, r5, r4, lsl #8 | ||
50 | orr r6, r6, r5, lsl #8 | ||
51 | orr r7, r7, r6, lsl #8 | ||
52 | str r7, [r3], #4 | ||
53 | bne 1b | ||
54 | #endif | ||
55 | |||
56 | @ for (i = 0; i < 64; i++) | ||
57 | @ W[i+16] = ror(W[i+13] ^ W[i+8] ^ W[i+2] ^ W[i], 31); | ||
58 | |||
59 | sub r3, r2, #4 | ||
60 | mov lr, #64 | ||
61 | 2: ldr r4, [r3, #4]! | ||
62 | subs lr, lr, #1 | ||
63 | ldr r5, [r3, #8] | ||
64 | ldr r6, [r3, #32] | ||
65 | ldr r7, [r3, #52] | ||
66 | eor r4, r4, r5 | ||
67 | eor r4, r4, r6 | ||
68 | eor r4, r4, r7 | ||
69 | mov r4, r4, ror #31 | ||
70 | str r4, [r3, #64] | ||
71 | bne 2b | ||
72 | |||
73 | /* | ||
74 | * The SHA functions are: | ||
75 | * | ||
76 | * f1(B,C,D) = (D ^ (B & (C ^ D))) | ||
77 | * f2(B,C,D) = (B ^ C ^ D) | ||
78 | * f3(B,C,D) = ((B & C) | (D & (B | C))) | ||
79 | * | ||
80 | * Then the sub-blocks are processed as follows: | ||
81 | * | ||
82 | * A' = ror(A, 27) + f(B,C,D) + E + K + *W++ | ||
83 | * B' = A | ||
84 | * C' = ror(B, 2) | ||
85 | * D' = C | ||
86 | * E' = D | ||
87 | * | ||
88 | * We therefore unroll each loop 5 times to avoid register shuffling. | ||
89 | * Also the ror for C (and also D and E which are successivelyderived | ||
90 | * from it) is applied in place to cut on an additional mov insn for | ||
91 | * each round. | ||
92 | */ | ||
93 | |||
94 | .macro sha_f1, A, B, C, D, E | ||
95 | ldr r3, [r2], #4 | ||
96 | eor ip, \C, \D | ||
97 | add \E, r1, \E, ror #2 | ||
98 | and ip, \B, ip, ror #2 | ||
99 | add \E, \E, \A, ror #27 | ||
100 | eor ip, ip, \D, ror #2 | ||
101 | add \E, \E, r3 | ||
102 | add \E, \E, ip | ||
103 | .endm | ||
104 | |||
105 | .macro sha_f2, A, B, C, D, E | ||
106 | ldr r3, [r2], #4 | ||
107 | add \E, r1, \E, ror #2 | ||
108 | eor ip, \B, \C, ror #2 | ||
109 | add \E, \E, \A, ror #27 | ||
110 | eor ip, ip, \D, ror #2 | ||
111 | add \E, \E, r3 | ||
112 | add \E, \E, ip | ||
113 | .endm | ||
114 | |||
115 | .macro sha_f3, A, B, C, D, E | ||
116 | ldr r3, [r2], #4 | ||
117 | add \E, r1, \E, ror #2 | ||
118 | orr ip, \B, \C, ror #2 | ||
119 | add \E, \E, \A, ror #27 | ||
120 | and ip, ip, \D, ror #2 | ||
121 | add \E, \E, r3 | ||
122 | and r3, \B, \C, ror #2 | ||
123 | orr ip, ip, r3 | ||
124 | add \E, \E, ip | ||
125 | .endm | ||
126 | |||
127 | ldmia r0, {r4 - r8} | ||
128 | |||
129 | mov lr, #4 | ||
130 | ldr r1, .L_sha_K + 0 | ||
131 | |||
132 | /* adjust initial values */ | ||
133 | mov r6, r6, ror #30 | ||
134 | mov r7, r7, ror #30 | ||
135 | mov r8, r8, ror #30 | ||
136 | |||
137 | 3: subs lr, lr, #1 | ||
138 | sha_f1 r4, r5, r6, r7, r8 | ||
139 | sha_f1 r8, r4, r5, r6, r7 | ||
140 | sha_f1 r7, r8, r4, r5, r6 | ||
141 | sha_f1 r6, r7, r8, r4, r5 | ||
142 | sha_f1 r5, r6, r7, r8, r4 | ||
143 | bne 3b | ||
144 | |||
145 | ldr r1, .L_sha_K + 4 | ||
146 | mov lr, #4 | ||
147 | |||
148 | 4: subs lr, lr, #1 | ||
149 | sha_f2 r4, r5, r6, r7, r8 | ||
150 | sha_f2 r8, r4, r5, r6, r7 | ||
151 | sha_f2 r7, r8, r4, r5, r6 | ||
152 | sha_f2 r6, r7, r8, r4, r5 | ||
153 | sha_f2 r5, r6, r7, r8, r4 | ||
154 | bne 4b | ||
155 | |||
156 | ldr r1, .L_sha_K + 8 | ||
157 | mov lr, #4 | ||
158 | |||
159 | 5: subs lr, lr, #1 | ||
160 | sha_f3 r4, r5, r6, r7, r8 | ||
161 | sha_f3 r8, r4, r5, r6, r7 | ||
162 | sha_f3 r7, r8, r4, r5, r6 | ||
163 | sha_f3 r6, r7, r8, r4, r5 | ||
164 | sha_f3 r5, r6, r7, r8, r4 | ||
165 | bne 5b | ||
166 | |||
167 | ldr r1, .L_sha_K + 12 | ||
168 | mov lr, #4 | ||
169 | |||
170 | 6: subs lr, lr, #1 | ||
171 | sha_f2 r4, r5, r6, r7, r8 | ||
172 | sha_f2 r8, r4, r5, r6, r7 | ||
173 | sha_f2 r7, r8, r4, r5, r6 | ||
174 | sha_f2 r6, r7, r8, r4, r5 | ||
175 | sha_f2 r5, r6, r7, r8, r4 | ||
176 | bne 6b | ||
177 | |||
178 | ldmia r0, {r1, r2, r3, ip, lr} | ||
179 | add r4, r1, r4 | ||
180 | add r5, r2, r5 | ||
181 | add r6, r3, r6, ror #2 | ||
182 | add r7, ip, r7, ror #2 | ||
183 | add r8, lr, r8, ror #2 | ||
184 | stmia r0, {r4 - r8} | ||
185 | |||
186 | ldmfd sp!, {r4 - r8, pc} | ||
187 | |||
188 | .L_sha_K: | ||
189 | .word 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6 | ||
190 | |||
191 | |||
192 | /* | ||
193 | * void sha_init(__u32 *buf) | ||
194 | */ | ||
195 | |||
196 | .L_sha_initial_digest: | ||
197 | .word 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 | ||
198 | |||
199 | ENTRY(sha_init) | ||
200 | |||
201 | str lr, [sp, #-4]! | ||
202 | adr r1, .L_sha_initial_digest | ||
203 | ldmia r1, {r1, r2, r3, ip, lr} | ||
204 | stmia r0, {r1, r2, r3, ip, lr} | ||
205 | ldr pc, [sp], #4 | ||
206 | |||
diff --git a/arch/arm/lib/ucmpdi2.S b/arch/arm/lib/ucmpdi2.S new file mode 100644 index 000000000000..112630f93e5d --- /dev/null +++ b/arch/arm/lib/ucmpdi2.S | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/ucmpdi2.S | ||
3 | * | ||
4 | * Author: Nicolas Pitre | ||
5 | * Created: Oct 19, 2005 | ||
6 | * Copyright: Monta Vista Software, Inc. | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/linkage.h> | ||
14 | |||
15 | #ifdef __ARMEB__ | ||
16 | #define xh r0 | ||
17 | #define xl r1 | ||
18 | #define yh r2 | ||
19 | #define yl r3 | ||
20 | #else | ||
21 | #define xl r0 | ||
22 | #define xh r1 | ||
23 | #define yl r2 | ||
24 | #define yh r3 | ||
25 | #endif | ||
26 | |||
27 | ENTRY(__ucmpdi2) | ||
28 | |||
29 | cmp xh, yh | ||
30 | cmpeq xl, yl | ||
31 | movlo r0, #0 | ||
32 | moveq r0, #1 | ||
33 | movhi r0, #2 | ||
34 | mov pc, lr | ||
35 | |||
diff --git a/arch/arm/lib/ucmpdi2.c b/arch/arm/lib/ucmpdi2.c deleted file mode 100644 index 57f3f2df3850..000000000000 --- a/arch/arm/lib/ucmpdi2.c +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* More subroutines needed by GCC output code on some machines. */ | ||
2 | /* Compile this one with gcc. */ | ||
3 | /* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. | ||
4 | |||
5 | This file is part of GNU CC. | ||
6 | |||
7 | GNU CC 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, or (at your option) | ||
10 | any later version. | ||
11 | |||
12 | GNU CC 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 GNU CC; see the file COPYING. If not, write to | ||
19 | the Free Software Foundation, 59 Temple Place - Suite 330, | ||
20 | Boston, MA 02111-1307, USA. */ | ||
21 | |||
22 | /* As a special exception, if you link this library with other files, | ||
23 | some of which are compiled with GCC, to produce an executable, | ||
24 | this library does not by itself cause the resulting executable | ||
25 | to be covered by the GNU General Public License. | ||
26 | This exception does not however invalidate any other reasons why | ||
27 | the executable file might be covered by the GNU General Public License. | ||
28 | */ | ||
29 | /* support functions required by the kernel. based on code from gcc-2.95.3 */ | ||
30 | /* I Molton 29/07/01 */ | ||
31 | |||
32 | #include "gcclib.h" | ||
33 | |||
34 | int __ucmpdi2(s64 a, s64 b) | ||
35 | { | ||
36 | DIunion au, bu; | ||
37 | |||
38 | au.ll = a, bu.ll = b; | ||
39 | |||
40 | if ((u32) au.s.high < (u32) bu.s.high) | ||
41 | return 0; | ||
42 | else if ((u32) au.s.high > (u32) bu.s.high) | ||
43 | return 2; | ||
44 | if ((u32) au.s.low < (u32) bu.s.low) | ||
45 | return 0; | ||
46 | else if ((u32) au.s.low > (u32) bu.s.low) | ||
47 | return 2; | ||
48 | return 1; | ||
49 | } | ||
diff --git a/arch/arm/mach-aaec2000/Makefile b/arch/arm/mach-aaec2000/Makefile index 20ec83896c37..a8e462f58bc9 100644 --- a/arch/arm/mach-aaec2000/Makefile +++ b/arch/arm/mach-aaec2000/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support (must be linked before board specific support) | 5 | # Common support (must be linked before board specific support) |
6 | obj-y += core.o | 6 | obj-y += core.o clock.o |
7 | 7 | ||
8 | # Specific board support | 8 | # Specific board support |
9 | obj-$(CONFIG_MACH_AAED2000) += aaed2000.o | 9 | obj-$(CONFIG_MACH_AAED2000) += aaed2000.o |
diff --git a/arch/arm/mach-aaec2000/aaed2000.c b/arch/arm/mach-aaec2000/aaed2000.c index c9d899886648..f5ef69702296 100644 --- a/arch/arm/mach-aaec2000/aaed2000.c +++ b/arch/arm/mach-aaec2000/aaed2000.c | |||
@@ -27,16 +27,65 @@ | |||
27 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
28 | #include <asm/mach/irq.h> | 28 | #include <asm/mach/irq.h> |
29 | 29 | ||
30 | #include <asm/arch/aaed2000.h> | ||
31 | |||
30 | #include "core.h" | 32 | #include "core.h" |
31 | 33 | ||
34 | static void aaed2000_clcd_disable(struct clcd_fb *fb) | ||
35 | { | ||
36 | AAED_EXT_GPIO &= ~AAED_EGPIO_LCD_PWR_EN; | ||
37 | } | ||
38 | |||
39 | static void aaed2000_clcd_enable(struct clcd_fb *fb) | ||
40 | { | ||
41 | AAED_EXT_GPIO |= AAED_EGPIO_LCD_PWR_EN; | ||
42 | } | ||
43 | |||
44 | struct aaec2000_clcd_info clcd_info = { | ||
45 | .enable = aaed2000_clcd_enable, | ||
46 | .disable = aaed2000_clcd_disable, | ||
47 | .panel = { | ||
48 | .mode = { | ||
49 | .name = "Sharp", | ||
50 | .refresh = 60, | ||
51 | .xres = 640, | ||
52 | .yres = 480, | ||
53 | .pixclock = 39721, | ||
54 | .left_margin = 20, | ||
55 | .right_margin = 44, | ||
56 | .upper_margin = 21, | ||
57 | .lower_margin = 34, | ||
58 | .hsync_len = 96, | ||
59 | .vsync_len = 2, | ||
60 | .sync = 0, | ||
61 | .vmode = FB_VMODE_NONINTERLACED, | ||
62 | }, | ||
63 | .width = -1, | ||
64 | .height = -1, | ||
65 | .tim2 = TIM2_IVS | TIM2_IHS, | ||
66 | .cntl = CNTL_LCDTFT, | ||
67 | .bpp = 16, | ||
68 | }, | ||
69 | }; | ||
70 | |||
32 | static void __init aaed2000_init_irq(void) | 71 | static void __init aaed2000_init_irq(void) |
33 | { | 72 | { |
34 | aaec2000_init_irq(); | 73 | aaec2000_init_irq(); |
35 | } | 74 | } |
36 | 75 | ||
76 | static void __init aaed2000_init(void) | ||
77 | { | ||
78 | aaec2000_set_clcd_plat_data(&clcd_info); | ||
79 | } | ||
80 | |||
81 | static struct map_desc aaed2000_io_desc[] __initdata = { | ||
82 | { EXT_GPIO_VBASE, EXT_GPIO_PBASE, EXT_GPIO_LENGTH, MT_DEVICE }, /* Ext GPIO */ | ||
83 | }; | ||
84 | |||
37 | static void __init aaed2000_map_io(void) | 85 | static void __init aaed2000_map_io(void) |
38 | { | 86 | { |
39 | aaec2000_map_io(); | 87 | aaec2000_map_io(); |
88 | iotable_init(aaed2000_io_desc, ARRAY_SIZE(aaed2000_io_desc)); | ||
40 | } | 89 | } |
41 | 90 | ||
42 | MACHINE_START(AAED2000, "Agilent AAED-2000 Development Platform") | 91 | MACHINE_START(AAED2000, "Agilent AAED-2000 Development Platform") |
@@ -47,4 +96,5 @@ MACHINE_START(AAED2000, "Agilent AAED-2000 Development Platform") | |||
47 | .map_io = aaed2000_map_io, | 96 | .map_io = aaed2000_map_io, |
48 | .init_irq = aaed2000_init_irq, | 97 | .init_irq = aaed2000_init_irq, |
49 | .timer = &aaec2000_timer, | 98 | .timer = &aaec2000_timer, |
99 | .init_machine = aaed2000_init, | ||
50 | MACHINE_END | 100 | MACHINE_END |
diff --git a/arch/arm/mach-aaec2000/clock.c b/arch/arm/mach-aaec2000/clock.c new file mode 100644 index 000000000000..99e019169dda --- /dev/null +++ b/arch/arm/mach-aaec2000/clock.c | |||
@@ -0,0 +1,110 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-aaec2000/clock.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Nicolas Bellido Y Ortega | ||
5 | * | ||
6 | * Based on linux/arch/arm/mach-integrator/clock.c | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/list.h> | ||
15 | #include <linux/errno.h> | ||
16 | #include <linux/err.h> | ||
17 | |||
18 | #include <asm/semaphore.h> | ||
19 | #include <asm/hardware/clock.h> | ||
20 | |||
21 | #include "clock.h" | ||
22 | |||
23 | static LIST_HEAD(clocks); | ||
24 | static DECLARE_MUTEX(clocks_sem); | ||
25 | |||
26 | struct clk *clk_get(struct device *dev, const char *id) | ||
27 | { | ||
28 | struct clk *p, *clk = ERR_PTR(-ENOENT); | ||
29 | |||
30 | down(&clocks_sem); | ||
31 | list_for_each_entry(p, &clocks, node) { | ||
32 | if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { | ||
33 | clk = p; | ||
34 | break; | ||
35 | } | ||
36 | } | ||
37 | up(&clocks_sem); | ||
38 | |||
39 | return clk; | ||
40 | } | ||
41 | EXPORT_SYMBOL(clk_get); | ||
42 | |||
43 | void clk_put(struct clk *clk) | ||
44 | { | ||
45 | module_put(clk->owner); | ||
46 | } | ||
47 | EXPORT_SYMBOL(clk_put); | ||
48 | |||
49 | int clk_enable(struct clk *clk) | ||
50 | { | ||
51 | return 0; | ||
52 | } | ||
53 | EXPORT_SYMBOL(clk_enable); | ||
54 | |||
55 | void clk_disable(struct clk *clk) | ||
56 | { | ||
57 | } | ||
58 | EXPORT_SYMBOL(clk_disable); | ||
59 | |||
60 | int clk_use(struct clk *clk) | ||
61 | { | ||
62 | return 0; | ||
63 | } | ||
64 | EXPORT_SYMBOL(clk_use); | ||
65 | |||
66 | void clk_unuse(struct clk *clk) | ||
67 | { | ||
68 | } | ||
69 | EXPORT_SYMBOL(clk_unuse); | ||
70 | |||
71 | unsigned long clk_get_rate(struct clk *clk) | ||
72 | { | ||
73 | return clk->rate; | ||
74 | } | ||
75 | EXPORT_SYMBOL(clk_get_rate); | ||
76 | |||
77 | long clk_round_rate(struct clk *clk, unsigned long rate) | ||
78 | { | ||
79 | return rate; | ||
80 | } | ||
81 | EXPORT_SYMBOL(clk_round_rate); | ||
82 | |||
83 | int clk_set_rate(struct clk *clk, unsigned long rate) | ||
84 | { | ||
85 | return 0; | ||
86 | } | ||
87 | EXPORT_SYMBOL(clk_set_rate); | ||
88 | |||
89 | int clk_register(struct clk *clk) | ||
90 | { | ||
91 | down(&clocks_sem); | ||
92 | list_add(&clk->node, &clocks); | ||
93 | up(&clocks_sem); | ||
94 | return 0; | ||
95 | } | ||
96 | EXPORT_SYMBOL(clk_register); | ||
97 | |||
98 | void clk_unregister(struct clk *clk) | ||
99 | { | ||
100 | down(&clocks_sem); | ||
101 | list_del(&clk->node); | ||
102 | up(&clocks_sem); | ||
103 | } | ||
104 | EXPORT_SYMBOL(clk_unregister); | ||
105 | |||
106 | static int __init clk_init(void) | ||
107 | { | ||
108 | return 0; | ||
109 | } | ||
110 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-aaec2000/clock.h b/arch/arm/mach-aaec2000/clock.h new file mode 100644 index 000000000000..d4bb74ff613f --- /dev/null +++ b/arch/arm/mach-aaec2000/clock.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-aaec2000/clock.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Nicolas Bellido Y Ortega | ||
5 | * | ||
6 | * Based on linux/arch/arm/mach-integrator/clock.h | ||
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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | struct module; | ||
13 | |||
14 | struct clk { | ||
15 | struct list_head node; | ||
16 | unsigned long rate; | ||
17 | struct module *owner; | ||
18 | const char *name; | ||
19 | void *data; | ||
20 | }; | ||
21 | |||
22 | int clk_register(struct clk *clk); | ||
23 | void clk_unregister(struct clk *clk); | ||
diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c index aece0cd4f0a3..0c53dab80905 100644 --- a/arch/arm/mach-aaec2000/core.c +++ b/arch/arm/mach-aaec2000/core.c | |||
@@ -13,19 +13,27 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/device.h> | ||
16 | #include <linux/list.h> | 17 | #include <linux/list.h> |
17 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/dma-mapping.h> | ||
18 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
19 | #include <linux/timex.h> | 21 | #include <linux/timex.h> |
20 | #include <linux/signal.h> | 22 | #include <linux/signal.h> |
21 | 23 | ||
22 | #include <asm/hardware.h> | 24 | #include <asm/hardware.h> |
23 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
26 | #include <asm/sizes.h> | ||
27 | #include <asm/hardware/amba.h> | ||
24 | 28 | ||
29 | #include <asm/mach/flash.h> | ||
25 | #include <asm/mach/irq.h> | 30 | #include <asm/mach/irq.h> |
26 | #include <asm/mach/time.h> | 31 | #include <asm/mach/time.h> |
27 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
28 | 33 | ||
34 | #include "core.h" | ||
35 | #include "clock.h" | ||
36 | |||
29 | /* | 37 | /* |
30 | * Common I/O mapping: | 38 | * Common I/O mapping: |
31 | * | 39 | * |
@@ -40,9 +48,17 @@ | |||
40 | * default mapping provided here. | 48 | * default mapping provided here. |
41 | */ | 49 | */ |
42 | static struct map_desc standard_io_desc[] __initdata = { | 50 | static struct map_desc standard_io_desc[] __initdata = { |
43 | /* virtual physical length type */ | 51 | { |
44 | { VIO_APB_BASE, PIO_APB_BASE, IO_APB_LENGTH, MT_DEVICE }, | 52 | .virtual = VIO_APB_BASE, |
45 | { VIO_AHB_BASE, PIO_AHB_BASE, IO_AHB_LENGTH, MT_DEVICE } | 53 | .physical = __phys_to_pfn(PIO_APB_BASE), |
54 | .length = IO_APB_LENGTH, | ||
55 | .type = MT_DEVICE | ||
56 | }, { | ||
57 | .virtual = VIO_AHB_BASE, | ||
58 | .physical = __phys_to_pfn(PIO_AHB_BASE), | ||
59 | .length = IO_AHB_LENGTH, | ||
60 | .type = MT_DEVICE | ||
61 | } | ||
46 | }; | 62 | }; |
47 | 63 | ||
48 | void __init aaec2000_map_io(void) | 64 | void __init aaec2000_map_io(void) |
@@ -155,3 +171,116 @@ struct sys_timer aaec2000_timer = { | |||
155 | .offset = aaec2000_gettimeoffset, | 171 | .offset = aaec2000_gettimeoffset, |
156 | }; | 172 | }; |
157 | 173 | ||
174 | static struct clcd_panel mach_clcd_panel; | ||
175 | |||
176 | static int aaec2000_clcd_setup(struct clcd_fb *fb) | ||
177 | { | ||
178 | dma_addr_t dma; | ||
179 | |||
180 | fb->panel = &mach_clcd_panel; | ||
181 | |||
182 | fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, SZ_1M, | ||
183 | &dma, GFP_KERNEL); | ||
184 | |||
185 | if (!fb->fb.screen_base) { | ||
186 | printk(KERN_ERR "CLCD: unable to map framebuffer\n"); | ||
187 | return -ENOMEM; | ||
188 | } | ||
189 | |||
190 | fb->fb.fix.smem_start = dma; | ||
191 | fb->fb.fix.smem_len = SZ_1M; | ||
192 | |||
193 | return 0; | ||
194 | } | ||
195 | |||
196 | static int aaec2000_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma) | ||
197 | { | ||
198 | return dma_mmap_writecombine(&fb->dev->dev, vma, | ||
199 | fb->fb.screen_base, | ||
200 | fb->fb.fix.smem_start, | ||
201 | fb->fb.fix.smem_len); | ||
202 | } | ||
203 | |||
204 | static void aaec2000_clcd_remove(struct clcd_fb *fb) | ||
205 | { | ||
206 | dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len, | ||
207 | fb->fb.screen_base, fb->fb.fix.smem_start); | ||
208 | } | ||
209 | |||
210 | static struct clcd_board clcd_plat_data = { | ||
211 | .name = "AAEC-2000", | ||
212 | .check = clcdfb_check, | ||
213 | .decode = clcdfb_decode, | ||
214 | .setup = aaec2000_clcd_setup, | ||
215 | .mmap = aaec2000_clcd_mmap, | ||
216 | .remove = aaec2000_clcd_remove, | ||
217 | }; | ||
218 | |||
219 | static struct amba_device clcd_device = { | ||
220 | .dev = { | ||
221 | .bus_id = "mb:16", | ||
222 | .coherent_dma_mask = ~0, | ||
223 | .platform_data = &clcd_plat_data, | ||
224 | }, | ||
225 | .res = { | ||
226 | .start = AAEC_CLCD_PHYS, | ||
227 | .end = AAEC_CLCD_PHYS + SZ_4K - 1, | ||
228 | .flags = IORESOURCE_MEM, | ||
229 | }, | ||
230 | .irq = { INT_LCD, NO_IRQ }, | ||
231 | .periphid = 0x41110, | ||
232 | }; | ||
233 | |||
234 | static struct amba_device *amba_devs[] __initdata = { | ||
235 | &clcd_device, | ||
236 | }; | ||
237 | |||
238 | static struct clk aaec2000_clcd_clk = { | ||
239 | .name = "CLCDCLK", | ||
240 | }; | ||
241 | |||
242 | void __init aaec2000_set_clcd_plat_data(struct aaec2000_clcd_info *clcd) | ||
243 | { | ||
244 | clcd_plat_data.enable = clcd->enable; | ||
245 | clcd_plat_data.disable = clcd->disable; | ||
246 | memcpy(&mach_clcd_panel, &clcd->panel, sizeof(struct clcd_panel)); | ||
247 | } | ||
248 | |||
249 | static struct flash_platform_data aaec2000_flash_data = { | ||
250 | .map_name = "cfi_probe", | ||
251 | .width = 4, | ||
252 | }; | ||
253 | |||
254 | static struct resource aaec2000_flash_resource = { | ||
255 | .start = AAEC_FLASH_BASE, | ||
256 | .end = AAEC_FLASH_BASE + AAEC_FLASH_SIZE, | ||
257 | .flags = IORESOURCE_MEM, | ||
258 | }; | ||
259 | |||
260 | static struct platform_device aaec2000_flash_device = { | ||
261 | .name = "armflash", | ||
262 | .id = 0, | ||
263 | .dev = { | ||
264 | .platform_data = &aaec2000_flash_data, | ||
265 | }, | ||
266 | .num_resources = 1, | ||
267 | .resource = &aaec2000_flash_resource, | ||
268 | }; | ||
269 | |||
270 | static int __init aaec2000_init(void) | ||
271 | { | ||
272 | int i; | ||
273 | |||
274 | clk_register(&aaec2000_clcd_clk); | ||
275 | |||
276 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | ||
277 | struct amba_device *d = amba_devs[i]; | ||
278 | amba_device_register(d, &iomem_resource); | ||
279 | } | ||
280 | |||
281 | platform_device_register(&aaec2000_flash_device); | ||
282 | |||
283 | return 0; | ||
284 | }; | ||
285 | arch_initcall(aaec2000_init); | ||
286 | |||
diff --git a/arch/arm/mach-aaec2000/core.h b/arch/arm/mach-aaec2000/core.h index 91893d848c16..daefc0ea14a1 100644 --- a/arch/arm/mach-aaec2000/core.h +++ b/arch/arm/mach-aaec2000/core.h | |||
@@ -9,8 +9,19 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <asm/hardware/amba_clcd.h> | ||
13 | |||
12 | struct sys_timer; | 14 | struct sys_timer; |
13 | 15 | ||
14 | extern struct sys_timer aaec2000_timer; | 16 | extern struct sys_timer aaec2000_timer; |
15 | extern void __init aaec2000_map_io(void); | 17 | extern void __init aaec2000_map_io(void); |
16 | extern void __init aaec2000_init_irq(void); | 18 | extern void __init aaec2000_init_irq(void); |
19 | |||
20 | struct aaec2000_clcd_info { | ||
21 | struct clcd_panel panel; | ||
22 | void (*disable)(struct clcd_fb *); | ||
23 | void (*enable)(struct clcd_fb *); | ||
24 | }; | ||
25 | |||
26 | extern void __init aaec2000_set_clcd_plat_data(struct aaec2000_clcd_info *); | ||
27 | |||
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig index 0793dcf54f2e..d5c155045762 100644 --- a/arch/arm/mach-clps711x/Kconfig +++ b/arch/arm/mach-clps711x/Kconfig | |||
@@ -69,6 +69,17 @@ config EP72XX_ROM_BOOT | |||
69 | 69 | ||
70 | You almost surely want to say N here. | 70 | You almost surely want to say N here. |
71 | 71 | ||
72 | config MACH_MP1000 | ||
73 | bool "MACH_MP1000" | ||
74 | help | ||
75 | Say Y if you intend to run the kernel on the Comdial MP1000 platform. | ||
76 | |||
77 | config MP1000_90MHZ | ||
78 | bool "MP1000_90MHZ" | ||
79 | depends on MACH_MP1000 | ||
80 | help | ||
81 | Say Y if you have the MP1000 configured to be set at 90MHZ rather than 74MHZ | ||
82 | |||
72 | endmenu | 83 | endmenu |
73 | 84 | ||
74 | endif | 85 | endif |
diff --git a/arch/arm/mach-clps711x/Makefile b/arch/arm/mach-clps711x/Makefile index 4a197315f0cf..8a6dc1ccf8fe 100644 --- a/arch/arm/mach-clps711x/Makefile +++ b/arch/arm/mach-clps711x/Makefile | |||
@@ -15,6 +15,7 @@ obj-$(CONFIG_ARCH_CDB89712) += cdb89712.o | |||
15 | obj-$(CONFIG_ARCH_CLEP7312) += clep7312.o | 15 | obj-$(CONFIG_ARCH_CLEP7312) += clep7312.o |
16 | obj-$(CONFIG_ARCH_EDB7211) += edb7211-arch.o edb7211-mm.o | 16 | obj-$(CONFIG_ARCH_EDB7211) += edb7211-arch.o edb7211-mm.o |
17 | obj-$(CONFIG_ARCH_FORTUNET) += fortunet.o | 17 | obj-$(CONFIG_ARCH_FORTUNET) += fortunet.o |
18 | obj-$(CONFIG_MACH_MP1000) += mp1000-mach.o mp1000-mm.o mp1000-seprom.o | ||
18 | obj-$(CONFIG_ARCH_P720T) += p720t.o | 19 | obj-$(CONFIG_ARCH_P720T) += p720t.o |
19 | leds-$(CONFIG_ARCH_P720T) += p720t-leds.o | 20 | leds-$(CONFIG_ARCH_P720T) += p720t-leds.o |
20 | obj-$(CONFIG_LEDS) += $(leds-y) | 21 | obj-$(CONFIG_LEDS) += $(leds-y) |
diff --git a/arch/arm/mach-clps711x/autcpu12.c b/arch/arm/mach-clps711x/autcpu12.c index dc73feb1ffb0..43b9423d1440 100644 --- a/arch/arm/mach-clps711x/autcpu12.c +++ b/arch/arm/mach-clps711x/autcpu12.c | |||
@@ -46,10 +46,14 @@ | |||
46 | */ | 46 | */ |
47 | 47 | ||
48 | static struct map_desc autcpu12_io_desc[] __initdata = { | 48 | static struct map_desc autcpu12_io_desc[] __initdata = { |
49 | /* virtual, physical, length, type */ | 49 | /* memory-mapped extra io and CS8900A Ethernet chip */ |
50 | /* memory-mapped extra io and CS8900A Ethernet chip */ | 50 | /* ethernet chip */ |
51 | /* ethernet chip */ | 51 | { |
52 | { AUTCPU12_VIRT_CS8900A, AUTCPU12_PHYS_CS8900A, SZ_1M, MT_DEVICE } | 52 | .virtual = AUTCPU12_VIRT_CS8900A, |
53 | .pfn = __phys_to_pfn(AUTCPU12_PHYS_CS8900A), | ||
54 | .length = SZ_1M, | ||
55 | .type = MT_DEVICE | ||
56 | } | ||
53 | }; | 57 | }; |
54 | 58 | ||
55 | void __init autcpu12_map_io(void) | 59 | void __init autcpu12_map_io(void) |
diff --git a/arch/arm/mach-clps711x/cdb89712.c b/arch/arm/mach-clps711x/cdb89712.c index a46c82cd2711..cba7be5a06c3 100644 --- a/arch/arm/mach-clps711x/cdb89712.c +++ b/arch/arm/mach-clps711x/cdb89712.c | |||
@@ -39,7 +39,12 @@ | |||
39 | * ethernet driver, perhaps. | 39 | * ethernet driver, perhaps. |
40 | */ | 40 | */ |
41 | static struct map_desc cdb89712_io_desc[] __initdata = { | 41 | static struct map_desc cdb89712_io_desc[] __initdata = { |
42 | { ETHER_BASE, ETHER_START, ETHER_SIZE, MT_DEVICE } | 42 | { |
43 | .virtual = ETHER_BASE, | ||
44 | .pfn =__phys_to_pfn(ETHER_START), | ||
45 | .length = ETHER_SIZE, | ||
46 | .type = MT_DEVICE | ||
47 | } | ||
43 | }; | 48 | }; |
44 | 49 | ||
45 | static void __init cdb89712_map_io(void) | 50 | static void __init cdb89712_map_io(void) |
diff --git a/arch/arm/mach-clps711x/ceiva.c b/arch/arm/mach-clps711x/ceiva.c index 780d91805984..35d51a759b59 100644 --- a/arch/arm/mach-clps711x/ceiva.c +++ b/arch/arm/mach-clps711x/ceiva.c | |||
@@ -37,11 +37,13 @@ | |||
37 | #include "common.h" | 37 | #include "common.h" |
38 | 38 | ||
39 | static struct map_desc ceiva_io_desc[] __initdata = { | 39 | static struct map_desc ceiva_io_desc[] __initdata = { |
40 | /* virtual, physical, length, type */ | 40 | /* SED1355 controlled video RAM & registers */ |
41 | 41 | { | |
42 | /* SED1355 controlled video RAM & registers */ | 42 | .virtual = CEIVA_VIRT_SED1355, |
43 | { CEIVA_VIRT_SED1355, CEIVA_PHYS_SED1355, SZ_2M, MT_DEVICE } | 43 | .pfn = __phys_to_pfn(CEIVA_PHYS_SED1355), |
44 | 44 | .length = SZ_2M, | |
45 | .type = MT_DEVICE | ||
46 | } | ||
45 | }; | 47 | }; |
46 | 48 | ||
47 | 49 | ||
diff --git a/arch/arm/mach-clps711x/edb7211-mm.c b/arch/arm/mach-clps711x/edb7211-mm.c index 7fd7b01822d0..72f8bb05d55e 100644 --- a/arch/arm/mach-clps711x/edb7211-mm.c +++ b/arch/arm/mach-clps711x/edb7211-mm.c | |||
@@ -51,15 +51,27 @@ extern void clps711x_map_io(void); | |||
51 | * happens). | 51 | * happens). |
52 | */ | 52 | */ |
53 | static struct map_desc edb7211_io_desc[] __initdata = { | 53 | static struct map_desc edb7211_io_desc[] __initdata = { |
54 | /* virtual, physical, length, type */ | 54 | { /* memory-mapped extra keyboard row */ |
55 | 55 | .virtual = EP7211_VIRT_EXTKBD, | |
56 | /* memory-mapped extra keyboard row and CS8900A Ethernet chip */ | 56 | .pfn = __phys_to_pfn(EP7211_PHYS_EXTKBD), |
57 | { EP7211_VIRT_EXTKBD, EP7211_PHYS_EXTKBD, SZ_1M, MT_DEVICE }, | 57 | .length = SZ_1M, |
58 | { EP7211_VIRT_CS8900A, EP7211_PHYS_CS8900A, SZ_1M, MT_DEVICE }, | 58 | .type - MT_DEVICE |
59 | 59 | }, { /* and CS8900A Ethernet chip */ | |
60 | /* flash banks */ | 60 | .virtual = EP7211_VIRT_CS8900A, |
61 | { EP7211_VIRT_FLASH1, EP7211_PHYS_FLASH1, SZ_8M, MT_DEVICE }, | 61 | .pfn = __phys_to_pfn(EP7211_PHYS_CS8900A), |
62 | { EP7211_VIRT_FLASH2, EP7211_PHYS_FLASH2, SZ_8M, MT_DEVICE } | 62 | .length = SZ_1M, |
63 | .type = MT_DEVICE | ||
64 | }, { /* flash banks */ | ||
65 | .virtual = EP7211_VIRT_FLASH1, | ||
66 | .pfn = __phys_to_pfn(EP7211_PHYS_FLASH1), | ||
67 | .length = SZ_8M, | ||
68 | .type = MT_DEVICE | ||
69 | }, { | ||
70 | .virtual = EP7211_VIRT_FLASH2, | ||
71 | .pfn = __phys_to_pfn(EP7211_PHYS_FLASH2), | ||
72 | .length = SZ_8M, | ||
73 | .type = MT_DEVICE | ||
74 | } | ||
63 | }; | 75 | }; |
64 | 76 | ||
65 | void __init edb7211_map_io(void) | 77 | void __init edb7211_map_io(void) |
diff --git a/arch/arm/mach-clps711x/mm.c b/arch/arm/mach-clps711x/mm.c index 120b7cac84b5..a00f77ef8df8 100644 --- a/arch/arm/mach-clps711x/mm.c +++ b/arch/arm/mach-clps711x/mm.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/bootmem.h> | 25 | #include <linux/bootmem.h> |
26 | 26 | ||
27 | #include <asm/sizes.h> | ||
27 | #include <asm/hardware.h> | 28 | #include <asm/hardware.h> |
28 | #include <asm/pgtable.h> | 29 | #include <asm/pgtable.h> |
29 | #include <asm/page.h> | 30 | #include <asm/page.h> |
@@ -34,7 +35,12 @@ | |||
34 | * This maps the generic CLPS711x registers | 35 | * This maps the generic CLPS711x registers |
35 | */ | 36 | */ |
36 | static struct map_desc clps711x_io_desc[] __initdata = { | 37 | static struct map_desc clps711x_io_desc[] __initdata = { |
37 | { CLPS7111_VIRT_BASE, CLPS7111_PHYS_BASE, 1048576, MT_DEVICE } | 38 | { |
39 | .virtual = CLPS7111_VIRT_BASE, | ||
40 | .pfn = __phys_to_pfn(CLPS7111_PHYS_BASE), | ||
41 | .length = SZ_1M, | ||
42 | .type = MT_DEVICE | ||
43 | } | ||
38 | }; | 44 | }; |
39 | 45 | ||
40 | void __init clps711x_map_io(void) | 46 | void __init clps711x_map_io(void) |
diff --git a/arch/arm/mach-clps711x/mp1000-mach.c b/arch/arm/mach-clps711x/mp1000-mach.c new file mode 100644 index 000000000000..c2816bcde5e7 --- /dev/null +++ b/arch/arm/mach-clps711x/mp1000-mach.c | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-mp1000/mp1000.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Comdial Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/types.h> | ||
22 | #include <linux/string.h> | ||
23 | |||
24 | #include <asm/setup.h> | ||
25 | #include <asm/mach-types.h> | ||
26 | #include <asm/mach/arch.h> | ||
27 | #include <asm/arch/mp1000-seprom.h> | ||
28 | |||
29 | #include "common.h" | ||
30 | |||
31 | extern void mp1000_map_io(void); | ||
32 | |||
33 | static void __init mp1000_init(void) | ||
34 | { | ||
35 | seprom_init(); | ||
36 | } | ||
37 | |||
38 | MACHINE_START(MP1000, "Comdial MP1000") | ||
39 | /* Maintainer: Jon Ringle */ | ||
40 | .phys_ram = 0xc0000000, | ||
41 | .phys_io = 0x80000000, | ||
42 | .io_pg_offst = ((0xff000000) >> 18) & 0xfffc, | ||
43 | .boot_params = 0xc0015100, | ||
44 | .map_io = mp1000_map_io, | ||
45 | .init_irq = clps711x_init_irq, | ||
46 | .init_machine = mp1000_init, | ||
47 | .timer = &clps711x_timer, | ||
48 | MACHINE_END | ||
49 | |||
diff --git a/arch/arm/mach-clps711x/mp1000-mm.c b/arch/arm/mach-clps711x/mp1000-mm.c new file mode 100644 index 000000000000..20e810b0ec0c --- /dev/null +++ b/arch/arm/mach-clps711x/mp1000-mm.c | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-mp1000/mm.c | ||
3 | * | ||
4 | * Extra MM routines for the MP1000 | ||
5 | * | ||
6 | * Copyright (C) 2005 Comdial Corporation | ||
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 | #include <linux/kernel.h> | ||
23 | #include <linux/init.h> | ||
24 | |||
25 | #include <asm/hardware.h> | ||
26 | #include <asm/page.h> | ||
27 | #include <asm/pgtable.h> | ||
28 | #include <asm/sizes.h> | ||
29 | |||
30 | #include <asm/mach/map.h> | ||
31 | |||
32 | extern void clps711x_map_io(void); | ||
33 | |||
34 | static struct map_desc mp1000_io_desc[] __initdata = { | ||
35 | { MP1000_EIO_BASE, MP1000_EIO_START, MP1000_EIO_SIZE, MT_DEVICE }, | ||
36 | { MP1000_FIO_BASE, MP1000_FIO_START, MP1000_FIO_SIZE, MT_DEVICE }, | ||
37 | { MP1000_LIO_BASE, MP1000_LIO_START, MP1000_LIO_SIZE, MT_DEVICE }, | ||
38 | { MP1000_NIO_BASE, MP1000_NIO_START, MP1000_NIO_SIZE, MT_DEVICE }, | ||
39 | { MP1000_IDE_BASE, MP1000_IDE_START, MP1000_IDE_SIZE, MT_DEVICE }, | ||
40 | { MP1000_DSP_BASE, MP1000_DSP_START, MP1000_DSP_SIZE, MT_DEVICE } | ||
41 | }; | ||
42 | |||
43 | void __init mp1000_map_io(void) | ||
44 | { | ||
45 | clps711x_map_io(); | ||
46 | iotable_init(mp1000_io_desc, ARRAY_SIZE(mp1000_io_desc)); | ||
47 | } | ||
diff --git a/arch/arm/mach-clps711x/mp1000-seprom.c b/arch/arm/mach-clps711x/mp1000-seprom.c new file mode 100644 index 000000000000..b22d0bebb851 --- /dev/null +++ b/arch/arm/mach-clps711x/mp1000-seprom.c | |||
@@ -0,0 +1,195 @@ | |||
1 | /*` | ||
2 | * mp1000-seprom.c | ||
3 | * | ||
4 | * This file contains the Serial EEPROM code for the MP1000 board | ||
5 | * | ||
6 | * Copyright (C) 2005 Comdial Corporation | ||
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 <linux/kernel.h> | ||
25 | #include <linux/init.h> | ||
26 | #include <asm/hardware.h> | ||
27 | #include <asm/hardware/clps7111.h> | ||
28 | #include <asm/arch/mp1000-seprom.h> | ||
29 | |||
30 | /* If SepromInit() can initialize and checksum the seprom successfully, */ | ||
31 | /* then it will point seprom_data_ptr at the shadow copy. */ | ||
32 | |||
33 | static eeprom_struct seprom_data; /* shadow copy of seprom content */ | ||
34 | |||
35 | eeprom_struct *seprom_data_ptr = 0; /* 0 => not initialized */ | ||
36 | |||
37 | /* | ||
38 | * Port D Bit 5 is Chip Select for EEPROM | ||
39 | * Port E Bit 0 is Input, Data out from EEPROM | ||
40 | * Port E Bit 1 is Output, Data in to EEPROM | ||
41 | * Port E Bit 2 is Output, CLK to EEPROM | ||
42 | */ | ||
43 | |||
44 | static char *port_d_ptr = (char *)(CLPS7111_VIRT_BASE + PDDR); | ||
45 | static char *port_e_ptr = (char *)(CLPS7111_VIRT_BASE + PEDR); | ||
46 | |||
47 | #define NO_OF_SHORTS 64 // Device is 64 x 16 bits | ||
48 | #define ENABLE_RW 0 | ||
49 | #define DISABLE_RW 1 | ||
50 | |||
51 | static inline void toggle_seprom_clock(void) | ||
52 | { | ||
53 | *port_e_ptr |= HwPortESepromCLK; | ||
54 | *port_e_ptr &= ~(HwPortESepromCLK); | ||
55 | } | ||
56 | |||
57 | static inline void select_eeprom(void) | ||
58 | { | ||
59 | *port_d_ptr |= HwPortDEECS; | ||
60 | *port_e_ptr &= ~(HwPortESepromCLK); | ||
61 | } | ||
62 | |||
63 | static inline void deselect_eeprom(void) | ||
64 | { | ||
65 | *port_d_ptr &= ~(HwPortDEECS); | ||
66 | *port_e_ptr &= ~(HwPortESepromDIn); | ||
67 | } | ||
68 | |||
69 | /* | ||
70 | * GetSepromDataPtr - returns pointer to shadow (RAM) copy of seprom | ||
71 | * and returns 0 if seprom is not initialized or | ||
72 | * has a checksum error. | ||
73 | */ | ||
74 | |||
75 | eeprom_struct* get_seprom_ptr(void) | ||
76 | { | ||
77 | return seprom_data_ptr; | ||
78 | } | ||
79 | |||
80 | unsigned char* get_eeprom_mac_address(void) | ||
81 | { | ||
82 | return seprom_data_ptr->variant.eprom_struct.mac_Address; | ||
83 | } | ||
84 | |||
85 | /* | ||
86 | * ReadSProm, Physically reads data from the Serial PROM | ||
87 | */ | ||
88 | static void read_sprom(short address, int length, eeprom_struct *buffer) | ||
89 | { | ||
90 | short data = COMMAND_READ | (address & 0x3F); | ||
91 | short bit; | ||
92 | int i; | ||
93 | |||
94 | select_eeprom(); | ||
95 | |||
96 | // Clock in 9 bits of the command | ||
97 | for (i = 0, bit = 0x100; i < 9; i++, bit >>= 1) { | ||
98 | if (data & bit) | ||
99 | *port_e_ptr |= HwPortESepromDIn; | ||
100 | else | ||
101 | *port_e_ptr &= ~(HwPortESepromDIn); | ||
102 | |||
103 | toggle_seprom_clock(); | ||
104 | } | ||
105 | |||
106 | // | ||
107 | // Now read one or more shorts of data from the Seprom | ||
108 | // | ||
109 | while (length-- > 0) { | ||
110 | data = 0; | ||
111 | |||
112 | // Read 16 bits at a time | ||
113 | for (i = 0; i < 16; i++) { | ||
114 | data <<= 1; | ||
115 | toggle_seprom_clock(); | ||
116 | data |= *port_e_ptr & HwPortESepromDOut; | ||
117 | |||
118 | } | ||
119 | |||
120 | buffer->variant.eprom_short_data[address++] = data; | ||
121 | } | ||
122 | |||
123 | deselect_eeprom(); | ||
124 | |||
125 | return; | ||
126 | } | ||
127 | |||
128 | |||
129 | |||
130 | /* | ||
131 | * ReadSerialPROM | ||
132 | * | ||
133 | * Input: Pointer to array of 64 x 16 Bits | ||
134 | * | ||
135 | * Output: if no problem reading data is filled in | ||
136 | */ | ||
137 | static void read_serial_prom(eeprom_struct *data) | ||
138 | { | ||
139 | read_sprom(0, 64, data); | ||
140 | } | ||
141 | |||
142 | |||
143 | // | ||
144 | // Compute Serial EEPROM checksum | ||
145 | // | ||
146 | // Input: Pointer to struct with Eprom data | ||
147 | // | ||
148 | // Output: The computed Eprom checksum | ||
149 | // | ||
150 | static short compute_seprom_checksum(eeprom_struct *data) | ||
151 | { | ||
152 | short checksum = 0; | ||
153 | int i; | ||
154 | |||
155 | for (i = 0; i < 126; i++) { | ||
156 | checksum += (short)data->variant.eprom_byte_data[i]; | ||
157 | } | ||
158 | |||
159 | return((short)(0x5555 - (checksum & 0xFFFF))); | ||
160 | } | ||
161 | |||
162 | // | ||
163 | // Make sure the data port bits for the SEPROM are correctly initialised | ||
164 | // | ||
165 | |||
166 | void __init seprom_init(void) | ||
167 | { | ||
168 | short checksum; | ||
169 | |||
170 | // Init Port D | ||
171 | *(char *)(CLPS7111_VIRT_BASE + PDDDR) = 0x0; | ||
172 | *(char *)(CLPS7111_VIRT_BASE + PDDR) = 0x15; | ||
173 | |||
174 | // Init Port E | ||
175 | *(int *)(CLPS7111_VIRT_BASE + PEDDR) = 0x06; | ||
176 | *(int *)(CLPS7111_VIRT_BASE + PEDR) = 0x04; | ||
177 | |||
178 | // | ||
179 | // Make sure that EEPROM struct size never exceeds 128 bytes | ||
180 | // | ||
181 | if (sizeof(eeprom_struct) > 128) { | ||
182 | panic("Serial PROM struct size > 128, aborting read\n"); | ||
183 | } | ||
184 | |||
185 | read_serial_prom(&seprom_data); | ||
186 | |||
187 | checksum = compute_seprom_checksum(&seprom_data); | ||
188 | |||
189 | if (checksum != seprom_data.variant.eprom_short_data[63]) { | ||
190 | panic("Serial EEPROM checksum failed\n"); | ||
191 | } | ||
192 | |||
193 | seprom_data_ptr = &seprom_data; | ||
194 | } | ||
195 | |||
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c index 5bdb90edf992..a1acb945fb51 100644 --- a/arch/arm/mach-clps711x/p720t.c +++ b/arch/arm/mach-clps711x/p720t.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/pgtable.h> | 29 | #include <asm/pgtable.h> |
30 | #include <asm/page.h> | 30 | #include <asm/page.h> |
31 | #include <asm/setup.h> | 31 | #include <asm/setup.h> |
32 | #include <asm/sizes.h> | ||
32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/map.h> | 35 | #include <asm/mach/map.h> |
@@ -42,8 +43,17 @@ | |||
42 | * We map both here. | 43 | * We map both here. |
43 | */ | 44 | */ |
44 | static struct map_desc p720t_io_desc[] __initdata = { | 45 | static struct map_desc p720t_io_desc[] __initdata = { |
45 | { SYSPLD_VIRT_BASE, SYSPLD_PHYS_BASE, 1048576, MT_DEVICE }, | 46 | { |
46 | { 0xfe400000, 0x10400000, 1048576, MT_DEVICE } | 47 | .virtual = SYSPLD_VIRT_BASE, |
48 | .pfn = __phys_to_pfn(SYSPLD_PHYS_BASE), | ||
49 | .length = SZ_1M, | ||
50 | .type = MT_DEVICE | ||
51 | }, { | ||
52 | .virtual = 0xfe400000, | ||
53 | .pfn = __phys_to_pfn(0x10400000), | ||
54 | .length = SZ_1M, | ||
55 | .type = MT_DEVICE | ||
56 | } | ||
47 | }; | 57 | }; |
48 | 58 | ||
49 | static void __init | 59 | static void __init |
diff --git a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c index e216ab8b9e8f..0364ba4b539e 100644 --- a/arch/arm/mach-clps7500/core.c +++ b/arch/arm/mach-clps7500/core.c | |||
@@ -259,10 +259,27 @@ static void __init clps7500_init_irq(void) | |||
259 | } | 259 | } |
260 | 260 | ||
261 | static struct map_desc cl7500_io_desc[] __initdata = { | 261 | static struct map_desc cl7500_io_desc[] __initdata = { |
262 | { IO_BASE, IO_START, IO_SIZE, MT_DEVICE }, /* IO space */ | 262 | { /* IO space */ |
263 | { ISA_BASE, ISA_START, ISA_SIZE, MT_DEVICE }, /* ISA space */ | 263 | .virtual = IO_BASE, |
264 | { FLASH_BASE, FLASH_START, FLASH_SIZE, MT_DEVICE }, /* Flash */ | 264 | .pfn = __phys_to_pfn(IO_START), |
265 | { LED_BASE, LED_START, LED_SIZE, MT_DEVICE } /* LED */ | 265 | .length = IO_SIZE, |
266 | .type = MT_DEVICE | ||
267 | }, { /* ISA space */ | ||
268 | .virtual = ISA_BASE, | ||
269 | .pfn = __phys_to_pfn(ISA_START), | ||
270 | .length = ISA_SIZE, | ||
271 | .type = MT_DEVICE | ||
272 | }, { /* Flash */ | ||
273 | .virtual = FLASH_BASE, | ||
274 | .pfn = __phys_to_pfn(FLASH_START), | ||
275 | .length = FLASH_SIZE, | ||
276 | .type = MT_DEVICE | ||
277 | }, { /* LED */ | ||
278 | .virtual = LED_BASE, | ||
279 | .pfn = __phys_to_pfn(LED_START), | ||
280 | .length = LED_SIZE, | ||
281 | .type = MT_DEVICE | ||
282 | } | ||
266 | }; | 283 | }; |
267 | 284 | ||
268 | static void __init clps7500_map_io(void) | 285 | static void __init clps7500_map_io(void) |
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c index 5aeadfd72143..15261646dcdd 100644 --- a/arch/arm/mach-ebsa110/core.c +++ b/arch/arm/mach-ebsa110/core.c | |||
@@ -76,16 +76,42 @@ static struct map_desc ebsa110_io_desc[] __initdata = { | |||
76 | /* | 76 | /* |
77 | * sparse external-decode ISAIO space | 77 | * sparse external-decode ISAIO space |
78 | */ | 78 | */ |
79 | { IRQ_STAT, TRICK4_PHYS, PGDIR_SIZE, MT_DEVICE }, /* IRQ_STAT/IRQ_MCLR */ | 79 | { /* IRQ_STAT/IRQ_MCLR */ |
80 | { IRQ_MASK, TRICK3_PHYS, PGDIR_SIZE, MT_DEVICE }, /* IRQ_MASK/IRQ_MSET */ | 80 | .virtual = IRQ_STAT, |
81 | { SOFT_BASE, TRICK1_PHYS, PGDIR_SIZE, MT_DEVICE }, /* SOFT_BASE */ | 81 | .pfn = __phys_to_pfn(TRICK4_PHYS), |
82 | { PIT_BASE, TRICK0_PHYS, PGDIR_SIZE, MT_DEVICE }, /* PIT_BASE */ | 82 | .length = PGDIR_SIZE, |
83 | .type = MT_DEVICE | ||
84 | }, { /* IRQ_MASK/IRQ_MSET */ | ||
85 | .virtual = IRQ_MASK, | ||
86 | .pfn = __phys_to_pfn(TRICK3_PHYS), | ||
87 | .length = PGDIR_SIZE, | ||
88 | .type = MT_DEVICE | ||
89 | }, { /* SOFT_BASE */ | ||
90 | .virtual = SOFT_BASE, | ||
91 | .pfn = __phys_to_pfn(TRICK1_PHYS), | ||
92 | .length = PGDIR_SIZE, | ||
93 | .type = MT_DEVICE | ||
94 | }, { /* PIT_BASE */ | ||
95 | .virtual = PIT_BASE, | ||
96 | .pfn = __phys_to_pfn(TRICK0_PHYS), | ||
97 | .length = PGDIR_SIZE, | ||
98 | .type = MT_DEVICE | ||
99 | }, | ||
83 | 100 | ||
84 | /* | 101 | /* |
85 | * self-decode ISAIO space | 102 | * self-decode ISAIO space |
86 | */ | 103 | */ |
87 | { ISAIO_BASE, ISAIO_PHYS, ISAIO_SIZE, MT_DEVICE }, | 104 | { |
88 | { ISAMEM_BASE, ISAMEM_PHYS, ISAMEM_SIZE, MT_DEVICE } | 105 | .virtual = ISAIO_BASE, |
106 | .pfn = __phys_to_pfn(ISAIO_PHYS), | ||
107 | .length = ISAIO_SIZE, | ||
108 | .type = MT_DEVICE | ||
109 | }, { | ||
110 | .virtual = ISAMEM_BASE, | ||
111 | .pfn = __phys_to_pfn(ISAMEM_PHYS), | ||
112 | .length = ISAMEM_SIZE, | ||
113 | .type = MT_DEVICE | ||
114 | } | ||
89 | }; | 115 | }; |
90 | 116 | ||
91 | static void __init ebsa110_map_io(void) | 117 | static void __init ebsa110_map_io(void) |
diff --git a/arch/arm/mach-ebsa110/io.c b/arch/arm/mach-ebsa110/io.c index ef7eb5dc91bd..c648bfb676a1 100644 --- a/arch/arm/mach-ebsa110/io.c +++ b/arch/arm/mach-ebsa110/io.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | 26 | ||
27 | #include <asm/hardware.h> | ||
27 | #include <asm/io.h> | 28 | #include <asm/io.h> |
28 | #include <asm/page.h> | 29 | #include <asm/page.h> |
29 | 30 | ||
diff --git a/arch/arm/mach-epxa10db/mm.c b/arch/arm/mach-epxa10db/mm.c index 2aa57fa46da3..e8832d0910ee 100644 --- a/arch/arm/mach-epxa10db/mm.c +++ b/arch/arm/mach-epxa10db/mm.c | |||
@@ -31,12 +31,37 @@ | |||
31 | /* Page table mapping for I/O region */ | 31 | /* Page table mapping for I/O region */ |
32 | 32 | ||
33 | static struct map_desc epxa10db_io_desc[] __initdata = { | 33 | static struct map_desc epxa10db_io_desc[] __initdata = { |
34 | { IO_ADDRESS(EXC_REGISTERS_BASE), EXC_REGISTERS_BASE, SZ_16K, MT_DEVICE }, | 34 | { |
35 | { IO_ADDRESS(EXC_PLD_BLOCK0_BASE), EXC_PLD_BLOCK0_BASE, SZ_16K, MT_DEVICE }, | 35 | .virtual = IO_ADDRESS(EXC_REGISTERS_BASE), |
36 | { IO_ADDRESS(EXC_PLD_BLOCK1_BASE), EXC_PLD_BLOCK1_BASE, SZ_16K, MT_DEVICE }, | 36 | .pfn = __phys_to_pfn(EXC_REGISTERS_BASE), |
37 | { IO_ADDRESS(EXC_PLD_BLOCK2_BASE), EXC_PLD_BLOCK2_BASE, SZ_16K, MT_DEVICE }, | 37 | .length = SZ_16K, |
38 | { IO_ADDRESS(EXC_PLD_BLOCK3_BASE), EXC_PLD_BLOCK3_BASE, SZ_16K, MT_DEVICE }, | 38 | .type = MT_DEVICE |
39 | { FLASH_VADDR(EXC_EBI_BLOCK0_BASE), EXC_EBI_BLOCK0_BASE, SZ_16M, MT_DEVICE } | 39 | }, { |
40 | .virtual = IO_ADDRESS(EXC_PLD_BLOCK0_BASE), | ||
41 | .pfn = __phys_to_pfn(EXC_PLD_BLOCK0_BASE), | ||
42 | .length = SZ_16K, | ||
43 | .type = MT_DEVICE | ||
44 | }, { | ||
45 | .virtual = IO_ADDRESS(EXC_PLD_BLOCK1_BASE), | ||
46 | .pfn =__phys_to_pfn(EXC_PLD_BLOCK1_BASE), | ||
47 | .length = SZ_16K, | ||
48 | .type = MT_DEVICE | ||
49 | }, { | ||
50 | .virtual = IO_ADDRESS(EXC_PLD_BLOCK2_BASE), | ||
51 | .physical = __phys_to_pfn(EXC_PLD_BLOCK2_BASE), | ||
52 | .length = SZ_16K, | ||
53 | .type = MT_DEVICE | ||
54 | }, { | ||
55 | .virtual = IO_ADDRESS(EXC_PLD_BLOCK3_BASE), | ||
56 | .pfn = __phys_to_pfn(EXC_PLD_BLOCK3_BASE), | ||
57 | .length = SZ_16K, | ||
58 | .type = MT_DEVICE | ||
59 | }, { | ||
60 | .virtual = FLASH_VADDR(EXC_EBI_BLOCK0_BASE), | ||
61 | .pfn = __phys_to_pfn(EXC_EBI_BLOCK0_BASE), | ||
62 | .length = SZ_16M, | ||
63 | .type = MT_DEVICE | ||
64 | } | ||
40 | }; | 65 | }; |
41 | 66 | ||
42 | void __init epxa10db_map_io(void) | 67 | void __init epxa10db_map_io(void) |
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c index eb8238c1ef06..dc09fd200c16 100644 --- a/arch/arm/mach-footbridge/common.c +++ b/arch/arm/mach-footbridge/common.c | |||
@@ -130,8 +130,17 @@ void __init footbridge_init_irq(void) | |||
130 | * it means that we have extra bullet protection on our feet. | 130 | * it means that we have extra bullet protection on our feet. |
131 | */ | 131 | */ |
132 | static struct map_desc fb_common_io_desc[] __initdata = { | 132 | static struct map_desc fb_common_io_desc[] __initdata = { |
133 | { ARMCSR_BASE, DC21285_ARMCSR_BASE, ARMCSR_SIZE, MT_DEVICE }, | 133 | { |
134 | { XBUS_BASE, 0x40000000, XBUS_SIZE, MT_DEVICE } | 134 | .virtual = ARMCSR_BASE, |
135 | .pfn = DC21285_ARMCSR_BASE, | ||
136 | .length = ARMCSR_SIZE, | ||
137 | .type = MT_DEVICE | ||
138 | }, { | ||
139 | .virtual = XBUS_BASE, | ||
140 | .pfn = __phys_to_pfn(0x40000000), | ||
141 | .length = XBUS_SIZE, | ||
142 | .type = MT_DEVICE | ||
143 | } | ||
135 | }; | 144 | }; |
136 | 145 | ||
137 | /* | 146 | /* |
@@ -140,11 +149,32 @@ static struct map_desc fb_common_io_desc[] __initdata = { | |||
140 | */ | 149 | */ |
141 | static struct map_desc ebsa285_host_io_desc[] __initdata = { | 150 | static struct map_desc ebsa285_host_io_desc[] __initdata = { |
142 | #if defined(CONFIG_ARCH_FOOTBRIDGE) && defined(CONFIG_FOOTBRIDGE_HOST) | 151 | #if defined(CONFIG_ARCH_FOOTBRIDGE) && defined(CONFIG_FOOTBRIDGE_HOST) |
143 | { PCIMEM_BASE, DC21285_PCI_MEM, PCIMEM_SIZE, MT_DEVICE }, | 152 | { |
144 | { PCICFG0_BASE, DC21285_PCI_TYPE_0_CONFIG, PCICFG0_SIZE, MT_DEVICE }, | 153 | .virtual = PCIMEM_BASE, |
145 | { PCICFG1_BASE, DC21285_PCI_TYPE_1_CONFIG, PCICFG1_SIZE, MT_DEVICE }, | 154 | .pfn = __phys_to_pfn(DC21285_PCI_MEM), |
146 | { PCIIACK_BASE, DC21285_PCI_IACK, PCIIACK_SIZE, MT_DEVICE }, | 155 | .length = PCIMEM_SIZE, |
147 | { PCIO_BASE, DC21285_PCI_IO, PCIO_SIZE, MT_DEVICE } | 156 | .type = MT_DEVICE |
157 | }, { | ||
158 | .virtual = PCICFG0_BASE, | ||
159 | .pfn = __phys_to_pfn(DC21285_PCI_TYPE_0_CONFIG), | ||
160 | .length = PCICFG0_SIZE, | ||
161 | .type = MT_DEVICE | ||
162 | }, { | ||
163 | .virtual = PCICFG1_BASE, | ||
164 | .pfn = __phys_to_pfn(DC21285_PCI_TYPE_1_CONFIG), | ||
165 | .length = PCICFG1_SIZE, | ||
166 | .type = MT_DEVICE | ||
167 | }, { | ||
168 | .virtual = PCIIACK_BASE, | ||
169 | .pfn = __phys_to_pfn(DC21285_PCI_IACK), | ||
170 | .length = PCIIACK_SIZE, | ||
171 | .type = MT_DEVICE | ||
172 | }, { | ||
173 | .virtual = PCIO_BASE, | ||
174 | .pfn = __phys_to_pfn(DC21285_PCI_IO), | ||
175 | .length = PCIO_SIZE, | ||
176 | .type = MT_DEVICE | ||
177 | } | ||
148 | #endif | 178 | #endif |
149 | }; | 179 | }; |
150 | 180 | ||
@@ -153,8 +183,17 @@ static struct map_desc ebsa285_host_io_desc[] __initdata = { | |||
153 | */ | 183 | */ |
154 | static struct map_desc co285_io_desc[] __initdata = { | 184 | static struct map_desc co285_io_desc[] __initdata = { |
155 | #ifdef CONFIG_ARCH_CO285 | 185 | #ifdef CONFIG_ARCH_CO285 |
156 | { PCIO_BASE, DC21285_PCI_IO, PCIO_SIZE, MT_DEVICE }, | 186 | { |
157 | { PCIMEM_BASE, DC21285_PCI_MEM, PCIMEM_SIZE, MT_DEVICE } | 187 | .virtual = PCIO_BASE, |
188 | .pfn = __phys_to_pfn(DC21285_PCI_IO), | ||
189 | .length = PCIO_SIZE, | ||
190 | .type = MT_DEVICE | ||
191 | }, { | ||
192 | .virtual = PCIMEM_BASE, | ||
193 | .pfn = __phys_to_pfn(DC21285_PCI_MEM), | ||
194 | .length = PCIMEM_SIZE, | ||
195 | .type = MT_DEVICE | ||
196 | } | ||
158 | #endif | 197 | #endif |
159 | }; | 198 | }; |
160 | 199 | ||
diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c index 5110e2e65ddd..c096b4569308 100644 --- a/arch/arm/mach-h720x/common.c +++ b/arch/arm/mach-h720x/common.c | |||
@@ -237,7 +237,12 @@ void __init h720x_init_irq (void) | |||
237 | } | 237 | } |
238 | 238 | ||
239 | static struct map_desc h720x_io_desc[] __initdata = { | 239 | static struct map_desc h720x_io_desc[] __initdata = { |
240 | { IO_VIRT, IO_PHYS, IO_SIZE, MT_DEVICE }, | 240 | { |
241 | .virtual = IO_VIRT, | ||
242 | .pfn = __phys_to_pfn(IO_PHYS), | ||
243 | .length = IO_SIZE, | ||
244 | .type = MT_DEVICE | ||
245 | }, | ||
241 | }; | 246 | }; |
242 | 247 | ||
243 | /* Initialize io tables */ | 248 | /* Initialize io tables */ |
diff --git a/arch/arm/mach-imx/generic.c b/arch/arm/mach-imx/generic.c index f8a742bb2d5b..837d7f0bda4c 100644 --- a/arch/arm/mach-imx/generic.c +++ b/arch/arm/mach-imx/generic.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/string.h> | ||
30 | |||
29 | #include <asm/arch/imxfb.h> | 31 | #include <asm/arch/imxfb.h> |
30 | #include <asm/hardware.h> | 32 | #include <asm/hardware.h> |
31 | #include <asm/arch/imx-regs.h> | 33 | #include <asm/arch/imx-regs.h> |
@@ -273,8 +275,12 @@ static struct platform_device *devices[] __initdata = { | |||
273 | }; | 275 | }; |
274 | 276 | ||
275 | static struct map_desc imx_io_desc[] __initdata = { | 277 | static struct map_desc imx_io_desc[] __initdata = { |
276 | /* virtual physical length type */ | 278 | { |
277 | {IMX_IO_BASE, IMX_IO_PHYS, IMX_IO_SIZE, MT_DEVICE}, | 279 | .virtual = IMX_IO_BASE, |
280 | .pfn = __phys_to_pfn(IMX_IO_PHYS), | ||
281 | .length = IMX_IO_SIZE, | ||
282 | .type = MT_DEVICE | ||
283 | } | ||
278 | }; | 284 | }; |
279 | 285 | ||
280 | void __init | 286 | void __init |
diff --git a/arch/arm/mach-imx/mx1ads.c b/arch/arm/mach-imx/mx1ads.c index a7511ddfe364..4cbdc1fe04b1 100644 --- a/arch/arm/mach-imx/mx1ads.c +++ b/arch/arm/mach-imx/mx1ads.c | |||
@@ -61,13 +61,37 @@ mx1ads_init(void) | |||
61 | } | 61 | } |
62 | 62 | ||
63 | static struct map_desc mx1ads_io_desc[] __initdata = { | 63 | static struct map_desc mx1ads_io_desc[] __initdata = { |
64 | /* virtual physical length type */ | 64 | { |
65 | {IMX_CS0_VIRT, IMX_CS0_PHYS, IMX_CS0_SIZE, MT_DEVICE}, | 65 | .virtual = IMX_CS0_VIRT, |
66 | {IMX_CS1_VIRT, IMX_CS1_PHYS, IMX_CS1_SIZE, MT_DEVICE}, | 66 | .pfn = __phys_to_pfn(IMX_CS0_PHYS), |
67 | {IMX_CS2_VIRT, IMX_CS2_PHYS, IMX_CS2_SIZE, MT_DEVICE}, | 67 | .length = IMX_CS0_SIZE, |
68 | {IMX_CS3_VIRT, IMX_CS3_PHYS, IMX_CS3_SIZE, MT_DEVICE}, | 68 | .type = MT_DEVICE |
69 | {IMX_CS4_VIRT, IMX_CS4_PHYS, IMX_CS4_SIZE, MT_DEVICE}, | 69 | }, { |
70 | {IMX_CS5_VIRT, IMX_CS5_PHYS, IMX_CS5_SIZE, MT_DEVICE}, | 70 | .virtual = IMX_CS1_VIRT, |
71 | .pfn = __phys_to_pfn(IMX_CS1_PHYS), | ||
72 | .length = IMX_CS1_SIZE, | ||
73 | .type = MT_DEVICE | ||
74 | }, { | ||
75 | .virtual = IMX_CS2_VIRT, | ||
76 | .pfn = __phys_to_pfn(IMX_CS2_PHYS), | ||
77 | .length = IMX_CS2_SIZE, | ||
78 | .type = MT_DEVICE | ||
79 | }, { | ||
80 | .virtual = IMX_CS3_VIRT, | ||
81 | .pfn = __phys_to_pfn(IMX_CS3_PHYS), | ||
82 | .length = IMX_CS3_SIZE, | ||
83 | .type = MT_DEVICE | ||
84 | }, { | ||
85 | .virtual = IMX_CS4_VIRT, | ||
86 | .pfn = __phys_to_pfn(IMX_CS4_PHYS), | ||
87 | .length = IMX_CS4_SIZE, | ||
88 | .type = MT_DEVICE | ||
89 | }, { | ||
90 | .virtual = IMX_CS5_VIRT, | ||
91 | .pfn = __phys_to_pfn(IMX_CS5_PHYS), | ||
92 | .length = IMX_CS5_SIZE, | ||
93 | .type = MT_DEVICE | ||
94 | } | ||
71 | }; | 95 | }; |
72 | 96 | ||
73 | static void __init | 97 | static void __init |
diff --git a/arch/arm/mach-integrator/clock.c b/arch/arm/mach-integrator/clock.c index 56200594db3c..73c360685cad 100644 --- a/arch/arm/mach-integrator/clock.c +++ b/arch/arm/mach-integrator/clock.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/err.h> | 15 | #include <linux/err.h> |
16 | #include <linux/string.h> | ||
16 | 17 | ||
17 | #include <asm/semaphore.h> | 18 | #include <asm/semaphore.h> |
18 | #include <asm/hardware/clock.h> | 19 | #include <asm/hardware/clock.h> |
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 36e2b6eb67b7..764ceb49470a 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <asm/io.h> | 30 | #include <asm/io.h> |
31 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
32 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
33 | #include <asm/param.h> /* HZ */ | ||
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
34 | #include <asm/hardware/amba.h> | 35 | #include <asm/hardware/amba.h> |
35 | #include <asm/hardware/amba_kmi.h> | 36 | #include <asm/hardware/amba_kmi.h> |
@@ -75,19 +76,72 @@ | |||
75 | */ | 76 | */ |
76 | 77 | ||
77 | static struct map_desc ap_io_desc[] __initdata = { | 78 | static struct map_desc ap_io_desc[] __initdata = { |
78 | { IO_ADDRESS(INTEGRATOR_HDR_BASE), INTEGRATOR_HDR_BASE, SZ_4K, MT_DEVICE }, | 79 | { |
79 | { IO_ADDRESS(INTEGRATOR_SC_BASE), INTEGRATOR_SC_BASE, SZ_4K, MT_DEVICE }, | 80 | .virtual = IO_ADDRESS(INTEGRATOR_HDR_BASE), |
80 | { IO_ADDRESS(INTEGRATOR_EBI_BASE), INTEGRATOR_EBI_BASE, SZ_4K, MT_DEVICE }, | 81 | .pfn = __phys_to_pfn(INTEGRATOR_HDR_BASE), |
81 | { IO_ADDRESS(INTEGRATOR_CT_BASE), INTEGRATOR_CT_BASE, SZ_4K, MT_DEVICE }, | 82 | .length = SZ_4K, |
82 | { IO_ADDRESS(INTEGRATOR_IC_BASE), INTEGRATOR_IC_BASE, SZ_4K, MT_DEVICE }, | 83 | .type = MT_DEVICE |
83 | { IO_ADDRESS(INTEGRATOR_UART0_BASE), INTEGRATOR_UART0_BASE, SZ_4K, MT_DEVICE }, | 84 | }, { |
84 | { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K, MT_DEVICE }, | 85 | .virtual = IO_ADDRESS(INTEGRATOR_SC_BASE), |
85 | { IO_ADDRESS(INTEGRATOR_DBG_BASE), INTEGRATOR_DBG_BASE, SZ_4K, MT_DEVICE }, | 86 | .pfn = __phys_to_pfn(INTEGRATOR_SC_BASE), |
86 | { IO_ADDRESS(INTEGRATOR_GPIO_BASE), INTEGRATOR_GPIO_BASE, SZ_4K, MT_DEVICE }, | 87 | .length = SZ_4K, |
87 | { PCI_MEMORY_VADDR, PHYS_PCI_MEM_BASE, SZ_16M, MT_DEVICE }, | 88 | .type = MT_DEVICE |
88 | { PCI_CONFIG_VADDR, PHYS_PCI_CONFIG_BASE, SZ_16M, MT_DEVICE }, | 89 | }, { |
89 | { PCI_V3_VADDR, PHYS_PCI_V3_BASE, SZ_64K, MT_DEVICE }, | 90 | .virtual = IO_ADDRESS(INTEGRATOR_EBI_BASE), |
90 | { PCI_IO_VADDR, PHYS_PCI_IO_BASE, SZ_64K, MT_DEVICE } | 91 | .pfn = __phys_to_pfn(INTEGRATOR_EBI_BASE), |
92 | .length = SZ_4K, | ||
93 | .type = MT_DEVICE | ||
94 | }, { | ||
95 | .virtual = IO_ADDRESS(INTEGRATOR_CT_BASE), | ||
96 | .pfn = __phys_to_pfn(INTEGRATOR_CT_BASE), | ||
97 | .length = SZ_4K, | ||
98 | .type = MT_DEVICE | ||
99 | }, { | ||
100 | .virtual = IO_ADDRESS(INTEGRATOR_IC_BASE), | ||
101 | .pfn = __phys_to_pfn(INTEGRATOR_IC_BASE), | ||
102 | .length = SZ_4K, | ||
103 | .type = MT_DEVICE | ||
104 | }, { | ||
105 | .virtual = IO_ADDRESS(INTEGRATOR_UART0_BASE), | ||
106 | .pfn = __phys_to_pfn(INTEGRATOR_UART0_BASE), | ||
107 | .length = SZ_4K, | ||
108 | .type = MT_DEVICE | ||
109 | }, { | ||
110 | .virtual = IO_ADDRESS(INTEGRATOR_UART1_BASE), | ||
111 | .pfn = __phys_to_pfn(INTEGRATOR_UART1_BASE), | ||
112 | .length = SZ_4K, | ||
113 | .type = MT_DEVICE | ||
114 | }, { | ||
115 | .virtual = IO_ADDRESS(INTEGRATOR_DBG_BASE), | ||
116 | .pfn = __phys_to_pfn(INTEGRATOR_DBG_BASE), | ||
117 | .length = SZ_4K, | ||
118 | .type = MT_DEVICE | ||
119 | }, { | ||
120 | .virtual = IO_ADDRESS(INTEGRATOR_GPIO_BASE), | ||
121 | .pfn = __phys_to_pfn(INTEGRATOR_GPIO_BASE), | ||
122 | .length = SZ_4K, | ||
123 | .type = MT_DEVICE | ||
124 | }, { | ||
125 | .virtual = PCI_MEMORY_VADDR, | ||
126 | .pfn = __phys_to_pfn(PHYS_PCI_MEM_BASE), | ||
127 | .length = SZ_16M, | ||
128 | .type = MT_DEVICE | ||
129 | }, { | ||
130 | .virtual = PCI_CONFIG_VADDR, | ||
131 | .pfn = __phys_to_pfn(PHYS_PCI_CONFIG_BASE), | ||
132 | .length = SZ_16M, | ||
133 | .type = MT_DEVICE | ||
134 | }, { | ||
135 | .virtual = PCI_V3_VADDR, | ||
136 | .pfn = __phys_to_pfn(PHYS_PCI_V3_BASE), | ||
137 | .length = SZ_64K, | ||
138 | .type = MT_DEVICE | ||
139 | }, { | ||
140 | .virtual = PCI_IO_VADDR, | ||
141 | .pfn = __phys_to_pfn(PHYS_PCI_IO_BASE), | ||
142 | .length = SZ_64K, | ||
143 | .type = MT_DEVICE | ||
144 | } | ||
91 | }; | 145 | }; |
92 | 146 | ||
93 | static void __init ap_map_io(void) | 147 | static void __init ap_map_io(void) |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 2be5c03ab87f..aa34c58b96c4 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -74,17 +74,62 @@ | |||
74 | */ | 74 | */ |
75 | 75 | ||
76 | static struct map_desc intcp_io_desc[] __initdata = { | 76 | static struct map_desc intcp_io_desc[] __initdata = { |
77 | { IO_ADDRESS(INTEGRATOR_HDR_BASE), INTEGRATOR_HDR_BASE, SZ_4K, MT_DEVICE }, | 77 | { |
78 | { IO_ADDRESS(INTEGRATOR_SC_BASE), INTEGRATOR_SC_BASE, SZ_4K, MT_DEVICE }, | 78 | .virtual = IO_ADDRESS(INTEGRATOR_HDR_BASE), |
79 | { IO_ADDRESS(INTEGRATOR_EBI_BASE), INTEGRATOR_EBI_BASE, SZ_4K, MT_DEVICE }, | 79 | .pfn = __phys_to_pfn(INTEGRATOR_HDR_BASE), |
80 | { IO_ADDRESS(INTEGRATOR_CT_BASE), INTEGRATOR_CT_BASE, SZ_4K, MT_DEVICE }, | 80 | .length = SZ_4K, |
81 | { IO_ADDRESS(INTEGRATOR_IC_BASE), INTEGRATOR_IC_BASE, SZ_4K, MT_DEVICE }, | 81 | .type = MT_DEVICE |
82 | { IO_ADDRESS(INTEGRATOR_UART0_BASE), INTEGRATOR_UART0_BASE, SZ_4K, MT_DEVICE }, | 82 | }, { |
83 | { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K, MT_DEVICE }, | 83 | .virtual = IO_ADDRESS(INTEGRATOR_SC_BASE), |
84 | { IO_ADDRESS(INTEGRATOR_DBG_BASE), INTEGRATOR_DBG_BASE, SZ_4K, MT_DEVICE }, | 84 | .pfn = __phys_to_pfn(INTEGRATOR_SC_BASE), |
85 | { IO_ADDRESS(INTEGRATOR_GPIO_BASE), INTEGRATOR_GPIO_BASE, SZ_4K, MT_DEVICE }, | 85 | .length = SZ_4K, |
86 | { 0xfca00000, 0xca000000, SZ_4K, MT_DEVICE }, | 86 | .type = MT_DEVICE |
87 | { 0xfcb00000, 0xcb000000, SZ_4K, MT_DEVICE }, | 87 | }, { |
88 | .virtual = IO_ADDRESS(INTEGRATOR_EBI_BASE), | ||
89 | .pfn = __phys_to_pfn(INTEGRATOR_EBI_BASE), | ||
90 | .length = SZ_4K, | ||
91 | .type = MT_DEVICE | ||
92 | }, { | ||
93 | .virtual = IO_ADDRESS(INTEGRATOR_CT_BASE), | ||
94 | .pfn = __phys_to_pfn(INTEGRATOR_CT_BASE), | ||
95 | .length = SZ_4K, | ||
96 | .type = MT_DEVICE | ||
97 | }, { | ||
98 | .virtual = IO_ADDRESS(INTEGRATOR_IC_BASE), | ||
99 | .pfn = __phys_to_pfn(INTEGRATOR_IC_BASE), | ||
100 | .length = SZ_4K, | ||
101 | .type = MT_DEVICE | ||
102 | }, { | ||
103 | .virtual = IO_ADDRESS(INTEGRATOR_UART0_BASE), | ||
104 | .pfn = __phys_to_pfn(INTEGRATOR_UART0_BASE), | ||
105 | .length = SZ_4K, | ||
106 | .type = MT_DEVICE | ||
107 | }, { | ||
108 | .virtual = IO_ADDRESS(INTEGRATOR_UART1_BASE), | ||
109 | .pfn = __phys_to_pfn(INTEGRATOR_UART1_BASE), | ||
110 | .length = SZ_4K, | ||
111 | .type = MT_DEVICE | ||
112 | }, { | ||
113 | .virtual = IO_ADDRESS(INTEGRATOR_DBG_BASE), | ||
114 | .pfn = __phys_to_pfn(INTEGRATOR_DBG_BASE), | ||
115 | .length = SZ_4K, | ||
116 | .type = MT_DEVICE | ||
117 | }, { | ||
118 | .virtual = IO_ADDRESS(INTEGRATOR_GPIO_BASE), | ||
119 | .pfn = __phys_to_pfn(INTEGRATOR_GPIO_BASE), | ||
120 | .length = SZ_4K, | ||
121 | .type = MT_DEVICE | ||
122 | }, { | ||
123 | .virtual = 0xfca00000, | ||
124 | .pfn = __phys_to_pfn(0xca000000), | ||
125 | .length = SZ_4K, | ||
126 | .type = MT_DEVICE | ||
127 | }, { | ||
128 | .virtual = 0xfcb00000, | ||
129 | .pfn = __phys_to_pfn(0xcb000000), | ||
130 | .length = SZ_4K, | ||
131 | .type = MT_DEVICE | ||
132 | } | ||
88 | }; | 133 | }; |
89 | 134 | ||
90 | static void __init intcp_map_io(void) | 135 | static void __init intcp_map_io(void) |
diff --git a/arch/arm/mach-integrator/lm.c b/arch/arm/mach-integrator/lm.c index c5f19d160598..5b41e3a724e1 100644 --- a/arch/arm/mach-integrator/lm.c +++ b/arch/arm/mach-integrator/lm.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
13 | #include <linux/slab.h> | ||
13 | 14 | ||
14 | #include <asm/arch/lm.h> | 15 | #include <asm/arch/lm.h> |
15 | 16 | ||
diff --git a/arch/arm/mach-iop3xx/iop321-setup.c b/arch/arm/mach-iop3xx/iop321-setup.c index 0f921ba2750c..bb5091223b63 100644 --- a/arch/arm/mach-iop3xx/iop321-setup.c +++ b/arch/arm/mach-iop3xx/iop321-setup.c | |||
@@ -38,13 +38,17 @@ | |||
38 | * Standard IO mapping for all IOP321 based systems | 38 | * Standard IO mapping for all IOP321 based systems |
39 | */ | 39 | */ |
40 | static struct map_desc iop321_std_desc[] __initdata = { | 40 | static struct map_desc iop321_std_desc[] __initdata = { |
41 | /* virtual physical length type */ | 41 | { /* mem mapped registers */ |
42 | 42 | .virtual = IOP321_VIRT_MEM_BASE, | |
43 | /* mem mapped registers */ | 43 | .pfn = __phys_to_pfn(IOP321_PHYS_MEM_BASE), |
44 | { IOP321_VIRT_MEM_BASE, IOP321_PHYS_MEM_BASE, 0x00002000, MT_DEVICE }, | 44 | .length = 0x00002000, |
45 | 45 | .type = MT_DEVICE | |
46 | /* PCI IO space */ | 46 | }, { /* PCI IO space */ |
47 | { IOP321_PCI_LOWER_IO_VA, IOP321_PCI_LOWER_IO_PA, IOP321_PCI_IO_WINDOW_SIZE, MT_DEVICE } | 47 | .virtual = IOP321_PCI_LOWER_IO_VA, |
48 | .pfn = __phys_to_pfn(IOP321_PCI_LOWER_IO_PA), | ||
49 | .length = IOP321_PCI_IO_WINDOW_SIZE, | ||
50 | .type = MT_DEVICE | ||
51 | } | ||
48 | }; | 52 | }; |
49 | 53 | ||
50 | #ifdef CONFIG_ARCH_IQ80321 | 54 | #ifdef CONFIG_ARCH_IQ80321 |
diff --git a/arch/arm/mach-iop3xx/iop331-setup.c b/arch/arm/mach-iop3xx/iop331-setup.c index fc74b722f72f..a2533c3ab42f 100644 --- a/arch/arm/mach-iop3xx/iop331-setup.c +++ b/arch/arm/mach-iop3xx/iop331-setup.c | |||
@@ -37,13 +37,17 @@ | |||
37 | * Standard IO mapping for all IOP331 based systems | 37 | * Standard IO mapping for all IOP331 based systems |
38 | */ | 38 | */ |
39 | static struct map_desc iop331_std_desc[] __initdata = { | 39 | static struct map_desc iop331_std_desc[] __initdata = { |
40 | /* virtual physical length type */ | 40 | { /* mem mapped registers */ |
41 | 41 | .virtual = IOP331_VIRT_MEM_BASE, | |
42 | /* mem mapped registers */ | 42 | .pfn = __phys_to_pfn(IOP331_PHYS_MEM_BASE), |
43 | { IOP331_VIRT_MEM_BASE, IOP331_PHYS_MEM_BASE, 0x00002000, MT_DEVICE }, | 43 | .length = 0x00002000, |
44 | 44 | .type = MT_DEVICE | |
45 | /* PCI IO space */ | 45 | }, { /* PCI IO space */ |
46 | { IOP331_PCI_LOWER_IO_VA, IOP331_PCI_LOWER_IO_PA, IOP331_PCI_IO_WINDOW_SIZE, MT_DEVICE } | 46 | .virtual = IOP331_PCI_LOWER_IO_VA, |
47 | .pfn = __phys_to_pfn(IOP331_PCI_LOWER_IO_PA), | ||
48 | .length = IOP331_PCI_IO_WINDOW_SIZE, | ||
49 | .type = MT_DEVICE | ||
50 | } | ||
47 | }; | 51 | }; |
48 | 52 | ||
49 | static struct uart_port iop331_serial_ports[] = { | 53 | static struct uart_port iop331_serial_ports[] = { |
diff --git a/arch/arm/mach-iop3xx/iq31244-mm.c b/arch/arm/mach-iop3xx/iq31244-mm.c index 55992ab586ba..e874b54eefe3 100644 --- a/arch/arm/mach-iop3xx/iq31244-mm.c +++ b/arch/arm/mach-iop3xx/iq31244-mm.c | |||
@@ -29,10 +29,12 @@ | |||
29 | * We use RedBoot's setup for the onboard devices. | 29 | * We use RedBoot's setup for the onboard devices. |
30 | */ | 30 | */ |
31 | static struct map_desc iq31244_io_desc[] __initdata = { | 31 | static struct map_desc iq31244_io_desc[] __initdata = { |
32 | /* virtual physical length type */ | 32 | { /* on-board devices */ |
33 | 33 | .virtual = IQ31244_UART, | |
34 | /* on-board devices */ | 34 | .pfn = __phys_to_pfn(IQ31244_UART), |
35 | { IQ31244_UART, IQ31244_UART, 0x00100000, MT_DEVICE } | 35 | .length = 0x00100000, |
36 | .type = MT_DEVICE | ||
37 | } | ||
36 | }; | 38 | }; |
37 | 39 | ||
38 | void __init iq31244_map_io(void) | 40 | void __init iq31244_map_io(void) |
diff --git a/arch/arm/mach-iop3xx/iq31244-pci.c b/arch/arm/mach-iop3xx/iq31244-pci.c index f997daa800bf..c6a973ba8fc6 100644 --- a/arch/arm/mach-iop3xx/iq31244-pci.c +++ b/arch/arm/mach-iop3xx/iq31244-pci.c | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/string.h> | ||
18 | #include <linux/slab.h> | ||
17 | 19 | ||
18 | #include <asm/hardware.h> | 20 | #include <asm/hardware.h> |
19 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
diff --git a/arch/arm/mach-iop3xx/iq80321-mm.c b/arch/arm/mach-iop3xx/iq80321-mm.c index bb3e9e5a9aff..d9cac5e1fc3d 100644 --- a/arch/arm/mach-iop3xx/iq80321-mm.c +++ b/arch/arm/mach-iop3xx/iq80321-mm.c | |||
@@ -29,10 +29,12 @@ | |||
29 | * We use RedBoot's setup for the onboard devices. | 29 | * We use RedBoot's setup for the onboard devices. |
30 | */ | 30 | */ |
31 | static struct map_desc iq80321_io_desc[] __initdata = { | 31 | static struct map_desc iq80321_io_desc[] __initdata = { |
32 | /* virtual physical length type */ | 32 | { /* on-board devices */ |
33 | 33 | .virtual = IQ80321_UART, | |
34 | /* on-board devices */ | 34 | .pfn = __phys_to_pfn(IQ80321_UART), |
35 | { IQ80321_UART, IQ80321_UART, 0x00100000, MT_DEVICE } | 35 | .length = 0x00100000, |
36 | .type = MT_DEVICE | ||
37 | } | ||
36 | }; | 38 | }; |
37 | 39 | ||
38 | void __init iq80321_map_io(void) | 40 | void __init iq80321_map_io(void) |
diff --git a/arch/arm/mach-iop3xx/iq80321-pci.c b/arch/arm/mach-iop3xx/iq80321-pci.c index 79fea3d20b66..802f6d091b75 100644 --- a/arch/arm/mach-iop3xx/iq80321-pci.c +++ b/arch/arm/mach-iop3xx/iq80321-pci.c | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/string.h> | ||
18 | #include <linux/slab.h> | ||
17 | 19 | ||
18 | #include <asm/hardware.h> | 20 | #include <asm/hardware.h> |
19 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
diff --git a/arch/arm/mach-iop3xx/iq80331-pci.c b/arch/arm/mach-iop3xx/iq80331-pci.c index f37a0e26b466..654e450a1311 100644 --- a/arch/arm/mach-iop3xx/iq80331-pci.c +++ b/arch/arm/mach-iop3xx/iq80331-pci.c | |||
@@ -13,6 +13,8 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/string.h> | ||
17 | #include <linux/slab.h> | ||
16 | 18 | ||
17 | #include <asm/hardware.h> | 19 | #include <asm/hardware.h> |
18 | #include <asm/irq.h> | 20 | #include <asm/irq.h> |
diff --git a/arch/arm/mach-iop3xx/iq80332-pci.c b/arch/arm/mach-iop3xx/iq80332-pci.c index b9807aa2aade..65951ffe4631 100644 --- a/arch/arm/mach-iop3xx/iq80332-pci.c +++ b/arch/arm/mach-iop3xx/iq80332-pci.c | |||
@@ -13,6 +13,8 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/string.h> | ||
17 | #include <linux/slab.h> | ||
16 | 18 | ||
17 | #include <asm/hardware.h> | 19 | #include <asm/hardware.h> |
18 | #include <asm/irq.h> | 20 | #include <asm/irq.h> |
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c index f4d7f1f6ef85..01c393c504d0 100644 --- a/arch/arm/mach-ixp2000/core.c +++ b/arch/arm/mach-ixp2000/core.c | |||
@@ -83,42 +83,42 @@ void ixp2000_release_slowport(struct slowport_cfg *old_cfg) | |||
83 | static struct map_desc ixp2000_io_desc[] __initdata = { | 83 | static struct map_desc ixp2000_io_desc[] __initdata = { |
84 | { | 84 | { |
85 | .virtual = IXP2000_CAP_VIRT_BASE, | 85 | .virtual = IXP2000_CAP_VIRT_BASE, |
86 | .physical = IXP2000_CAP_PHYS_BASE, | 86 | .pfn = __phys_to_pfn(IXP2000_CAP_PHYS_BASE), |
87 | .length = IXP2000_CAP_SIZE, | 87 | .length = IXP2000_CAP_SIZE, |
88 | .type = MT_DEVICE | 88 | .type = MT_DEVICE |
89 | }, { | 89 | }, { |
90 | .virtual = IXP2000_INTCTL_VIRT_BASE, | 90 | .virtual = IXP2000_INTCTL_VIRT_BASE, |
91 | .physical = IXP2000_INTCTL_PHYS_BASE, | 91 | .pfn = __phys_to_pfn(IXP2000_INTCTL_PHYS_BASE), |
92 | .length = IXP2000_INTCTL_SIZE, | 92 | .length = IXP2000_INTCTL_SIZE, |
93 | .type = MT_DEVICE | 93 | .type = MT_DEVICE |
94 | }, { | 94 | }, { |
95 | .virtual = IXP2000_PCI_CREG_VIRT_BASE, | 95 | .virtual = IXP2000_PCI_CREG_VIRT_BASE, |
96 | .physical = IXP2000_PCI_CREG_PHYS_BASE, | 96 | .pfn = __phys_to_pfn(IXP2000_PCI_CREG_PHYS_BASE), |
97 | .length = IXP2000_PCI_CREG_SIZE, | 97 | .length = IXP2000_PCI_CREG_SIZE, |
98 | .type = MT_DEVICE | 98 | .type = MT_DEVICE |
99 | }, { | 99 | }, { |
100 | .virtual = IXP2000_PCI_CSR_VIRT_BASE, | 100 | .virtual = IXP2000_PCI_CSR_VIRT_BASE, |
101 | .physical = IXP2000_PCI_CSR_PHYS_BASE, | 101 | .pfn = __phys_to_pfn(IXP2000_PCI_CSR_PHYS_BASE), |
102 | .length = IXP2000_PCI_CSR_SIZE, | 102 | .length = IXP2000_PCI_CSR_SIZE, |
103 | .type = MT_DEVICE | 103 | .type = MT_DEVICE |
104 | }, { | 104 | }, { |
105 | .virtual = IXP2000_MSF_VIRT_BASE, | 105 | .virtual = IXP2000_MSF_VIRT_BASE, |
106 | .physical = IXP2000_MSF_PHYS_BASE, | 106 | .pfn = __phys_to_pfn(IXP2000_MSF_PHYS_BASE), |
107 | .length = IXP2000_MSF_SIZE, | 107 | .length = IXP2000_MSF_SIZE, |
108 | .type = MT_DEVICE | 108 | .type = MT_DEVICE |
109 | }, { | 109 | }, { |
110 | .virtual = IXP2000_PCI_IO_VIRT_BASE, | 110 | .virtual = IXP2000_PCI_IO_VIRT_BASE, |
111 | .physical = IXP2000_PCI_IO_PHYS_BASE, | 111 | .pfn = __phys_to_pfn(IXP2000_PCI_IO_PHYS_BASE), |
112 | .length = IXP2000_PCI_IO_SIZE, | 112 | .length = IXP2000_PCI_IO_SIZE, |
113 | .type = MT_DEVICE | 113 | .type = MT_DEVICE |
114 | }, { | 114 | }, { |
115 | .virtual = IXP2000_PCI_CFG0_VIRT_BASE, | 115 | .virtual = IXP2000_PCI_CFG0_VIRT_BASE, |
116 | .physical = IXP2000_PCI_CFG0_PHYS_BASE, | 116 | .pfn = __phys_to_pfn(IXP2000_PCI_CFG0_PHYS_BASE), |
117 | .length = IXP2000_PCI_CFG0_SIZE, | 117 | .length = IXP2000_PCI_CFG0_SIZE, |
118 | .type = MT_DEVICE | 118 | .type = MT_DEVICE |
119 | }, { | 119 | }, { |
120 | .virtual = IXP2000_PCI_CFG1_VIRT_BASE, | 120 | .virtual = IXP2000_PCI_CFG1_VIRT_BASE, |
121 | .physical = IXP2000_PCI_CFG1_PHYS_BASE, | 121 | .pfn = __phys_to_pfn(IXP2000_PCI_CFG1_PHYS_BASE), |
122 | .length = IXP2000_PCI_CFG1_SIZE, | 122 | .length = IXP2000_PCI_CFG1_SIZE, |
123 | .type = MT_DEVICE | 123 | .type = MT_DEVICE |
124 | } | 124 | } |
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c index 63ba0191aa65..8b4a839b6279 100644 --- a/arch/arm/mach-ixp2000/ixdp2x00.c +++ b/arch/arm/mach-ixp2000/ixdp2x00.c | |||
@@ -176,7 +176,7 @@ void ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long | |||
176 | *************************************************************************/ | 176 | *************************************************************************/ |
177 | static struct map_desc ixdp2x00_io_desc __initdata = { | 177 | static struct map_desc ixdp2x00_io_desc __initdata = { |
178 | .virtual = IXDP2X00_VIRT_CPLD_BASE, | 178 | .virtual = IXDP2X00_VIRT_CPLD_BASE, |
179 | .physical = IXDP2X00_PHYS_CPLD_BASE, | 179 | .pfn = __phys_to_pfn(IXDP2X00_PHYS_CPLD_BASE), |
180 | .length = IXDP2X00_CPLD_SIZE, | 180 | .length = IXDP2X00_CPLD_SIZE, |
181 | .type = MT_DEVICE | 181 | .type = MT_DEVICE |
182 | }; | 182 | }; |
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c index 7a5109921287..fee1d7b73503 100644 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ b/arch/arm/mach-ixp2000/ixdp2x01.c | |||
@@ -136,7 +136,7 @@ void __init ixdp2x01_init_irq(void) | |||
136 | *************************************************************************/ | 136 | *************************************************************************/ |
137 | static struct map_desc ixdp2x01_io_desc __initdata = { | 137 | static struct map_desc ixdp2x01_io_desc __initdata = { |
138 | .virtual = IXDP2X01_VIRT_CPLD_BASE, | 138 | .virtual = IXDP2X01_VIRT_CPLD_BASE, |
139 | .physical = IXDP2X01_PHYS_CPLD_BASE, | 139 | .pfn = __phys_to_pfn(IXDP2X01_PHYS_CPLD_BASE), |
140 | .length = IXDP2X01_CPLD_REGION_SIZE, | 140 | .length = IXDP2X01_CPLD_REGION_SIZE, |
141 | .type = MT_DEVICE | 141 | .type = MT_DEVICE |
142 | }; | 142 | }; |
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 36b6045213ee..6c396447c4e0 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -44,24 +44,24 @@ | |||
44 | static struct map_desc ixp4xx_io_desc[] __initdata = { | 44 | static struct map_desc ixp4xx_io_desc[] __initdata = { |
45 | { /* UART, Interrupt ctrl, GPIO, timers, NPEs, MACs, USB .... */ | 45 | { /* UART, Interrupt ctrl, GPIO, timers, NPEs, MACs, USB .... */ |
46 | .virtual = IXP4XX_PERIPHERAL_BASE_VIRT, | 46 | .virtual = IXP4XX_PERIPHERAL_BASE_VIRT, |
47 | .physical = IXP4XX_PERIPHERAL_BASE_PHYS, | 47 | .pfn = __phys_to_pfn(IXP4XX_PERIPHERAL_BASE_PHYS), |
48 | .length = IXP4XX_PERIPHERAL_REGION_SIZE, | 48 | .length = IXP4XX_PERIPHERAL_REGION_SIZE, |
49 | .type = MT_DEVICE | 49 | .type = MT_DEVICE |
50 | }, { /* Expansion Bus Config Registers */ | 50 | }, { /* Expansion Bus Config Registers */ |
51 | .virtual = IXP4XX_EXP_CFG_BASE_VIRT, | 51 | .virtual = IXP4XX_EXP_CFG_BASE_VIRT, |
52 | .physical = IXP4XX_EXP_CFG_BASE_PHYS, | 52 | .pfn = __phys_to_pfn(IXP4XX_EXP_CFG_BASE_PHYS), |
53 | .length = IXP4XX_EXP_CFG_REGION_SIZE, | 53 | .length = IXP4XX_EXP_CFG_REGION_SIZE, |
54 | .type = MT_DEVICE | 54 | .type = MT_DEVICE |
55 | }, { /* PCI Registers */ | 55 | }, { /* PCI Registers */ |
56 | .virtual = IXP4XX_PCI_CFG_BASE_VIRT, | 56 | .virtual = IXP4XX_PCI_CFG_BASE_VIRT, |
57 | .physical = IXP4XX_PCI_CFG_BASE_PHYS, | 57 | .pfn = __phys_to_pfn(IXP4XX_PCI_CFG_BASE_PHYS), |
58 | .length = IXP4XX_PCI_CFG_REGION_SIZE, | 58 | .length = IXP4XX_PCI_CFG_REGION_SIZE, |
59 | .type = MT_DEVICE | 59 | .type = MT_DEVICE |
60 | }, | 60 | }, |
61 | #ifdef CONFIG_DEBUG_LL | 61 | #ifdef CONFIG_DEBUG_LL |
62 | { /* Debug UART mapping */ | 62 | { /* Debug UART mapping */ |
63 | .virtual = IXP4XX_DEBUG_UART_BASE_VIRT, | 63 | .virtual = IXP4XX_DEBUG_UART_BASE_VIRT, |
64 | .physical = IXP4XX_DEBUG_UART_BASE_PHYS, | 64 | .pfn = __phys_to_pfn(IXP4XX_DEBUG_UART_BASE_PHYS), |
65 | .length = IXP4XX_DEBUG_UART_REGION_SIZE, | 65 | .length = IXP4XX_DEBUG_UART_REGION_SIZE, |
66 | .type = MT_DEVICE | 66 | .type = MT_DEVICE |
67 | } | 67 | } |
diff --git a/arch/arm/mach-lh7a40x/arch-kev7a400.c b/arch/arm/mach-lh7a40x/arch-kev7a400.c index cb3dcd3bd00a..19f2fa2244c4 100644 --- a/arch/arm/mach-lh7a40x/arch-kev7a400.c +++ b/arch/arm/mach-lh7a40x/arch-kev7a400.c | |||
@@ -26,8 +26,17 @@ | |||
26 | /* This function calls the board specific IRQ initialization function. */ | 26 | /* This function calls the board specific IRQ initialization function. */ |
27 | 27 | ||
28 | static struct map_desc kev7a400_io_desc[] __initdata = { | 28 | static struct map_desc kev7a400_io_desc[] __initdata = { |
29 | { IO_VIRT, IO_PHYS, IO_SIZE, MT_DEVICE }, | 29 | { |
30 | { CPLD_VIRT, CPLD_PHYS, CPLD_SIZE, MT_DEVICE }, | 30 | .virtual = IO_VIRT, |
31 | .pfn = __phys_to_pfn(IO_PHYS), | ||
32 | .length = IO_SIZE, | ||
33 | .type = MT_DEVICE | ||
34 | }, { | ||
35 | .virtual = CPLD_VIRT, | ||
36 | .pfn = __phys_to_pfn(CPLD_PHYS), | ||
37 | .length = CPLD_SIZE, | ||
38 | .type = MT_DEVICE | ||
39 | } | ||
31 | }; | 40 | }; |
32 | 41 | ||
33 | void __init kev7a400_map_io(void) | 42 | void __init kev7a400_map_io(void) |
diff --git a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c index 6eb61a17c63b..a20eabc132b0 100644 --- a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c +++ b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c | |||
@@ -227,23 +227,79 @@ void __init lh7a40x_init_board_irq (void) | |||
227 | } | 227 | } |
228 | 228 | ||
229 | static struct map_desc lpd7a400_io_desc[] __initdata = { | 229 | static struct map_desc lpd7a400_io_desc[] __initdata = { |
230 | { IO_VIRT, IO_PHYS, IO_SIZE, MT_DEVICE }, | 230 | { |
231 | /* Mapping added to work around chip select problems */ | 231 | .virtual = IO_VIRT, |
232 | { IOBARRIER_VIRT, IOBARRIER_PHYS, IOBARRIER_SIZE, MT_DEVICE }, | 232 | .pfn = __phys_to_pfn(IO_PHYS), |
233 | { CF_VIRT, CF_PHYS, CF_SIZE, MT_DEVICE }, | 233 | .length = IO_SIZE, |
234 | .type = MT_DEVICE | ||
235 | }, { /* Mapping added to work around chip select problems */ | ||
236 | .virtual = IOBARRIER_VIRT, | ||
237 | .pfn = __phys_to_pfn(IOBARRIER_PHYS), | ||
238 | .length = IOBARRIER_SIZE, | ||
239 | .type = MT_DEVICE | ||
240 | }, { | ||
241 | .virtual = CF_VIRT, | ||
242 | .pfn = __phys_to_pfn(CF_PHYS), | ||
243 | .length = CF_SIZE, | ||
244 | .type = MT_DEVICE | ||
245 | }, { | ||
246 | .virtual = CPLD02_VIRT, | ||
247 | .pfn = __phys_to_pfn(CPLD02_PHYS), | ||
248 | .length = CPLD02_SIZE, | ||
249 | .type = MT_DEVICE | ||
250 | }, { | ||
251 | .virtual = CPLD06_VIRT, | ||
252 | .pfn = __phys_to_pfn(CPLD06_PHYS), | ||
253 | .length = CPLD06_SIZE, | ||
254 | .type = MT_DEVICE | ||
255 | }, { | ||
256 | .virtual = CPLD08_VIRT, | ||
257 | .pfn = __phys_to_pfn(CPLD08_PHYS), | ||
258 | .length = CPLD08_SIZE, | ||
259 | .type = MT_DEVICE | ||
260 | }, { | ||
261 | .virtual = CPLD0C_VIRT, | ||
262 | .pfn = __phys_to_pfn(CPLD0C_PHYS), | ||
263 | .length = CPLD0C_SIZE, | ||
264 | .type = MT_DEVICE | ||
265 | }, { | ||
266 | .virtual = CPLD0E_VIRT, | ||
267 | .pfn = __phys_to_pfn(CPLD0E_PHYS), | ||
268 | .length = CPLD0E_SIZE, | ||
269 | .type = MT_DEVICE | ||
270 | }, { | ||
271 | .virtual = CPLD10_VIRT, | ||
272 | .pfn = __phys_to_pfn(CPLD10_PHYS), | ||
273 | .length = CPLD10_SIZE, | ||
274 | .type = MT_DEVICE | ||
275 | }, { | ||
276 | .virtual = CPLD12_VIRT, | ||
277 | .pfn = __phys_to_pfn(CPLD12_PHYS), | ||
278 | .length = CPLD12_SIZE, | ||
279 | .type = MT_DEVICE | ||
280 | }, { | ||
281 | .virtual = CPLD14_VIRT, | ||
282 | .pfn = __phys_to_pfn(CPLD14_PHYS), | ||
283 | .length = CPLD14_SIZE, | ||
284 | .type = MT_DEVICE | ||
285 | }, { | ||
286 | .virtual = CPLD16_VIRT, | ||
287 | .pfn = __phys_to_pfn(CPLD16_PHYS), | ||
288 | .length = CPLD16_SIZE, | ||
289 | .type = MT_DEVICE | ||
290 | }, { | ||
291 | .virtual = CPLD18_VIRT, | ||
292 | .pfn = __phys_to_pfn(CPLD18_PHYS), | ||
293 | .length = CPLD18_SIZE, | ||
294 | .type = MT_DEVICE | ||
295 | }, { | ||
296 | .virtual = CPLD1A_VIRT, | ||
297 | .pfn = __phys_to_pfn(CPLD1A_PHYS), | ||
298 | .length = CPLD1A_SIZE, | ||
299 | .type = MT_DEVICE | ||
300 | }, | ||
234 | /* This mapping is redundant since the smc driver performs another. */ | 301 | /* This mapping is redundant since the smc driver performs another. */ |
235 | /* { CPLD00_VIRT, CPLD00_PHYS, CPLD00_SIZE, MT_DEVICE }, */ | 302 | /* { CPLD00_VIRT, CPLD00_PHYS, CPLD00_SIZE, MT_DEVICE }, */ |
236 | { CPLD02_VIRT, CPLD02_PHYS, CPLD02_SIZE, MT_DEVICE }, | ||
237 | { CPLD06_VIRT, CPLD06_PHYS, CPLD06_SIZE, MT_DEVICE }, | ||
238 | { CPLD08_VIRT, CPLD08_PHYS, CPLD08_SIZE, MT_DEVICE }, | ||
239 | { CPLD0C_VIRT, CPLD0C_PHYS, CPLD0C_SIZE, MT_DEVICE }, | ||
240 | { CPLD0E_VIRT, CPLD0E_PHYS, CPLD0E_SIZE, MT_DEVICE }, | ||
241 | { CPLD10_VIRT, CPLD10_PHYS, CPLD10_SIZE, MT_DEVICE }, | ||
242 | { CPLD12_VIRT, CPLD12_PHYS, CPLD12_SIZE, MT_DEVICE }, | ||
243 | { CPLD14_VIRT, CPLD14_PHYS, CPLD14_SIZE, MT_DEVICE }, | ||
244 | { CPLD16_VIRT, CPLD16_PHYS, CPLD16_SIZE, MT_DEVICE }, | ||
245 | { CPLD18_VIRT, CPLD18_PHYS, CPLD18_SIZE, MT_DEVICE }, | ||
246 | { CPLD1A_VIRT, CPLD1A_PHYS, CPLD1A_SIZE, MT_DEVICE }, | ||
247 | }; | 303 | }; |
248 | 304 | ||
249 | void __init | 305 | void __init |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index df0312b596e4..fd9183ff2ed5 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -103,8 +103,12 @@ static struct platform_device innovator_flash_device = { | |||
103 | 103 | ||
104 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ | 104 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ |
105 | static struct map_desc innovator1510_io_desc[] __initdata = { | 105 | static struct map_desc innovator1510_io_desc[] __initdata = { |
106 | { OMAP1510_FPGA_BASE, OMAP1510_FPGA_START, OMAP1510_FPGA_SIZE, | 106 | { |
107 | MT_DEVICE }, | 107 | .virtual = OMAP1510_FPGA_BASE, |
108 | .pfn = __phys_to_pfn(OMAP1510_FPGA_START), | ||
109 | .length = OMAP1510_FPGA_SIZE, | ||
110 | .type = MT_DEVICE | ||
111 | } | ||
108 | }; | 112 | }; |
109 | 113 | ||
110 | static struct resource innovator1510_smc91x_resources[] = { | 114 | static struct resource innovator1510_smc91x_resources[] = { |
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index 107c68c8ab54..2ba26e239108 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
@@ -134,8 +134,12 @@ void omap_perseus2_init_irq(void) | |||
134 | 134 | ||
135 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ | 135 | /* Only FPGA needs to be mapped here. All others are done with ioremap */ |
136 | static struct map_desc omap_perseus2_io_desc[] __initdata = { | 136 | static struct map_desc omap_perseus2_io_desc[] __initdata = { |
137 | {H2P2_DBG_FPGA_BASE, H2P2_DBG_FPGA_START, H2P2_DBG_FPGA_SIZE, | 137 | { |
138 | MT_DEVICE}, | 138 | .virtual = H2P2_DBG_FPGA_BASE, |
139 | .pfn = __phys_to_pfn(H2P2_DBG_FPGA_START), | ||
140 | .length = H2P2_DBG_FPGA_SIZE, | ||
141 | .type = MT_DEVICE | ||
142 | } | ||
139 | }; | 143 | }; |
140 | 144 | ||
141 | static void __init omap_perseus2_map_io(void) | 145 | static void __init omap_perseus2_map_io(void) |
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c index eb8261d7dead..79fb86535ebc 100644 --- a/arch/arm/mach-omap1/io.c +++ b/arch/arm/mach-omap1/io.c | |||
@@ -26,27 +26,59 @@ extern void omap_sram_init(void); | |||
26 | * default mapping provided here. | 26 | * default mapping provided here. |
27 | */ | 27 | */ |
28 | static struct map_desc omap_io_desc[] __initdata = { | 28 | static struct map_desc omap_io_desc[] __initdata = { |
29 | { IO_VIRT, IO_PHYS, IO_SIZE, MT_DEVICE }, | 29 | { |
30 | .virtual = IO_VIRT, | ||
31 | .pfn = __phys_to_pfn(IO_PHYS), | ||
32 | .length = IO_SIZE, | ||
33 | .type = MT_DEVICE | ||
34 | } | ||
30 | }; | 35 | }; |
31 | 36 | ||
32 | #ifdef CONFIG_ARCH_OMAP730 | 37 | #ifdef CONFIG_ARCH_OMAP730 |
33 | static struct map_desc omap730_io_desc[] __initdata = { | 38 | static struct map_desc omap730_io_desc[] __initdata = { |
34 | { OMAP730_DSP_BASE, OMAP730_DSP_START, OMAP730_DSP_SIZE, MT_DEVICE }, | 39 | { |
35 | { OMAP730_DSPREG_BASE, OMAP730_DSPREG_START, OMAP730_DSPREG_SIZE, MT_DEVICE }, | 40 | .virtual = OMAP730_DSP_BASE, |
41 | .pfn = __phys_to_pfn(OMAP730_DSP_START), | ||
42 | .length = OMAP730_DSP_SIZE, | ||
43 | .type = MT_DEVICE | ||
44 | }, { | ||
45 | .virtual = OMAP730_DSPREG_BASE, | ||
46 | .pfn = __phys_to_pfn(OMAP730_DSPREG_START), | ||
47 | .length = OMAP730_DSPREG_SIZE, | ||
48 | .type = MT_DEVICE | ||
49 | } | ||
36 | }; | 50 | }; |
37 | #endif | 51 | #endif |
38 | 52 | ||
39 | #ifdef CONFIG_ARCH_OMAP1510 | 53 | #ifdef CONFIG_ARCH_OMAP1510 |
40 | static struct map_desc omap1510_io_desc[] __initdata = { | 54 | static struct map_desc omap1510_io_desc[] __initdata = { |
41 | { OMAP1510_DSP_BASE, OMAP1510_DSP_START, OMAP1510_DSP_SIZE, MT_DEVICE }, | 55 | { |
42 | { OMAP1510_DSPREG_BASE, OMAP1510_DSPREG_START, OMAP1510_DSPREG_SIZE, MT_DEVICE }, | 56 | .virtual = OMAP1510_DSP_BASE, |
57 | .pfn = __phys_to_pfn(OMAP1510_DSP_START), | ||
58 | .length = OMAP1510_DSP_SIZE, | ||
59 | .type = MT_DEVICE | ||
60 | }, { | ||
61 | .virtual = OMAP1510_DSPREG_BASE, | ||
62 | .pfn = __phys_to_pfn(OMAP1510_DSPREG_START), | ||
63 | .length = OMAP1510_DSPREG_SIZE, | ||
64 | .type = MT_DEVICE | ||
65 | } | ||
43 | }; | 66 | }; |
44 | #endif | 67 | #endif |
45 | 68 | ||
46 | #if defined(CONFIG_ARCH_OMAP16XX) | 69 | #if defined(CONFIG_ARCH_OMAP16XX) |
47 | static struct map_desc omap16xx_io_desc[] __initdata = { | 70 | static struct map_desc omap16xx_io_desc[] __initdata = { |
48 | { OMAP16XX_DSP_BASE, OMAP16XX_DSP_START, OMAP16XX_DSP_SIZE, MT_DEVICE }, | 71 | { |
49 | { OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_START, OMAP16XX_DSPREG_SIZE, MT_DEVICE }, | 72 | .virtual = OMAP16XX_DSP_BASE, |
73 | .pfn = __phys_to_pfn(OMAP16XX_DSP_START), | ||
74 | .length = OMAP16XX_DSP_SIZE, | ||
75 | .type = MT_DEVICE | ||
76 | }, { | ||
77 | .virtual = OMAP16XX_DSPREG_BASE, | ||
78 | .pfn = __phys_to_pfn(OMAP16XX_DSPREG_START), | ||
79 | .length = OMAP16XX_DSPREG_SIZE, | ||
80 | .type = MT_DEVICE | ||
81 | } | ||
50 | }; | 82 | }; |
51 | #endif | 83 | #endif |
52 | 84 | ||
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 60c8b9d8bb9c..656f73bbcb5a 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <asm/arch/pxa-regs.h> | 34 | #include <asm/arch/pxa-regs.h> |
35 | #include <asm/arch/irq.h> | 35 | #include <asm/arch/irq.h> |
36 | #include <asm/arch/irda.h> | ||
36 | #include <asm/arch/mmc.h> | 37 | #include <asm/arch/mmc.h> |
37 | #include <asm/arch/udc.h> | 38 | #include <asm/arch/udc.h> |
38 | #include <asm/arch/corgi.h> | 39 | #include <asm/arch/corgi.h> |
@@ -224,6 +225,22 @@ static struct pxamci_platform_data corgi_mci_platform_data = { | |||
224 | }; | 225 | }; |
225 | 226 | ||
226 | 227 | ||
228 | /* | ||
229 | * Irda | ||
230 | */ | ||
231 | static void corgi_irda_transceiver_mode(struct device *dev, int mode) | ||
232 | { | ||
233 | if (mode & IR_OFF) | ||
234 | GPSR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON); | ||
235 | else | ||
236 | GPCR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON); | ||
237 | } | ||
238 | |||
239 | static struct pxaficp_platform_data corgi_ficp_platform_data = { | ||
240 | .transceiver_cap = IR_SIRMODE | IR_OFF, | ||
241 | .transceiver_mode = corgi_irda_transceiver_mode, | ||
242 | }; | ||
243 | |||
227 | 244 | ||
228 | /* | 245 | /* |
229 | * USB Device Controller | 246 | * USB Device Controller |
@@ -269,10 +286,13 @@ static void __init corgi_init(void) | |||
269 | 286 | ||
270 | corgi_ssp_set_machinfo(&corgi_ssp_machinfo); | 287 | corgi_ssp_set_machinfo(&corgi_ssp_machinfo); |
271 | 288 | ||
289 | pxa_gpio_mode(CORGI_GPIO_IR_ON | GPIO_OUT); | ||
272 | pxa_gpio_mode(CORGI_GPIO_USB_PULLUP | GPIO_OUT); | 290 | pxa_gpio_mode(CORGI_GPIO_USB_PULLUP | GPIO_OUT); |
273 | pxa_gpio_mode(CORGI_GPIO_HSYNC | GPIO_IN); | 291 | pxa_gpio_mode(CORGI_GPIO_HSYNC | GPIO_IN); |
292 | |||
274 | pxa_set_udc_info(&udc_info); | 293 | pxa_set_udc_info(&udc_info); |
275 | pxa_set_mci_info(&corgi_mci_platform_data); | 294 | pxa_set_mci_info(&corgi_mci_platform_data); |
295 | pxa_set_ficp_info(&corgi_ficp_platform_data); | ||
276 | 296 | ||
277 | scoop_num = 1; | 297 | scoop_num = 1; |
278 | scoop_devs = &corgi_pcmcia_scoop[0]; | 298 | scoop_devs = &corgi_pcmcia_scoop[0]; |
diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c index 0ef428287055..136c269db0b7 100644 --- a/arch/arm/mach-pxa/corgi_ssp.c +++ b/arch/arm/mach-pxa/corgi_ssp.c | |||
@@ -222,24 +222,22 @@ static int corgi_ssp_remove(struct device *dev) | |||
222 | return 0; | 222 | return 0; |
223 | } | 223 | } |
224 | 224 | ||
225 | static int corgi_ssp_suspend(struct device *dev, pm_message_t state, u32 level) | 225 | static int corgi_ssp_suspend(struct device *dev, pm_message_t state) |
226 | { | 226 | { |
227 | if (level == SUSPEND_POWER_DOWN) { | 227 | ssp_flush(&corgi_ssp_dev); |
228 | ssp_flush(&corgi_ssp_dev); | 228 | ssp_save_state(&corgi_ssp_dev,&corgi_ssp_state); |
229 | ssp_save_state(&corgi_ssp_dev,&corgi_ssp_state); | 229 | |
230 | } | ||
231 | return 0; | 230 | return 0; |
232 | } | 231 | } |
233 | 232 | ||
234 | static int corgi_ssp_resume(struct device *dev, u32 level) | 233 | static int corgi_ssp_resume(struct device *dev) |
235 | { | 234 | { |
236 | if (level == RESUME_POWER_ON) { | 235 | GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); /* High - Disable LCD Control/Timing Gen */ |
237 | GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); /* High - Disable LCD Control/Timing Gen */ | 236 | GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); /* High - Disable MAX1111*/ |
238 | GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); /* High - Disable MAX1111*/ | 237 | GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); /* High - Disable ADS7846*/ |
239 | GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); /* High - Disable ADS7846*/ | 238 | ssp_restore_state(&corgi_ssp_dev,&corgi_ssp_state); |
240 | ssp_restore_state(&corgi_ssp_dev,&corgi_ssp_state); | 239 | ssp_enable(&corgi_ssp_dev); |
241 | ssp_enable(&corgi_ssp_dev); | 240 | |
242 | } | ||
243 | return 0; | 241 | return 0; |
244 | } | 242 | } |
245 | 243 | ||
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 1d7677669a76..9c0289333301 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
24 | #include <linux/ioport.h> | 24 | #include <linux/ioport.h> |
25 | #include <linux/pm.h> | 25 | #include <linux/pm.h> |
26 | #include <linux/string.h> | ||
26 | 27 | ||
27 | #include <asm/hardware.h> | 28 | #include <asm/hardware.h> |
28 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
@@ -34,6 +35,7 @@ | |||
34 | #include <asm/arch/udc.h> | 35 | #include <asm/arch/udc.h> |
35 | #include <asm/arch/pxafb.h> | 36 | #include <asm/arch/pxafb.h> |
36 | #include <asm/arch/mmc.h> | 37 | #include <asm/arch/mmc.h> |
38 | #include <asm/arch/irda.h> | ||
37 | #include <asm/arch/i2c.h> | 39 | #include <asm/arch/i2c.h> |
38 | 40 | ||
39 | #include "generic.h" | 41 | #include "generic.h" |
@@ -92,14 +94,42 @@ EXPORT_SYMBOL(pxa_set_cken); | |||
92 | * and cache flush area. | 94 | * and cache flush area. |
93 | */ | 95 | */ |
94 | static struct map_desc standard_io_desc[] __initdata = { | 96 | static struct map_desc standard_io_desc[] __initdata = { |
95 | /* virtual physical length type */ | 97 | { /* Devs */ |
96 | { 0xf2000000, 0x40000000, 0x02000000, MT_DEVICE }, /* Devs */ | 98 | .virtual = 0xf2000000, |
97 | { 0xf4000000, 0x44000000, 0x00100000, MT_DEVICE }, /* LCD */ | 99 | .pfn = __phys_to_pfn(0x40000000), |
98 | { 0xf6000000, 0x48000000, 0x00100000, MT_DEVICE }, /* Mem Ctl */ | 100 | .length = 0x02000000, |
99 | { 0xf8000000, 0x4c000000, 0x00100000, MT_DEVICE }, /* USB host */ | 101 | .type = MT_DEVICE |
100 | { 0xfa000000, 0x50000000, 0x00100000, MT_DEVICE }, /* Camera */ | 102 | }, { /* LCD */ |
101 | { 0xfe000000, 0x58000000, 0x00100000, MT_DEVICE }, /* IMem ctl */ | 103 | .virtual = 0xf4000000, |
102 | { 0xff000000, 0x00000000, 0x00100000, MT_DEVICE } /* UNCACHED_PHYS_0 */ | 104 | .pfn = __phys_to_pfn(0x44000000), |
105 | .length = 0x00100000, | ||
106 | .type = MT_DEVICE | ||
107 | }, { /* Mem Ctl */ | ||
108 | .virtual = 0xf6000000, | ||
109 | .pfn = __phys_to_pfn(0x48000000), | ||
110 | .length = 0x00100000, | ||
111 | .type = MT_DEVICE | ||
112 | }, { /* USB host */ | ||
113 | .virtual = 0xf8000000, | ||
114 | .pfn = __phys_to_pfn(0x4c000000), | ||
115 | .length = 0x00100000, | ||
116 | .type = MT_DEVICE | ||
117 | }, { /* Camera */ | ||
118 | .virtual = 0xfa000000, | ||
119 | .pfn = __phys_to_pfn(0x50000000), | ||
120 | .length = 0x00100000, | ||
121 | .type = MT_DEVICE | ||
122 | }, { /* IMem ctl */ | ||
123 | .virtual = 0xfe000000, | ||
124 | .pfn = __phys_to_pfn(0x58000000), | ||
125 | .length = 0x00100000, | ||
126 | .type = MT_DEVICE | ||
127 | }, { /* UNCACHED_PHYS_0 */ | ||
128 | .virtual = 0xff000000, | ||
129 | .pfn = __phys_to_pfn(0x00000000), | ||
130 | .length = 0x00100000, | ||
131 | .type = MT_DEVICE | ||
132 | } | ||
103 | }; | 133 | }; |
104 | 134 | ||
105 | void __init pxa_map_io(void) | 135 | void __init pxa_map_io(void) |
@@ -225,6 +255,10 @@ static struct platform_device stuart_device = { | |||
225 | .name = "pxa2xx-uart", | 255 | .name = "pxa2xx-uart", |
226 | .id = 2, | 256 | .id = 2, |
227 | }; | 257 | }; |
258 | static struct platform_device hwuart_device = { | ||
259 | .name = "pxa2xx-uart", | ||
260 | .id = 3, | ||
261 | }; | ||
228 | 262 | ||
229 | static struct resource i2c_resources[] = { | 263 | static struct resource i2c_resources[] = { |
230 | { | 264 | { |
@@ -265,10 +299,26 @@ static struct resource i2s_resources[] = { | |||
265 | static struct platform_device i2s_device = { | 299 | static struct platform_device i2s_device = { |
266 | .name = "pxa2xx-i2s", | 300 | .name = "pxa2xx-i2s", |
267 | .id = -1, | 301 | .id = -1, |
268 | .resource = i2c_resources, | 302 | .resource = i2s_resources, |
269 | .num_resources = ARRAY_SIZE(i2s_resources), | 303 | .num_resources = ARRAY_SIZE(i2s_resources), |
270 | }; | 304 | }; |
271 | 305 | ||
306 | static u64 pxaficp_dmamask = ~(u32)0; | ||
307 | |||
308 | static struct platform_device pxaficp_device = { | ||
309 | .name = "pxa2xx-ir", | ||
310 | .id = -1, | ||
311 | .dev = { | ||
312 | .dma_mask = &pxaficp_dmamask, | ||
313 | .coherent_dma_mask = 0xffffffff, | ||
314 | }, | ||
315 | }; | ||
316 | |||
317 | void __init pxa_set_ficp_info(struct pxaficp_platform_data *info) | ||
318 | { | ||
319 | pxaficp_device.dev.platform_data = info; | ||
320 | } | ||
321 | |||
272 | static struct platform_device *devices[] __initdata = { | 322 | static struct platform_device *devices[] __initdata = { |
273 | &pxamci_device, | 323 | &pxamci_device, |
274 | &udc_device, | 324 | &udc_device, |
@@ -276,13 +326,26 @@ static struct platform_device *devices[] __initdata = { | |||
276 | &ffuart_device, | 326 | &ffuart_device, |
277 | &btuart_device, | 327 | &btuart_device, |
278 | &stuart_device, | 328 | &stuart_device, |
329 | &pxaficp_device, | ||
279 | &i2c_device, | 330 | &i2c_device, |
280 | &i2s_device, | 331 | &i2s_device, |
281 | }; | 332 | }; |
282 | 333 | ||
283 | static int __init pxa_init(void) | 334 | static int __init pxa_init(void) |
284 | { | 335 | { |
285 | return platform_add_devices(devices, ARRAY_SIZE(devices)); | 336 | int cpuid, ret; |
337 | |||
338 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
339 | if (ret) | ||
340 | return ret; | ||
341 | |||
342 | /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */ | ||
343 | cpuid = read_cpuid(CPUID_ID); | ||
344 | if (((cpuid >> 4) & 0xfff) == 0x2d0 || | ||
345 | ((cpuid >> 4) & 0xfff) == 0x290) | ||
346 | ret = platform_device_register(&hwuart_device); | ||
347 | |||
348 | return ret; | ||
286 | } | 349 | } |
287 | 350 | ||
288 | subsys_initcall(pxa_init); | 351 | subsys_initcall(pxa_init); |
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index 386e107b53cc..01a83ab09ac3 100644 --- a/arch/arm/mach-pxa/idp.c +++ b/arch/arm/mach-pxa/idp.c | |||
@@ -152,16 +152,17 @@ static void __init idp_init_irq(void) | |||
152 | } | 152 | } |
153 | 153 | ||
154 | static struct map_desc idp_io_desc[] __initdata = { | 154 | static struct map_desc idp_io_desc[] __initdata = { |
155 | /* virtual physical length type */ | 155 | { |
156 | 156 | .virtual = IDP_COREVOLT_VIRT, | |
157 | { IDP_COREVOLT_VIRT, | 157 | .pfn = __phys_to_pfn(IDP_COREVOLT_PHYS), |
158 | IDP_COREVOLT_PHYS, | 158 | .length = IDP_COREVOLT_SIZE, |
159 | IDP_COREVOLT_SIZE, | 159 | .type = MT_DEVICE |
160 | MT_DEVICE }, | 160 | }, { |
161 | { IDP_CPLD_VIRT, | 161 | .virtual = IDP_CPLD_VIRT, |
162 | IDP_CPLD_PHYS, | 162 | .pfn = __phys_to_pfn(IDP_CPLD_PHYS), |
163 | IDP_CPLD_SIZE, | 163 | .length = IDP_CPLD_SIZE, |
164 | MT_DEVICE } | 164 | .type = MT_DEVICE |
165 | } | ||
165 | }; | 166 | }; |
166 | 167 | ||
167 | static void __init idp_map_io(void) | 168 | static void __init idp_map_io(void) |
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 1f38033921e9..beccf455f796 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/arch/pxa-regs.h> | 35 | #include <asm/arch/pxa-regs.h> |
36 | #include <asm/arch/lubbock.h> | 36 | #include <asm/arch/lubbock.h> |
37 | #include <asm/arch/udc.h> | 37 | #include <asm/arch/udc.h> |
38 | #include <asm/arch/irda.h> | ||
38 | #include <asm/arch/pxafb.h> | 39 | #include <asm/arch/pxafb.h> |
39 | #include <asm/arch/mmc.h> | 40 | #include <asm/arch/mmc.h> |
40 | 41 | ||
@@ -237,16 +238,40 @@ static struct pxamci_platform_data lubbock_mci_platform_data = { | |||
237 | .init = lubbock_mci_init, | 238 | .init = lubbock_mci_init, |
238 | }; | 239 | }; |
239 | 240 | ||
241 | static void lubbock_irda_transceiver_mode(struct device *dev, int mode) | ||
242 | { | ||
243 | unsigned long flags; | ||
244 | |||
245 | local_irq_save(flags); | ||
246 | if (mode & IR_SIRMODE) { | ||
247 | LUB_MISC_WR &= ~(1 << 4); | ||
248 | } else if (mode & IR_FIRMODE) { | ||
249 | LUB_MISC_WR |= 1 << 4; | ||
250 | } | ||
251 | local_irq_restore(flags); | ||
252 | } | ||
253 | |||
254 | static struct pxaficp_platform_data lubbock_ficp_platform_data = { | ||
255 | .transceiver_cap = IR_SIRMODE | IR_FIRMODE, | ||
256 | .transceiver_mode = lubbock_irda_transceiver_mode, | ||
257 | }; | ||
258 | |||
240 | static void __init lubbock_init(void) | 259 | static void __init lubbock_init(void) |
241 | { | 260 | { |
242 | pxa_set_udc_info(&udc_info); | 261 | pxa_set_udc_info(&udc_info); |
243 | set_pxa_fb_info(&sharp_lm8v31); | 262 | set_pxa_fb_info(&sharp_lm8v31); |
244 | pxa_set_mci_info(&lubbock_mci_platform_data); | 263 | pxa_set_mci_info(&lubbock_mci_platform_data); |
264 | pxa_set_ficp_info(&lubbock_ficp_platform_data); | ||
245 | (void) platform_add_devices(devices, ARRAY_SIZE(devices)); | 265 | (void) platform_add_devices(devices, ARRAY_SIZE(devices)); |
246 | } | 266 | } |
247 | 267 | ||
248 | static struct map_desc lubbock_io_desc[] __initdata = { | 268 | static struct map_desc lubbock_io_desc[] __initdata = { |
249 | { LUBBOCK_FPGA_VIRT, LUBBOCK_FPGA_PHYS, 0x00100000, MT_DEVICE }, /* CPLD */ | 269 | { /* CPLD */ |
270 | .virtual = LUBBOCK_FPGA_VIRT, | ||
271 | .pfn = __phys_to_pfn(LUBBOCK_FPGA_PHYS), | ||
272 | .length = 0x00100000, | ||
273 | .type = MT_DEVICE | ||
274 | } | ||
250 | }; | 275 | }; |
251 | 276 | ||
252 | static void __init lubbock_map_io(void) | 277 | static void __init lubbock_map_io(void) |
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 85fdb5b1470a..a48c64026e1f 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <asm/arch/audio.h> | 37 | #include <asm/arch/audio.h> |
38 | #include <asm/arch/pxafb.h> | 38 | #include <asm/arch/pxafb.h> |
39 | #include <asm/arch/mmc.h> | 39 | #include <asm/arch/mmc.h> |
40 | #include <asm/arch/irda.h> | ||
40 | 41 | ||
41 | #include "generic.h" | 42 | #include "generic.h" |
42 | 43 | ||
@@ -294,6 +295,29 @@ static struct pxamci_platform_data mainstone_mci_platform_data = { | |||
294 | .exit = mainstone_mci_exit, | 295 | .exit = mainstone_mci_exit, |
295 | }; | 296 | }; |
296 | 297 | ||
298 | static void mainstone_irda_transceiver_mode(struct device *dev, int mode) | ||
299 | { | ||
300 | unsigned long flags; | ||
301 | |||
302 | local_irq_save(flags); | ||
303 | if (mode & IR_SIRMODE) { | ||
304 | MST_MSCWR1 &= ~MST_MSCWR1_IRDA_FIR; | ||
305 | } else if (mode & IR_FIRMODE) { | ||
306 | MST_MSCWR1 |= MST_MSCWR1_IRDA_FIR; | ||
307 | } | ||
308 | if (mode & IR_OFF) { | ||
309 | MST_MSCWR1 = (MST_MSCWR1 & ~MST_MSCWR1_IRDA_MASK) | MST_MSCWR1_IRDA_OFF; | ||
310 | } else { | ||
311 | MST_MSCWR1 = (MST_MSCWR1 & ~MST_MSCWR1_IRDA_MASK) | MST_MSCWR1_IRDA_FULL; | ||
312 | } | ||
313 | local_irq_restore(flags); | ||
314 | } | ||
315 | |||
316 | static struct pxaficp_platform_data mainstone_ficp_platform_data = { | ||
317 | .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF, | ||
318 | .transceiver_mode = mainstone_irda_transceiver_mode, | ||
319 | }; | ||
320 | |||
297 | static void __init mainstone_init(void) | 321 | static void __init mainstone_init(void) |
298 | { | 322 | { |
299 | /* | 323 | /* |
@@ -313,11 +337,17 @@ static void __init mainstone_init(void) | |||
313 | set_pxa_fb_info(&toshiba_ltm035a776c); | 337 | set_pxa_fb_info(&toshiba_ltm035a776c); |
314 | 338 | ||
315 | pxa_set_mci_info(&mainstone_mci_platform_data); | 339 | pxa_set_mci_info(&mainstone_mci_platform_data); |
340 | pxa_set_ficp_info(&mainstone_ficp_platform_data); | ||
316 | } | 341 | } |
317 | 342 | ||
318 | 343 | ||
319 | static struct map_desc mainstone_io_desc[] __initdata = { | 344 | static struct map_desc mainstone_io_desc[] __initdata = { |
320 | { MST_FPGA_VIRT, MST_FPGA_PHYS, 0x00100000, MT_DEVICE }, /* CPLD */ | 345 | { /* CPLD */ |
346 | .virtual = MST_FPGA_VIRT, | ||
347 | .pfn = __phys_to_pfn(MST_FPGA_PHYS), | ||
348 | .length = 0x00100000, | ||
349 | .type = MT_DEVICE | ||
350 | } | ||
321 | }; | 351 | }; |
322 | 352 | ||
323 | static void __init mainstone_map_io(void) | 353 | static void __init mainstone_map_io(void) |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index f25638810017..6d413f6701a7 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/arch/irq.h> | 32 | #include <asm/arch/irq.h> |
33 | #include <asm/arch/mmc.h> | 33 | #include <asm/arch/mmc.h> |
34 | #include <asm/arch/udc.h> | 34 | #include <asm/arch/udc.h> |
35 | #include <asm/arch/irda.h> | ||
35 | #include <asm/arch/poodle.h> | 36 | #include <asm/arch/poodle.h> |
36 | #include <asm/arch/pxafb.h> | 37 | #include <asm/arch/pxafb.h> |
37 | 38 | ||
@@ -152,6 +153,24 @@ static struct pxamci_platform_data poodle_mci_platform_data = { | |||
152 | 153 | ||
153 | 154 | ||
154 | /* | 155 | /* |
156 | * Irda | ||
157 | */ | ||
158 | static void poodle_irda_transceiver_mode(struct device *dev, int mode) | ||
159 | { | ||
160 | if (mode & IR_OFF) { | ||
161 | GPSR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON); | ||
162 | } else { | ||
163 | GPCR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON); | ||
164 | } | ||
165 | } | ||
166 | |||
167 | static struct pxaficp_platform_data poodle_ficp_platform_data = { | ||
168 | .transceiver_cap = IR_SIRMODE | IR_OFF, | ||
169 | .transceiver_mode = poodle_irda_transceiver_mode, | ||
170 | }; | ||
171 | |||
172 | |||
173 | /* | ||
155 | * USB Device Controller | 174 | * USB Device Controller |
156 | */ | 175 | */ |
157 | static void poodle_udc_command(int cmd) | 176 | static void poodle_udc_command(int cmd) |
@@ -244,8 +263,10 @@ static void __init poodle_init(void) | |||
244 | 263 | ||
245 | set_pxa_fb_info(&poodle_fb_info); | 264 | set_pxa_fb_info(&poodle_fb_info); |
246 | pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT); | 265 | pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT); |
266 | pxa_gpio_mode(POODLE_GPIO_IR_ON | GPIO_OUT); | ||
247 | pxa_set_udc_info(&udc_info); | 267 | pxa_set_udc_info(&udc_info); |
248 | pxa_set_mci_info(&poodle_mci_platform_data); | 268 | pxa_set_mci_info(&poodle_mci_platform_data); |
269 | pxa_set_ficp_info(&poodle_ficp_platform_data); | ||
249 | 270 | ||
250 | scoop_num = 1; | 271 | scoop_num = 1; |
251 | scoop_devs = &poodle_pcmcia_scoop[0]; | 272 | scoop_devs = &poodle_pcmcia_scoop[0]; |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 7869c3b4e62f..573a5758e781 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -129,7 +129,7 @@ void pxa_cpu_pm_enter(suspend_state_t state) | |||
129 | case PM_SUSPEND_MEM: | 129 | case PM_SUSPEND_MEM: |
130 | /* set resume return address */ | 130 | /* set resume return address */ |
131 | PSPR = virt_to_phys(pxa_cpu_resume); | 131 | PSPR = virt_to_phys(pxa_cpu_resume); |
132 | pxa_cpu_suspend(3); | 132 | pxa_cpu_suspend(PWRMODE_SLEEP); |
133 | break; | 133 | break; |
134 | } | 134 | } |
135 | } | 135 | } |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 9a791b07118d..09a5d593f04b 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -157,7 +157,7 @@ void pxa_cpu_pm_enter(suspend_state_t state) | |||
157 | case PM_SUSPEND_MEM: | 157 | case PM_SUSPEND_MEM: |
158 | /* set resume return address */ | 158 | /* set resume return address */ |
159 | PSPR = virt_to_phys(pxa_cpu_resume); | 159 | PSPR = virt_to_phys(pxa_cpu_resume); |
160 | pxa_cpu_suspend(3); | 160 | pxa_cpu_suspend(PWRMODE_SLEEP); |
161 | break; | 161 | break; |
162 | } | 162 | } |
163 | } | 163 | } |
diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S index 5786ccad938c..c9862688ff3d 100644 --- a/arch/arm/mach-pxa/sleep.S +++ b/arch/arm/mach-pxa/sleep.S | |||
@@ -28,7 +28,9 @@ | |||
28 | /* | 28 | /* |
29 | * pxa_cpu_suspend() | 29 | * pxa_cpu_suspend() |
30 | * | 30 | * |
31 | * Forces CPU into sleep state | 31 | * Forces CPU into sleep state. |
32 | * | ||
33 | * r0 = value for PWRMODE M field for desired sleep state | ||
32 | */ | 34 | */ |
33 | 35 | ||
34 | ENTRY(pxa_cpu_suspend) | 36 | ENTRY(pxa_cpu_suspend) |
@@ -53,6 +55,7 @@ ENTRY(pxa_cpu_suspend) | |||
53 | mov r10, sp | 55 | mov r10, sp |
54 | stmfd sp!, {r3 - r10} | 56 | stmfd sp!, {r3 - r10} |
55 | 57 | ||
58 | mov r5, r0 @ save sleep mode | ||
56 | @ preserve phys address of stack | 59 | @ preserve phys address of stack |
57 | mov r0, sp | 60 | mov r0, sp |
58 | bl sleep_phys_sp | 61 | bl sleep_phys_sp |
@@ -66,7 +69,7 @@ ENTRY(pxa_cpu_suspend) | |||
66 | @ (also workaround for sighting 28071) | 69 | @ (also workaround for sighting 28071) |
67 | 70 | ||
68 | @ prepare value for sleep mode | 71 | @ prepare value for sleep mode |
69 | mov r1, #3 @ sleep mode | 72 | mov r1, r5 @ sleep mode |
70 | 73 | ||
71 | @ prepare pointer to physical address 0 (virtual mapping in generic.c) | 74 | @ prepare pointer to physical address 0 (virtual mapping in generic.c) |
72 | mov r2, #UNCACHED_PHYS_0 | 75 | mov r2, #UNCACHED_PHYS_0 |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index d0ab428c2d7d..b838842b6a20 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | #include <asm/arch/pxa-regs.h> | 35 | #include <asm/arch/pxa-regs.h> |
36 | #include <asm/arch/irq.h> | 36 | #include <asm/arch/irq.h> |
37 | #include <asm/arch/irda.h> | ||
37 | #include <asm/arch/mmc.h> | 38 | #include <asm/arch/mmc.h> |
38 | #include <asm/arch/udc.h> | 39 | #include <asm/arch/udc.h> |
39 | #include <asm/arch/pxafb.h> | 40 | #include <asm/arch/pxafb.h> |
@@ -277,6 +278,23 @@ static struct pxamci_platform_data spitz_mci_platform_data = { | |||
277 | 278 | ||
278 | 279 | ||
279 | /* | 280 | /* |
281 | * Irda | ||
282 | */ | ||
283 | static void spitz_irda_transceiver_mode(struct device *dev, int mode) | ||
284 | { | ||
285 | if (mode & IR_OFF) | ||
286 | set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON); | ||
287 | else | ||
288 | reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON); | ||
289 | } | ||
290 | |||
291 | static struct pxaficp_platform_data spitz_ficp_platform_data = { | ||
292 | .transceiver_cap = IR_SIRMODE | IR_OFF, | ||
293 | .transceiver_mode = spitz_irda_transceiver_mode, | ||
294 | }; | ||
295 | |||
296 | |||
297 | /* | ||
280 | * Spitz PXA Framebuffer | 298 | * Spitz PXA Framebuffer |
281 | */ | 299 | */ |
282 | static struct pxafb_mach_info spitz_pxafb_info __initdata = { | 300 | static struct pxafb_mach_info spitz_pxafb_info __initdata = { |
@@ -326,6 +344,7 @@ static void __init common_init(void) | |||
326 | 344 | ||
327 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 345 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
328 | pxa_set_mci_info(&spitz_mci_platform_data); | 346 | pxa_set_mci_info(&spitz_mci_platform_data); |
347 | pxa_set_ficp_info(&spitz_ficp_platform_data); | ||
329 | set_pxa_fb_parent(&spitzssp_device.dev); | 348 | set_pxa_fb_parent(&spitzssp_device.dev); |
330 | set_pxa_fb_info(&spitz_pxafb_info); | 349 | set_pxa_fb_info(&spitz_pxafb_info); |
331 | } | 350 | } |
diff --git a/arch/arm/mach-pxa/standby.S b/arch/arm/mach-pxa/standby.S index 8a3f27b76784..6f6dbbd08021 100644 --- a/arch/arm/mach-pxa/standby.S +++ b/arch/arm/mach-pxa/standby.S | |||
@@ -21,7 +21,7 @@ | |||
21 | ENTRY(pxa_cpu_standby) | 21 | ENTRY(pxa_cpu_standby) |
22 | ldr r0, =PSSR | 22 | ldr r0, =PSSR |
23 | mov r1, #(PSSR_PH | PSSR_STS) | 23 | mov r1, #(PSSR_PH | PSSR_STS) |
24 | mov r2, #2 | 24 | mov r2, #PWRMODE_STANDBY |
25 | mov r3, #UNCACHED_PHYS_0 @ Read mem context in. | 25 | mov r3, #UNCACHED_PHYS_0 @ Read mem context in. |
26 | ldr ip, [r3] | 26 | ldr ip, [r3] |
27 | b 1f | 27 | b 1f |
diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c index e3587efec4bf..5c4ac1c008a6 100644 --- a/arch/arm/mach-rpc/riscpc.c +++ b/arch/arm/mach-rpc/riscpc.c | |||
@@ -61,9 +61,22 @@ static int __init parse_tag_acorn(const struct tag *tag) | |||
61 | __tagtable(ATAG_ACORN, parse_tag_acorn); | 61 | __tagtable(ATAG_ACORN, parse_tag_acorn); |
62 | 62 | ||
63 | static struct map_desc rpc_io_desc[] __initdata = { | 63 | static struct map_desc rpc_io_desc[] __initdata = { |
64 | { SCREEN_BASE, SCREEN_START, 2*1048576, MT_DEVICE }, /* VRAM */ | 64 | { /* VRAM */ |
65 | { (u32)IO_BASE, IO_START, IO_SIZE , MT_DEVICE }, /* IO space */ | 65 | .virtual = SCREEN_BASE, |
66 | { EASI_BASE, EASI_START, EASI_SIZE, MT_DEVICE } /* EASI space */ | 66 | .pfn = __phys_to_pfn(SCREEN_START), |
67 | .length = 2*1048576, | ||
68 | .type = MT_DEVICE | ||
69 | }, { /* IO space */ | ||
70 | .virtual = (u32)IO_BASE, | ||
71 | .pfn = __phys_to_pfn(IO_START), | ||
72 | .length = IO_SIZE , | ||
73 | .type = MT_DEVICE | ||
74 | }, { /* EASI space */ | ||
75 | .virtual = EASI_BASE, | ||
76 | .pfn = __phys_to_pfn(EASI_START), | ||
77 | .length = EASI_SIZE, | ||
78 | .type = MT_DEVICE | ||
79 | } | ||
67 | }; | 80 | }; |
68 | 81 | ||
69 | static void __init rpc_map_io(void) | 82 | static void __init rpc_map_io(void) |
diff --git a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h index 478c15c0e36a..9cbe5eef492b 100644 --- a/arch/arm/mach-s3c2410/cpu.h +++ b/arch/arm/mach-s3c2410/cpu.h | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | /* todo - fix when rmk changes iodescs to use `void __iomem *` */ | 22 | /* todo - fix when rmk changes iodescs to use `void __iomem *` */ |
23 | 23 | ||
24 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, S3C2410_PA_##x, S3C24XX_SZ_##x, MT_DEVICE } | 24 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C2410_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } |
25 | 25 | ||
26 | #ifndef MHZ | 26 | #ifndef MHZ |
27 | #define MHZ (1000*1000) | 27 | #define MHZ (1000*1000) |
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c index 0077937a7ab8..08bc7d95a45d 100644 --- a/arch/arm/mach-s3c2410/devs.c +++ b/arch/arm/mach-s3c2410/devs.c | |||
@@ -47,7 +47,7 @@ struct platform_device *s3c24xx_uart_devs[3]; | |||
47 | static struct resource s3c_usb_resource[] = { | 47 | static struct resource s3c_usb_resource[] = { |
48 | [0] = { | 48 | [0] = { |
49 | .start = S3C2410_PA_USBHOST, | 49 | .start = S3C2410_PA_USBHOST, |
50 | .end = S3C2410_PA_USBHOST + S3C24XX_SZ_USBHOST, | 50 | .end = S3C2410_PA_USBHOST + S3C24XX_SZ_USBHOST - 1, |
51 | .flags = IORESOURCE_MEM, | 51 | .flags = IORESOURCE_MEM, |
52 | }, | 52 | }, |
53 | [1] = { | 53 | [1] = { |
@@ -77,7 +77,7 @@ EXPORT_SYMBOL(s3c_device_usb); | |||
77 | static struct resource s3c_lcd_resource[] = { | 77 | static struct resource s3c_lcd_resource[] = { |
78 | [0] = { | 78 | [0] = { |
79 | .start = S3C2410_PA_LCD, | 79 | .start = S3C2410_PA_LCD, |
80 | .end = S3C2410_PA_LCD + S3C24XX_SZ_LCD, | 80 | .end = S3C2410_PA_LCD + S3C24XX_SZ_LCD - 1, |
81 | .flags = IORESOURCE_MEM, | 81 | .flags = IORESOURCE_MEM, |
82 | }, | 82 | }, |
83 | [1] = { | 83 | [1] = { |
@@ -103,21 +103,25 @@ struct platform_device s3c_device_lcd = { | |||
103 | 103 | ||
104 | EXPORT_SYMBOL(s3c_device_lcd); | 104 | EXPORT_SYMBOL(s3c_device_lcd); |
105 | 105 | ||
106 | static struct s3c2410fb_mach_info s3c2410fb_info; | 106 | void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd) |
107 | |||
108 | void __init set_s3c2410fb_info(struct s3c2410fb_mach_info *hard_s3c2410fb_info) | ||
109 | { | 107 | { |
110 | memcpy(&s3c2410fb_info,hard_s3c2410fb_info,sizeof(struct s3c2410fb_mach_info)); | 108 | struct s3c2410fb_mach_info *npd; |
111 | s3c_device_lcd.dev.platform_data = &s3c2410fb_info; | 109 | |
110 | npd = kmalloc(sizeof(*npd), GFP_KERNEL); | ||
111 | if (npd) { | ||
112 | memcpy(npd, pd, sizeof(*npd)); | ||
113 | s3c_device_lcd.dev.platform_data = npd; | ||
114 | } else { | ||
115 | printk(KERN_ERR "no memory for LCD platform data\n"); | ||
116 | } | ||
112 | } | 117 | } |
113 | EXPORT_SYMBOL(set_s3c2410fb_info); | ||
114 | 118 | ||
115 | /* NAND Controller */ | 119 | /* NAND Controller */ |
116 | 120 | ||
117 | static struct resource s3c_nand_resource[] = { | 121 | static struct resource s3c_nand_resource[] = { |
118 | [0] = { | 122 | [0] = { |
119 | .start = S3C2410_PA_NAND, | 123 | .start = S3C2410_PA_NAND, |
120 | .end = S3C2410_PA_NAND + S3C24XX_SZ_NAND, | 124 | .end = S3C2410_PA_NAND + S3C24XX_SZ_NAND - 1, |
121 | .flags = IORESOURCE_MEM, | 125 | .flags = IORESOURCE_MEM, |
122 | } | 126 | } |
123 | }; | 127 | }; |
@@ -136,7 +140,7 @@ EXPORT_SYMBOL(s3c_device_nand); | |||
136 | static struct resource s3c_usbgadget_resource[] = { | 140 | static struct resource s3c_usbgadget_resource[] = { |
137 | [0] = { | 141 | [0] = { |
138 | .start = S3C2410_PA_USBDEV, | 142 | .start = S3C2410_PA_USBDEV, |
139 | .end = S3C2410_PA_USBDEV + S3C24XX_SZ_USBDEV, | 143 | .end = S3C2410_PA_USBDEV + S3C24XX_SZ_USBDEV - 1, |
140 | .flags = IORESOURCE_MEM, | 144 | .flags = IORESOURCE_MEM, |
141 | }, | 145 | }, |
142 | [1] = { | 146 | [1] = { |
@@ -161,7 +165,7 @@ EXPORT_SYMBOL(s3c_device_usbgadget); | |||
161 | static struct resource s3c_wdt_resource[] = { | 165 | static struct resource s3c_wdt_resource[] = { |
162 | [0] = { | 166 | [0] = { |
163 | .start = S3C2410_PA_WATCHDOG, | 167 | .start = S3C2410_PA_WATCHDOG, |
164 | .end = S3C2410_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG, | 168 | .end = S3C2410_PA_WATCHDOG + S3C24XX_SZ_WATCHDOG - 1, |
165 | .flags = IORESOURCE_MEM, | 169 | .flags = IORESOURCE_MEM, |
166 | }, | 170 | }, |
167 | [1] = { | 171 | [1] = { |
@@ -186,7 +190,7 @@ EXPORT_SYMBOL(s3c_device_wdt); | |||
186 | static struct resource s3c_i2c_resource[] = { | 190 | static struct resource s3c_i2c_resource[] = { |
187 | [0] = { | 191 | [0] = { |
188 | .start = S3C2410_PA_IIC, | 192 | .start = S3C2410_PA_IIC, |
189 | .end = S3C2410_PA_IIC + S3C24XX_SZ_IIC, | 193 | .end = S3C2410_PA_IIC + S3C24XX_SZ_IIC - 1, |
190 | .flags = IORESOURCE_MEM, | 194 | .flags = IORESOURCE_MEM, |
191 | }, | 195 | }, |
192 | [1] = { | 196 | [1] = { |
@@ -211,7 +215,7 @@ EXPORT_SYMBOL(s3c_device_i2c); | |||
211 | static struct resource s3c_iis_resource[] = { | 215 | static struct resource s3c_iis_resource[] = { |
212 | [0] = { | 216 | [0] = { |
213 | .start = S3C2410_PA_IIS, | 217 | .start = S3C2410_PA_IIS, |
214 | .end = S3C2410_PA_IIS + S3C24XX_SZ_IIS, | 218 | .end = S3C2410_PA_IIS + S3C24XX_SZ_IIS -1, |
215 | .flags = IORESOURCE_MEM, | 219 | .flags = IORESOURCE_MEM, |
216 | } | 220 | } |
217 | }; | 221 | }; |
@@ -265,7 +269,7 @@ EXPORT_SYMBOL(s3c_device_rtc); | |||
265 | static struct resource s3c_adc_resource[] = { | 269 | static struct resource s3c_adc_resource[] = { |
266 | [0] = { | 270 | [0] = { |
267 | .start = S3C2410_PA_ADC, | 271 | .start = S3C2410_PA_ADC, |
268 | .end = S3C2410_PA_ADC + S3C24XX_SZ_ADC, | 272 | .end = S3C2410_PA_ADC + S3C24XX_SZ_ADC - 1, |
269 | .flags = IORESOURCE_MEM, | 273 | .flags = IORESOURCE_MEM, |
270 | }, | 274 | }, |
271 | [1] = { | 275 | [1] = { |
@@ -288,7 +292,7 @@ struct platform_device s3c_device_adc = { | |||
288 | static struct resource s3c_sdi_resource[] = { | 292 | static struct resource s3c_sdi_resource[] = { |
289 | [0] = { | 293 | [0] = { |
290 | .start = S3C2410_PA_SDI, | 294 | .start = S3C2410_PA_SDI, |
291 | .end = S3C2410_PA_SDI + S3C24XX_SZ_SDI, | 295 | .end = S3C2410_PA_SDI + S3C24XX_SZ_SDI - 1, |
292 | .flags = IORESOURCE_MEM, | 296 | .flags = IORESOURCE_MEM, |
293 | }, | 297 | }, |
294 | [1] = { | 298 | [1] = { |
@@ -465,7 +469,7 @@ EXPORT_SYMBOL(s3c_device_timer3); | |||
465 | static struct resource s3c_camif_resource[] = { | 469 | static struct resource s3c_camif_resource[] = { |
466 | [0] = { | 470 | [0] = { |
467 | .start = S3C2440_PA_CAMIF, | 471 | .start = S3C2440_PA_CAMIF, |
468 | .end = S3C2440_PA_CAMIF + S3C2440_SZ_CAMIF, | 472 | .end = S3C2440_PA_CAMIF + S3C2440_SZ_CAMIF - 1, |
469 | .flags = IORESOURCE_MEM, | 473 | .flags = IORESOURCE_MEM, |
470 | }, | 474 | }, |
471 | [1] = { | 475 | [1] = { |
diff --git a/arch/arm/mach-s3c2410/gpio.c b/arch/arm/mach-s3c2410/gpio.c index 94f1776cf312..23ea3d5fa09c 100644 --- a/arch/arm/mach-s3c2410/gpio.c +++ b/arch/arm/mach-s3c2410/gpio.c | |||
@@ -30,6 +30,7 @@ | |||
30 | * 04-Oct-2004 BJD Added irq filter controls for GPIO | 30 | * 04-Oct-2004 BJD Added irq filter controls for GPIO |
31 | * 05-Nov-2004 BJD EXPORT_SYMBOL() added for all code | 31 | * 05-Nov-2004 BJD EXPORT_SYMBOL() added for all code |
32 | * 13-Mar-2005 BJD Updates for __iomem | 32 | * 13-Mar-2005 BJD Updates for __iomem |
33 | * 26-Oct-2005 BJD Added generic configuration types | ||
33 | */ | 34 | */ |
34 | 35 | ||
35 | 36 | ||
@@ -58,6 +59,27 @@ void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function) | |||
58 | mask = 3 << S3C2410_GPIO_OFFSET(pin)*2; | 59 | mask = 3 << S3C2410_GPIO_OFFSET(pin)*2; |
59 | } | 60 | } |
60 | 61 | ||
62 | switch (function) { | ||
63 | case S3C2410_GPIO_LEAVE: | ||
64 | mask = 0; | ||
65 | function = 0; | ||
66 | break; | ||
67 | |||
68 | case S3C2410_GPIO_INPUT: | ||
69 | case S3C2410_GPIO_OUTPUT: | ||
70 | case S3C2410_GPIO_SFN2: | ||
71 | case S3C2410_GPIO_SFN3: | ||
72 | if (pin < S3C2410_GPIO_BANKB) { | ||
73 | function &= 1; | ||
74 | function <<= S3C2410_GPIO_OFFSET(pin); | ||
75 | } else { | ||
76 | function &= 3; | ||
77 | function <<= S3C2410_GPIO_OFFSET(pin)*2; | ||
78 | } | ||
79 | } | ||
80 | |||
81 | /* modify the specified register wwith IRQs off */ | ||
82 | |||
61 | local_irq_save(flags); | 83 | local_irq_save(flags); |
62 | 84 | ||
63 | con = __raw_readl(base + 0x00); | 85 | con = __raw_readl(base + 0x00); |
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 7b51bfd0ba6d..c1b5c63ec24a 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -32,6 +32,7 @@ | |||
32 | * 25-Jul-2005 BJD Removed ASIX static mappings | 32 | * 25-Jul-2005 BJD Removed ASIX static mappings |
33 | * 27-Jul-2005 BJD Ensure maximum frequency of i2c bus | 33 | * 27-Jul-2005 BJD Ensure maximum frequency of i2c bus |
34 | * 20-Sep-2005 BJD Added static to non-exported items | 34 | * 20-Sep-2005 BJD Added static to non-exported items |
35 | * 26-Oct-2005 BJD Added FB platform data | ||
35 | */ | 36 | */ |
36 | 37 | ||
37 | #include <linux/kernel.h> | 38 | #include <linux/kernel.h> |
@@ -61,8 +62,10 @@ | |||
61 | #include <asm/arch/regs-gpio.h> | 62 | #include <asm/arch/regs-gpio.h> |
62 | #include <asm/arch/regs-mem.h> | 63 | #include <asm/arch/regs-mem.h> |
63 | #include <asm/arch/regs-lcd.h> | 64 | #include <asm/arch/regs-lcd.h> |
65 | |||
64 | #include <asm/arch/nand.h> | 66 | #include <asm/arch/nand.h> |
65 | #include <asm/arch/iic.h> | 67 | #include <asm/arch/iic.h> |
68 | #include <asm/arch/fb.h> | ||
66 | 69 | ||
67 | #include <linux/mtd/mtd.h> | 70 | #include <linux/mtd/mtd.h> |
68 | #include <linux/mtd/nand.h> | 71 | #include <linux/mtd/nand.h> |
@@ -399,6 +402,38 @@ static struct s3c2410_platform_i2c bast_i2c_info = { | |||
399 | .max_freq = 130*1000, | 402 | .max_freq = 130*1000, |
400 | }; | 403 | }; |
401 | 404 | ||
405 | |||
406 | static struct s3c2410fb_mach_info __initdata bast_lcd_info = { | ||
407 | .width = 640, | ||
408 | .height = 480, | ||
409 | |||
410 | .xres = { | ||
411 | .min = 320, | ||
412 | .max = 1024, | ||
413 | .defval = 640, | ||
414 | }, | ||
415 | |||
416 | .yres = { | ||
417 | .min = 240, | ||
418 | .max = 600, | ||
419 | .defval = 480, | ||
420 | }, | ||
421 | |||
422 | .bpp = { | ||
423 | .min = 4, | ||
424 | .max = 16, | ||
425 | .defval = 8, | ||
426 | }, | ||
427 | |||
428 | .regs = { | ||
429 | .lcdcon1 = 0x00000176, | ||
430 | .lcdcon2 = 0x1d77c7c2, | ||
431 | .lcdcon3 = 0x013a7f13, | ||
432 | .lcdcon4 = 0x00000057, | ||
433 | .lcdcon5 = 0x00014b02, | ||
434 | } | ||
435 | }; | ||
436 | |||
402 | /* Standard BAST devices */ | 437 | /* Standard BAST devices */ |
403 | 438 | ||
404 | static struct platform_device *bast_devices[] __initdata = { | 439 | static struct platform_device *bast_devices[] __initdata = { |
@@ -454,6 +489,10 @@ static void __init bast_map_io(void) | |||
454 | usb_simtec_init(); | 489 | usb_simtec_init(); |
455 | } | 490 | } |
456 | 491 | ||
492 | static void __init bast_init(void) | ||
493 | { | ||
494 | s3c24xx_fb_set_platdata(&bast_lcd_info); | ||
495 | } | ||
457 | 496 | ||
458 | MACHINE_START(BAST, "Simtec-BAST") | 497 | MACHINE_START(BAST, "Simtec-BAST") |
459 | /* Maintainer: Ben Dooks <ben@simtec.co.uk> */ | 498 | /* Maintainer: Ben Dooks <ben@simtec.co.uk> */ |
@@ -463,5 +502,6 @@ MACHINE_START(BAST, "Simtec-BAST") | |||
463 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 502 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
464 | .map_io = bast_map_io, | 503 | .map_io = bast_map_io, |
465 | .init_irq = s3c24xx_init_irq, | 504 | .init_irq = s3c24xx_init_irq, |
505 | .init_machine = bast_init, | ||
466 | .timer = &s3c24xx_timer, | 506 | .timer = &s3c24xx_timer, |
467 | MACHINE_END | 507 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index fb3cb01266e5..7efeaaad2361 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
@@ -25,6 +25,7 @@ | |||
25 | * 14-Jan-2005 BJD Added clock init | 25 | * 14-Jan-2005 BJD Added clock init |
26 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | 26 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA |
27 | * 20-Sep-2005 BJD Added static to non-exported items | 27 | * 20-Sep-2005 BJD Added static to non-exported items |
28 | * 26-Oct-2005 BJD Changed name of fb init call | ||
28 | */ | 29 | */ |
29 | 30 | ||
30 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
@@ -164,7 +165,7 @@ static void __init h1940_init_irq(void) | |||
164 | 165 | ||
165 | static void __init h1940_init(void) | 166 | static void __init h1940_init(void) |
166 | { | 167 | { |
167 | set_s3c2410fb_info(&h1940_lcdcfg); | 168 | s3c24xx_fb_set_platdata(&h1940_lcdcfg); |
168 | } | 169 | } |
169 | 170 | ||
170 | MACHINE_START(H1940, "IPAQ-H1940") | 171 | MACHINE_START(H1940, "IPAQ-H1940") |
diff --git a/arch/arm/mach-s3c2410/mach-smdk2440.c b/arch/arm/mach-s3c2410/mach-smdk2440.c index 722ef46b630a..6950e61b7914 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2440.c +++ b/arch/arm/mach-s3c2410/mach-smdk2440.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * 10-Mar-2005 LCVR Replaced S3C2410_VA by S3C24XX_VA | 19 | * 10-Mar-2005 LCVR Replaced S3C2410_VA by S3C24XX_VA |
20 | * 14-Mar-2005 BJD void __iomem fixes | 20 | * 14-Mar-2005 BJD void __iomem fixes |
21 | * 20-Sep-2005 BJD Added static to non-exported items | 21 | * 20-Sep-2005 BJD Added static to non-exported items |
22 | * 26-Oct-2005 BJD Added framebuffer data | ||
22 | */ | 23 | */ |
23 | 24 | ||
24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
@@ -41,7 +42,10 @@ | |||
41 | //#include <asm/debug-ll.h> | 42 | //#include <asm/debug-ll.h> |
42 | #include <asm/arch/regs-serial.h> | 43 | #include <asm/arch/regs-serial.h> |
43 | #include <asm/arch/regs-gpio.h> | 44 | #include <asm/arch/regs-gpio.h> |
45 | #include <asm/arch/regs-lcd.h> | ||
46 | |||
44 | #include <asm/arch/idle.h> | 47 | #include <asm/arch/idle.h> |
48 | #include <asm/arch/fb.h> | ||
45 | 49 | ||
46 | #include "s3c2410.h" | 50 | #include "s3c2410.h" |
47 | #include "s3c2440.h" | 51 | #include "s3c2440.h" |
@@ -86,6 +90,70 @@ static struct s3c2410_uartcfg smdk2440_uartcfgs[] = { | |||
86 | } | 90 | } |
87 | }; | 91 | }; |
88 | 92 | ||
93 | /* LCD driver info */ | ||
94 | |||
95 | static struct s3c2410fb_mach_info smdk2440_lcd_cfg __initdata = { | ||
96 | .regs = { | ||
97 | |||
98 | .lcdcon1 = S3C2410_LCDCON1_TFT16BPP | | ||
99 | S3C2410_LCDCON1_TFT | | ||
100 | S3C2410_LCDCON1_CLKVAL(0x04), | ||
101 | |||
102 | .lcdcon2 = S3C2410_LCDCON2_VBPD(7) | | ||
103 | S3C2410_LCDCON2_LINEVAL(319) | | ||
104 | S3C2410_LCDCON2_VFPD(6) | | ||
105 | S3C2410_LCDCON2_VSPW(3), | ||
106 | |||
107 | .lcdcon3 = S3C2410_LCDCON3_HBPD(19) | | ||
108 | S3C2410_LCDCON3_HOZVAL(239) | | ||
109 | S3C2410_LCDCON3_HFPD(7), | ||
110 | |||
111 | .lcdcon4 = S3C2410_LCDCON4_MVAL(0) | | ||
112 | S3C2410_LCDCON4_HSPW(3), | ||
113 | |||
114 | .lcdcon5 = S3C2410_LCDCON5_FRM565 | | ||
115 | S3C2410_LCDCON5_INVVLINE | | ||
116 | S3C2410_LCDCON5_INVVFRAME | | ||
117 | S3C2410_LCDCON5_PWREN | | ||
118 | S3C2410_LCDCON5_HWSWP, | ||
119 | }, | ||
120 | |||
121 | #if 0 | ||
122 | /* currently setup by downloader */ | ||
123 | .gpccon = 0xaa940659, | ||
124 | .gpccon_mask = 0xffffffff, | ||
125 | .gpcup = 0x0000ffff, | ||
126 | .gpcup_mask = 0xffffffff, | ||
127 | .gpdcon = 0xaa84aaa0, | ||
128 | .gpdcon_mask = 0xffffffff, | ||
129 | .gpdup = 0x0000faff, | ||
130 | .gpdup_mask = 0xffffffff, | ||
131 | #endif | ||
132 | |||
133 | .lpcsel = ((0xCE6) & ~7) | 1<<4, | ||
134 | |||
135 | .width = 240, | ||
136 | .height = 320, | ||
137 | |||
138 | .xres = { | ||
139 | .min = 240, | ||
140 | .max = 240, | ||
141 | .defval = 240, | ||
142 | }, | ||
143 | |||
144 | .yres = { | ||
145 | .min = 320, | ||
146 | .max = 320, | ||
147 | .defval = 320, | ||
148 | }, | ||
149 | |||
150 | .bpp = { | ||
151 | .min = 16, | ||
152 | .max = 16, | ||
153 | .defval = 16, | ||
154 | }, | ||
155 | }; | ||
156 | |||
89 | static struct platform_device *smdk2440_devices[] __initdata = { | 157 | static struct platform_device *smdk2440_devices[] __initdata = { |
90 | &s3c_device_usb, | 158 | &s3c_device_usb, |
91 | &s3c_device_lcd, | 159 | &s3c_device_lcd, |
@@ -121,6 +189,8 @@ static void __init smdk2440_machine_init(void) | |||
121 | s3c2410_gpio_setpin(S3C2410_GPF6, 0); | 189 | s3c2410_gpio_setpin(S3C2410_GPF6, 0); |
122 | s3c2410_gpio_setpin(S3C2410_GPF7, 0); | 190 | s3c2410_gpio_setpin(S3C2410_GPF7, 0); |
123 | 191 | ||
192 | s3c24xx_fb_set_platdata(&smdk2440_lcd_cfg); | ||
193 | |||
124 | s3c2410_pm_init(); | 194 | s3c2410_pm_init(); |
125 | } | 195 | } |
126 | 196 | ||
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c index 24687f511bf5..75efb5da5b6d 100644 --- a/arch/arm/mach-sa1100/assabet.c +++ b/arch/arm/mach-sa1100/assabet.c | |||
@@ -388,9 +388,17 @@ static struct sa1100_port_fns assabet_port_fns __initdata = { | |||
388 | }; | 388 | }; |
389 | 389 | ||
390 | static struct map_desc assabet_io_desc[] __initdata = { | 390 | static struct map_desc assabet_io_desc[] __initdata = { |
391 | /* virtual physical length type */ | 391 | { /* Board Control Register */ |
392 | { 0xf1000000, 0x12000000, 0x00100000, MT_DEVICE }, /* Board Control Register */ | 392 | .virtual = 0xf1000000, |
393 | { 0xf2800000, 0x4b800000, 0x00800000, MT_DEVICE } /* MQ200 */ | 393 | .pfn = __phys_to_pfn(0x12000000), |
394 | .length = 0x00100000, | ||
395 | .type = MT_DEVICE | ||
396 | }, { /* MQ200 */ | ||
397 | .virtual = 0xf2800000, | ||
398 | .pfn = __phys_to_pfn(0x4b800000), | ||
399 | .length = 0x00800000, | ||
400 | .type = MT_DEVICE | ||
401 | } | ||
394 | }; | 402 | }; |
395 | 403 | ||
396 | static void __init assabet_map_io(void) | 404 | static void __init assabet_map_io(void) |
diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c index b6169cb09196..c92cebff7f8e 100644 --- a/arch/arm/mach-sa1100/badge4.c +++ b/arch/arm/mach-sa1100/badge4.c | |||
@@ -254,10 +254,22 @@ EXPORT_SYMBOL(badge4_set_5V); | |||
254 | 254 | ||
255 | 255 | ||
256 | static struct map_desc badge4_io_desc[] __initdata = { | 256 | static struct map_desc badge4_io_desc[] __initdata = { |
257 | /* virtual physical length type */ | 257 | { /* SRAM bank 1 */ |
258 | {0xf1000000, 0x08000000, 0x00100000, MT_DEVICE },/* SRAM bank 1 */ | 258 | .virtual = 0xf1000000, |
259 | {0xf2000000, 0x10000000, 0x00100000, MT_DEVICE },/* SRAM bank 2 */ | 259 | .pfn = __phys_to_pfn(0x08000000), |
260 | {0xf4000000, 0x48000000, 0x00100000, MT_DEVICE } /* SA-1111 */ | 260 | .length = 0x00100000, |
261 | .type = MT_DEVICE | ||
262 | }, { /* SRAM bank 2 */ | ||
263 | .virtual = 0xf2000000, | ||
264 | .pfn = __phys_to_pfn(0x10000000), | ||
265 | .length = 0x00100000, | ||
266 | .type = MT_DEVICE | ||
267 | }, { /* SA-1111 */ | ||
268 | .virtual = 0xf4000000, | ||
269 | .pfn = __phys_to_pfn(0x48000000), | ||
270 | .length = 0x00100000, | ||
271 | .type = MT_DEVICE | ||
272 | } | ||
261 | }; | 273 | }; |
262 | 274 | ||
263 | static void | 275 | static void |
diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c index 9484be7dc671..23cb74885275 100644 --- a/arch/arm/mach-sa1100/cerf.c +++ b/arch/arm/mach-sa1100/cerf.c | |||
@@ -100,8 +100,12 @@ static void __init cerf_init_irq(void) | |||
100 | } | 100 | } |
101 | 101 | ||
102 | static struct map_desc cerf_io_desc[] __initdata = { | 102 | static struct map_desc cerf_io_desc[] __initdata = { |
103 | /* virtual physical length type */ | 103 | { /* Crystal Ethernet Chip */ |
104 | { 0xf0000000, 0x08000000, 0x00100000, MT_DEVICE } /* Crystal Ethernet Chip */ | 104 | .virtual = 0xf0000000, |
105 | .pfn = __phys_to_pfn(0x08000000), | ||
106 | .length = 0x00100000, | ||
107 | .type = MT_DEVICE | ||
108 | } | ||
105 | }; | 109 | }; |
106 | 110 | ||
107 | static void __init cerf_map_io(void) | 111 | static void __init cerf_map_io(void) |
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index 6ecab7e2c238..7fd6e29c36b7 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c | |||
@@ -171,9 +171,17 @@ static void __init collie_init(void) | |||
171 | } | 171 | } |
172 | 172 | ||
173 | static struct map_desc collie_io_desc[] __initdata = { | 173 | static struct map_desc collie_io_desc[] __initdata = { |
174 | /* virtual physical length type */ | 174 | { /* 32M main flash (cs0) */ |
175 | {0xe8000000, 0x00000000, 0x02000000, MT_DEVICE}, /* 32M main flash (cs0) */ | 175 | .virtual = 0xe8000000, |
176 | {0xea000000, 0x08000000, 0x02000000, MT_DEVICE}, /* 32M boot flash (cs1) */ | 176 | .pfn = __phys_to_pfn(0x00000000), |
177 | .length = 0x02000000, | ||
178 | .type = MT_DEVICE | ||
179 | }, { /* 32M boot flash (cs1) */ | ||
180 | .virtual = 0xea000000, | ||
181 | .pfn = __phys_to_pfn(0x08000000), | ||
182 | .length = 0x02000000, | ||
183 | .type = MT_DEVICE | ||
184 | } | ||
177 | }; | 185 | }; |
178 | 186 | ||
179 | static void __init collie_map_io(void) | 187 | static void __init collie_map_io(void) |
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index 3f1e358455e5..83eba8b54816 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -17,12 +17,14 @@ | |||
17 | #include <linux/pm.h> | 17 | #include <linux/pm.h> |
18 | #include <linux/cpufreq.h> | 18 | #include <linux/cpufreq.h> |
19 | #include <linux/ioport.h> | 19 | #include <linux/ioport.h> |
20 | #include <linux/sched.h> /* just for sched_clock() - funny that */ | ||
20 | 21 | ||
21 | #include <asm/div64.h> | 22 | #include <asm/div64.h> |
22 | #include <asm/hardware.h> | 23 | #include <asm/hardware.h> |
23 | #include <asm/system.h> | 24 | #include <asm/system.h> |
24 | #include <asm/pgtable.h> | 25 | #include <asm/pgtable.h> |
25 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
27 | #include <asm/mach/flash.h> | ||
26 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
27 | 29 | ||
28 | #include "generic.h" | 30 | #include "generic.h" |
@@ -283,6 +285,7 @@ static struct platform_device sa11x0mtd_device = { | |||
283 | void sa11x0_set_flash_data(struct flash_platform_data *flash, | 285 | void sa11x0_set_flash_data(struct flash_platform_data *flash, |
284 | struct resource *res, int nr) | 286 | struct resource *res, int nr) |
285 | { | 287 | { |
288 | flash->name = "sa1100"; | ||
286 | sa11x0mtd_device.dev.platform_data = flash; | 289 | sa11x0mtd_device.dev.platform_data = flash; |
287 | sa11x0mtd_device.resource = res; | 290 | sa11x0mtd_device.resource = res; |
288 | sa11x0mtd_device.num_resources = nr; | 291 | sa11x0mtd_device.num_resources = nr; |
@@ -369,11 +372,27 @@ EXPORT_SYMBOL(sa1100fb_lcd_power); | |||
369 | */ | 372 | */ |
370 | 373 | ||
371 | static struct map_desc standard_io_desc[] __initdata = { | 374 | static struct map_desc standard_io_desc[] __initdata = { |
372 | /* virtual physical length type */ | 375 | { /* PCM */ |
373 | { 0xf8000000, 0x80000000, 0x00100000, MT_DEVICE }, /* PCM */ | 376 | .virtual = 0xf8000000, |
374 | { 0xfa000000, 0x90000000, 0x00100000, MT_DEVICE }, /* SCM */ | 377 | .pfn = __phys_to_pfn(0x80000000), |
375 | { 0xfc000000, 0xa0000000, 0x00100000, MT_DEVICE }, /* MER */ | 378 | .length = 0x00100000, |
376 | { 0xfe000000, 0xb0000000, 0x00200000, MT_DEVICE } /* LCD + DMA */ | 379 | .type = MT_DEVICE |
380 | }, { /* SCM */ | ||
381 | .virtual = 0xfa000000, | ||
382 | .pfn = __phys_to_pfn(0x90000000), | ||
383 | .length = 0x00100000, | ||
384 | .type = MT_DEVICE | ||
385 | }, { /* MER */ | ||
386 | .virtual = 0xfc000000, | ||
387 | .pfn = __phys_to_pfn(0xa0000000), | ||
388 | .length = 0x00100000, | ||
389 | .type = MT_DEVICE | ||
390 | }, { /* LCD + DMA */ | ||
391 | .virtual = 0xfe000000, | ||
392 | .pfn = __phys_to_pfn(0xb0000000), | ||
393 | .length = 0x00200000, | ||
394 | .type = MT_DEVICE | ||
395 | }, | ||
377 | }; | 396 | }; |
378 | 397 | ||
379 | void __init sa1100_map_io(void) | 398 | void __init sa1100_map_io(void) |
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c index e7aa2681ca64..e8352b7f74b0 100644 --- a/arch/arm/mach-sa1100/h3600.c +++ b/arch/arm/mach-sa1100/h3600.c | |||
@@ -223,10 +223,22 @@ static void h3xxx_lcd_power(int enable) | |||
223 | } | 223 | } |
224 | 224 | ||
225 | static struct map_desc h3600_io_desc[] __initdata = { | 225 | static struct map_desc h3600_io_desc[] __initdata = { |
226 | /* virtual physical length type */ | 226 | { /* static memory bank 2 CS#2 */ |
227 | { H3600_BANK_2_VIRT, SA1100_CS2_PHYS, 0x02800000, MT_DEVICE }, /* static memory bank 2 CS#2 */ | 227 | .virtual = H3600_BANK_2_VIRT, |
228 | { H3600_BANK_4_VIRT, SA1100_CS4_PHYS, 0x00800000, MT_DEVICE }, /* static memory bank 4 CS#4 */ | 228 | .pfn = __phys_to_pfn(SA1100_CS2_PHYS), |
229 | { H3600_EGPIO_VIRT, H3600_EGPIO_PHYS, 0x01000000, MT_DEVICE }, /* EGPIO 0 CS#5 */ | 229 | .length = 0x02800000, |
230 | .type = MT_DEVICE | ||
231 | }, { /* static memory bank 4 CS#4 */ | ||
232 | .virtual = H3600_BANK_4_VIRT, | ||
233 | .pfn = __phys_to_pfn(SA1100_CS4_PHYS), | ||
234 | .length = 0x00800000, | ||
235 | .type = MT_DEVICE | ||
236 | }, { /* EGPIO 0 CS#5 */ | ||
237 | .virtual = H3600_EGPIO_VIRT, | ||
238 | .pfn = __phys_to_pfn(H3600_EGPIO_PHYS), | ||
239 | .length = 0x01000000, | ||
240 | .type = MT_DEVICE | ||
241 | } | ||
230 | }; | 242 | }; |
231 | 243 | ||
232 | /* | 244 | /* |
diff --git a/arch/arm/mach-sa1100/hackkit.c b/arch/arm/mach-sa1100/hackkit.c index 502d65cfe654..c922e043c424 100644 --- a/arch/arm/mach-sa1100/hackkit.c +++ b/arch/arm/mach-sa1100/hackkit.c | |||
@@ -57,8 +57,12 @@ static void hackkit_uart_pm(struct uart_port *port, u_int state, u_int oldstate) | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | static struct map_desc hackkit_io_desc[] __initdata = { | 59 | static struct map_desc hackkit_io_desc[] __initdata = { |
60 | /* virtual physical length type */ | 60 | { /* Flash bank 0 */ |
61 | { 0xe8000000, 0x00000000, 0x01000000, MT_DEVICE } /* Flash bank 0 */ | 61 | .virtual = 0xe8000000, |
62 | .pfn = __phys_to_pfn(0x00000000), | ||
63 | .length = 0x01000000, | ||
64 | .type = MT_DEVICE | ||
65 | }, | ||
62 | }; | 66 | }; |
63 | 67 | ||
64 | static struct sa1100_port_fns hackkit_port_fns __initdata = { | 68 | static struct sa1100_port_fns hackkit_port_fns __initdata = { |
diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c index 2f497112c96a..89af0c831e8f 100644 --- a/arch/arm/mach-sa1100/jornada720.c +++ b/arch/arm/mach-sa1100/jornada720.c | |||
@@ -8,6 +8,8 @@ | |||
8 | #include <linux/delay.h> | 8 | #include <linux/delay.h> |
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/ioport.h> | 10 | #include <linux/ioport.h> |
11 | #include <linux/mtd/mtd.h> | ||
12 | #include <linux/mtd/partitions.h> | ||
11 | 13 | ||
12 | #include <asm/hardware.h> | 14 | #include <asm/hardware.h> |
13 | #include <asm/hardware/sa1111.h> | 15 | #include <asm/hardware/sa1111.h> |
@@ -16,6 +18,7 @@ | |||
16 | #include <asm/setup.h> | 18 | #include <asm/setup.h> |
17 | 19 | ||
18 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
21 | #include <asm/mach/flash.h> | ||
19 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
20 | #include <asm/mach/serial_sa1100.h> | 23 | #include <asm/mach/serial_sa1100.h> |
21 | 24 | ||
@@ -81,10 +84,22 @@ static int __init jornada720_init(void) | |||
81 | arch_initcall(jornada720_init); | 84 | arch_initcall(jornada720_init); |
82 | 85 | ||
83 | static struct map_desc jornada720_io_desc[] __initdata = { | 86 | static struct map_desc jornada720_io_desc[] __initdata = { |
84 | /* virtual physical length type */ | 87 | { /* Epson registers */ |
85 | { 0xf0000000, 0x48000000, 0x00100000, MT_DEVICE }, /* Epson registers */ | 88 | .virtual = 0xf0000000, |
86 | { 0xf1000000, 0x48200000, 0x00100000, MT_DEVICE }, /* Epson frame buffer */ | 89 | .pfn = __phys_to_pfn(0x48000000), |
87 | { 0xf4000000, 0x40000000, 0x00100000, MT_DEVICE } /* SA-1111 */ | 90 | .length = 0x00100000, |
91 | .type = MT_DEVICE | ||
92 | }, { /* Epson frame buffer */ | ||
93 | .virtual = 0xf1000000, | ||
94 | .pfn = __phys_to_pfn(0x48200000), | ||
95 | .length = 0x00100000, | ||
96 | .type = MT_DEVICE | ||
97 | }, { /* SA-1111 */ | ||
98 | .virtual = 0xf4000000, | ||
99 | .pfn = __phys_to_pfn(0x40000000), | ||
100 | .length = 0x00100000, | ||
101 | .type = MT_DEVICE | ||
102 | } | ||
88 | }; | 103 | }; |
89 | 104 | ||
90 | static void __init jornada720_map_io(void) | 105 | static void __init jornada720_map_io(void) |
@@ -96,6 +111,66 @@ static void __init jornada720_map_io(void) | |||
96 | sa1100_register_uart(1, 1); | 111 | sa1100_register_uart(1, 1); |
97 | } | 112 | } |
98 | 113 | ||
114 | static struct mtd_partition jornada720_partitions[] = { | ||
115 | { | ||
116 | .name = "JORNADA720 boot firmware", | ||
117 | .size = 0x00040000, | ||
118 | .offset = 0, | ||
119 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
120 | }, { | ||
121 | .name = "JORNADA720 kernel", | ||
122 | .size = 0x000c0000, | ||
123 | .offset = 0x00040000, | ||
124 | }, { | ||
125 | .name = "JORNADA720 params", | ||
126 | .size = 0x00040000, | ||
127 | .offset = 0x00100000, | ||
128 | }, { | ||
129 | .name = "JORNADA720 initrd", | ||
130 | .size = 0x00100000, | ||
131 | .offset = 0x00140000, | ||
132 | }, { | ||
133 | .name = "JORNADA720 root cramfs", | ||
134 | .size = 0x00300000, | ||
135 | .offset = 0x00240000, | ||
136 | }, { | ||
137 | .name = "JORNADA720 usr cramfs", | ||
138 | .size = 0x00800000, | ||
139 | .offset = 0x00540000, | ||
140 | }, { | ||
141 | .name = "JORNADA720 usr local", | ||
142 | .size = 0, /* will expand to the end of the flash */ | ||
143 | .offset = 0x00d00000, | ||
144 | } | ||
145 | }; | ||
146 | |||
147 | static void jornada720_set_vpp(int vpp) | ||
148 | { | ||
149 | if (vpp) | ||
150 | PPSR |= 0x80; | ||
151 | else | ||
152 | PPSR &= ~0x80; | ||
153 | PPDR |= 0x80; | ||
154 | } | ||
155 | |||
156 | static struct flash_platform_data jornada720_flash_data = { | ||
157 | .map_name = "cfi_probe", | ||
158 | .set_vpp = jornada720_set_vpp, | ||
159 | .parts = jornada720_partitions, | ||
160 | .nr_parts = ARRAY_SIZE(jornada720_partitions), | ||
161 | }; | ||
162 | |||
163 | static struct resource jornada720_flash_resource = { | ||
164 | .start = SA1100_CS0_PHYS, | ||
165 | .end = SA1100_CS0_PHYS + SZ_32M - 1, | ||
166 | .flags = IORESOURCE_MEM, | ||
167 | }; | ||
168 | |||
169 | static void __init jornada720_mach_init(void) | ||
170 | { | ||
171 | sa11x0_set_flash_data(&jornada720_flash_data, &jornada720_flash_resource, 1); | ||
172 | } | ||
173 | |||
99 | MACHINE_START(JORNADA720, "HP Jornada 720") | 174 | MACHINE_START(JORNADA720, "HP Jornada 720") |
100 | /* Maintainer: Michael Gernoth <michael@gernoth.net> */ | 175 | /* Maintainer: Michael Gernoth <michael@gernoth.net> */ |
101 | .phys_ram = 0xc0000000, | 176 | .phys_ram = 0xc0000000, |
@@ -105,4 +180,5 @@ MACHINE_START(JORNADA720, "HP Jornada 720") | |||
105 | .map_io = jornada720_map_io, | 180 | .map_io = jornada720_map_io, |
106 | .init_irq = sa1100_init_irq, | 181 | .init_irq = sa1100_init_irq, |
107 | .timer = &sa1100_timer, | 182 | .timer = &sa1100_timer, |
183 | .init_machine = jornada720_mach_init, | ||
108 | MACHINE_END | 184 | MACHINE_END |
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c index ed6744d480af..8c9e3dd52942 100644 --- a/arch/arm/mach-sa1100/lart.c +++ b/arch/arm/mach-sa1100/lart.c | |||
@@ -31,9 +31,17 @@ static void __init lart_init(void) | |||
31 | } | 31 | } |
32 | 32 | ||
33 | static struct map_desc lart_io_desc[] __initdata = { | 33 | static struct map_desc lart_io_desc[] __initdata = { |
34 | /* virtual physical length type */ | 34 | { /* main flash memory */ |
35 | { 0xe8000000, 0x00000000, 0x00400000, MT_DEVICE }, /* main flash memory */ | 35 | .virtual = 0xe8000000, |
36 | { 0xec000000, 0x08000000, 0x00400000, MT_DEVICE } /* main flash, alternative location */ | 36 | .pfn = __phys_to_pfn(0x00000000), |
37 | .length = 0x00400000, | ||
38 | .type = MT_DEVICE | ||
39 | }, { /* main flash, alternative location */ | ||
40 | .virtual = 0xec000000, | ||
41 | .pfn = __phys_to_pfn(0x08000000), | ||
42 | .length = 0x00400000, | ||
43 | .type = MT_DEVICE | ||
44 | } | ||
37 | }; | 45 | }; |
38 | 46 | ||
39 | static void __init lart_map_io(void) | 47 | static void __init lart_map_io(void) |
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c index fc061641b7be..052e4caedb89 100644 --- a/arch/arm/mach-sa1100/neponset.c +++ b/arch/arm/mach-sa1100/neponset.c | |||
@@ -178,33 +178,27 @@ static int neponset_probe(struct device *dev) | |||
178 | /* | 178 | /* |
179 | * LDM power management. | 179 | * LDM power management. |
180 | */ | 180 | */ |
181 | static int neponset_suspend(struct device *dev, pm_message_t state, u32 level) | 181 | static int neponset_suspend(struct device *dev, pm_message_t state) |
182 | { | 182 | { |
183 | /* | 183 | /* |
184 | * Save state. | 184 | * Save state. |
185 | */ | 185 | */ |
186 | if (level == SUSPEND_SAVE_STATE || | 186 | if (!dev->power.saved_state) |
187 | level == SUSPEND_DISABLE || | 187 | dev->power.saved_state = kmalloc(sizeof(unsigned int), GFP_KERNEL); |
188 | level == SUSPEND_POWER_DOWN) { | 188 | if (!dev->power.saved_state) |
189 | if (!dev->power.saved_state) | 189 | return -ENOMEM; |
190 | dev->power.saved_state = kmalloc(sizeof(unsigned int), GFP_KERNEL); | 190 | |
191 | if (!dev->power.saved_state) | 191 | *(unsigned int *)dev->power.saved_state = NCR_0; |
192 | return -ENOMEM; | ||
193 | |||
194 | *(unsigned int *)dev->power.saved_state = NCR_0; | ||
195 | } | ||
196 | 192 | ||
197 | return 0; | 193 | return 0; |
198 | } | 194 | } |
199 | 195 | ||
200 | static int neponset_resume(struct device *dev, u32 level) | 196 | static int neponset_resume(struct device *dev) |
201 | { | 197 | { |
202 | if (level == RESUME_RESTORE_STATE || level == RESUME_ENABLE) { | 198 | if (dev->power.saved_state) { |
203 | if (dev->power.saved_state) { | 199 | NCR_0 = *(unsigned int *)dev->power.saved_state; |
204 | NCR_0 = *(unsigned int *)dev->power.saved_state; | 200 | kfree(dev->power.saved_state); |
205 | kfree(dev->power.saved_state); | 201 | dev->power.saved_state = NULL; |
206 | dev->power.saved_state = NULL; | ||
207 | } | ||
208 | } | 202 | } |
209 | 203 | ||
210 | return 0; | 204 | return 0; |
@@ -331,9 +325,17 @@ static int __init neponset_init(void) | |||
331 | subsys_initcall(neponset_init); | 325 | subsys_initcall(neponset_init); |
332 | 326 | ||
333 | static struct map_desc neponset_io_desc[] __initdata = { | 327 | static struct map_desc neponset_io_desc[] __initdata = { |
334 | /* virtual physical length type */ | 328 | { /* System Registers */ |
335 | { 0xf3000000, 0x10000000, SZ_1M, MT_DEVICE }, /* System Registers */ | 329 | .virtual = 0xf3000000, |
336 | { 0xf4000000, 0x40000000, SZ_1M, MT_DEVICE } /* SA-1111 */ | 330 | .pfn = __phys_to_pfn(0x10000000), |
331 | .length = SZ_1M, | ||
332 | .type = MT_DEVICE | ||
333 | }, { /* SA-1111 */ | ||
334 | .virtual = 0xf4000000, | ||
335 | .pfn = __phys_to_pfn(0x40000000), | ||
336 | .length = SZ_1M, | ||
337 | .type = MT_DEVICE | ||
338 | } | ||
337 | }; | 339 | }; |
338 | 340 | ||
339 | void __init neponset_map_io(void) | 341 | void __init neponset_map_io(void) |
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c index 07f6d5fd7bb0..cfb6658e5cdf 100644 --- a/arch/arm/mach-sa1100/simpad.c +++ b/arch/arm/mach-sa1100/simpad.c | |||
@@ -60,11 +60,17 @@ EXPORT_SYMBOL(set_cs3_bit); | |||
60 | EXPORT_SYMBOL(clear_cs3_bit); | 60 | EXPORT_SYMBOL(clear_cs3_bit); |
61 | 61 | ||
62 | static struct map_desc simpad_io_desc[] __initdata = { | 62 | static struct map_desc simpad_io_desc[] __initdata = { |
63 | /* virtual physical length type */ | 63 | { /* MQ200 */ |
64 | /* MQ200 */ | 64 | .virtual = 0xf2800000, |
65 | { 0xf2800000, 0x4b800000, 0x00800000, MT_DEVICE }, | 65 | .pfn = __phys_to_pfn(0x4b800000), |
66 | /* Paules CS3, write only */ | 66 | .length = 0x00800000, |
67 | { 0xf1000000, 0x18000000, 0x00100000, MT_DEVICE }, | 67 | .type = MT_DEVICE |
68 | }, { /* Paules CS3, write only */ | ||
69 | .virtual = 0xf1000000, | ||
70 | .pfn = __phys_to_pfn(0x18000000), | ||
71 | .length = 0x00100000, | ||
72 | .type = MT_DEVICE | ||
73 | }, | ||
68 | }; | 74 | }; |
69 | 75 | ||
70 | 76 | ||
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c index 946c0d11c73b..2d428b6dbb58 100644 --- a/arch/arm/mach-shark/core.c +++ b/arch/arm/mach-shark/core.c | |||
@@ -62,7 +62,12 @@ arch_initcall(shark_init); | |||
62 | extern void shark_init_irq(void); | 62 | extern void shark_init_irq(void); |
63 | 63 | ||
64 | static struct map_desc shark_io_desc[] __initdata = { | 64 | static struct map_desc shark_io_desc[] __initdata = { |
65 | { IO_BASE , IO_START , IO_SIZE , MT_DEVICE } | 65 | { |
66 | .virtual = IO_BASE, | ||
67 | .pfn = __phys_to_pfn(IO_START), | ||
68 | .length = IO_SIZE, | ||
69 | .type = MT_DEVICE | ||
70 | } | ||
66 | }; | 71 | }; |
67 | 72 | ||
68 | static void __init shark_map_io(void) | 73 | static void __init shark_map_io(void) |
diff --git a/arch/arm/mach-versatile/clock.c b/arch/arm/mach-versatile/clock.c index 48025c2b9987..b96a2ea15d41 100644 --- a/arch/arm/mach-versatile/clock.c +++ b/arch/arm/mach-versatile/clock.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/err.h> | 15 | #include <linux/err.h> |
16 | #include <linux/string.h> | ||
16 | 17 | ||
17 | #include <asm/semaphore.h> | 18 | #include <asm/semaphore.h> |
18 | #include <asm/hardware/clock.h> | 19 | #include <asm/hardware/clock.h> |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index a30e0451df72..7e4bdd07f4af 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -186,25 +186,82 @@ void __init versatile_init_irq(void) | |||
186 | } | 186 | } |
187 | 187 | ||
188 | static struct map_desc versatile_io_desc[] __initdata = { | 188 | static struct map_desc versatile_io_desc[] __initdata = { |
189 | { IO_ADDRESS(VERSATILE_SYS_BASE), VERSATILE_SYS_BASE, SZ_4K, MT_DEVICE }, | 189 | { |
190 | { IO_ADDRESS(VERSATILE_SIC_BASE), VERSATILE_SIC_BASE, SZ_4K, MT_DEVICE }, | 190 | .virtual = IO_ADDRESS(VERSATILE_SYS_BASE), |
191 | { IO_ADDRESS(VERSATILE_VIC_BASE), VERSATILE_VIC_BASE, SZ_4K, MT_DEVICE }, | 191 | .pfn = __phys_to_pfn(VERSATILE_SYS_BASE), |
192 | { IO_ADDRESS(VERSATILE_SCTL_BASE), VERSATILE_SCTL_BASE, SZ_4K * 9, MT_DEVICE }, | 192 | .length = SZ_4K, |
193 | .type = MT_DEVICE | ||
194 | }, { | ||
195 | .virtual = IO_ADDRESS(VERSATILE_SIC_BASE), | ||
196 | .pfn = __phys_to_pfn(VERSATILE_SIC_BASE), | ||
197 | .length = SZ_4K, | ||
198 | .type = MT_DEVICE | ||
199 | }, { | ||
200 | .virtual = IO_ADDRESS(VERSATILE_VIC_BASE), | ||
201 | .pfn = __phys_to_pfn(VERSATILE_VIC_BASE), | ||
202 | .length = SZ_4K, | ||
203 | .type = MT_DEVICE | ||
204 | }, { | ||
205 | .virtual = IO_ADDRESS(VERSATILE_SCTL_BASE), | ||
206 | .pfn = __phys_to_pfn(VERSATILE_SCTL_BASE), | ||
207 | .length = SZ_4K * 9, | ||
208 | .type = MT_DEVICE | ||
209 | }, | ||
193 | #ifdef CONFIG_MACH_VERSATILE_AB | 210 | #ifdef CONFIG_MACH_VERSATILE_AB |
194 | { IO_ADDRESS(VERSATILE_GPIO0_BASE), VERSATILE_GPIO0_BASE, SZ_4K, MT_DEVICE }, | 211 | { |
195 | { IO_ADDRESS(VERSATILE_IB2_BASE), VERSATILE_IB2_BASE, SZ_64M, MT_DEVICE }, | 212 | .virtual = IO_ADDRESS(VERSATILE_GPIO0_BASE), |
213 | .pfn = __phys_to_pfn(VERSATILE_GPIO0_BASE), | ||
214 | .length = SZ_4K, | ||
215 | .type = MT_DEVICE | ||
216 | }, { | ||
217 | .virtual = IO_ADDRESS(VERSATILE_IB2_BASE), | ||
218 | .pfn = __phys_to_pfn(VERSATILE_IB2_BASE), | ||
219 | .length = SZ_64M, | ||
220 | .type = MT_DEVICE | ||
221 | }, | ||
196 | #endif | 222 | #endif |
197 | #ifdef CONFIG_DEBUG_LL | 223 | #ifdef CONFIG_DEBUG_LL |
198 | { IO_ADDRESS(VERSATILE_UART0_BASE), VERSATILE_UART0_BASE, SZ_4K, MT_DEVICE }, | 224 | { |
225 | .virtual = IO_ADDRESS(VERSATILE_UART0_BASE), | ||
226 | .pfn = __phys_to_pfn(VERSATILE_UART0_BASE), | ||
227 | .length = SZ_4K, | ||
228 | .type = MT_DEVICE | ||
229 | }, | ||
199 | #endif | 230 | #endif |
200 | #ifdef CONFIG_PCI | 231 | #ifdef CONFIG_PCI |
201 | { IO_ADDRESS(VERSATILE_PCI_CORE_BASE), VERSATILE_PCI_CORE_BASE, SZ_4K, MT_DEVICE }, | 232 | { |
202 | { VERSATILE_PCI_VIRT_BASE, VERSATILE_PCI_BASE, VERSATILE_PCI_BASE_SIZE, MT_DEVICE }, | 233 | .virtual = IO_ADDRESS(VERSATILE_PCI_CORE_BASE), |
203 | { VERSATILE_PCI_CFG_VIRT_BASE, VERSATILE_PCI_CFG_BASE, VERSATILE_PCI_CFG_BASE_SIZE, MT_DEVICE }, | 234 | .pfn = __phys_to_pfn(VERSATILE_PCI_CORE_BASE), |
235 | .length = SZ_4K, | ||
236 | .type = MT_DEVICE | ||
237 | }, { | ||
238 | .virtual = VERSATILE_PCI_VIRT_BASE, | ||
239 | .pfn = __phys_to_pfn(VERSATILE_PCI_BASE), | ||
240 | .length = VERSATILE_PCI_BASE_SIZE, | ||
241 | .type = MT_DEVICE | ||
242 | }, { | ||
243 | .virtual = VERSATILE_PCI_CFG_VIRT_BASE, | ||
244 | .pfn = __phys_to_pfn(VERSATILE_PCI_CFG_BASE), | ||
245 | .length = VERSATILE_PCI_CFG_BASE_SIZE, | ||
246 | .type = MT_DEVICE | ||
247 | }, | ||
204 | #if 0 | 248 | #if 0 |
205 | { VERSATILE_PCI_VIRT_MEM_BASE0, VERSATILE_PCI_MEM_BASE0, SZ_16M, MT_DEVICE }, | 249 | { |
206 | { VERSATILE_PCI_VIRT_MEM_BASE1, VERSATILE_PCI_MEM_BASE1, SZ_16M, MT_DEVICE }, | 250 | .virtual = VERSATILE_PCI_VIRT_MEM_BASE0, |
207 | { VERSATILE_PCI_VIRT_MEM_BASE2, VERSATILE_PCI_MEM_BASE2, SZ_16M, MT_DEVICE }, | 251 | .pfn = __phys_to_pfn(VERSATILE_PCI_MEM_BASE0), |
252 | .length = SZ_16M, | ||
253 | .type = MT_DEVICE | ||
254 | }, { | ||
255 | .virtual = VERSATILE_PCI_VIRT_MEM_BASE1, | ||
256 | .pfn = __phys_to_pfn(VERSATILE_PCI_MEM_BASE1), | ||
257 | .length = SZ_16M, | ||
258 | .type = MT_DEVICE | ||
259 | }, { | ||
260 | .virtual = VERSATILE_PCI_VIRT_MEM_BASE2, | ||
261 | .pfn = __phys_to_pfn(VERSATILE_PCI_MEM_BASE2), | ||
262 | .length = SZ_16M, | ||
263 | .type = MT_DEVICE | ||
264 | }, | ||
208 | #endif | 265 | #endif |
209 | #endif | 266 | #endif |
210 | }; | 267 | }; |
diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c index 26356ce4da54..47b0b767f080 100644 --- a/arch/arm/mm/consistent.c +++ b/arch/arm/mm/consistent.c | |||
@@ -75,7 +75,7 @@ static struct vm_region consistent_head = { | |||
75 | }; | 75 | }; |
76 | 76 | ||
77 | static struct vm_region * | 77 | static struct vm_region * |
78 | vm_region_alloc(struct vm_region *head, size_t size, int gfp) | 78 | vm_region_alloc(struct vm_region *head, size_t size, gfp_t gfp) |
79 | { | 79 | { |
80 | unsigned long addr = head->vm_start, end = head->vm_end - size; | 80 | unsigned long addr = head->vm_start, end = head->vm_end - size; |
81 | unsigned long flags; | 81 | unsigned long flags; |
@@ -133,7 +133,7 @@ static struct vm_region *vm_region_find(struct vm_region *head, unsigned long ad | |||
133 | #endif | 133 | #endif |
134 | 134 | ||
135 | static void * | 135 | static void * |
136 | __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, int gfp, | 136 | __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, |
137 | pgprot_t prot) | 137 | pgprot_t prot) |
138 | { | 138 | { |
139 | struct page *page; | 139 | struct page *page; |
@@ -251,7 +251,7 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, int gfp, | |||
251 | * virtual and bus address for that space. | 251 | * virtual and bus address for that space. |
252 | */ | 252 | */ |
253 | void * | 253 | void * |
254 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, int gfp) | 254 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp) |
255 | { | 255 | { |
256 | return __dma_alloc(dev, size, handle, gfp, | 256 | return __dma_alloc(dev, size, handle, gfp, |
257 | pgprot_noncached(pgprot_kernel)); | 257 | pgprot_noncached(pgprot_kernel)); |
@@ -263,7 +263,7 @@ EXPORT_SYMBOL(dma_alloc_coherent); | |||
263 | * dma_alloc_coherent above. | 263 | * dma_alloc_coherent above. |
264 | */ | 264 | */ |
265 | void * | 265 | void * |
266 | dma_alloc_writecombine(struct device *dev, size_t size, dma_addr_t *handle, int gfp) | 266 | dma_alloc_writecombine(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp) |
267 | { | 267 | { |
268 | return __dma_alloc(dev, size, handle, gfp, | 268 | return __dma_alloc(dev, size, handle, gfp, |
269 | pgprot_writecombine(pgprot_kernel)); | 269 | pgprot_writecombine(pgprot_kernel)); |
@@ -397,8 +397,6 @@ static int __init consistent_init(void) | |||
397 | pte_t *pte; | 397 | pte_t *pte; |
398 | int ret = 0; | 398 | int ret = 0; |
399 | 399 | ||
400 | spin_lock(&init_mm.page_table_lock); | ||
401 | |||
402 | do { | 400 | do { |
403 | pgd = pgd_offset(&init_mm, CONSISTENT_BASE); | 401 | pgd = pgd_offset(&init_mm, CONSISTENT_BASE); |
404 | pmd = pmd_alloc(&init_mm, pgd, CONSISTENT_BASE); | 402 | pmd = pmd_alloc(&init_mm, pgd, CONSISTENT_BASE); |
@@ -409,7 +407,7 @@ static int __init consistent_init(void) | |||
409 | } | 407 | } |
410 | WARN_ON(!pmd_none(*pmd)); | 408 | WARN_ON(!pmd_none(*pmd)); |
411 | 409 | ||
412 | pte = pte_alloc_kernel(&init_mm, pmd, CONSISTENT_BASE); | 410 | pte = pte_alloc_kernel(pmd, CONSISTENT_BASE); |
413 | if (!pte) { | 411 | if (!pte) { |
414 | printk(KERN_ERR "%s: no pte tables\n", __func__); | 412 | printk(KERN_ERR "%s: no pte tables\n", __func__); |
415 | ret = -ENOMEM; | 413 | ret = -ENOMEM; |
@@ -419,8 +417,6 @@ static int __init consistent_init(void) | |||
419 | consistent_pte = pte; | 417 | consistent_pte = pte; |
420 | } while (0); | 418 | } while (0); |
421 | 419 | ||
422 | spin_unlock(&init_mm.page_table_lock); | ||
423 | |||
424 | return ret; | 420 | return ret; |
425 | } | 421 | } |
426 | 422 | ||
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c index 27d041574ea7..269ce6913ee9 100644 --- a/arch/arm/mm/copypage-v6.c +++ b/arch/arm/mm/copypage-v6.c | |||
@@ -22,9 +22,7 @@ | |||
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #define from_address (0xffff8000) | 24 | #define from_address (0xffff8000) |
25 | #define from_pgprot PAGE_KERNEL | ||
26 | #define to_address (0xffffc000) | 25 | #define to_address (0xffffc000) |
27 | #define to_pgprot PAGE_KERNEL | ||
28 | 26 | ||
29 | #define TOP_PTE(x) pte_offset_kernel(top_pmd, x) | 27 | #define TOP_PTE(x) pte_offset_kernel(top_pmd, x) |
30 | 28 | ||
@@ -34,7 +32,7 @@ static DEFINE_SPINLOCK(v6_lock); | |||
34 | * Copy the user page. No aliasing to deal with so we can just | 32 | * Copy the user page. No aliasing to deal with so we can just |
35 | * attack the kernel's existing mapping of these pages. | 33 | * attack the kernel's existing mapping of these pages. |
36 | */ | 34 | */ |
37 | void v6_copy_user_page_nonaliasing(void *kto, const void *kfrom, unsigned long vaddr) | 35 | static void v6_copy_user_page_nonaliasing(void *kto, const void *kfrom, unsigned long vaddr) |
38 | { | 36 | { |
39 | copy_page(kto, kfrom); | 37 | copy_page(kto, kfrom); |
40 | } | 38 | } |
@@ -43,7 +41,7 @@ void v6_copy_user_page_nonaliasing(void *kto, const void *kfrom, unsigned long v | |||
43 | * Clear the user page. No aliasing to deal with so we can just | 41 | * Clear the user page. No aliasing to deal with so we can just |
44 | * attack the kernel's existing mapping of this page. | 42 | * attack the kernel's existing mapping of this page. |
45 | */ | 43 | */ |
46 | void v6_clear_user_page_nonaliasing(void *kaddr, unsigned long vaddr) | 44 | static void v6_clear_user_page_nonaliasing(void *kaddr, unsigned long vaddr) |
47 | { | 45 | { |
48 | clear_page(kaddr); | 46 | clear_page(kaddr); |
49 | } | 47 | } |
@@ -51,7 +49,7 @@ void v6_clear_user_page_nonaliasing(void *kaddr, unsigned long vaddr) | |||
51 | /* | 49 | /* |
52 | * Copy the page, taking account of the cache colour. | 50 | * Copy the page, taking account of the cache colour. |
53 | */ | 51 | */ |
54 | void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vaddr) | 52 | static void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vaddr) |
55 | { | 53 | { |
56 | unsigned int offset = CACHE_COLOUR(vaddr); | 54 | unsigned int offset = CACHE_COLOUR(vaddr); |
57 | unsigned long from, to; | 55 | unsigned long from, to; |
@@ -72,8 +70,8 @@ void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vadd | |||
72 | */ | 70 | */ |
73 | spin_lock(&v6_lock); | 71 | spin_lock(&v6_lock); |
74 | 72 | ||
75 | set_pte(TOP_PTE(from_address) + offset, pfn_pte(__pa(kfrom) >> PAGE_SHIFT, from_pgprot)); | 73 | set_pte(TOP_PTE(from_address) + offset, pfn_pte(__pa(kfrom) >> PAGE_SHIFT, PAGE_KERNEL)); |
76 | set_pte(TOP_PTE(to_address) + offset, pfn_pte(__pa(kto) >> PAGE_SHIFT, to_pgprot)); | 74 | set_pte(TOP_PTE(to_address) + offset, pfn_pte(__pa(kto) >> PAGE_SHIFT, PAGE_KERNEL)); |
77 | 75 | ||
78 | from = from_address + (offset << PAGE_SHIFT); | 76 | from = from_address + (offset << PAGE_SHIFT); |
79 | to = to_address + (offset << PAGE_SHIFT); | 77 | to = to_address + (offset << PAGE_SHIFT); |
@@ -91,7 +89,7 @@ void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vadd | |||
91 | * so remap the kernel page into the same cache colour as the user | 89 | * so remap the kernel page into the same cache colour as the user |
92 | * page. | 90 | * page. |
93 | */ | 91 | */ |
94 | void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr) | 92 | static void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr) |
95 | { | 93 | { |
96 | unsigned int offset = CACHE_COLOUR(vaddr); | 94 | unsigned int offset = CACHE_COLOUR(vaddr); |
97 | unsigned long to = to_address + (offset << PAGE_SHIFT); | 95 | unsigned long to = to_address + (offset << PAGE_SHIFT); |
@@ -112,7 +110,7 @@ void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr) | |||
112 | */ | 110 | */ |
113 | spin_lock(&v6_lock); | 111 | spin_lock(&v6_lock); |
114 | 112 | ||
115 | set_pte(TOP_PTE(to_address) + offset, pfn_pte(__pa(kaddr) >> PAGE_SHIFT, to_pgprot)); | 113 | set_pte(TOP_PTE(to_address) + offset, pfn_pte(__pa(kaddr) >> PAGE_SHIFT, PAGE_KERNEL)); |
116 | flush_tlb_kernel_page(to); | 114 | flush_tlb_kernel_page(to); |
117 | clear_page((void *)to); | 115 | clear_page((void *)to); |
118 | 116 | ||
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index be4ab3d73c91..7fc1b35a6746 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c | |||
@@ -26,6 +26,11 @@ static unsigned long shared_pte_mask = L_PTE_CACHEABLE; | |||
26 | /* | 26 | /* |
27 | * We take the easy way out of this problem - we make the | 27 | * We take the easy way out of this problem - we make the |
28 | * PTE uncacheable. However, we leave the write buffer on. | 28 | * PTE uncacheable. However, we leave the write buffer on. |
29 | * | ||
30 | * Note that the pte lock held when calling update_mmu_cache must also | ||
31 | * guard the pte (somewhere else in the same mm) that we modify here. | ||
32 | * Therefore those configurations which might call adjust_pte (those | ||
33 | * without CONFIG_CPU_CACHE_VIPT) cannot support split page_table_lock. | ||
29 | */ | 34 | */ |
30 | static int adjust_pte(struct vm_area_struct *vma, unsigned long address) | 35 | static int adjust_pte(struct vm_area_struct *vma, unsigned long address) |
31 | { | 36 | { |
@@ -127,7 +132,7 @@ void __flush_dcache_page(struct address_space *mapping, struct page *page); | |||
127 | * 2. If we have multiple shared mappings of the same space in | 132 | * 2. If we have multiple shared mappings of the same space in |
128 | * an object, we need to deal with the cache aliasing issues. | 133 | * an object, we need to deal with the cache aliasing issues. |
129 | * | 134 | * |
130 | * Note that the page_table_lock will be held. | 135 | * Note that the pte lock will be held. |
131 | */ | 136 | */ |
132 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte) | 137 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte) |
133 | { | 138 | { |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index edffa47a4b2a..fd079ff1fc53 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/arm/mm/init.c | 2 | * linux/arch/arm/mm/init.c |
3 | * | 3 | * |
4 | * Copyright (C) 1995-2002 Russell King | 4 | * Copyright (C) 1995-2005 Russell King |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
@@ -86,14 +86,19 @@ void show_mem(void) | |||
86 | printk("%d pages swap cached\n", cached); | 86 | printk("%d pages swap cached\n", cached); |
87 | } | 87 | } |
88 | 88 | ||
89 | struct node_info { | 89 | static inline pmd_t *pmd_off(pgd_t *pgd, unsigned long virt) |
90 | unsigned int start; | 90 | { |
91 | unsigned int end; | 91 | return pmd_offset(pgd, virt); |
92 | int bootmap_pages; | 92 | } |
93 | }; | 93 | |
94 | static inline pmd_t *pmd_off_k(unsigned long virt) | ||
95 | { | ||
96 | return pmd_off(pgd_offset_k(virt), virt); | ||
97 | } | ||
94 | 98 | ||
95 | #define O_PFN_DOWN(x) ((x) >> PAGE_SHIFT) | 99 | #define for_each_nodebank(iter,mi,no) \ |
96 | #define O_PFN_UP(x) (PAGE_ALIGN(x) >> PAGE_SHIFT) | 100 | for (iter = 0; iter < mi->nr_banks; iter++) \ |
101 | if (mi->bank[iter].node == no) | ||
97 | 102 | ||
98 | /* | 103 | /* |
99 | * FIXME: We really want to avoid allocating the bootmap bitmap | 104 | * FIXME: We really want to avoid allocating the bootmap bitmap |
@@ -106,15 +111,12 @@ find_bootmap_pfn(int node, struct meminfo *mi, unsigned int bootmap_pages) | |||
106 | { | 111 | { |
107 | unsigned int start_pfn, bank, bootmap_pfn; | 112 | unsigned int start_pfn, bank, bootmap_pfn; |
108 | 113 | ||
109 | start_pfn = O_PFN_UP(__pa(&_end)); | 114 | start_pfn = PAGE_ALIGN(__pa(&_end)) >> PAGE_SHIFT; |
110 | bootmap_pfn = 0; | 115 | bootmap_pfn = 0; |
111 | 116 | ||
112 | for (bank = 0; bank < mi->nr_banks; bank ++) { | 117 | for_each_nodebank(bank, mi, node) { |
113 | unsigned int start, end; | 118 | unsigned int start, end; |
114 | 119 | ||
115 | if (mi->bank[bank].node != node) | ||
116 | continue; | ||
117 | |||
118 | start = mi->bank[bank].start >> PAGE_SHIFT; | 120 | start = mi->bank[bank].start >> PAGE_SHIFT; |
119 | end = (mi->bank[bank].size + | 121 | end = (mi->bank[bank].size + |
120 | mi->bank[bank].start) >> PAGE_SHIFT; | 122 | mi->bank[bank].start) >> PAGE_SHIFT; |
@@ -140,92 +142,6 @@ find_bootmap_pfn(int node, struct meminfo *mi, unsigned int bootmap_pages) | |||
140 | return bootmap_pfn; | 142 | return bootmap_pfn; |
141 | } | 143 | } |
142 | 144 | ||
143 | /* | ||
144 | * Scan the memory info structure and pull out: | ||
145 | * - the end of memory | ||
146 | * - the number of nodes | ||
147 | * - the pfn range of each node | ||
148 | * - the number of bootmem bitmap pages | ||
149 | */ | ||
150 | static unsigned int __init | ||
151 | find_memend_and_nodes(struct meminfo *mi, struct node_info *np) | ||
152 | { | ||
153 | unsigned int i, bootmem_pages = 0, memend_pfn = 0; | ||
154 | |||
155 | for (i = 0; i < MAX_NUMNODES; i++) { | ||
156 | np[i].start = -1U; | ||
157 | np[i].end = 0; | ||
158 | np[i].bootmap_pages = 0; | ||
159 | } | ||
160 | |||
161 | for (i = 0; i < mi->nr_banks; i++) { | ||
162 | unsigned long start, end; | ||
163 | int node; | ||
164 | |||
165 | if (mi->bank[i].size == 0) { | ||
166 | /* | ||
167 | * Mark this bank with an invalid node number | ||
168 | */ | ||
169 | mi->bank[i].node = -1; | ||
170 | continue; | ||
171 | } | ||
172 | |||
173 | node = mi->bank[i].node; | ||
174 | |||
175 | /* | ||
176 | * Make sure we haven't exceeded the maximum number of nodes | ||
177 | * that we have in this configuration. If we have, we're in | ||
178 | * trouble. (maybe we ought to limit, instead of bugging?) | ||
179 | */ | ||
180 | if (node >= MAX_NUMNODES) | ||
181 | BUG(); | ||
182 | node_set_online(node); | ||
183 | |||
184 | /* | ||
185 | * Get the start and end pfns for this bank | ||
186 | */ | ||
187 | start = mi->bank[i].start >> PAGE_SHIFT; | ||
188 | end = (mi->bank[i].start + mi->bank[i].size) >> PAGE_SHIFT; | ||
189 | |||
190 | if (np[node].start > start) | ||
191 | np[node].start = start; | ||
192 | |||
193 | if (np[node].end < end) | ||
194 | np[node].end = end; | ||
195 | |||
196 | if (memend_pfn < end) | ||
197 | memend_pfn = end; | ||
198 | } | ||
199 | |||
200 | /* | ||
201 | * Calculate the number of pages we require to | ||
202 | * store the bootmem bitmaps. | ||
203 | */ | ||
204 | for_each_online_node(i) { | ||
205 | if (np[i].end == 0) | ||
206 | continue; | ||
207 | |||
208 | np[i].bootmap_pages = bootmem_bootmap_pages(np[i].end - | ||
209 | np[i].start); | ||
210 | bootmem_pages += np[i].bootmap_pages; | ||
211 | } | ||
212 | |||
213 | high_memory = __va(memend_pfn << PAGE_SHIFT); | ||
214 | |||
215 | /* | ||
216 | * This doesn't seem to be used by the Linux memory | ||
217 | * manager any more. If we can get rid of it, we | ||
218 | * also get rid of some of the stuff above as well. | ||
219 | * | ||
220 | * Note: max_low_pfn and max_pfn reflect the number | ||
221 | * of _pages_ in the system, not the maximum PFN. | ||
222 | */ | ||
223 | max_low_pfn = memend_pfn - O_PFN_DOWN(PHYS_OFFSET); | ||
224 | max_pfn = memend_pfn - O_PFN_DOWN(PHYS_OFFSET); | ||
225 | |||
226 | return bootmem_pages; | ||
227 | } | ||
228 | |||
229 | static int __init check_initrd(struct meminfo *mi) | 145 | static int __init check_initrd(struct meminfo *mi) |
230 | { | 146 | { |
231 | int initrd_node = -2; | 147 | int initrd_node = -2; |
@@ -266,9 +182,8 @@ static int __init check_initrd(struct meminfo *mi) | |||
266 | /* | 182 | /* |
267 | * Reserve the various regions of node 0 | 183 | * Reserve the various regions of node 0 |
268 | */ | 184 | */ |
269 | static __init void reserve_node_zero(unsigned int bootmap_pfn, unsigned int bootmap_pages) | 185 | static __init void reserve_node_zero(pg_data_t *pgdat) |
270 | { | 186 | { |
271 | pg_data_t *pgdat = NODE_DATA(0); | ||
272 | unsigned long res_size = 0; | 187 | unsigned long res_size = 0; |
273 | 188 | ||
274 | /* | 189 | /* |
@@ -289,13 +204,6 @@ static __init void reserve_node_zero(unsigned int bootmap_pfn, unsigned int boot | |||
289 | PTRS_PER_PGD * sizeof(pgd_t)); | 204 | PTRS_PER_PGD * sizeof(pgd_t)); |
290 | 205 | ||
291 | /* | 206 | /* |
292 | * And don't forget to reserve the allocator bitmap, | ||
293 | * which will be freed later. | ||
294 | */ | ||
295 | reserve_bootmem_node(pgdat, bootmap_pfn << PAGE_SHIFT, | ||
296 | bootmap_pages << PAGE_SHIFT); | ||
297 | |||
298 | /* | ||
299 | * Hmm... This should go elsewhere, but we really really need to | 207 | * Hmm... This should go elsewhere, but we really really need to |
300 | * stop things allocating the low memory; ideally we need a better | 208 | * stop things allocating the low memory; ideally we need a better |
301 | * implementation of GFP_DMA which does not assume that DMA-able | 209 | * implementation of GFP_DMA which does not assume that DMA-able |
@@ -324,183 +232,284 @@ static __init void reserve_node_zero(unsigned int bootmap_pfn, unsigned int boot | |||
324 | reserve_bootmem_node(pgdat, PHYS_OFFSET, res_size); | 232 | reserve_bootmem_node(pgdat, PHYS_OFFSET, res_size); |
325 | } | 233 | } |
326 | 234 | ||
327 | /* | 235 | void __init build_mem_type_table(void); |
328 | * Register all available RAM in this node with the bootmem allocator. | 236 | void __init create_mapping(struct map_desc *md); |
329 | */ | 237 | |
330 | static inline void free_bootmem_node_bank(int node, struct meminfo *mi) | 238 | static unsigned long __init |
239 | bootmem_init_node(int node, int initrd_node, struct meminfo *mi) | ||
331 | { | 240 | { |
332 | pg_data_t *pgdat = NODE_DATA(node); | 241 | unsigned long zone_size[MAX_NR_ZONES], zhole_size[MAX_NR_ZONES]; |
333 | int bank; | 242 | unsigned long start_pfn, end_pfn, boot_pfn; |
243 | unsigned int boot_pages; | ||
244 | pg_data_t *pgdat; | ||
245 | int i; | ||
334 | 246 | ||
335 | for (bank = 0; bank < mi->nr_banks; bank++) | 247 | start_pfn = -1UL; |
336 | if (mi->bank[bank].node == node) | 248 | end_pfn = 0; |
337 | free_bootmem_node(pgdat, mi->bank[bank].start, | ||
338 | mi->bank[bank].size); | ||
339 | } | ||
340 | 249 | ||
341 | /* | 250 | /* |
342 | * Initialise the bootmem allocator for all nodes. This is called | 251 | * Calculate the pfn range, and map the memory banks for this node. |
343 | * early during the architecture specific initialisation. | 252 | */ |
344 | */ | 253 | for_each_nodebank(i, mi, node) { |
345 | static void __init bootmem_init(struct meminfo *mi) | 254 | unsigned long start, end; |
346 | { | 255 | struct map_desc map; |
347 | struct node_info node_info[MAX_NUMNODES], *np = node_info; | ||
348 | unsigned int bootmap_pages, bootmap_pfn, map_pg; | ||
349 | int node, initrd_node; | ||
350 | 256 | ||
351 | bootmap_pages = find_memend_and_nodes(mi, np); | 257 | start = mi->bank[i].start >> PAGE_SHIFT; |
352 | bootmap_pfn = find_bootmap_pfn(0, mi, bootmap_pages); | 258 | end = (mi->bank[i].start + mi->bank[i].size) >> PAGE_SHIFT; |
353 | initrd_node = check_initrd(mi); | 259 | |
260 | if (start_pfn > start) | ||
261 | start_pfn = start; | ||
262 | if (end_pfn < end) | ||
263 | end_pfn = end; | ||
354 | 264 | ||
355 | map_pg = bootmap_pfn; | 265 | map.pfn = __phys_to_pfn(mi->bank[i].start); |
266 | map.virtual = __phys_to_virt(mi->bank[i].start); | ||
267 | map.length = mi->bank[i].size; | ||
268 | map.type = MT_MEMORY; | ||
269 | |||
270 | create_mapping(&map); | ||
271 | } | ||
356 | 272 | ||
357 | /* | 273 | /* |
358 | * Initialise the bootmem nodes. | 274 | * If there is no memory in this node, ignore it. |
359 | * | ||
360 | * What we really want to do is: | ||
361 | * | ||
362 | * unmap_all_regions_except_kernel(); | ||
363 | * for_each_node_in_reverse_order(node) { | ||
364 | * map_node(node); | ||
365 | * allocate_bootmem_map(node); | ||
366 | * init_bootmem_node(node); | ||
367 | * free_bootmem_node(node); | ||
368 | * } | ||
369 | * | ||
370 | * but this is a 2.5-type change. For now, we just set | ||
371 | * the nodes up in reverse order. | ||
372 | * | ||
373 | * (we could also do with rolling bootmem_init and paging_init | ||
374 | * into one generic "memory_init" type function). | ||
375 | */ | 275 | */ |
376 | np += num_online_nodes() - 1; | 276 | if (end_pfn == 0) |
377 | for (node = num_online_nodes() - 1; node >= 0; node--, np--) { | 277 | return end_pfn; |
378 | /* | ||
379 | * If there are no pages in this node, ignore it. | ||
380 | * Note that node 0 must always have some pages. | ||
381 | */ | ||
382 | if (np->end == 0 || !node_online(node)) { | ||
383 | if (node == 0) | ||
384 | BUG(); | ||
385 | continue; | ||
386 | } | ||
387 | 278 | ||
388 | /* | 279 | /* |
389 | * Initialise the bootmem allocator. | 280 | * Allocate the bootmem bitmap page. |
390 | */ | 281 | */ |
391 | init_bootmem_node(NODE_DATA(node), map_pg, np->start, np->end); | 282 | boot_pages = bootmem_bootmap_pages(end_pfn - start_pfn); |
392 | free_bootmem_node_bank(node, mi); | 283 | boot_pfn = find_bootmap_pfn(node, mi, boot_pages); |
393 | map_pg += np->bootmap_pages; | ||
394 | 284 | ||
395 | /* | 285 | /* |
396 | * If this is node 0, we need to reserve some areas ASAP - | 286 | * Initialise the bootmem allocator for this node, handing the |
397 | * we may use bootmem on node 0 to setup the other nodes. | 287 | * memory banks over to bootmem. |
398 | */ | 288 | */ |
399 | if (node == 0) | 289 | node_set_online(node); |
400 | reserve_node_zero(bootmap_pfn, bootmap_pages); | 290 | pgdat = NODE_DATA(node); |
401 | } | 291 | init_bootmem_node(pgdat, boot_pfn, start_pfn, end_pfn); |
292 | |||
293 | for_each_nodebank(i, mi, node) | ||
294 | free_bootmem_node(pgdat, mi->bank[i].start, mi->bank[i].size); | ||
402 | 295 | ||
296 | /* | ||
297 | * Reserve the bootmem bitmap for this node. | ||
298 | */ | ||
299 | reserve_bootmem_node(pgdat, boot_pfn << PAGE_SHIFT, | ||
300 | boot_pages << PAGE_SHIFT); | ||
403 | 301 | ||
404 | #ifdef CONFIG_BLK_DEV_INITRD | 302 | #ifdef CONFIG_BLK_DEV_INITRD |
405 | if (phys_initrd_size && initrd_node >= 0) { | 303 | /* |
406 | reserve_bootmem_node(NODE_DATA(initrd_node), phys_initrd_start, | 304 | * If the initrd is in this node, reserve its memory. |
305 | */ | ||
306 | if (node == initrd_node) { | ||
307 | reserve_bootmem_node(pgdat, phys_initrd_start, | ||
407 | phys_initrd_size); | 308 | phys_initrd_size); |
408 | initrd_start = __phys_to_virt(phys_initrd_start); | 309 | initrd_start = __phys_to_virt(phys_initrd_start); |
409 | initrd_end = initrd_start + phys_initrd_size; | 310 | initrd_end = initrd_start + phys_initrd_size; |
410 | } | 311 | } |
411 | #endif | 312 | #endif |
412 | 313 | ||
413 | BUG_ON(map_pg != bootmap_pfn + bootmap_pages); | 314 | /* |
315 | * Finally, reserve any node zero regions. | ||
316 | */ | ||
317 | if (node == 0) | ||
318 | reserve_node_zero(pgdat); | ||
319 | |||
320 | /* | ||
321 | * initialise the zones within this node. | ||
322 | */ | ||
323 | memset(zone_size, 0, sizeof(zone_size)); | ||
324 | memset(zhole_size, 0, sizeof(zhole_size)); | ||
325 | |||
326 | /* | ||
327 | * The size of this node has already been determined. If we need | ||
328 | * to do anything fancy with the allocation of this memory to the | ||
329 | * zones, now is the time to do it. | ||
330 | */ | ||
331 | zone_size[0] = end_pfn - start_pfn; | ||
332 | |||
333 | /* | ||
334 | * For each bank in this node, calculate the size of the holes. | ||
335 | * holes = node_size - sum(bank_sizes_in_node) | ||
336 | */ | ||
337 | zhole_size[0] = zone_size[0]; | ||
338 | for_each_nodebank(i, mi, node) | ||
339 | zhole_size[0] -= mi->bank[i].size >> PAGE_SHIFT; | ||
340 | |||
341 | /* | ||
342 | * Adjust the sizes according to any special requirements for | ||
343 | * this machine type. | ||
344 | */ | ||
345 | arch_adjust_zones(node, zone_size, zhole_size); | ||
346 | |||
347 | free_area_init_node(node, pgdat, zone_size, start_pfn, zhole_size); | ||
348 | |||
349 | return end_pfn; | ||
414 | } | 350 | } |
415 | 351 | ||
416 | /* | 352 | static void __init bootmem_init(struct meminfo *mi) |
417 | * paging_init() sets up the page tables, initialises the zone memory | ||
418 | * maps, and sets up the zero page, bad page and bad page tables. | ||
419 | */ | ||
420 | void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc) | ||
421 | { | 353 | { |
422 | void *zero_page; | 354 | unsigned long addr, memend_pfn = 0; |
423 | int node; | 355 | int node, initrd_node, i; |
424 | 356 | ||
425 | bootmem_init(mi); | 357 | /* |
358 | * Invalidate the node number for empty or invalid memory banks | ||
359 | */ | ||
360 | for (i = 0; i < mi->nr_banks; i++) | ||
361 | if (mi->bank[i].size == 0 || mi->bank[i].node >= MAX_NUMNODES) | ||
362 | mi->bank[i].node = -1; | ||
426 | 363 | ||
427 | memcpy(&meminfo, mi, sizeof(meminfo)); | 364 | memcpy(&meminfo, mi, sizeof(meminfo)); |
428 | 365 | ||
429 | /* | 366 | /* |
430 | * allocate the zero page. Note that we count on this going ok. | 367 | * Clear out all the mappings below the kernel image. |
431 | */ | 368 | */ |
432 | zero_page = alloc_bootmem_low_pages(PAGE_SIZE); | 369 | for (addr = 0; addr < MODULE_START; addr += PGDIR_SIZE) |
370 | pmd_clear(pmd_off_k(addr)); | ||
371 | #ifdef CONFIG_XIP_KERNEL | ||
372 | /* The XIP kernel is mapped in the module area -- skip over it */ | ||
373 | addr = ((unsigned long)&_etext + PGDIR_SIZE - 1) & PGDIR_MASK; | ||
374 | #endif | ||
375 | for ( ; addr < PAGE_OFFSET; addr += PGDIR_SIZE) | ||
376 | pmd_clear(pmd_off_k(addr)); | ||
433 | 377 | ||
434 | /* | 378 | /* |
435 | * initialise the page tables. | 379 | * Clear out all the kernel space mappings, except for the first |
380 | * memory bank, up to the end of the vmalloc region. | ||
436 | */ | 381 | */ |
437 | memtable_init(mi); | 382 | for (addr = __phys_to_virt(mi->bank[0].start + mi->bank[0].size); |
438 | if (mdesc->map_io) | 383 | addr < VMALLOC_END; addr += PGDIR_SIZE) |
439 | mdesc->map_io(); | 384 | pmd_clear(pmd_off_k(addr)); |
440 | local_flush_tlb_all(); | ||
441 | 385 | ||
442 | /* | 386 | /* |
443 | * initialise the zones within each node | 387 | * Locate which node contains the ramdisk image, if any. |
444 | */ | 388 | */ |
445 | for_each_online_node(node) { | 389 | initrd_node = check_initrd(mi); |
446 | unsigned long zone_size[MAX_NR_ZONES]; | ||
447 | unsigned long zhole_size[MAX_NR_ZONES]; | ||
448 | struct bootmem_data *bdata; | ||
449 | pg_data_t *pgdat; | ||
450 | int i; | ||
451 | 390 | ||
452 | /* | 391 | /* |
453 | * Initialise the zone size information. | 392 | * Run through each node initialising the bootmem allocator. |
454 | */ | 393 | */ |
455 | for (i = 0; i < MAX_NR_ZONES; i++) { | 394 | for_each_node(node) { |
456 | zone_size[i] = 0; | 395 | unsigned long end_pfn; |
457 | zhole_size[i] = 0; | ||
458 | } | ||
459 | 396 | ||
460 | pgdat = NODE_DATA(node); | 397 | end_pfn = bootmem_init_node(node, initrd_node, mi); |
461 | bdata = pgdat->bdata; | ||
462 | 398 | ||
463 | /* | 399 | /* |
464 | * The size of this node has already been determined. | 400 | * Remember the highest memory PFN. |
465 | * If we need to do anything fancy with the allocation | ||
466 | * of this memory to the zones, now is the time to do | ||
467 | * it. | ||
468 | */ | 401 | */ |
469 | zone_size[0] = bdata->node_low_pfn - | 402 | if (end_pfn > memend_pfn) |
470 | (bdata->node_boot_start >> PAGE_SHIFT); | 403 | memend_pfn = end_pfn; |
404 | } | ||
471 | 405 | ||
472 | /* | 406 | high_memory = __va(memend_pfn << PAGE_SHIFT); |
473 | * If this zone has zero size, skip it. | ||
474 | */ | ||
475 | if (!zone_size[0]) | ||
476 | continue; | ||
477 | 407 | ||
478 | /* | 408 | /* |
479 | * For each bank in this node, calculate the size of the | 409 | * This doesn't seem to be used by the Linux memory manager any |
480 | * holes. holes = node_size - sum(bank_sizes_in_node) | 410 | * more, but is used by ll_rw_block. If we can get rid of it, we |
481 | */ | 411 | * also get rid of some of the stuff above as well. |
482 | zhole_size[0] = zone_size[0]; | 412 | * |
483 | for (i = 0; i < mi->nr_banks; i++) { | 413 | * Note: max_low_pfn and max_pfn reflect the number of _pages_ in |
484 | if (mi->bank[i].node != node) | 414 | * the system, not the maximum PFN. |
485 | continue; | 415 | */ |
416 | max_pfn = max_low_pfn = memend_pfn - PHYS_PFN_OFFSET; | ||
417 | } | ||
486 | 418 | ||
487 | zhole_size[0] -= mi->bank[i].size >> PAGE_SHIFT; | 419 | /* |
488 | } | 420 | * Set up device the mappings. Since we clear out the page tables for all |
421 | * mappings above VMALLOC_END, we will remove any debug device mappings. | ||
422 | * This means you have to be careful how you debug this function, or any | ||
423 | * called function. (Do it by code inspection!) | ||
424 | */ | ||
425 | static void __init devicemaps_init(struct machine_desc *mdesc) | ||
426 | { | ||
427 | struct map_desc map; | ||
428 | unsigned long addr; | ||
429 | void *vectors; | ||
489 | 430 | ||
490 | /* | 431 | for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE) |
491 | * Adjust the sizes according to any special | 432 | pmd_clear(pmd_off_k(addr)); |
492 | * requirements for this machine type. | ||
493 | */ | ||
494 | arch_adjust_zones(node, zone_size, zhole_size); | ||
495 | 433 | ||
496 | free_area_init_node(node, pgdat, zone_size, | 434 | /* |
497 | bdata->node_boot_start >> PAGE_SHIFT, zhole_size); | 435 | * Map the kernel if it is XIP. |
436 | * It is always first in the modulearea. | ||
437 | */ | ||
438 | #ifdef CONFIG_XIP_KERNEL | ||
439 | map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & PGDIR_MASK); | ||
440 | map.virtual = MODULE_START; | ||
441 | map.length = ((unsigned long)&_etext - map.virtual + ~PGDIR_MASK) & PGDIR_MASK; | ||
442 | map.type = MT_ROM; | ||
443 | create_mapping(&map); | ||
444 | #endif | ||
445 | |||
446 | /* | ||
447 | * Map the cache flushing regions. | ||
448 | */ | ||
449 | #ifdef FLUSH_BASE | ||
450 | map.pfn = __phys_to_pfn(FLUSH_BASE_PHYS); | ||
451 | map.virtual = FLUSH_BASE; | ||
452 | map.length = PGDIR_SIZE; | ||
453 | map.type = MT_CACHECLEAN; | ||
454 | create_mapping(&map); | ||
455 | #endif | ||
456 | #ifdef FLUSH_BASE_MINICACHE | ||
457 | map.pfn = __phys_to_pfn(FLUSH_BASE_PHYS + PGDIR_SIZE); | ||
458 | map.virtual = FLUSH_BASE_MINICACHE; | ||
459 | map.length = PGDIR_SIZE; | ||
460 | map.type = MT_MINICLEAN; | ||
461 | create_mapping(&map); | ||
462 | #endif | ||
463 | |||
464 | flush_cache_all(); | ||
465 | local_flush_tlb_all(); | ||
466 | |||
467 | vectors = alloc_bootmem_low_pages(PAGE_SIZE); | ||
468 | BUG_ON(!vectors); | ||
469 | |||
470 | /* | ||
471 | * Create a mapping for the machine vectors at the high-vectors | ||
472 | * location (0xffff0000). If we aren't using high-vectors, also | ||
473 | * create a mapping at the low-vectors virtual address. | ||
474 | */ | ||
475 | map.pfn = __phys_to_pfn(virt_to_phys(vectors)); | ||
476 | map.virtual = 0xffff0000; | ||
477 | map.length = PAGE_SIZE; | ||
478 | map.type = MT_HIGH_VECTORS; | ||
479 | create_mapping(&map); | ||
480 | |||
481 | if (!vectors_high()) { | ||
482 | map.virtual = 0; | ||
483 | map.type = MT_LOW_VECTORS; | ||
484 | create_mapping(&map); | ||
498 | } | 485 | } |
499 | 486 | ||
500 | /* | 487 | /* |
501 | * finish off the bad pages once | 488 | * Ask the machine support to map in the statically mapped devices. |
502 | * the mem_map is initialised | 489 | * After this point, we can start to touch devices again. |
490 | */ | ||
491 | if (mdesc->map_io) | ||
492 | mdesc->map_io(); | ||
493 | } | ||
494 | |||
495 | /* | ||
496 | * paging_init() sets up the page tables, initialises the zone memory | ||
497 | * maps, and sets up the zero page, bad page and bad page tables. | ||
498 | */ | ||
499 | void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc) | ||
500 | { | ||
501 | void *zero_page; | ||
502 | |||
503 | build_mem_type_table(); | ||
504 | bootmem_init(mi); | ||
505 | devicemaps_init(mdesc); | ||
506 | |||
507 | top_pmd = pmd_off_k(0xffff0000); | ||
508 | |||
509 | /* | ||
510 | * allocate the zero page. Note that we count on this going ok. | ||
503 | */ | 511 | */ |
512 | zero_page = alloc_bootmem_low_pages(PAGE_SIZE); | ||
504 | memzero(zero_page, PAGE_SIZE); | 513 | memzero(zero_page, PAGE_SIZE); |
505 | empty_zero_page = virt_to_page(zero_page); | 514 | empty_zero_page = virt_to_page(zero_page); |
506 | flush_dcache_page(empty_zero_page); | 515 | flush_dcache_page(empty_zero_page); |
@@ -562,10 +571,7 @@ static void __init free_unused_memmap_node(int node, struct meminfo *mi) | |||
562 | * may not be the case, especially if the user has provided the | 571 | * may not be the case, especially if the user has provided the |
563 | * information on the command line. | 572 | * information on the command line. |
564 | */ | 573 | */ |
565 | for (i = 0; i < mi->nr_banks; i++) { | 574 | for_each_nodebank(i, mi, node) { |
566 | if (mi->bank[i].size == 0 || mi->bank[i].node != node) | ||
567 | continue; | ||
568 | |||
569 | bank_start = mi->bank[i].start >> PAGE_SHIFT; | 575 | bank_start = mi->bank[i].start >> PAGE_SHIFT; |
570 | if (bank_start < prev_bank_end) { | 576 | if (bank_start < prev_bank_end) { |
571 | printk(KERN_ERR "MEM: unordered memory banks. " | 577 | printk(KERN_ERR "MEM: unordered memory banks. " |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 7110e54182b1..0f128c28fee4 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
27 | 27 | ||
28 | #include <asm/cacheflush.h> | 28 | #include <asm/cacheflush.h> |
29 | #include <asm/hardware.h> | ||
29 | #include <asm/io.h> | 30 | #include <asm/io.h> |
30 | #include <asm/tlbflush.h> | 31 | #include <asm/tlbflush.h> |
31 | 32 | ||
@@ -74,7 +75,7 @@ remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size, | |||
74 | 75 | ||
75 | pgprot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_WRITE | flags); | 76 | pgprot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_WRITE | flags); |
76 | do { | 77 | do { |
77 | pte_t * pte = pte_alloc_kernel(&init_mm, pmd, address); | 78 | pte_t * pte = pte_alloc_kernel(pmd, address); |
78 | if (!pte) | 79 | if (!pte) |
79 | return -ENOMEM; | 80 | return -ENOMEM; |
80 | remap_area_pte(pte, address, end - address, address + phys_addr, pgprot); | 81 | remap_area_pte(pte, address, end - address, address + phys_addr, pgprot); |
@@ -96,7 +97,6 @@ remap_area_pages(unsigned long start, unsigned long phys_addr, | |||
96 | phys_addr -= address; | 97 | phys_addr -= address; |
97 | dir = pgd_offset(&init_mm, address); | 98 | dir = pgd_offset(&init_mm, address); |
98 | BUG_ON(address >= end); | 99 | BUG_ON(address >= end); |
99 | spin_lock(&init_mm.page_table_lock); | ||
100 | do { | 100 | do { |
101 | pmd_t *pmd = pmd_alloc(&init_mm, dir, address); | 101 | pmd_t *pmd = pmd_alloc(&init_mm, dir, address); |
102 | if (!pmd) { | 102 | if (!pmd) { |
@@ -113,7 +113,6 @@ remap_area_pages(unsigned long start, unsigned long phys_addr, | |||
113 | dir++; | 113 | dir++; |
114 | } while (address && (address < end)); | 114 | } while (address && (address < end)); |
115 | 115 | ||
116 | spin_unlock(&init_mm.page_table_lock); | ||
117 | flush_cache_vmap(start, end); | 116 | flush_cache_vmap(start, end); |
118 | return err; | 117 | return err; |
119 | } | 118 | } |
diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c index d125a3dc061c..1221fdde1769 100644 --- a/arch/arm/mm/mm-armv.c +++ b/arch/arm/mm/mm-armv.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/arm/mm/mm-armv.c | 2 | * linux/arch/arm/mm/mm-armv.c |
3 | * | 3 | * |
4 | * Copyright (C) 1998-2002 Russell King | 4 | * Copyright (C) 1998-2005 Russell King |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
@@ -180,11 +180,6 @@ pgd_t *get_pgd_slow(struct mm_struct *mm) | |||
180 | 180 | ||
181 | if (!vectors_high()) { | 181 | if (!vectors_high()) { |
182 | /* | 182 | /* |
183 | * This lock is here just to satisfy pmd_alloc and pte_lock | ||
184 | */ | ||
185 | spin_lock(&mm->page_table_lock); | ||
186 | |||
187 | /* | ||
188 | * On ARM, first page must always be allocated since it | 183 | * On ARM, first page must always be allocated since it |
189 | * contains the machine vectors. | 184 | * contains the machine vectors. |
190 | */ | 185 | */ |
@@ -201,23 +196,14 @@ pgd_t *get_pgd_slow(struct mm_struct *mm) | |||
201 | set_pte(new_pte, *init_pte); | 196 | set_pte(new_pte, *init_pte); |
202 | pte_unmap_nested(init_pte); | 197 | pte_unmap_nested(init_pte); |
203 | pte_unmap(new_pte); | 198 | pte_unmap(new_pte); |
204 | |||
205 | spin_unlock(&mm->page_table_lock); | ||
206 | } | 199 | } |
207 | 200 | ||
208 | return new_pgd; | 201 | return new_pgd; |
209 | 202 | ||
210 | no_pte: | 203 | no_pte: |
211 | spin_unlock(&mm->page_table_lock); | ||
212 | pmd_free(new_pmd); | 204 | pmd_free(new_pmd); |
213 | free_pages((unsigned long)new_pgd, 2); | ||
214 | return NULL; | ||
215 | |||
216 | no_pmd: | 205 | no_pmd: |
217 | spin_unlock(&mm->page_table_lock); | ||
218 | free_pages((unsigned long)new_pgd, 2); | 206 | free_pages((unsigned long)new_pgd, 2); |
219 | return NULL; | ||
220 | |||
221 | no_pgd: | 207 | no_pgd: |
222 | return NULL; | 208 | return NULL; |
223 | } | 209 | } |
@@ -243,6 +229,7 @@ void free_pgd_slow(pgd_t *pgd) | |||
243 | pte = pmd_page(*pmd); | 229 | pte = pmd_page(*pmd); |
244 | pmd_clear(pmd); | 230 | pmd_clear(pmd); |
245 | dec_page_state(nr_page_table_pages); | 231 | dec_page_state(nr_page_table_pages); |
232 | pte_lock_deinit(pte); | ||
246 | pte_free(pte); | 233 | pte_free(pte); |
247 | pmd_free(pmd); | 234 | pmd_free(pmd); |
248 | free: | 235 | free: |
@@ -305,16 +292,6 @@ alloc_init_page(unsigned long virt, unsigned long phys, unsigned int prot_l1, pg | |||
305 | set_pte(ptep, pfn_pte(phys >> PAGE_SHIFT, prot)); | 292 | set_pte(ptep, pfn_pte(phys >> PAGE_SHIFT, prot)); |
306 | } | 293 | } |
307 | 294 | ||
308 | /* | ||
309 | * Clear any PGD mapping. On a two-level page table system, | ||
310 | * the clearance is done by the middle-level functions (pmd) | ||
311 | * rather than the top-level (pgd) functions. | ||
312 | */ | ||
313 | static inline void clear_mapping(unsigned long virt) | ||
314 | { | ||
315 | pmd_clear(pmd_off_k(virt)); | ||
316 | } | ||
317 | |||
318 | struct mem_types { | 295 | struct mem_types { |
319 | unsigned int prot_pte; | 296 | unsigned int prot_pte; |
320 | unsigned int prot_l1; | 297 | unsigned int prot_l1; |
@@ -373,7 +350,7 @@ static struct mem_types mem_types[] __initdata = { | |||
373 | /* | 350 | /* |
374 | * Adjust the PMD section entries according to the CPU in use. | 351 | * Adjust the PMD section entries according to the CPU in use. |
375 | */ | 352 | */ |
376 | static void __init build_mem_type_table(void) | 353 | void __init build_mem_type_table(void) |
377 | { | 354 | { |
378 | struct cachepolicy *cp; | 355 | struct cachepolicy *cp; |
379 | unsigned int cr = get_cr(); | 356 | unsigned int cr = get_cr(); |
@@ -483,25 +460,25 @@ static void __init build_mem_type_table(void) | |||
483 | * offsets, and we take full advantage of sections and | 460 | * offsets, and we take full advantage of sections and |
484 | * supersections. | 461 | * supersections. |
485 | */ | 462 | */ |
486 | static void __init create_mapping(struct map_desc *md) | 463 | void __init create_mapping(struct map_desc *md) |
487 | { | 464 | { |
488 | unsigned long virt, length; | 465 | unsigned long virt, length; |
489 | int prot_sect, prot_l1, domain; | 466 | int prot_sect, prot_l1, domain; |
490 | pgprot_t prot_pte; | 467 | pgprot_t prot_pte; |
491 | long off; | 468 | unsigned long off = (u32)__pfn_to_phys(md->pfn); |
492 | 469 | ||
493 | if (md->virtual != vectors_base() && md->virtual < TASK_SIZE) { | 470 | if (md->virtual != vectors_base() && md->virtual < TASK_SIZE) { |
494 | printk(KERN_WARNING "BUG: not creating mapping for " | 471 | printk(KERN_WARNING "BUG: not creating mapping for " |
495 | "0x%08lx at 0x%08lx in user region\n", | 472 | "0x%016llx at 0x%08lx in user region\n", |
496 | md->physical, md->virtual); | 473 | __pfn_to_phys((u64)md->pfn), md->virtual); |
497 | return; | 474 | return; |
498 | } | 475 | } |
499 | 476 | ||
500 | if ((md->type == MT_DEVICE || md->type == MT_ROM) && | 477 | if ((md->type == MT_DEVICE || md->type == MT_ROM) && |
501 | md->virtual >= PAGE_OFFSET && md->virtual < VMALLOC_END) { | 478 | md->virtual >= PAGE_OFFSET && md->virtual < VMALLOC_END) { |
502 | printk(KERN_WARNING "BUG: mapping for 0x%08lx at 0x%08lx " | 479 | printk(KERN_WARNING "BUG: mapping for 0x%016llx at 0x%08lx " |
503 | "overlaps vmalloc space\n", | 480 | "overlaps vmalloc space\n", |
504 | md->physical, md->virtual); | 481 | __pfn_to_phys((u64)md->pfn), md->virtual); |
505 | } | 482 | } |
506 | 483 | ||
507 | domain = mem_types[md->type].domain; | 484 | domain = mem_types[md->type].domain; |
@@ -509,15 +486,40 @@ static void __init create_mapping(struct map_desc *md) | |||
509 | prot_l1 = mem_types[md->type].prot_l1 | PMD_DOMAIN(domain); | 486 | prot_l1 = mem_types[md->type].prot_l1 | PMD_DOMAIN(domain); |
510 | prot_sect = mem_types[md->type].prot_sect | PMD_DOMAIN(domain); | 487 | prot_sect = mem_types[md->type].prot_sect | PMD_DOMAIN(domain); |
511 | 488 | ||
489 | /* | ||
490 | * Catch 36-bit addresses | ||
491 | */ | ||
492 | if(md->pfn >= 0x100000) { | ||
493 | if(domain) { | ||
494 | printk(KERN_ERR "MM: invalid domain in supersection " | ||
495 | "mapping for 0x%016llx at 0x%08lx\n", | ||
496 | __pfn_to_phys((u64)md->pfn), md->virtual); | ||
497 | return; | ||
498 | } | ||
499 | if((md->virtual | md->length | __pfn_to_phys(md->pfn)) | ||
500 | & ~SUPERSECTION_MASK) { | ||
501 | printk(KERN_ERR "MM: cannot create mapping for " | ||
502 | "0x%016llx at 0x%08lx invalid alignment\n", | ||
503 | __pfn_to_phys((u64)md->pfn), md->virtual); | ||
504 | return; | ||
505 | } | ||
506 | |||
507 | /* | ||
508 | * Shift bits [35:32] of address into bits [23:20] of PMD | ||
509 | * (See ARMv6 spec). | ||
510 | */ | ||
511 | off |= (((md->pfn >> (32 - PAGE_SHIFT)) & 0xF) << 20); | ||
512 | } | ||
513 | |||
512 | virt = md->virtual; | 514 | virt = md->virtual; |
513 | off = md->physical - virt; | 515 | off -= virt; |
514 | length = md->length; | 516 | length = md->length; |
515 | 517 | ||
516 | if (mem_types[md->type].prot_l1 == 0 && | 518 | if (mem_types[md->type].prot_l1 == 0 && |
517 | (virt & 0xfffff || (virt + off) & 0xfffff || (virt + length) & 0xfffff)) { | 519 | (virt & 0xfffff || (virt + off) & 0xfffff || (virt + length) & 0xfffff)) { |
518 | printk(KERN_WARNING "BUG: map for 0x%08lx at 0x%08lx can not " | 520 | printk(KERN_WARNING "BUG: map for 0x%08lx at 0x%08lx can not " |
519 | "be mapped using pages, ignoring.\n", | 521 | "be mapped using pages, ignoring.\n", |
520 | md->physical, md->virtual); | 522 | __pfn_to_phys(md->pfn), md->virtual); |
521 | return; | 523 | return; |
522 | } | 524 | } |
523 | 525 | ||
@@ -535,13 +537,22 @@ static void __init create_mapping(struct map_desc *md) | |||
535 | * of the actual domain assignments in use. | 537 | * of the actual domain assignments in use. |
536 | */ | 538 | */ |
537 | if (cpu_architecture() >= CPU_ARCH_ARMv6 && domain == 0) { | 539 | if (cpu_architecture() >= CPU_ARCH_ARMv6 && domain == 0) { |
538 | /* Align to supersection boundary */ | 540 | /* |
539 | while ((virt & ~SUPERSECTION_MASK || (virt + off) & | 541 | * Align to supersection boundary if !high pages. |
540 | ~SUPERSECTION_MASK) && length >= (PGDIR_SIZE / 2)) { | 542 | * High pages have already been checked for proper |
541 | alloc_init_section(virt, virt + off, prot_sect); | 543 | * alignment above and they will fail the SUPSERSECTION_MASK |
542 | 544 | * check because of the way the address is encoded into | |
543 | virt += (PGDIR_SIZE / 2); | 545 | * offset. |
544 | length -= (PGDIR_SIZE / 2); | 546 | */ |
547 | if (md->pfn <= 0x100000) { | ||
548 | while ((virt & ~SUPERSECTION_MASK || | ||
549 | (virt + off) & ~SUPERSECTION_MASK) && | ||
550 | length >= (PGDIR_SIZE / 2)) { | ||
551 | alloc_init_section(virt, virt + off, prot_sect); | ||
552 | |||
553 | virt += (PGDIR_SIZE / 2); | ||
554 | length -= (PGDIR_SIZE / 2); | ||
555 | } | ||
545 | } | 556 | } |
546 | 557 | ||
547 | while (length >= SUPERSECTION_SIZE) { | 558 | while (length >= SUPERSECTION_SIZE) { |
@@ -601,100 +612,6 @@ void setup_mm_for_reboot(char mode) | |||
601 | } | 612 | } |
602 | } | 613 | } |
603 | 614 | ||
604 | extern void _stext, _etext; | ||
605 | |||
606 | /* | ||
607 | * Setup initial mappings. We use the page we allocated for zero page to hold | ||
608 | * the mappings, which will get overwritten by the vectors in traps_init(). | ||
609 | * The mappings must be in virtual address order. | ||
610 | */ | ||
611 | void __init memtable_init(struct meminfo *mi) | ||
612 | { | ||
613 | struct map_desc *init_maps, *p, *q; | ||
614 | unsigned long address = 0; | ||
615 | int i; | ||
616 | |||
617 | build_mem_type_table(); | ||
618 | |||
619 | init_maps = p = alloc_bootmem_low_pages(PAGE_SIZE); | ||
620 | |||
621 | #ifdef CONFIG_XIP_KERNEL | ||
622 | p->physical = CONFIG_XIP_PHYS_ADDR & PMD_MASK; | ||
623 | p->virtual = (unsigned long)&_stext & PMD_MASK; | ||
624 | p->length = ((unsigned long)&_etext - p->virtual + ~PMD_MASK) & PMD_MASK; | ||
625 | p->type = MT_ROM; | ||
626 | p ++; | ||
627 | #endif | ||
628 | |||
629 | for (i = 0; i < mi->nr_banks; i++) { | ||
630 | if (mi->bank[i].size == 0) | ||
631 | continue; | ||
632 | |||
633 | p->physical = mi->bank[i].start; | ||
634 | p->virtual = __phys_to_virt(p->physical); | ||
635 | p->length = mi->bank[i].size; | ||
636 | p->type = MT_MEMORY; | ||
637 | p ++; | ||
638 | } | ||
639 | |||
640 | #ifdef FLUSH_BASE | ||
641 | p->physical = FLUSH_BASE_PHYS; | ||
642 | p->virtual = FLUSH_BASE; | ||
643 | p->length = PGDIR_SIZE; | ||
644 | p->type = MT_CACHECLEAN; | ||
645 | p ++; | ||
646 | #endif | ||
647 | |||
648 | #ifdef FLUSH_BASE_MINICACHE | ||
649 | p->physical = FLUSH_BASE_PHYS + PGDIR_SIZE; | ||
650 | p->virtual = FLUSH_BASE_MINICACHE; | ||
651 | p->length = PGDIR_SIZE; | ||
652 | p->type = MT_MINICLEAN; | ||
653 | p ++; | ||
654 | #endif | ||
655 | |||
656 | /* | ||
657 | * Go through the initial mappings, but clear out any | ||
658 | * pgdir entries that are not in the description. | ||
659 | */ | ||
660 | q = init_maps; | ||
661 | do { | ||
662 | if (address < q->virtual || q == p) { | ||
663 | clear_mapping(address); | ||
664 | address += PGDIR_SIZE; | ||
665 | } else { | ||
666 | create_mapping(q); | ||
667 | |||
668 | address = q->virtual + q->length; | ||
669 | address = (address + PGDIR_SIZE - 1) & PGDIR_MASK; | ||
670 | |||
671 | q ++; | ||
672 | } | ||
673 | } while (address != 0); | ||
674 | |||
675 | /* | ||
676 | * Create a mapping for the machine vectors at the high-vectors | ||
677 | * location (0xffff0000). If we aren't using high-vectors, also | ||
678 | * create a mapping at the low-vectors virtual address. | ||
679 | */ | ||
680 | init_maps->physical = virt_to_phys(init_maps); | ||
681 | init_maps->virtual = 0xffff0000; | ||
682 | init_maps->length = PAGE_SIZE; | ||
683 | init_maps->type = MT_HIGH_VECTORS; | ||
684 | create_mapping(init_maps); | ||
685 | |||
686 | if (!vectors_high()) { | ||
687 | init_maps->virtual = 0; | ||
688 | init_maps->type = MT_LOW_VECTORS; | ||
689 | create_mapping(init_maps); | ||
690 | } | ||
691 | |||
692 | flush_cache_all(); | ||
693 | local_flush_tlb_all(); | ||
694 | |||
695 | top_pmd = pmd_off_k(0xffff0000); | ||
696 | } | ||
697 | |||
698 | /* | 615 | /* |
699 | * Create the architecture specific mappings | 616 | * Create the architecture specific mappings |
700 | */ | 617 | */ |
diff --git a/arch/arm/oprofile/Makefile b/arch/arm/oprofile/Makefile index 8ffb523e6c77..6a94e54848fd 100644 --- a/arch/arm/oprofile/Makefile +++ b/arch/arm/oprofile/Makefile | |||
@@ -6,6 +6,6 @@ DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \ | |||
6 | oprofilefs.o oprofile_stats.o \ | 6 | oprofilefs.o oprofile_stats.o \ |
7 | timer_int.o ) | 7 | timer_int.o ) |
8 | 8 | ||
9 | oprofile-y := $(DRIVER_OBJS) init.o backtrace.o | 9 | oprofile-y := $(DRIVER_OBJS) common.o backtrace.o |
10 | oprofile-$(CONFIG_CPU_XSCALE) += common.o op_model_xscale.o | 10 | oprofile-$(CONFIG_CPU_XSCALE) += op_model_xscale.o |
11 | 11 | ||
diff --git a/arch/arm/oprofile/backtrace.c b/arch/arm/oprofile/backtrace.c index df35c452a8bf..7c22c12618cc 100644 --- a/arch/arm/oprofile/backtrace.c +++ b/arch/arm/oprofile/backtrace.c | |||
@@ -49,42 +49,22 @@ static struct frame_tail* kernel_backtrace(struct frame_tail *tail) | |||
49 | 49 | ||
50 | static struct frame_tail* user_backtrace(struct frame_tail *tail) | 50 | static struct frame_tail* user_backtrace(struct frame_tail *tail) |
51 | { | 51 | { |
52 | struct frame_tail buftail; | 52 | struct frame_tail buftail[2]; |
53 | 53 | ||
54 | /* hardware pte might not be valid due to dirty/accessed bit emulation | 54 | /* Also check accessibility of one struct frame_tail beyond */ |
55 | * so we use copy_from_user and benefit from exception fixups */ | 55 | if (!access_ok(VERIFY_READ, tail, sizeof(buftail))) |
56 | if (copy_from_user(&buftail, tail, sizeof(struct frame_tail))) | 56 | return NULL; |
57 | if (__copy_from_user_inatomic(buftail, tail, sizeof(buftail))) | ||
57 | return NULL; | 58 | return NULL; |
58 | 59 | ||
59 | oprofile_add_trace(buftail.lr); | 60 | oprofile_add_trace(buftail[0].lr); |
60 | 61 | ||
61 | /* frame pointers should strictly progress back up the stack | 62 | /* frame pointers should strictly progress back up the stack |
62 | * (towards higher addresses) */ | 63 | * (towards higher addresses) */ |
63 | if (tail >= buftail.fp) | 64 | if (tail >= buftail[0].fp) |
64 | return NULL; | 65 | return NULL; |
65 | 66 | ||
66 | return buftail.fp-1; | 67 | return buftail[0].fp-1; |
67 | } | ||
68 | |||
69 | /* Compare two addresses and see if they're on the same page */ | ||
70 | #define CMP_ADDR_EQUAL(x,y,offset) ((((unsigned long) x) >> PAGE_SHIFT) \ | ||
71 | == ((((unsigned long) y) + offset) >> PAGE_SHIFT)) | ||
72 | |||
73 | /* check that the page(s) containing the frame tail are present */ | ||
74 | static int pages_present(struct frame_tail *tail) | ||
75 | { | ||
76 | struct mm_struct * mm = current->mm; | ||
77 | |||
78 | if (!check_user_page_readable(mm, (unsigned long)tail)) | ||
79 | return 0; | ||
80 | |||
81 | if (CMP_ADDR_EQUAL(tail, tail, 8)) | ||
82 | return 1; | ||
83 | |||
84 | if (!check_user_page_readable(mm, ((unsigned long)tail) + 8)) | ||
85 | return 0; | ||
86 | |||
87 | return 1; | ||
88 | } | 68 | } |
89 | 69 | ||
90 | /* | 70 | /* |
@@ -118,7 +98,6 @@ static int valid_kernel_stack(struct frame_tail *tail, struct pt_regs *regs) | |||
118 | void arm_backtrace(struct pt_regs * const regs, unsigned int depth) | 98 | void arm_backtrace(struct pt_regs * const regs, unsigned int depth) |
119 | { | 99 | { |
120 | struct frame_tail *tail; | 100 | struct frame_tail *tail; |
121 | unsigned long last_address = 0; | ||
122 | 101 | ||
123 | tail = ((struct frame_tail *) regs->ARM_fp) - 1; | 102 | tail = ((struct frame_tail *) regs->ARM_fp) - 1; |
124 | 103 | ||
@@ -132,13 +111,6 @@ void arm_backtrace(struct pt_regs * const regs, unsigned int depth) | |||
132 | return; | 111 | return; |
133 | } | 112 | } |
134 | 113 | ||
135 | while (depth-- && tail && !((unsigned long) tail & 3)) { | 114 | while (depth-- && tail && !((unsigned long) tail & 3)) |
136 | if ((!CMP_ADDR_EQUAL(last_address, tail, 0) | ||
137 | || !CMP_ADDR_EQUAL(last_address, tail, 8)) | ||
138 | && !pages_present(tail)) | ||
139 | return; | ||
140 | last_address = (unsigned long) tail; | ||
141 | tail = user_backtrace(tail); | 115 | tail = user_backtrace(tail); |
142 | } | ||
143 | } | 116 | } |
144 | |||
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index e57dde882898..1415930ceee1 100644 --- a/arch/arm/oprofile/common.c +++ b/arch/arm/oprofile/common.c | |||
@@ -10,74 +10,23 @@ | |||
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/oprofile.h> | 11 | #include <linux/oprofile.h> |
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <asm/semaphore.h> | ||
14 | #include <linux/sysdev.h> | 13 | #include <linux/sysdev.h> |
14 | #include <asm/semaphore.h> | ||
15 | 15 | ||
16 | #include "op_counter.h" | 16 | #include "op_counter.h" |
17 | #include "op_arm_model.h" | 17 | #include "op_arm_model.h" |
18 | 18 | ||
19 | static struct op_arm_model_spec *pmu_model; | 19 | static struct op_arm_model_spec *op_arm_model; |
20 | static int pmu_enabled; | 20 | static int op_arm_enabled; |
21 | static struct semaphore pmu_sem; | 21 | static struct semaphore op_arm_sem; |
22 | |||
23 | static int pmu_start(void); | ||
24 | static int pmu_setup(void); | ||
25 | static void pmu_stop(void); | ||
26 | static int pmu_create_files(struct super_block *, struct dentry *); | ||
27 | |||
28 | #ifdef CONFIG_PM | ||
29 | static int pmu_suspend(struct sys_device *dev, pm_message_t state) | ||
30 | { | ||
31 | if (pmu_enabled) | ||
32 | pmu_stop(); | ||
33 | return 0; | ||
34 | } | ||
35 | |||
36 | static int pmu_resume(struct sys_device *dev) | ||
37 | { | ||
38 | if (pmu_enabled) | ||
39 | pmu_start(); | ||
40 | return 0; | ||
41 | } | ||
42 | |||
43 | static struct sysdev_class oprofile_sysclass = { | ||
44 | set_kset_name("oprofile"), | ||
45 | .resume = pmu_resume, | ||
46 | .suspend = pmu_suspend, | ||
47 | }; | ||
48 | |||
49 | static struct sys_device device_oprofile = { | ||
50 | .id = 0, | ||
51 | .cls = &oprofile_sysclass, | ||
52 | }; | ||
53 | |||
54 | static int __init init_driverfs(void) | ||
55 | { | ||
56 | int ret; | ||
57 | |||
58 | if (!(ret = sysdev_class_register(&oprofile_sysclass))) | ||
59 | ret = sysdev_register(&device_oprofile); | ||
60 | |||
61 | return ret; | ||
62 | } | ||
63 | |||
64 | static void exit_driverfs(void) | ||
65 | { | ||
66 | sysdev_unregister(&device_oprofile); | ||
67 | sysdev_class_unregister(&oprofile_sysclass); | ||
68 | } | ||
69 | #else | ||
70 | #define init_driverfs() do { } while (0) | ||
71 | #define exit_driverfs() do { } while (0) | ||
72 | #endif /* CONFIG_PM */ | ||
73 | 22 | ||
74 | struct op_counter_config counter_config[OP_MAX_COUNTER]; | 23 | struct op_counter_config counter_config[OP_MAX_COUNTER]; |
75 | 24 | ||
76 | static int pmu_create_files(struct super_block *sb, struct dentry *root) | 25 | static int op_arm_create_files(struct super_block *sb, struct dentry *root) |
77 | { | 26 | { |
78 | unsigned int i; | 27 | unsigned int i; |
79 | 28 | ||
80 | for (i = 0; i < pmu_model->num_counters; i++) { | 29 | for (i = 0; i < op_arm_model->num_counters; i++) { |
81 | struct dentry *dir; | 30 | struct dentry *dir; |
82 | char buf[2]; | 31 | char buf[2]; |
83 | 32 | ||
@@ -94,63 +43,123 @@ static int pmu_create_files(struct super_block *sb, struct dentry *root) | |||
94 | return 0; | 43 | return 0; |
95 | } | 44 | } |
96 | 45 | ||
97 | static int pmu_setup(void) | 46 | static int op_arm_setup(void) |
98 | { | 47 | { |
99 | int ret; | 48 | int ret; |
100 | 49 | ||
101 | spin_lock(&oprofilefs_lock); | 50 | spin_lock(&oprofilefs_lock); |
102 | ret = pmu_model->setup_ctrs(); | 51 | ret = op_arm_model->setup_ctrs(); |
103 | spin_unlock(&oprofilefs_lock); | 52 | spin_unlock(&oprofilefs_lock); |
104 | return ret; | 53 | return ret; |
105 | } | 54 | } |
106 | 55 | ||
107 | static int pmu_start(void) | 56 | static int op_arm_start(void) |
108 | { | 57 | { |
109 | int ret = -EBUSY; | 58 | int ret = -EBUSY; |
110 | 59 | ||
111 | down(&pmu_sem); | 60 | down(&op_arm_sem); |
112 | if (!pmu_enabled) { | 61 | if (!op_arm_enabled) { |
113 | ret = pmu_model->start(); | 62 | ret = op_arm_model->start(); |
114 | pmu_enabled = !ret; | 63 | op_arm_enabled = !ret; |
115 | } | 64 | } |
116 | up(&pmu_sem); | 65 | up(&op_arm_sem); |
117 | return ret; | 66 | return ret; |
118 | } | 67 | } |
119 | 68 | ||
120 | static void pmu_stop(void) | 69 | static void op_arm_stop(void) |
70 | { | ||
71 | down(&op_arm_sem); | ||
72 | if (op_arm_enabled) | ||
73 | op_arm_model->stop(); | ||
74 | op_arm_enabled = 0; | ||
75 | up(&op_arm_sem); | ||
76 | } | ||
77 | |||
78 | #ifdef CONFIG_PM | ||
79 | static int op_arm_suspend(struct sys_device *dev, pm_message_t state) | ||
121 | { | 80 | { |
122 | down(&pmu_sem); | 81 | down(&op_arm_sem); |
123 | if (pmu_enabled) | 82 | if (op_arm_enabled) |
124 | pmu_model->stop(); | 83 | op_arm_model->stop(); |
125 | pmu_enabled = 0; | 84 | up(&op_arm_sem); |
126 | up(&pmu_sem); | 85 | return 0; |
127 | } | 86 | } |
128 | 87 | ||
129 | int __init pmu_init(struct oprofile_operations *ops, struct op_arm_model_spec *spec) | 88 | static int op_arm_resume(struct sys_device *dev) |
130 | { | 89 | { |
131 | init_MUTEX(&pmu_sem); | 90 | down(&op_arm_sem); |
91 | if (op_arm_enabled && op_arm_model->start()) | ||
92 | op_arm_enabled = 0; | ||
93 | up(&op_arm_sem); | ||
94 | return 0; | ||
95 | } | ||
96 | |||
97 | static struct sysdev_class oprofile_sysclass = { | ||
98 | set_kset_name("oprofile"), | ||
99 | .resume = op_arm_resume, | ||
100 | .suspend = op_arm_suspend, | ||
101 | }; | ||
132 | 102 | ||
133 | if (spec->init() < 0) | 103 | static struct sys_device device_oprofile = { |
134 | return -ENODEV; | 104 | .id = 0, |
105 | .cls = &oprofile_sysclass, | ||
106 | }; | ||
135 | 107 | ||
136 | pmu_model = spec; | 108 | static int __init init_driverfs(void) |
137 | init_driverfs(); | 109 | { |
138 | ops->create_files = pmu_create_files; | 110 | int ret; |
139 | ops->setup = pmu_setup; | ||
140 | ops->shutdown = pmu_stop; | ||
141 | ops->start = pmu_start; | ||
142 | ops->stop = pmu_stop; | ||
143 | ops->cpu_type = pmu_model->name; | ||
144 | printk(KERN_INFO "oprofile: using %s PMU\n", spec->name); | ||
145 | 111 | ||
146 | return 0; | 112 | if (!(ret = sysdev_class_register(&oprofile_sysclass))) |
113 | ret = sysdev_register(&device_oprofile); | ||
114 | |||
115 | return ret; | ||
116 | } | ||
117 | |||
118 | static void exit_driverfs(void) | ||
119 | { | ||
120 | sysdev_unregister(&device_oprofile); | ||
121 | sysdev_class_unregister(&oprofile_sysclass); | ||
122 | } | ||
123 | #else | ||
124 | #define init_driverfs() do { } while (0) | ||
125 | #define exit_driverfs() do { } while (0) | ||
126 | #endif /* CONFIG_PM */ | ||
127 | |||
128 | int __init oprofile_arch_init(struct oprofile_operations *ops) | ||
129 | { | ||
130 | struct op_arm_model_spec *spec = NULL; | ||
131 | int ret = -ENODEV; | ||
132 | |||
133 | #ifdef CONFIG_CPU_XSCALE | ||
134 | spec = &op_xscale_spec; | ||
135 | #endif | ||
136 | |||
137 | if (spec) { | ||
138 | init_MUTEX(&op_arm_sem); | ||
139 | |||
140 | if (spec->init() < 0) | ||
141 | return -ENODEV; | ||
142 | |||
143 | op_arm_model = spec; | ||
144 | init_driverfs(); | ||
145 | ops->create_files = op_arm_create_files; | ||
146 | ops->setup = op_arm_setup; | ||
147 | ops->shutdown = op_arm_stop; | ||
148 | ops->start = op_arm_start; | ||
149 | ops->stop = op_arm_stop; | ||
150 | ops->cpu_type = op_arm_model->name; | ||
151 | ops->backtrace = arm_backtrace; | ||
152 | printk(KERN_INFO "oprofile: using %s\n", spec->name); | ||
153 | } | ||
154 | |||
155 | return ret; | ||
147 | } | 156 | } |
148 | 157 | ||
149 | void pmu_exit(void) | 158 | void oprofile_arch_exit(void) |
150 | { | 159 | { |
151 | if (pmu_model) { | 160 | if (op_arm_model) { |
152 | exit_driverfs(); | 161 | exit_driverfs(); |
153 | pmu_model = NULL; | 162 | op_arm_model = NULL; |
154 | } | 163 | } |
155 | } | 164 | } |
156 | 165 | ||
diff --git a/arch/arm/oprofile/init.c b/arch/arm/oprofile/init.c deleted file mode 100644 index d315a3a86c86..000000000000 --- a/arch/arm/oprofile/init.c +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /** | ||
2 | * @file init.c | ||
3 | * | ||
4 | * @remark Copyright 2004 Oprofile Authors | ||
5 | * @remark Read the file COPYING | ||
6 | * | ||
7 | * @author Zwane Mwaikambo | ||
8 | */ | ||
9 | |||
10 | #include <linux/oprofile.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/errno.h> | ||
13 | #include "op_arm_model.h" | ||
14 | |||
15 | int __init oprofile_arch_init(struct oprofile_operations *ops) | ||
16 | { | ||
17 | int ret = -ENODEV; | ||
18 | |||
19 | #ifdef CONFIG_CPU_XSCALE | ||
20 | ret = pmu_init(ops, &op_xscale_spec); | ||
21 | #endif | ||
22 | |||
23 | ops->backtrace = arm_backtrace; | ||
24 | |||
25 | return ret; | ||
26 | } | ||
27 | |||
28 | void oprofile_arch_exit(void) | ||
29 | { | ||
30 | #ifdef CONFIG_CPU_XSCALE | ||
31 | pmu_exit(); | ||
32 | #endif | ||
33 | } | ||
diff --git a/arch/arm/oprofile/op_arm_model.h b/arch/arm/oprofile/op_arm_model.h index 2148d07484b7..38c6ad158547 100644 --- a/arch/arm/oprofile/op_arm_model.h +++ b/arch/arm/oprofile/op_arm_model.h | |||
@@ -26,6 +26,6 @@ extern struct op_arm_model_spec op_xscale_spec; | |||
26 | 26 | ||
27 | extern void arm_backtrace(struct pt_regs * const regs, unsigned int depth); | 27 | extern void arm_backtrace(struct pt_regs * const regs, unsigned int depth); |
28 | 28 | ||
29 | extern int __init pmu_init(struct oprofile_operations *ops, struct op_arm_model_spec *spec); | 29 | extern int __init op_arm_init(struct oprofile_operations *ops, struct op_arm_model_spec *spec); |
30 | extern void pmu_exit(void); | 30 | extern void op_arm_exit(void); |
31 | #endif /* OP_ARM_MODEL_H */ | 31 | #endif /* OP_ARM_MODEL_H */ |
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 52a58b2da288..a020fe16428f 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
15 | #include <linux/err.h> | 15 | #include <linux/err.h> |
16 | #include <linux/string.h> | ||
16 | 17 | ||
17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
18 | #include <asm/semaphore.h> | 19 | #include <asm/semaphore.h> |
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index 7719a4062e3a..7ad69f14a3e7 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -59,7 +59,11 @@ void __init omap_detect_sram(void) | |||
59 | } | 59 | } |
60 | 60 | ||
61 | static struct map_desc omap_sram_io_desc[] __initdata = { | 61 | static struct map_desc omap_sram_io_desc[] __initdata = { |
62 | { OMAP1_SRAM_BASE, OMAP1_SRAM_START, 0, MT_DEVICE } | 62 | { /* .length gets filled in at runtime */ |
63 | .virtual = OMAP1_SRAM_BASE, | ||
64 | .pfn = __phys_to_pfn(OMAP1_SRAM_START), | ||
65 | .type = MT_DEVICE | ||
66 | } | ||
63 | }; | 67 | }; |
64 | 68 | ||
65 | /* | 69 | /* |