aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/common/rtctime.c16
-rw-r--r--arch/arm/kernel/calls.S2
-rw-r--r--arch/arm/kernel/entry-armv.S2
-rw-r--r--arch/arm/kernel/setup.c5
-rw-r--r--arch/arm/kernel/smp.c1
-rw-r--r--arch/arm/kernel/sys_oabi-compat.c30
-rw-r--r--arch/arm/kernel/traps.c8
-rw-r--r--arch/arm/mach-at91rm9200/devices.c4
-rw-r--r--arch/arm/mach-at91rm9200/gpio.c31
-rw-r--r--arch/arm/mach-integrator/platsmp.c21
-rw-r--r--arch/arm/mach-iop3xx/iop321-setup.c1
-rw-r--r--arch/arm/mach-iop3xx/iop331-setup.c1
-rw-r--r--arch/arm/mach-ixp4xx/common.c20
-rw-r--r--arch/arm/mach-ixp4xx/nslu2-power.c3
-rw-r--r--arch/arm/mach-ixp4xx/nslu2-setup.c13
-rw-r--r--arch/arm/mach-realview/platsmp.c21
-rw-r--r--arch/arm/mach-versatile/pci.c93
-rw-r--r--arch/arm/mm/abort-ev6.S2
-rw-r--r--arch/arm/plat-omap/pm.c1
-rw-r--r--arch/arm/tools/mach-types35
20 files changed, 228 insertions, 82 deletions
diff --git a/arch/arm/common/rtctime.c b/arch/arm/common/rtctime.c
index 48b1e19b131f..e851d86c212c 100644
--- a/arch/arm/common/rtctime.c
+++ b/arch/arm/common/rtctime.c
@@ -128,19 +128,27 @@ EXPORT_SYMBOL(rtc_tm_to_time);
128/* 128/*
129 * Calculate the next alarm time given the requested alarm time mask 129 * Calculate the next alarm time given the requested alarm time mask
130 * and the current time. 130 * and the current time.
131 *
132 * FIXME: for now, we just copy the alarm time because we're lazy (and
133 * is therefore buggy - setting a 10am alarm at 8pm will not result in
134 * the alarm triggering.)
135 */ 131 */
136void rtc_next_alarm_time(struct rtc_time *next, struct rtc_time *now, struct rtc_time *alrm) 132void rtc_next_alarm_time(struct rtc_time *next, struct rtc_time *now, struct rtc_time *alrm)
137{ 133{
134 unsigned long next_time;
135 unsigned long now_time;
136
138 next->tm_year = now->tm_year; 137 next->tm_year = now->tm_year;
139 next->tm_mon = now->tm_mon; 138 next->tm_mon = now->tm_mon;
140 next->tm_mday = now->tm_mday; 139 next->tm_mday = now->tm_mday;
141 next->tm_hour = alrm->tm_hour; 140 next->tm_hour = alrm->tm_hour;
142 next->tm_min = alrm->tm_min; 141 next->tm_min = alrm->tm_min;
143 next->tm_sec = alrm->tm_sec; 142 next->tm_sec = alrm->tm_sec;
143
144 rtc_tm_to_time(now, &now_time);
145 rtc_tm_to_time(next, &next_time);
146
147 if (next_time < now_time) {
148 /* Advance one day */
149 next_time += 60 * 60 * 24;
150 rtc_time_to_tm(next_time, next);
151 }
144} 152}
145 153
146static inline int rtc_read_time(struct rtc_ops *ops, struct rtc_time *tm) 154static inline int rtc_read_time(struct rtc_ops *ops, struct rtc_time *tm)
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index 8c3035d5ffc9..3173924a9b60 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -111,7 +111,7 @@
111 CALL(sys_statfs) 111 CALL(sys_statfs)
112/* 100 */ CALL(sys_fstatfs) 112/* 100 */ CALL(sys_fstatfs)
113 CALL(sys_ni_syscall) 113 CALL(sys_ni_syscall)
114 CALL(OBSOLETE(sys_socketcall)) 114 CALL(OBSOLETE(ABI(sys_socketcall, sys_oabi_socketcall)))
115 CALL(sys_syslog) 115 CALL(sys_syslog)
116 CALL(sys_setitimer) 116 CALL(sys_setitimer)
117/* 105 */ CALL(sys_getitimer) 117/* 105 */ CALL(sys_getitimer)
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 964cd717506b..ec48d70c6d8b 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -566,7 +566,7 @@ ENTRY(__switch_to)
566 ldr r6, [r2, #TI_CPU_DOMAIN]! 566 ldr r6, [r2, #TI_CPU_DOMAIN]!
567#endif 567#endif
568#if __LINUX_ARM_ARCH__ >= 6 568#if __LINUX_ARM_ARCH__ >= 6
569#ifdef CONFIG_CPU_MPCORE 569#ifdef CONFIG_CPU_32v6K
570 clrex 570 clrex
571#else 571#else
572 strex r5, r4, [ip] @ Clear exclusive monitor 572 strex r5, r4, [ip] @ Clear exclusive monitor
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index c45d10d07bde..68273b4dc882 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -23,6 +23,7 @@
23#include <linux/root_dev.h> 23#include <linux/root_dev.h>
24#include <linux/cpu.h> 24#include <linux/cpu.h>
25#include <linux/interrupt.h> 25#include <linux/interrupt.h>
26#include <linux/smp.h>
26 27
27#include <asm/cpu.h> 28#include <asm/cpu.h>
28#include <asm/elf.h> 29#include <asm/elf.h>
@@ -771,6 +772,10 @@ void __init setup_arch(char **cmdline_p)
771 paging_init(&meminfo, mdesc); 772 paging_init(&meminfo, mdesc);
772 request_standard_resources(&meminfo, mdesc); 773 request_standard_resources(&meminfo, mdesc);
773 774
775#ifdef CONFIG_SMP
776 smp_init_cpus();
777#endif
778
774 cpu_init(); 779 cpu_init();
775 780
776 /* 781 /*
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 7338948bd7d3..02aa300c4633 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -338,7 +338,6 @@ void __init smp_prepare_boot_cpu(void)
338 338
339 per_cpu(cpu_data, cpu).idle = current; 339 per_cpu(cpu_data, cpu).idle = current;
340 340
341 cpu_set(cpu, cpu_possible_map);
342 cpu_set(cpu, cpu_present_map); 341 cpu_set(cpu, cpu_present_map);
343 cpu_set(cpu, cpu_online_map); 342 cpu_set(cpu, cpu_online_map);
344} 343}
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c
index 9d4b76409c64..8e2f9bc3368b 100644
--- a/arch/arm/kernel/sys_oabi-compat.c
+++ b/arch/arm/kernel/sys_oabi-compat.c
@@ -64,6 +64,7 @@
64 * sys_connect: 64 * sys_connect:
65 * sys_sendmsg: 65 * sys_sendmsg:
66 * sys_sendto: 66 * sys_sendto:
67 * sys_socketcall:
67 * 68 *
68 * struct sockaddr_un loses its padding with EABI. Since the size of the 69 * struct sockaddr_un loses its padding with EABI. Since the size of the
69 * structure is used as a validation test in unix_mkname(), we need to 70 * structure is used as a validation test in unix_mkname(), we need to
@@ -78,6 +79,7 @@
78#include <linux/eventpoll.h> 79#include <linux/eventpoll.h>
79#include <linux/sem.h> 80#include <linux/sem.h>
80#include <linux/socket.h> 81#include <linux/socket.h>
82#include <linux/net.h>
81#include <asm/ipc.h> 83#include <asm/ipc.h>
82#include <asm/uaccess.h> 84#include <asm/uaccess.h>
83 85
@@ -408,3 +410,31 @@ asmlinkage long sys_oabi_sendmsg(int fd, struct msghdr __user *msg, unsigned fla
408 return sys_sendmsg(fd, msg, flags); 410 return sys_sendmsg(fd, msg, flags);
409} 411}
410 412
413asmlinkage long sys_oabi_socketcall(int call, unsigned long __user *args)
414{
415 unsigned long r = -EFAULT, a[6];
416
417 switch (call) {
418 case SYS_BIND:
419 if (copy_from_user(a, args, 3 * sizeof(long)) == 0)
420 r = sys_oabi_bind(a[0], (struct sockaddr __user *)a[1], a[2]);
421 break;
422 case SYS_CONNECT:
423 if (copy_from_user(a, args, 3 * sizeof(long)) == 0)
424 r = sys_oabi_connect(a[0], (struct sockaddr __user *)a[1], a[2]);
425 break;
426 case SYS_SENDTO:
427 if (copy_from_user(a, args, 6 * sizeof(long)) == 0)
428 r = sys_oabi_sendto(a[0], (void __user *)a[1], a[2], a[3],
429 (struct sockaddr __user *)a[4], a[5]);
430 break;
431 case SYS_SENDMSG:
432 if (copy_from_user(a, args, 3 * sizeof(long)) == 0)
433 r = sys_oabi_sendmsg(a[0], (struct msghdr __user *)a[1], a[2]);
434 break;
435 default:
436 r = sys_socketcall(call, args);
437 }
438
439 return r;
440}
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 10235b01582e..03924bcc6129 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -19,6 +19,7 @@
19#include <linux/personality.h> 19#include <linux/personality.h>
20#include <linux/ptrace.h> 20#include <linux/ptrace.h>
21#include <linux/kallsyms.h> 21#include <linux/kallsyms.h>
22#include <linux/delay.h>
22#include <linux/init.h> 23#include <linux/init.h>
23 24
24#include <asm/atomic.h> 25#include <asm/atomic.h>
@@ -231,6 +232,13 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
231 __die(str, err, thread, regs); 232 __die(str, err, thread, regs);
232 bust_spinlocks(0); 233 bust_spinlocks(0);
233 spin_unlock_irq(&die_lock); 234 spin_unlock_irq(&die_lock);
235
236 if (panic_on_oops) {
237 printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
238 ssleep(5);
239 panic("Fatal exception");
240 }
241
234 do_exit(SIGSEGV); 242 do_exit(SIGSEGV);
235} 243}
236 244
diff --git a/arch/arm/mach-at91rm9200/devices.c b/arch/arm/mach-at91rm9200/devices.c
index 8df3e5245651..57eedd5beaf6 100644
--- a/arch/arm/mach-at91rm9200/devices.c
+++ b/arch/arm/mach-at91rm9200/devices.c
@@ -100,8 +100,10 @@ void __init at91_add_device_udc(struct at91_udc_data *data)
100 at91_set_gpio_input(data->vbus_pin, 0); 100 at91_set_gpio_input(data->vbus_pin, 0);
101 at91_set_deglitch(data->vbus_pin, 1); 101 at91_set_deglitch(data->vbus_pin, 1);
102 } 102 }
103 if (data->pullup_pin) 103 if (data->pullup_pin) {
104 at91_set_gpio_output(data->pullup_pin, 0); 104 at91_set_gpio_output(data->pullup_pin, 0);
105 at91_set_multi_drive(data->pullup_pin, 1);
106 }
105 107
106 udc_data = *data; 108 udc_data = *data;
107 platform_device_register(&at91rm9200_udc_device); 109 platform_device_register(&at91rm9200_udc_device);
diff --git a/arch/arm/mach-at91rm9200/gpio.c b/arch/arm/mach-at91rm9200/gpio.c
index 2fd2ef583e4d..0e396feec468 100644
--- a/arch/arm/mach-at91rm9200/gpio.c
+++ b/arch/arm/mach-at91rm9200/gpio.c
@@ -159,6 +159,23 @@ int __init_or_module at91_set_deglitch(unsigned pin, int is_on)
159} 159}
160EXPORT_SYMBOL(at91_set_deglitch); 160EXPORT_SYMBOL(at91_set_deglitch);
161 161
162/*
163 * enable/disable the multi-driver; This is only valid for output and
164 * allows the output pin to run as an open collector output.
165 */
166int __init_or_module at91_set_multi_drive(unsigned pin, int is_on)
167{
168 void __iomem *pio = pin_to_controller(pin);
169 unsigned mask = pin_to_mask(pin);
170
171 if (!pio)
172 return -EINVAL;
173
174 __raw_writel(mask, pio + (is_on ? PIO_MDER : PIO_MDDR));
175 return 0;
176}
177EXPORT_SYMBOL(at91_set_multi_drive);
178
162/*--------------------------------------------------------------------------*/ 179/*--------------------------------------------------------------------------*/
163 180
164 181
@@ -257,8 +274,18 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
257 gpio = &irq_desc[pin]; 274 gpio = &irq_desc[pin];
258 275
259 while (isr) { 276 while (isr) {
260 if (isr & 1) 277 if (isr & 1) {
261 gpio->handle(pin, gpio, regs); 278 if (unlikely(gpio->disable_depth)) {
279 /*
280 * The core ARM interrupt handler lazily disables IRQs so
281 * another IRQ must be generated before it actually gets
282 * here to be disabled on the GPIO controller.
283 */
284 gpio_irq_mask(pin);
285 }
286 else
287 gpio->handle(pin, gpio, regs);
288 }
262 pin++; 289 pin++;
263 gpio++; 290 gpio++;
264 isr >>= 1; 291 isr >>= 1;
diff --git a/arch/arm/mach-integrator/platsmp.c b/arch/arm/mach-integrator/platsmp.c
index ea10bd8c972c..1bc8534ef0c6 100644
--- a/arch/arm/mach-integrator/platsmp.c
+++ b/arch/arm/mach-integrator/platsmp.c
@@ -140,6 +140,18 @@ static void __init poke_milo(void)
140 mb(); 140 mb();
141} 141}
142 142
143/*
144 * Initialise the CPU possible map early - this describes the CPUs
145 * which may be present or become present in the system.
146 */
147void __init smp_init_cpus(void)
148{
149 unsigned int i, ncores = get_core_count();
150
151 for (i = 0; i < ncores; i++)
152 cpu_set(i, cpu_possible_map);
153}
154
143void __init smp_prepare_cpus(unsigned int max_cpus) 155void __init smp_prepare_cpus(unsigned int max_cpus)
144{ 156{
145 unsigned int ncores = get_core_count(); 157 unsigned int ncores = get_core_count();
@@ -176,14 +188,11 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
176 max_cpus = ncores; 188 max_cpus = ncores;
177 189
178 /* 190 /*
179 * Initialise the possible/present maps. 191 * Initialise the present map, which describes the set of CPUs
180 * cpu_possible_map describes the set of CPUs which may be present 192 * actually populated at the present time.
181 * cpu_present_map describes the set of CPUs populated
182 */ 193 */
183 for (i = 0; i < max_cpus; i++) { 194 for (i = 0; i < max_cpus; i++)
184 cpu_set(i, cpu_possible_map);
185 cpu_set(i, cpu_present_map); 195 cpu_set(i, cpu_present_map);
186 }
187 196
188 /* 197 /*
189 * Do we need any more CPUs? If so, then let them know where 198 * Do we need any more CPUs? If so, then let them know where
diff --git a/arch/arm/mach-iop3xx/iop321-setup.c b/arch/arm/mach-iop3xx/iop321-setup.c
index e4f4c52d93d4..0ebbcb20c6ae 100644
--- a/arch/arm/mach-iop3xx/iop321-setup.c
+++ b/arch/arm/mach-iop3xx/iop321-setup.c
@@ -13,7 +13,6 @@
13#include <linux/mm.h> 13#include <linux/mm.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/config.h> 15#include <linux/config.h>
16#include <linux/init.h>
17#include <linux/major.h> 16#include <linux/major.h>
18#include <linux/fs.h> 17#include <linux/fs.h>
19#include <linux/platform_device.h> 18#include <linux/platform_device.h>
diff --git a/arch/arm/mach-iop3xx/iop331-setup.c b/arch/arm/mach-iop3xx/iop331-setup.c
index 63585485123e..2d6abe5be14d 100644
--- a/arch/arm/mach-iop3xx/iop331-setup.c
+++ b/arch/arm/mach-iop3xx/iop331-setup.c
@@ -12,7 +12,6 @@
12#include <linux/mm.h> 12#include <linux/mm.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/config.h> 14#include <linux/config.h>
15#include <linux/init.h>
16#include <linux/major.h> 15#include <linux/major.h>
17#include <linux/fs.h> 16#include <linux/fs.h>
18#include <linux/platform_device.h> 17#include <linux/platform_device.h>
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 4bdc9d4526cd..fbadf3021b9e 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -111,24 +111,30 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type)
111 if (line < 0) 111 if (line < 0)
112 return -EINVAL; 112 return -EINVAL;
113 113
114 if (type & IRQT_BOTHEDGE) { 114 switch (type){
115 case IRQT_BOTHEDGE:
115 int_style = IXP4XX_GPIO_STYLE_TRANSITIONAL; 116 int_style = IXP4XX_GPIO_STYLE_TRANSITIONAL;
116 irq_type = IXP4XX_IRQ_EDGE; 117 irq_type = IXP4XX_IRQ_EDGE;
117 } else if (type & IRQT_RISING) { 118 break;
119 case IRQT_RISING:
118 int_style = IXP4XX_GPIO_STYLE_RISING_EDGE; 120 int_style = IXP4XX_GPIO_STYLE_RISING_EDGE;
119 irq_type = IXP4XX_IRQ_EDGE; 121 irq_type = IXP4XX_IRQ_EDGE;
120 } else if (type & IRQT_FALLING) { 122 break;
123 case IRQT_FALLING:
121 int_style = IXP4XX_GPIO_STYLE_FALLING_EDGE; 124 int_style = IXP4XX_GPIO_STYLE_FALLING_EDGE;
122 irq_type = IXP4XX_IRQ_EDGE; 125 irq_type = IXP4XX_IRQ_EDGE;
123 } else if (type & IRQT_HIGH) { 126 break;
127 case IRQT_HIGH:
124 int_style = IXP4XX_GPIO_STYLE_ACTIVE_HIGH; 128 int_style = IXP4XX_GPIO_STYLE_ACTIVE_HIGH;
125 irq_type = IXP4XX_IRQ_LEVEL; 129 irq_type = IXP4XX_IRQ_LEVEL;
126 } else if (type & IRQT_LOW) { 130 break;
131 case IRQT_LOW:
127 int_style = IXP4XX_GPIO_STYLE_ACTIVE_LOW; 132 int_style = IXP4XX_GPIO_STYLE_ACTIVE_LOW;
128 irq_type = IXP4XX_IRQ_LEVEL; 133 irq_type = IXP4XX_IRQ_LEVEL;
129 } else 134 break;
135 default:
130 return -EINVAL; 136 return -EINVAL;
131 137 }
132 ixp4xx_config_irq(irq, irq_type); 138 ixp4xx_config_irq(irq, irq_type);
133 139
134 if (line >= 8) { /* pins 8-15 */ 140 if (line >= 8) { /* pins 8-15 */
diff --git a/arch/arm/mach-ixp4xx/nslu2-power.c b/arch/arm/mach-ixp4xx/nslu2-power.c
index b0ad9e901f6e..d80c362bc539 100644
--- a/arch/arm/mach-ixp4xx/nslu2-power.c
+++ b/arch/arm/mach-ixp4xx/nslu2-power.c
@@ -77,6 +77,9 @@ static int __init nslu2_power_init(void)
77 77
78static void __exit nslu2_power_exit(void) 78static void __exit nslu2_power_exit(void)
79{ 79{
80 if (!(machine_is_nslu2()))
81 return;
82
80 free_irq(NSLU2_RB_IRQ, NULL); 83 free_irq(NSLU2_RB_IRQ, NULL);
81 free_irq(NSLU2_PB_IRQ, NULL); 84 free_irq(NSLU2_PB_IRQ, NULL);
82} 85}
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c
index da9340a53434..55411f21d838 100644
--- a/arch/arm/mach-ixp4xx/nslu2-setup.c
+++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
@@ -27,8 +27,6 @@ static struct flash_platform_data nslu2_flash_data = {
27}; 27};
28 28
29static struct resource nslu2_flash_resource = { 29static struct resource nslu2_flash_resource = {
30 .start = NSLU2_FLASH_BASE,
31 .end = NSLU2_FLASH_BASE + NSLU2_FLASH_SIZE,
32 .flags = IORESOURCE_MEM, 30 .flags = IORESOURCE_MEM,
33}; 31};
34 32
@@ -52,6 +50,12 @@ static struct platform_device nslu2_i2c_controller = {
52 .num_resources = 0, 50 .num_resources = 0,
53}; 51};
54 52
53static struct platform_device nslu2_beeper = {
54 .name = "ixp4xx-beeper",
55 .id = NSLU2_GPIO_BUZZ,
56 .num_resources = 0,
57};
58
55static struct resource nslu2_uart_resources[] = { 59static struct resource nslu2_uart_resources[] = {
56 { 60 {
57 .start = IXP4XX_UART1_BASE_PHYS, 61 .start = IXP4XX_UART1_BASE_PHYS,
@@ -99,6 +103,7 @@ static struct platform_device *nslu2_devices[] __initdata = {
99 &nslu2_i2c_controller, 103 &nslu2_i2c_controller,
100 &nslu2_flash, 104 &nslu2_flash,
101 &nslu2_uart, 105 &nslu2_uart,
106 &nslu2_beeper,
102}; 107};
103 108
104static void nslu2_power_off(void) 109static void nslu2_power_off(void)
@@ -116,6 +121,10 @@ static void __init nslu2_init(void)
116{ 121{
117 ixp4xx_sys_init(); 122 ixp4xx_sys_init();
118 123
124 nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
125 nslu2_flash_resource.end =
126 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
127
119 pm_power_off = nslu2_power_off; 128 pm_power_off = nslu2_power_off;
120 129
121 platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices)); 130 platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices));
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c
index a8fbd76d8be5..b8484e15dacb 100644
--- a/arch/arm/mach-realview/platsmp.c
+++ b/arch/arm/mach-realview/platsmp.c
@@ -143,6 +143,18 @@ static void __init poke_milo(void)
143 mb(); 143 mb();
144} 144}
145 145
146/*
147 * Initialise the CPU possible map early - this describes the CPUs
148 * which may be present or become present in the system.
149 */
150void __init smp_init_cpus(void)
151{
152 unsigned int i, ncores = get_core_count();
153
154 for (i = 0; i < ncores; i++)
155 cpu_set(i, cpu_possible_map);
156}
157
146void __init smp_prepare_cpus(unsigned int max_cpus) 158void __init smp_prepare_cpus(unsigned int max_cpus)
147{ 159{
148 unsigned int ncores = get_core_count(); 160 unsigned int ncores = get_core_count();
@@ -179,14 +191,11 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
179 local_timer_setup(cpu); 191 local_timer_setup(cpu);
180 192
181 /* 193 /*
182 * Initialise the possible/present maps. 194 * Initialise the present map, which describes the set of CPUs
183 * cpu_possible_map describes the set of CPUs which may be present 195 * actually populated at the present time.
184 * cpu_present_map describes the set of CPUs populated
185 */ 196 */
186 for (i = 0; i < max_cpus; i++) { 197 for (i = 0; i < max_cpus; i++)
187 cpu_set(i, cpu_possible_map);
188 cpu_set(i, cpu_present_map); 198 cpu_set(i, cpu_present_map);
189 }
190 199
191 /* 200 /*
192 * Do we need any more CPUs? If so, then let them know where 201 * Do we need any more CPUs? If so, then let them know where
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c
index b80d57d51699..722fbabc9cfb 100644
--- a/arch/arm/mach-versatile/pci.c
+++ b/arch/arm/mach-versatile/pci.c
@@ -240,6 +240,14 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys)
240 int i; 240 int i;
241 int myslot = -1; 241 int myslot = -1;
242 unsigned long val; 242 unsigned long val;
243 void __iomem *local_pci_cfg_base;
244
245 val = __raw_readl(SYS_PCICTL);
246 if (!(val & 1)) {
247 printk("Not plugged into PCI backplane!\n");
248 ret = -EIO;
249 goto out;
250 }
243 251
244 if (nr == 0) { 252 if (nr == 0) {
245 sys->mem_offset = 0; 253 sys->mem_offset = 0;
@@ -253,48 +261,45 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys)
253 goto out; 261 goto out;
254 } 262 }
255 263
256 __raw_writel(VERSATILE_PCI_MEM_BASE0 >> 28,PCI_IMAP0);
257 __raw_writel(VERSATILE_PCI_MEM_BASE1 >> 28,PCI_IMAP1);
258 __raw_writel(VERSATILE_PCI_MEM_BASE2 >> 28,PCI_IMAP2);
259
260 __raw_writel(1, SYS_PCICTL);
261
262 val = __raw_readl(SYS_PCICTL);
263 if (!(val & 1)) {
264 printk("Not plugged into PCI backplane!\n");
265 ret = -EIO;
266 goto out;
267 }
268
269 /* 264 /*
270 * We need to discover the PCI core first to configure itself 265 * We need to discover the PCI core first to configure itself
271 * before the main PCI probing is performed 266 * before the main PCI probing is performed
272 */ 267 */
273 for (i=0; i<32; i++) { 268 for (i=0; i<32; i++)
274 if ((__raw_readl(VERSATILE_PCI_VIRT_BASE+(i<<11)+DEVICE_ID_OFFSET) == VP_PCI_DEVICE_ID) && 269 if ((__raw_readl(VERSATILE_PCI_VIRT_BASE+(i<<11)+DEVICE_ID_OFFSET) == VP_PCI_DEVICE_ID) &&
275 (__raw_readl(VERSATILE_PCI_VIRT_BASE+(i<<11)+CLASS_ID_OFFSET) == VP_PCI_CLASS_ID)) { 270 (__raw_readl(VERSATILE_PCI_VIRT_BASE+(i<<11)+CLASS_ID_OFFSET) == VP_PCI_CLASS_ID)) {
276 myslot = i; 271 myslot = i;
277
278 __raw_writel(myslot, PCI_SELFID);
279 val = __raw_readl(VERSATILE_PCI_CFG_VIRT_BASE+(myslot<<11)+CSR_OFFSET);
280 val |= (1<<2);
281 __raw_writel(val, VERSATILE_PCI_CFG_VIRT_BASE+(myslot<<11)+CSR_OFFSET);
282 break; 272 break;
283 } 273 }
284 }
285 274
286 if (myslot == -1) { 275 if (myslot == -1) {
287 printk("Cannot find PCI core!\n"); 276 printk("Cannot find PCI core!\n");
288 ret = -EIO; 277 ret = -EIO;
289 } else { 278 goto out;
290 printk("PCI core found (slot %d)\n",myslot);
291 /* Do not to map Versatile FPGA PCI device
292 into memory space as we are short of
293 mappable memory */
294 pci_slot_ignore |= (1 << myslot);
295 ret = 1;
296 } 279 }
297 280
281 printk("PCI core found (slot %d)\n",myslot);
282
283 __raw_writel(myslot, PCI_SELFID);
284 local_pci_cfg_base = (void *) VERSATILE_PCI_CFG_VIRT_BASE + (myslot << 11);
285
286 val = __raw_readl(local_pci_cfg_base + CSR_OFFSET);
287 val |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE;
288 __raw_writel(val, local_pci_cfg_base + CSR_OFFSET);
289
290 /*
291 * Configure the PCI inbound memory windows to be 1:1 mapped to SDRAM
292 */
293 __raw_writel(PHYS_OFFSET, local_pci_cfg_base + PCI_BASE_ADDRESS_0);
294 __raw_writel(PHYS_OFFSET, local_pci_cfg_base + PCI_BASE_ADDRESS_1);
295 __raw_writel(PHYS_OFFSET, local_pci_cfg_base + PCI_BASE_ADDRESS_2);
296
297 /*
298 * Do not to map Versatile FPGA PCI device into memory space
299 */
300 pci_slot_ignore |= (1 << myslot);
301 ret = 1;
302
298 out: 303 out:
299 return ret; 304 return ret;
300} 305}
@@ -305,18 +310,18 @@ struct pci_bus *pci_versatile_scan_bus(int nr, struct pci_sys_data *sys)
305 return pci_scan_bus(sys->busnr, &pci_versatile_ops, sys); 310 return pci_scan_bus(sys->busnr, &pci_versatile_ops, sys);
306} 311}
307 312
308/*
309 * V3_LB_BASE? - local bus address
310 * V3_LB_MAP? - pci bus address
311 */
312void __init pci_versatile_preinit(void) 313void __init pci_versatile_preinit(void)
313{ 314{
314} 315 __raw_writel(VERSATILE_PCI_MEM_BASE0 >> 28, PCI_IMAP0);
316 __raw_writel(VERSATILE_PCI_MEM_BASE1 >> 28, PCI_IMAP1);
317 __raw_writel(VERSATILE_PCI_MEM_BASE2 >> 28, PCI_IMAP2);
315 318
316void __init pci_versatile_postinit(void) 319 __raw_writel(PHYS_OFFSET >> 28, PCI_SMAP0);
317{ 320 __raw_writel(PHYS_OFFSET >> 28, PCI_SMAP1);
318} 321 __raw_writel(PHYS_OFFSET >> 28, PCI_SMAP2);
319 322
323 __raw_writel(1, SYS_PCICTL);
324}
320 325
321/* 326/*
322 * map the specified device/slot/pin to an IRQ. Different backplanes may need to modify this. 327 * map the specified device/slot/pin to an IRQ. Different backplanes may need to modify this.
@@ -326,16 +331,15 @@ static int __init versatile_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
326 int irq; 331 int irq;
327 int devslot = PCI_SLOT(dev->devfn); 332 int devslot = PCI_SLOT(dev->devfn);
328 333
329 /* slot, pin, irq 334 /* slot, pin, irq
330 24 1 27 335 * 24 1 27
331 25 1 28 untested 336 * 25 1 28
332 26 1 29 337 * 26 1 29
333 27 1 30 untested 338 * 27 1 30
334 */ 339 */
335 340 irq = 27 + ((slot + pin - 1) & 3);
336 irq = 27 + ((slot + pin + 2) % 3); /* Fudged */
337 341
338 printk("map irq: slot %d, pin %d, devslot %d, irq: %d\n",slot,pin,devslot,irq); 342 printk("PCI map irq: slot %d, pin %d, devslot %d, irq: %d\n",slot,pin,devslot,irq);
339 343
340 return irq; 344 return irq;
341} 345}
@@ -347,7 +351,6 @@ static struct hw_pci versatile_pci __initdata = {
347 .setup = pci_versatile_setup, 351 .setup = pci_versatile_setup,
348 .scan = pci_versatile_scan_bus, 352 .scan = pci_versatile_scan_bus,
349 .preinit = pci_versatile_preinit, 353 .preinit = pci_versatile_preinit,
350 .postinit = pci_versatile_postinit,
351}; 354};
352 355
353static int __init versatile_pci_init(void) 356static int __init versatile_pci_init(void)
diff --git a/arch/arm/mm/abort-ev6.S b/arch/arm/mm/abort-ev6.S
index dbd346033122..8a7f65ba14b7 100644
--- a/arch/arm/mm/abort-ev6.S
+++ b/arch/arm/mm/abort-ev6.S
@@ -20,7 +20,7 @@
20 */ 20 */
21 .align 5 21 .align 5
22ENTRY(v6_early_abort) 22ENTRY(v6_early_abort)
23#ifdef CONFIG_CPU_MPCORE 23#ifdef CONFIG_CPU_32v6K
24 clrex 24 clrex
25#else 25#else
26 strex r0, r1, [sp] @ Clear the exclusive monitor 26 strex r0, r1, [sp] @ Clear the exclusive monitor
diff --git a/arch/arm/plat-omap/pm.c b/arch/arm/plat-omap/pm.c
index 1a24e2c10714..093efd786f21 100644
--- a/arch/arm/plat-omap/pm.c
+++ b/arch/arm/plat-omap/pm.c
@@ -38,7 +38,6 @@
38#include <linux/pm.h> 38#include <linux/pm.h>
39#include <linux/sched.h> 39#include <linux/sched.h>
40#include <linux/proc_fs.h> 40#include <linux/proc_fs.h>
41#include <linux/pm.h>
42#include <linux/interrupt.h> 41#include <linux/interrupt.h>
43 42
44#include <asm/io.h> 43#include <asm/io.h>
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index d0f9bb5e9023..8ab5300dcb94 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -12,7 +12,7 @@
12# 12#
13# http://www.arm.linux.org.uk/developer/machines/?action=new 13# http://www.arm.linux.org.uk/developer/machines/?action=new
14# 14#
15# Last update: Mon Jan 9 12:56:42 2006 15# Last update: Mon Feb 20 10:18:02 2006
16# 16#
17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number 17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
18# 18#
@@ -904,7 +904,7 @@ wg302v2 MACH_WG302V2 WG302V2 890
904eb42x MACH_EB42X EB42X 891 904eb42x MACH_EB42X EB42X 891
905iq331es MACH_IQ331ES IQ331ES 892 905iq331es MACH_IQ331ES IQ331ES 892
906cosydsp MACH_COSYDSP COSYDSP 893 906cosydsp MACH_COSYDSP COSYDSP 893
907uplat7d MACH_UPLAT7D UPLAT7D 894 907uplat7d_proto MACH_UPLAT7D UPLAT7D 894
908ptdavinci MACH_PTDAVINCI PTDAVINCI 895 908ptdavinci MACH_PTDAVINCI PTDAVINCI 895
909mbus MACH_MBUS MBUS 896 909mbus MACH_MBUS MBUS 896
910nadia2vb MACH_NADIA2VB NADIA2VB 897 910nadia2vb MACH_NADIA2VB NADIA2VB 897
@@ -938,3 +938,34 @@ auckland MACH_AUCKLAND AUCKLAND 924
938ak3220m MACH_AK3320M AK3320M 925 938ak3220m MACH_AK3320M AK3320M 925
939duramax MACH_DURAMAX DURAMAX 926 939duramax MACH_DURAMAX DURAMAX 926
940n35 MACH_N35 N35 927 940n35 MACH_N35 N35 927
941pronghorn MACH_PRONGHORN PRONGHORN 928
942fundy MACH_FUNDY FUNDY 929
943logicpd_pxa270 MACH_LOGICPD_PXA270 LOGICPD_PXA270 930
944cpu777 MACH_CPU777 CPU777 931
945simicon9201 MACH_SIMICON9201 SIMICON9201 932
946leap2_hpm MACH_LEAP2_HPM LEAP2_HPM 933
947cm922txa10 MACH_CM922TXA10 CM922TXA10 934
948sandgate MACH_PXA PXA 935
949sandgate2 MACH_SANDGATE2 SANDGATE2 936
950sandgate2g MACH_SANDGATE2G SANDGATE2G 937
951sandgate2p MACH_SANDGATE2P SANDGATE2P 938
952fred_jack MACH_FRED_JACK FRED_JACK 939
953ttg_color1 MACH_TTG_COLOR1 TTG_COLOR1 940
954nxeb500hmi MACH_NXEB500HMI NXEB500HMI 941
955netdcu8 MACH_NETDCU8 NETDCU8 942
956ml675050_cpu_boa MACH_ML675050_CPU_BOA ML675050_CPU_BOA 943
957ng_fvx538 MACH_NG_FVX538 NG_FVX538 944
958ng_fvs338 MACH_NG_FVS338 NG_FVS338 945
959pnx4103 MACH_PNX4103 PNX4103 946
960hesdb MACH_HESDB HESDB 947
961xsilo MACH_XSILO XSILO 948
962espresso MACH_ESPRESSO ESPRESSO 949
963emlc MACH_EMLC EMLC 950
964sisteron MACH_SISTERON SISTERON 951
965rx1950 MACH_RX1950 RX1950 952
966tsc_venus MACH_TSC_VENUS TSC_VENUS 953
967ds101j MACH_DS101J DS101J 954
968mxc300_30ads MACH_MXC30030ADS MXC30030ADS 955
969fujitsu_wimaxsoc MACH_FUJITSU_WIMAXSOC FUJITSU_WIMAXSOC 956
970dualpcmodem MACH_DUALPCMODEM DUALPCMODEM 957
971gesbc9312 MACH_GESBC9312 GESBC9312 958