From 06cad098d28e02d2ee3ed587bb261377e4ae2f17 Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Thu, 18 Oct 2007 23:04:43 -0700 Subject: ARM: OMAP: Fix clockevent support for hrtimers One-shot mode was broken in MPU-timer support for OMAP1 due to a typo. Also, ensure timer is stopped before changing the auto-reload flag. The TRM says changing the AR flag when timer is running is undefined. Also set GENERIC_CLOCKEVENTS for all omaps. Signed-off-by: Tim Bird Signed-off-by: Kevin Hilman Signed-off-by: Tony Lindgren --- arch/arm/Kconfig | 1 + arch/arm/mach-omap1/time.c | 10 +++++++++- arch/arm/plat-omap/Kconfig | 1 - 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 955fc53c1c0..4039a133006 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -469,6 +469,7 @@ config ARCH_OMAP bool "TI OMAP" select GENERIC_GPIO select GENERIC_TIME + select GENERIC_CLOCKEVENTS help Support for TI's OMAP platform (OMAP1 and OMAP2). diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index 237651ebae5..572a2dbc72a 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, timer->cntl = timerflags; } +static inline void omap_mpu_timer_stop(int nr) +{ + volatile omap_mpu_timer_regs_t* timer = omap_mpu_timer_base(nr); + + timer->cntl &= ~MPU_TIMER_ST; +} + /* * --------------------------------------------------------------------------- * MPU timer 1 ... count down to zero, interrupt, reload * --------------------------------------------------------------------------- */ static int omap_mpu_set_next_event(unsigned long cycles, - struct clock_event_device *evt) + struct clock_event_device *evt) { omap_mpu_timer_start(0, cycles, 0); return 0; @@ -152,6 +159,7 @@ static void omap_mpu_set_mode(enum clock_event_mode mode, omap_mpu_set_autoreset(0); break; case CLOCK_EVT_MODE_ONESHOT: + omap_mpu_timer_stop(0); omap_mpu_remove_autoreset(0); break; case CLOCK_EVT_MODE_UNUSED: diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index c1f7e5a819a..b917206ee90 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig @@ -11,7 +11,6 @@ choice config ARCH_OMAP1 bool "TI OMAP1" - select GENERIC_CLOCKEVENTS config ARCH_OMAP2 bool "TI OMAP2" -- cgit v1.2.3 From 4de8c75b00181db8169438e9fa4fb7bdf0db72d5 Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Wed, 16 Jan 2008 21:56:14 -0800 Subject: ARM: OMAP: Fix GPIO IRQ unmask GPIO IRQ unmask doesn't actually do anything useful. The problem is hidden by a separate explicit mass unmask at the end of the chained bank handler. Signed-off-by: Kevin Hilman Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/gpio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 66a1455595f..8c78e4e57b5 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) static void gpio_unmask_irq(unsigned int irq) { unsigned int gpio = irq - IH_GPIO_BASE; - unsigned int gpio_idx = get_gpio_index(gpio); struct gpio_bank *bank = get_irq_chip_data(irq); - _set_gpio_irqenable(bank, gpio_idx, 1); + _set_gpio_irqenable(bank, gpio, 1); } static struct irq_chip gpio_irq_chip = { -- cgit v1.2.3 From 271c487e9110760c208758ba72971a531f675362 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Thu, 13 Mar 2008 15:03:36 +0200 Subject: ARM: OMAP: Fix missing makefile options Although audio and dsp drivers are not integrated yet, allow compiling in mailbox and mcbsp to see any build warnings. Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile index ce17df31b84..8f56c255d1e 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile @@ -14,9 +14,14 @@ obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o # OCPI interconnect support for 1710, 1610 and 5912 obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o +obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o obj-$(CONFIG_CPU_FREQ) += cpu-omap.o obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o obj-$(CONFIG_I2C_OMAP) += i2c.o + +# OMAP mailbox framework +obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o + -- cgit v1.2.3 From f4b6a7ef6c64d84e252d32df631813bd09ea3756 Mon Sep 17 00:00:00 2001 From: Anand Gadiyar Date: Tue, 11 Mar 2008 01:10:35 +0530 Subject: ARM: OMAP: Fix chain_a_transfer return value This patch changes the return value of omap_dma_chain_a_transfer to 0 on success instead of the flag 'start_dma', which wasn't really useful for anything. Signed-off-by: Anand Gadiyar Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 91004a3c479..06293bfcc83 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -1248,7 +1248,7 @@ EXPORT_SYMBOL(omap_dma_chain_status); * @param frame_count * @param callbk_data - channel callback parameter data. * - * @return - Success : start_dma status + * @return - Success : 0 * Failure: -EINVAL/-EBUSY */ 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, dma_chan[lch].flags |= OMAP_DMA_ACTIVE; } } - return start_dma; + return 0; } EXPORT_SYMBOL(omap_dma_chain_a_transfer); -- cgit v1.2.3 From 026a6fef55da7239ca0970000eb62b9eab5ba281 Mon Sep 17 00:00:00 2001 From: "Gadiyar, Anand" Date: Sat, 8 Mar 2008 05:49:13 -0800 Subject: ARM: OMAP: Fix DMA CLINK mask, clear spurious interrupt Fix CLINK mask, clear spurious interrupt. Signed-off-by: Gadiyar, Anand Signed-off-by: Kevin Hilman Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/dma.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 06293bfcc83..793740686be 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) } w = OMAP_DMA_CLNK_CTRL_REG(lch_head); - w &= ~(0x0f); + w &= ~(0x1f); w |= lch_queue; OMAP_DMA_CLNK_CTRL_REG(lch_head) = w; w = OMAP_DMA_CLNK_CTRL_REG(lch_queue); - w &= ~(0x0f); + w &= ~(0x1f); w |= (dma_chan[lch_queue].next_linked_ch); OMAP_DMA_CLNK_CTRL_REG(lch_queue) = w; } @@ -1663,6 +1663,7 @@ static int omap2_dma_handle_ch(int ch) if (!status) { if (printk_ratelimit()) printk(KERN_WARNING "Spurious DMA IRQ for lch %d\n", ch); + omap_writel(1 << ch, OMAP_DMA4_IRQSTATUS_L0); return 0; } if (unlikely(dma_chan[ch].dev_id == -1)) { -- cgit v1.2.3 From c6b349ed8a288f1f69fdd560d509d81351cafd89 Mon Sep 17 00:00:00 2001 From: Will Newton Date: Tue, 11 Mar 2008 09:47:43 +0000 Subject: ARM: OMAP1: Fix typo in OMAP1 MPU clock source initialization Fix typo in OMAP1 MPU clock source initialization. Signed-off-by: Will Newton Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index 572a2dbc72a..a4f8b205543 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c @@ -171,7 +171,7 @@ static void omap_mpu_set_mode(enum clock_event_mode mode, static struct clock_event_device clockevent_mpu_timer1 = { .name = "mpu_timer1", - .features = CLOCK_EVT_FEAT_PERIODIC, CLOCK_EVT_FEAT_ONESHOT, + .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, .shift = 32, .set_next_event = omap_mpu_set_next_event, .set_mode = omap_mpu_set_mode, -- cgit v1.2.3 From c5215f32ac6cc3d2ec0ca844a171cdcf4c0bab62 Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Wed, 12 Mar 2008 21:29:09 +0100 Subject: [ARM] 4861/1: AT91: Update maintainer email address (again) Change email address of AT91 maintainer. This reverts the incorrect change in commit 6650e0a517bbfa1c47aa3da6b3562fcb1a066c63 Signed-off-by: Andrew Victor Signed-off-by: Russell King --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 6d628fb6ee0..d8ec68df64e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -452,7 +452,7 @@ S: Maintained ARM/ATMEL AT91RM9200 ARM ARCHITECTURE P: Andrew Victor -M: andrew@sanpeople.com +M: linux@maxim.org.za L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) W: http://maxim.org.za/at91_26.html S: Maintained -- cgit v1.2.3 From 7d7971db29c078a7946efbe479de5e567a20ba9a Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Wed, 12 Mar 2008 22:33:57 +0100 Subject: [ARM] 4863/1: AT91: CAP9 USART definitions for early debug Define AT91_USART0, 1, 2 so the selection of the UART for early kernel messages works. (See commit fa3218d8594869b38b1a170ea36d176ac455b897). Replace AT91_SHDC with AT91_SHDWC to be consistent with other AT91 platforms. Signed-off-by: Andrew Victor Signed-off-by: Russell King --- include/asm-arm/arch-at91/at91cap9.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/asm-arm/arch-at91/at91cap9.h b/include/asm-arm/arch-at91/at91cap9.h index 73e1fcf4a0a..bac83adb505 100644 --- a/include/asm-arm/arch-at91/at91cap9.h +++ b/include/asm-arm/arch-at91/at91cap9.h @@ -97,12 +97,17 @@ #define AT91_PIOD (0xfffff800 - AT91_BASE_SYS) #define AT91_PMC (0xfffffc00 - AT91_BASE_SYS) #define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS) -#define AT91_SHDC (0xfffffd10 - AT91_BASE_SYS) +#define AT91_SHDWC (0xfffffd10 - AT91_BASE_SYS) #define AT91_RTT (0xfffffd20 - AT91_BASE_SYS) #define AT91_PIT (0xfffffd30 - AT91_BASE_SYS) #define AT91_WDT (0xfffffd40 - AT91_BASE_SYS) #define AT91_GPBR (0xfffffd50 - AT91_BASE_SYS) +#define AT91_USART0 AT91CAP9_BASE_US0 +#define AT91_USART1 AT91CAP9_BASE_US1 +#define AT91_USART2 AT91CAP9_BASE_US2 + + /* * Internal Memory. */ -- cgit v1.2.3 From 391c569daa6e4e999592966e29c146dfc4de9a9c Mon Sep 17 00:00:00 2001 From: Arnaud Patard Date: Thu, 13 Mar 2008 09:53:21 +0100 Subject: [ARM] 4864/1: Enable write buffer coalescing on IOP Some bootloaders are disabling write buffer coalescing. Enable it back under linux. Signed-off-by: Arnaud Patard Signed-off-by: Russell King --- arch/arm/mm/proc-xscale.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index c156ddab9a2..016690b9d56 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S @@ -114,6 +114,10 @@ clean_addr: .word CLEAN_ADDR * Nothing too exciting at the moment */ ENTRY(cpu_xscale_proc_init) + @ enable write buffer coalescing. Some bootloader disable it + mrc p15, 0, r1, c1, c0, 1 + bic r1, r1, #1 + mcr p15, 0, r1, c1, c0, 1 mov pc, lr /* -- cgit v1.2.3 From 4e7ffb6ab4c42740eaf8b8d905e95f106d9eb022 Mon Sep 17 00:00:00 2001 From: Gordon Farquharson Date: Fri, 14 Mar 2008 04:07:46 +0100 Subject: [ARM] 4865/1: Register the F75375 device in the GLAN Tank platform code This patch adds the code required to register the F75375 device on the GLAN Tank. Signed-off-by: Gordon Farquharson Acked-by: Lennert Buytenhek Signed-off-by: Russell King --- arch/arm/mach-iop32x/glantank.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c index 74c65ce221d..d2a7b04f1cb 100644 --- a/arch/arm/mach-iop32x/glantank.c +++ b/arch/arm/mach-iop32x/glantank.c @@ -14,8 +14,10 @@ #include #include +#include #include #include +#include #include #include #include @@ -167,11 +169,21 @@ static struct platform_device glantank_serial_device = { .resource = &glantank_uart_resource, }; +static struct f75375s_platform_data glantank_f75375s = { + .pwm = { 255, 255 }, + .pwm_enable = { 0, 0 }, +}; + static struct i2c_board_info __initdata glantank_i2c_devices[] = { { I2C_BOARD_INFO("rtc-rs5c372", 0x32), .type = "rs5c372a", }, + { + I2C_BOARD_INFO("f75375", 0x2e), + .type = "f75375", + .platform_data = &glantank_f75375s, + }, }; static void glantank_power_off(void) -- cgit v1.2.3 From eec2beac278fe5dbf342e0e3f9e56fb64a429d46 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Mon, 17 Mar 2008 13:01:07 +0100 Subject: [ARM] 4869/1: ARM: OMAP: Fix compile for mcbsp Until DSP MMU code is merged, dsp_request_mem() does not exist. Signed-off-by: Tony Lindgren Signed-off-by: Russell King --- include/asm-arm/arch-omap/dsp_common.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/asm-arm/arch-omap/dsp_common.h b/include/asm-arm/arch-omap/dsp_common.h index c61f868f24e..da97736f3ef 100644 --- a/include/asm-arm/arch-omap/dsp_common.h +++ b/include/asm-arm/arch-omap/dsp_common.h @@ -24,11 +24,17 @@ #ifndef ASM_ARCH_DSP_COMMON_H #define ASM_ARCH_DSP_COMMON_H -#ifdef CONFIG_ARCH_OMAP1 +#if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_OMAP_MMU_FWK) extern void omap_dsp_request_mpui(void); extern void omap_dsp_release_mpui(void); extern int omap_dsp_request_mem(void); extern int omap_dsp_release_mem(void); +#else +static inline int omap_dsp_request_mem(void) +{ + return 0; +} +#define omap_dsp_release_mem() do {} while (0) #endif #endif /* ASM_ARCH_DSP_COMMON_H */ -- cgit v1.2.3 From ee4cd588a3d9f81b5b13b76a498c3118a61f1dd2 Mon Sep 17 00:00:00 2001 From: janboe Date: Wed, 19 Mar 2008 03:34:23 +0100 Subject: [ARM] 4870/1: fix signal return code when enable CONFIG_OABI_COMPAT fix signal return code when enable CONFIG_OABI_COMPAT Signed-off-by: Janboe Ye Signed-off-by: Russell King --- arch/arm/kernel/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 54cdf1aeefc..ef2f86a5e78 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -26,8 +26,8 @@ /* * For ARM syscalls, we encode the syscall number into the instruction. */ -#define SWI_SYS_SIGRETURN (0xef000000|(__NR_sigreturn)) -#define SWI_SYS_RT_SIGRETURN (0xef000000|(__NR_rt_sigreturn)) +#define SWI_SYS_SIGRETURN (0xef000000|(__NR_sigreturn)|(__NR_OABI_SYSCALL_BASE)) +#define SWI_SYS_RT_SIGRETURN (0xef000000|(__NR_rt_sigreturn)|(__NR_OABI_SYSCALL_BASE)) /* * With EABI, the syscall number has to be loaded into r7. -- cgit v1.2.3 From a0d1d04ea810481dd0b8790712086a77bc665b8a Mon Sep 17 00:00:00 2001 From: Davide Rizzo Date: Wed, 19 Mar 2008 13:51:48 +0100 Subject: [ARM] 4872/1: Replaces buggy macro in S3C2410 irq include This is a bug correction for a macro that generated wrong results. Nobody used it in official kernel tree, my driver did. Signed-off-by: Davide Rizzo Acked-by: Ben Dooks Signed-off-by: Russell King --- include/asm-arm/arch-s3c2410/irqs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h index d858b3eb554..f5435d8c376 100644 --- a/include/asm-arm/arch-s3c2410/irqs.h +++ b/include/asm-arm/arch-s3c2410/irqs.h @@ -85,7 +85,7 @@ #define IRQ_EINT23 S3C2410_IRQ(51) -#define IRQ_EINT(x) S3C2410_IRQ((x >= 4) ? (IRQ_EINT4 + (x) - 4) : (S3C2410_IRQ(0) + (x))) +#define IRQ_EINT(x) (((x) >= 4) ? (IRQ_EINT4 + (x) - 4) : (IRQ_EINT0 + (x))) #define IRQ_LCD_FIFO S3C2410_IRQ(52) #define IRQ_LCD_FRAME S3C2410_IRQ(53) -- cgit v1.2.3