aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-03-20 11:59:51 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-03-20 11:59:51 -0400
commit2a1bf8b7da2736d85d683fb921ac9a6b71719f37 (patch)
tree24149cba37d87b3cf0fb36959be05b957d7d56cc /arch
parenta0d1d04ea810481dd0b8790712086a77bc665b8a (diff)
parentc6b349ed8a288f1f69fdd560d509d81351cafd89 (diff)
Merge branch 'omap-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into m
* 'omap-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: ARM: OMAP1: Fix typo in OMAP1 MPU clock source initialization ARM: OMAP: Fix DMA CLINK mask, clear spurious interrupt ARM: OMAP: Fix chain_a_transfer return value ARM: OMAP: Fix missing makefile options ARM: OMAP: Fix GPIO IRQ unmask ARM: OMAP: Fix clockevent support for hrtimers
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/mach-omap1/time.c12
-rw-r--r--arch/arm/plat-omap/Kconfig1
-rw-r--r--arch/arm/plat-omap/Makefile5
-rw-r--r--arch/arm/plat-omap/dma.c9
-rw-r--r--arch/arm/plat-omap/gpio.c3
6 files changed, 22 insertions, 9 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 955fc53c1c01..4039a133006e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -469,6 +469,7 @@ config ARCH_OMAP
469 bool "TI OMAP" 469 bool "TI OMAP"
470 select GENERIC_GPIO 470 select GENERIC_GPIO
471 select GENERIC_TIME 471 select GENERIC_TIME
472 select GENERIC_CLOCKEVENTS
472 help 473 help
473 Support for TI's OMAP platform (OMAP1 and OMAP2). 474 Support for TI's OMAP platform (OMAP1 and OMAP2).
474 475
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index 237651ebae5d..a4f8b2055437 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -132,13 +132,20 @@ static inline void omap_mpu_timer_start(int nr, unsigned long load_val,
132 timer->cntl = timerflags; 132 timer->cntl = timerflags;
133} 133}
134 134
135static inline void omap_mpu_timer_stop(int nr)
136{
137 volatile omap_mpu_timer_regs_t* timer = omap_mpu_timer_base(nr);
138
139 timer->cntl &= ~MPU_TIMER_ST;
140}
141
135/* 142/*
136 * --------------------------------------------------------------------------- 143 * ---------------------------------------------------------------------------
137 * MPU timer 1 ... count down to zero, interrupt, reload 144 * MPU timer 1 ... count down to zero, interrupt, reload
138 * --------------------------------------------------------------------------- 145 * ---------------------------------------------------------------------------
139 */ 146 */
140static int omap_mpu_set_next_event(unsigned long cycles, 147static int omap_mpu_set_next_event(unsigned long cycles,
141 struct clock_event_device *evt) 148 struct clock_event_device *evt)
142{ 149{
143 omap_mpu_timer_start(0, cycles, 0); 150 omap_mpu_timer_start(0, cycles, 0);
144 return 0; 151 return 0;
@@ -152,6 +159,7 @@ static void omap_mpu_set_mode(enum clock_event_mode mode,
152 omap_mpu_set_autoreset(0); 159 omap_mpu_set_autoreset(0);
153 break; 160 break;
154 case CLOCK_EVT_MODE_ONESHOT: 161 case CLOCK_EVT_MODE_ONESHOT:
162 omap_mpu_timer_stop(0);
155 omap_mpu_remove_autoreset(0); 163 omap_mpu_remove_autoreset(0);
156 break; 164 break;
157 case CLOCK_EVT_MODE_UNUSED: 165 case CLOCK_EVT_MODE_UNUSED:
@@ -163,7 +171,7 @@ static void omap_mpu_set_mode(enum clock_event_mode mode,
163 171
164static struct clock_event_device clockevent_mpu_timer1 = { 172static struct clock_event_device clockevent_mpu_timer1 = {
165 .name = "mpu_timer1", 173 .name = "mpu_timer1",
166 .features = CLOCK_EVT_FEAT_PERIODIC, CLOCK_EVT_FEAT_ONESHOT, 174 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
167 .shift = 32, 175 .shift = 32,
168 .set_next_event = omap_mpu_set_next_event, 176 .set_next_event = omap_mpu_set_next_event,
169 .set_mode = omap_mpu_set_mode, 177 .set_mode = omap_mpu_set_mode,
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index c1f7e5a819a3..b917206ee906 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -11,7 +11,6 @@ choice
11 11
12config ARCH_OMAP1 12config ARCH_OMAP1
13 bool "TI OMAP1" 13 bool "TI OMAP1"
14 select GENERIC_CLOCKEVENTS
15 14
16config ARCH_OMAP2 15config ARCH_OMAP2
17 bool "TI OMAP2" 16 bool "TI OMAP2"
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index ce17df31b845..8f56c255d1ee 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -14,9 +14,14 @@ obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o
14# OCPI interconnect support for 1710, 1610 and 5912 14# OCPI interconnect support for 1710, 1610 and 5912
15obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o 15obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
16 16
17obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
17 18
18obj-$(CONFIG_CPU_FREQ) += cpu-omap.o 19obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
19obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o 20obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
20obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o 21obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o
21obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o 22obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
22obj-$(CONFIG_I2C_OMAP) += i2c.o 23obj-$(CONFIG_I2C_OMAP) += i2c.o
24
25# OMAP mailbox framework
26obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o
27
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 91004a3c4794..793740686be2 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -1020,12 +1020,12 @@ static void create_dma_lch_chain(int lch_head, int lch_queue)
1020 } 1020 }
1021 1021
1022 w = OMAP_DMA_CLNK_CTRL_REG(lch_head); 1022 w = OMAP_DMA_CLNK_CTRL_REG(lch_head);
1023 w &= ~(0x0f); 1023 w &= ~(0x1f);
1024 w |= lch_queue; 1024 w |= lch_queue;
1025 OMAP_DMA_CLNK_CTRL_REG(lch_head) = w; 1025 OMAP_DMA_CLNK_CTRL_REG(lch_head) = w;
1026 1026
1027 w = OMAP_DMA_CLNK_CTRL_REG(lch_queue); 1027 w = OMAP_DMA_CLNK_CTRL_REG(lch_queue);
1028 w &= ~(0x0f); 1028 w &= ~(0x1f);
1029 w |= (dma_chan[lch_queue].next_linked_ch); 1029 w |= (dma_chan[lch_queue].next_linked_ch);
1030 OMAP_DMA_CLNK_CTRL_REG(lch_queue) = w; 1030 OMAP_DMA_CLNK_CTRL_REG(lch_queue) = w;
1031} 1031}
@@ -1248,7 +1248,7 @@ EXPORT_SYMBOL(omap_dma_chain_status);
1248 * @param frame_count 1248 * @param frame_count
1249 * @param callbk_data - channel callback parameter data. 1249 * @param callbk_data - channel callback parameter data.
1250 * 1250 *
1251 * @return - Success : start_dma status 1251 * @return - Success : 0
1252 * Failure: -EINVAL/-EBUSY 1252 * Failure: -EINVAL/-EBUSY
1253 */ 1253 */
1254int omap_dma_chain_a_transfer(int chain_id, int src_start, int dest_start, 1254int omap_dma_chain_a_transfer(int chain_id, int src_start, int dest_start,
@@ -1367,7 +1367,7 @@ int omap_dma_chain_a_transfer(int chain_id, int src_start, int dest_start,
1367 dma_chan[lch].flags |= OMAP_DMA_ACTIVE; 1367 dma_chan[lch].flags |= OMAP_DMA_ACTIVE;
1368 } 1368 }
1369 } 1369 }
1370 return start_dma; 1370 return 0;
1371} 1371}
1372EXPORT_SYMBOL(omap_dma_chain_a_transfer); 1372EXPORT_SYMBOL(omap_dma_chain_a_transfer);
1373 1373
@@ -1663,6 +1663,7 @@ static int omap2_dma_handle_ch(int ch)
1663 if (!status) { 1663 if (!status) {
1664 if (printk_ratelimit()) 1664 if (printk_ratelimit())
1665 printk(KERN_WARNING "Spurious DMA IRQ for lch %d\n", ch); 1665 printk(KERN_WARNING "Spurious DMA IRQ for lch %d\n", ch);
1666 omap_writel(1 << ch, OMAP_DMA4_IRQSTATUS_L0);
1666 return 0; 1667 return 0;
1667 } 1668 }
1668 if (unlikely(dma_chan[ch].dev_id == -1)) { 1669 if (unlikely(dma_chan[ch].dev_id == -1)) {
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 66a1455595f4..8c78e4e57b5c 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -1134,10 +1134,9 @@ static void gpio_mask_irq(unsigned int irq)
1134static void gpio_unmask_irq(unsigned int irq) 1134static void gpio_unmask_irq(unsigned int irq)
1135{ 1135{
1136 unsigned int gpio = irq - IH_GPIO_BASE; 1136 unsigned int gpio = irq - IH_GPIO_BASE;
1137 unsigned int gpio_idx = get_gpio_index(gpio);
1138 struct gpio_bank *bank = get_irq_chip_data(irq); 1137 struct gpio_bank *bank = get_irq_chip_data(irq);
1139 1138
1140 _set_gpio_irqenable(bank, gpio_idx, 1); 1139 _set_gpio_irqenable(bank, gpio, 1);
1141} 1140}
1142 1141
1143static struct irq_chip gpio_irq_chip = { 1142static struct irq_chip gpio_irq_chip = {