aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-09-13 11:24:25 -0400
committerPaul Mackerras <paulus@samba.org>2007-09-13 11:24:25 -0400
commitb2315372eac9cd9f622c32a93e323cf6f0f03462 (patch)
tree9e1faa7cdcddf5d90bec4fb9523742d4cce699a1 /arch/arm
parent5326152fa182b0a16e4abf913ce403e3c7ab53b7 (diff)
parentc87ce65868bbf9bbea9c3f112ff8315302daf8f2 (diff)
Merge branch 'linux-2.6' into for-2.6.24
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig7
-rw-r--r--arch/arm/mach-imx/generic.c7
-rw-r--r--arch/arm/mach-omap1/board-h3.c12
-rw-r--r--arch/arm/mach-omap1/leds-osk.c6
-rw-r--r--arch/arm/mach-omap1/pm.c11
-rw-r--r--arch/arm/mach-omap2/clock.c13
-rw-r--r--arch/arm/mach-omap2/serial.c2
-rw-r--r--arch/arm/mach-pxa/irq.c2
-rw-r--r--arch/arm/plat-omap/common.c2
-rw-r--r--arch/arm/plat-omap/dmtimer.c5
-rw-r--r--arch/arm/plat-omap/timer32k.c10
11 files changed, 28 insertions, 49 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d6145298a325..691aae309c8a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -721,7 +721,8 @@ config LEDS
721 721
722config LEDS_TIMER 722config LEDS_TIMER
723 bool "Timer LED" if (!ARCH_CDB89712 && !ARCH_OMAP) || \ 723 bool "Timer LED" if (!ARCH_CDB89712 && !ARCH_OMAP) || \
724 MACH_OMAP_H2 || MACH_OMAP_PERSEUS2 724 OMAP_OSK_MISTRAL || MACH_OMAP_H2 \
725 || MACH_OMAP_PERSEUS2
725 depends on LEDS 726 depends on LEDS
726 depends on !GENERIC_CLOCKEVENTS 727 depends on !GENERIC_CLOCKEVENTS
727 default y if ARCH_EBSA110 728 default y if ARCH_EBSA110
@@ -738,7 +739,9 @@ config LEDS_TIMER
738 739
739config LEDS_CPU 740config LEDS_CPU
740 bool "CPU usage LED" if (!ARCH_CDB89712 && !ARCH_EBSA110 && \ 741 bool "CPU usage LED" if (!ARCH_CDB89712 && !ARCH_EBSA110 && \
741 !ARCH_OMAP) || MACH_OMAP_H2 || MACH_OMAP_PERSEUS2 742 !ARCH_OMAP) \
743 || OMAP_OSK_MISTRAL || MACH_OMAP_H2 \
744 || MACH_OMAP_PERSEUS2
742 depends on LEDS 745 depends on LEDS
743 help 746 help
744 If you say Y here, the red LED will be used to give a good real 747 If you say Y here, the red LED will be used to give a good real
diff --git a/arch/arm/mach-imx/generic.c b/arch/arm/mach-imx/generic.c
index a58b678006df..4cfc9d3af28a 100644
--- a/arch/arm/mach-imx/generic.c
+++ b/arch/arm/mach-imx/generic.c
@@ -101,10 +101,11 @@ EXPORT_SYMBOL(imx_gpio_mode);
101 101
102int imx_gpio_request(unsigned gpio, const char *label) 102int imx_gpio_request(unsigned gpio, const char *label)
103{ 103{
104 if(gpio >= (GPIO_PORT_MAX + 1) * 32) 104 if(gpio >= (GPIO_PORT_MAX + 1) * 32) {
105 printk(KERN_ERR "imx_gpio: Attempt to request nonexistent GPIO %d for \"%s\"\n", 105 printk(KERN_ERR "imx_gpio: Attempt to request nonexistent GPIO %d for \"%s\"\n",
106 gpio, label ? label : "?"); 106 gpio, label ? label : "?");
107 return -EINVAL; 107 return -EINVAL;
108 }
108 109
109 if(test_and_set_bit(gpio, imx_gpio_alloc_map)) { 110 if(test_and_set_bit(gpio, imx_gpio_alloc_map)) {
110 printk(KERN_ERR "imx_gpio: GPIO %d already used. Allocation for \"%s\" failed\n", 111 printk(KERN_ERR "imx_gpio: GPIO %d already used. Allocation for \"%s\" failed\n",
@@ -129,7 +130,7 @@ EXPORT_SYMBOL(imx_gpio_free);
129 130
130int imx_gpio_direction_input(unsigned gpio) 131int imx_gpio_direction_input(unsigned gpio)
131{ 132{
132 imx_gpio_mode(gpio| GPIO_IN); 133 imx_gpio_mode(gpio | GPIO_IN | GPIO_GIUS | GPIO_DR);
133 return 0; 134 return 0;
134} 135}
135 136
@@ -138,7 +139,7 @@ EXPORT_SYMBOL(imx_gpio_direction_input);
138int imx_gpio_direction_output(unsigned gpio, int value) 139int imx_gpio_direction_output(unsigned gpio, int value)
139{ 140{
140 imx_gpio_set_value(gpio, value); 141 imx_gpio_set_value(gpio, value);
141 imx_gpio_mode(gpio| GPIO_OUT); 142 imx_gpio_mode(gpio | GPIO_OUT | GPIO_GIUS | GPIO_DR);
142 return 0; 143 return 0;
143} 144}
144 145
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 7b260b7c537b..79d4ef4c54d4 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -294,9 +294,11 @@ static int h3_select_irda(struct device *dev, int state)
294 return err; 294 return err;
295} 295}
296 296
297static void set_trans_mode(void *data) 297static void set_trans_mode(struct work_struct *work)
298{ 298{
299 int *mode = data; 299 struct omap_irda_config *irda_config =
300 container_of(work, struct omap_irda_config, gpio_expa.work);
301 int mode = irda_config->mode;
300 unsigned char expa; 302 unsigned char expa;
301 int err = 0; 303 int err = 0;
302 304
@@ -306,7 +308,7 @@ static void set_trans_mode(void *data)
306 308
307 expa &= ~0x03; 309 expa &= ~0x03;
308 310
309 if (*mode & IR_SIRMODE) { 311 if (mode & IR_SIRMODE) {
310 expa |= 0x01; 312 expa |= 0x01;
311 } else { /* MIR/FIR */ 313 } else { /* MIR/FIR */
312 expa |= 0x03; 314 expa |= 0x03;
@@ -321,9 +323,9 @@ static int h3_transceiver_mode(struct device *dev, int mode)
321{ 323{
322 struct omap_irda_config *irda_config = dev->platform_data; 324 struct omap_irda_config *irda_config = dev->platform_data;
323 325
326 irda_config->mode = mode;
324 cancel_delayed_work(&irda_config->gpio_expa); 327 cancel_delayed_work(&irda_config->gpio_expa);
325 PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode); 328 PREPARE_DELAYED_WORK(&irda_config->gpio_expa, set_trans_mode);
326#error this is not permitted - mode is an argument variable
327 schedule_delayed_work(&irda_config->gpio_expa, 0); 329 schedule_delayed_work(&irda_config->gpio_expa, 0);
328 330
329 return 0; 331 return 0;
diff --git a/arch/arm/mach-omap1/leds-osk.c b/arch/arm/mach-omap1/leds-osk.c
index 0cbf1b0071f8..86de303ecab2 100644
--- a/arch/arm/mach-omap1/leds-osk.c
+++ b/arch/arm/mach-omap1/leds-osk.c
@@ -133,13 +133,13 @@ void osk_leds_event(led_event_t evt)
133 mistral_setled(); 133 mistral_setled();
134 break; 134 break;
135 135
136 case led_idle_start: 136 case led_idle_start: /* idle == off */
137 hw_led_state |= IDLE_LED; 137 hw_led_state &= ~IDLE_LED;
138 mistral_setled(); 138 mistral_setled();
139 break; 139 break;
140 140
141 case led_idle_end: 141 case led_idle_end:
142 hw_led_state &= ~IDLE_LED; 142 hw_led_state |= IDLE_LED;
143 mistral_setled(); 143 mistral_setled();
144 break; 144 break;
145 145
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index 5bb348e2e315..2e68be607295 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -57,7 +57,6 @@
57#include <asm/arch/tc.h> 57#include <asm/arch/tc.h>
58#include <asm/arch/pm.h> 58#include <asm/arch/pm.h>
59#include <asm/arch/mux.h> 59#include <asm/arch/mux.h>
60#include <asm/arch/tps65010.h>
61#include <asm/arch/dma.h> 60#include <asm/arch/dma.h>
62#include <asm/arch/dsp_common.h> 61#include <asm/arch/dsp_common.h>
63#include <asm/arch/dmtimer.h> 62#include <asm/arch/dmtimer.h>
@@ -250,11 +249,6 @@ void omap_pm_suspend(void)
250 249
251 omap_serial_wake_trigger(1); 250 omap_serial_wake_trigger(1);
252 251
253 if (machine_is_omap_osk()) {
254 /* Stop LED1 (D9) blink */
255 tps65010_set_led(LED1, OFF);
256 }
257
258 if (!cpu_is_omap15xx()) 252 if (!cpu_is_omap15xx())
259 omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG); 253 omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG);
260 254
@@ -447,11 +441,6 @@ void omap_pm_suspend(void)
447 omap_serial_wake_trigger(0); 441 omap_serial_wake_trigger(0);
448 442
449 printk("PM: OMAP%x is re-starting from deep sleep...\n", system_rev); 443 printk("PM: OMAP%x is re-starting from deep sleep...\n", system_rev);
450
451 if (machine_is_omap_osk()) {
452 /* Let LED1 (D9) blink again */
453 tps65010_set_led(LED1, BLINK);
454 }
455} 444}
456 445
457#if defined(DEBUG) && defined(CONFIG_PROC_FS) 446#if defined(DEBUG) && defined(CONFIG_PROC_FS)
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 588adb5ab47f..d9af4367f8bb 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -1160,8 +1160,8 @@ int __init omap2_clk_init(void)
1160 clk_enable(&sync_32k_ick); 1160 clk_enable(&sync_32k_ick);
1161 clk_enable(&omapctrl_ick); 1161 clk_enable(&omapctrl_ick);
1162 1162
1163 /* Force the APLLs active during bootup to avoid disabling and 1163 /* Force the APLLs always active. The clocks are idled
1164 * enabling them unnecessarily. */ 1164 * automatically by hardware. */
1165 clk_enable(&apll96_ck); 1165 clk_enable(&apll96_ck);
1166 clk_enable(&apll54_ck); 1166 clk_enable(&apll54_ck);
1167 1167
@@ -1174,12 +1174,3 @@ int __init omap2_clk_init(void)
1174 1174
1175 return 0; 1175 return 0;
1176} 1176}
1177
1178static int __init omap2_disable_aplls(void)
1179{
1180 clk_disable(&apll96_ck);
1181 clk_disable(&apll54_ck);
1182
1183 return 0;
1184}
1185late_initcall(omap2_disable_aplls);
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index aaa5589e8169..e9c367fc9f61 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -84,7 +84,7 @@ static inline void __init omap_serial_reset(struct plat_serial8250_port *p)
84 serial_write_reg(p, UART_OMAP_MDR1, 0x07); 84 serial_write_reg(p, UART_OMAP_MDR1, 0x07);
85 serial_write_reg(p, UART_OMAP_SCR, 0x08); 85 serial_write_reg(p, UART_OMAP_SCR, 0x08);
86 serial_write_reg(p, UART_OMAP_MDR1, 0x00); 86 serial_write_reg(p, UART_OMAP_MDR1, 0x00);
87 serial_write_reg(p, UART_OMAP_SYSC, 0x01); 87 serial_write_reg(p, UART_OMAP_SYSC, (0x02 << 3) | (1 << 2) | (1 << 0));
88} 88}
89 89
90void __init omap_serial_init() 90void __init omap_serial_init()
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 4b867b0789d5..ae2ae08032d7 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -365,7 +365,7 @@ void __init pxa_init_irq_gpio(int gpio_nr)
365 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 365 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
366 } 366 }
367 367
368 for (irq = IRQ_GPIO(2); irq <= IRQ_GPIO(gpio_nr); irq++) { 368 for (irq = IRQ_GPIO(2); irq < IRQ_GPIO(gpio_nr); irq++) {
369 set_irq_chip(irq, &pxa_muxed_gpio_chip); 369 set_irq_chip(irq, &pxa_muxed_gpio_chip);
370 set_irq_handler(irq, handle_edge_irq); 370 set_irq_handler(irq, handle_edge_irq);
371 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 371 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index 7987aa6e95f8..4f0f9c4e938e 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -172,7 +172,7 @@ console_initcall(omap_add_serial_console);
172#if defined(CONFIG_ARCH_OMAP16XX) 172#if defined(CONFIG_ARCH_OMAP16XX)
173#define TIMER_32K_SYNCHRONIZED 0xfffbc410 173#define TIMER_32K_SYNCHRONIZED 0xfffbc410
174#elif defined(CONFIG_ARCH_OMAP24XX) 174#elif defined(CONFIG_ARCH_OMAP24XX)
175#define TIMER_32K_SYNCHRONIZED 0x48004010 175#define TIMER_32K_SYNCHRONIZED (OMAP24XX_32KSYNCT_BASE + 0x10)
176#endif 176#endif
177 177
178#ifdef TIMER_32K_SYNCHRONIZED 178#ifdef TIMER_32K_SYNCHRONIZED
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 36073dfaa4db..3856f5aedfc1 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -271,11 +271,6 @@ int omap_dm_timer_get_irq(struct omap_dm_timer *timer)
271 271
272#if defined(CONFIG_ARCH_OMAP1) 272#if defined(CONFIG_ARCH_OMAP1)
273 273
274struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer)
275{
276 BUG();
277}
278
279/** 274/**
280 * omap_dm_timer_modify_idlect_mask - Check if any running timers use ARMXOR 275 * omap_dm_timer_modify_idlect_mask - Check if any running timers use ARMXOR
281 * @inputmask: current value of idlect mask 276 * @inputmask: current value of idlect mask
diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c
index b0af014b0e2c..ea76f1979a3d 100644
--- a/arch/arm/plat-omap/timer32k.c
+++ b/arch/arm/plat-omap/timer32k.c
@@ -71,7 +71,7 @@ struct sys_timer omap_timer;
71#if defined(CONFIG_ARCH_OMAP16XX) 71#if defined(CONFIG_ARCH_OMAP16XX)
72#define TIMER_32K_SYNCHRONIZED 0xfffbc410 72#define TIMER_32K_SYNCHRONIZED 0xfffbc410
73#elif defined(CONFIG_ARCH_OMAP24XX) 73#elif defined(CONFIG_ARCH_OMAP24XX)
74#define TIMER_32K_SYNCHRONIZED 0x48004010 74#define TIMER_32K_SYNCHRONIZED (OMAP24XX_32KSYNCT_BASE + 0x10)
75#else 75#else
76#error OMAP 32KHz timer does not currently work on 15XX! 76#error OMAP 32KHz timer does not currently work on 15XX!
77#endif 77#endif
@@ -147,14 +147,15 @@ static inline void omap_32k_timer_ack_irq(void)
147static void omap_32k_timer_set_mode(enum clock_event_mode mode, 147static void omap_32k_timer_set_mode(enum clock_event_mode mode,
148 struct clock_event_device *evt) 148 struct clock_event_device *evt)
149{ 149{
150 omap_32k_timer_stop();
151
150 switch (mode) { 152 switch (mode) {
151 case CLOCK_EVT_MODE_ONESHOT:
152 case CLOCK_EVT_MODE_PERIODIC: 153 case CLOCK_EVT_MODE_PERIODIC:
153 omap_32k_timer_start(OMAP_32K_TIMER_TICK_PERIOD); 154 omap_32k_timer_start(OMAP_32K_TIMER_TICK_PERIOD);
154 break; 155 break;
156 case CLOCK_EVT_MODE_ONESHOT:
155 case CLOCK_EVT_MODE_UNUSED: 157 case CLOCK_EVT_MODE_UNUSED:
156 case CLOCK_EVT_MODE_SHUTDOWN: 158 case CLOCK_EVT_MODE_SHUTDOWN:
157 omap_32k_timer_stop();
158 break; 159 break;
159 case CLOCK_EVT_MODE_RESUME: 160 case CLOCK_EVT_MODE_RESUME:
160 break; 161 break;
@@ -194,8 +195,6 @@ omap_32k_ticks_to_nsecs(unsigned long ticks_32k)
194 return (unsigned long long) ticks_32k * 1000 * 5*5*5*5*5*5 >> 9; 195 return (unsigned long long) ticks_32k * 1000 * 5*5*5*5*5*5 >> 9;
195} 196}
196 197
197static unsigned long omap_32k_last_tick = 0;
198
199/* 198/*
200 * Returns current time from boot in nsecs. It's OK for this to wrap 199 * Returns current time from boot in nsecs. It's OK for this to wrap
201 * around for now, as it's just a relative time stamp. 200 * around for now, as it's just a relative time stamp.
@@ -225,7 +224,6 @@ static __init void omap_init_32k_timer(void)
225{ 224{
226 if (cpu_class_is_omap1()) 225 if (cpu_class_is_omap1())
227 setup_irq(INT_OS_TIMER, &omap_32k_timer_irq); 226 setup_irq(INT_OS_TIMER, &omap_32k_timer_irq);
228 omap_32k_last_tick = omap_32k_sync_timer_read();
229 227
230#ifdef CONFIG_ARCH_OMAP2 228#ifdef CONFIG_ARCH_OMAP2
231 /* REVISIT: Check 24xx TIOCP_CFG settings after idle works */ 229 /* REVISIT: Check 24xx TIOCP_CFG settings after idle works */