diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-03-20 11:59:51 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-03-20 11:59:51 -0400 |
commit | 2a1bf8b7da2736d85d683fb921ac9a6b71719f37 (patch) | |
tree | 24149cba37d87b3cf0fb36959be05b957d7d56cc /arch | |
parent | a0d1d04ea810481dd0b8790712086a77bc665b8a (diff) | |
parent | c6b349ed8a288f1f69fdd560d509d81351cafd89 (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/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap1/time.c | 12 | ||||
-rw-r--r-- | arch/arm/plat-omap/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/Makefile | 5 | ||||
-rw-r--r-- | arch/arm/plat-omap/dma.c | 9 | ||||
-rw-r--r-- | arch/arm/plat-omap/gpio.c | 3 |
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 | ||
135 | static 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 | */ |
140 | static int omap_mpu_set_next_event(unsigned long cycles, | 147 | static 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 | ||
164 | static struct clock_event_device clockevent_mpu_timer1 = { | 172 | static 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 | ||
12 | config ARCH_OMAP1 | 12 | config ARCH_OMAP1 |
13 | bool "TI OMAP1" | 13 | bool "TI OMAP1" |
14 | select GENERIC_CLOCKEVENTS | ||
15 | 14 | ||
16 | config ARCH_OMAP2 | 15 | config 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 |
15 | obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o | 15 | obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o |
16 | 16 | ||
17 | obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o | ||
17 | 18 | ||
18 | obj-$(CONFIG_CPU_FREQ) += cpu-omap.o | 19 | obj-$(CONFIG_CPU_FREQ) += cpu-omap.o |
19 | obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o | 20 | obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o |
20 | obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o | 21 | obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o |
21 | obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o | 22 | obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o |
22 | obj-$(CONFIG_I2C_OMAP) += i2c.o | 23 | obj-$(CONFIG_I2C_OMAP) += i2c.o |
24 | |||
25 | # OMAP mailbox framework | ||
26 | obj-$(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 | */ |
1254 | int omap_dma_chain_a_transfer(int chain_id, int src_start, int dest_start, | 1254 | int 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 | } |
1372 | EXPORT_SYMBOL(omap_dma_chain_a_transfer); | 1372 | EXPORT_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) | |||
1134 | static void gpio_unmask_irq(unsigned int irq) | 1134 | static 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 | ||
1143 | static struct irq_chip gpio_irq_chip = { | 1142 | static struct irq_chip gpio_irq_chip = { |