From b2b36316626f0d6b92c3675a2aa2726efc71d146 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Thu, 5 Nov 2009 08:10:10 +0100 Subject: [ARM] pxa: fix interrupts number calculation when CONFIG_PXA_HAVE_ISA_IRQS=y Commit d2c37068429b29d6549cf3486fc84b836689e122 ([ARM] pxa: initialize default interrupt priority and use ICHP for IRQ handling) broke ISA interrupt support on pxa27x/3xx. In such a case, PXA_IRQ(0) != 0, and the IRQ number computed from ICHP must be offset by PXA_IRQ(0). Tested on an Arcom Zeus (pxa270), with both CONFIG_PXA_HAVE_ISA_IRQS enabled and disabled. Signed-off-by: Marc Zyngier Tested-by: Haojian Zhuang Signed-off-by: Eric Miao --- arch/arm/mach-pxa/include/mach/entry-macro.S | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/arm/mach-pxa/include/mach/entry-macro.S b/arch/arm/mach-pxa/include/mach/entry-macro.S index 241880608ac..a73bc86a3c2 100644 --- a/arch/arm/mach-pxa/include/mach/entry-macro.S +++ b/arch/arm/mach-pxa/include/mach/entry-macro.S @@ -46,5 +46,6 @@ beq 1001f bic \irqstat, \irqstat, #0x80000000 mov \irqnr, \irqstat, lsr #16 + add \irqnr, \irqnr, #(PXA_IRQ(0)) 1001: .endm -- cgit v1.2.3 From 2b5e080ae946b4a346b842a73d80f319b7a6453c Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Wed, 21 Oct 2009 13:25:50 +0200 Subject: [ARM] pxa: fix missing underscores in mfp-pxa910.h Underscores were missing. Signed-off-by: Roel Kluin Signed-off-by: Eric Miao --- arch/arm/mach-mmp/include/mach/mfp-pxa910.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-mmp/include/mach/mfp-pxa910.h b/arch/arm/mach-mmp/include/mach/mfp-pxa910.h index bf1189ff9a3..7e8a80f25dd 100644 --- a/arch/arm/mach-mmp/include/mach/mfp-pxa910.h +++ b/arch/arm/mach-mmp/include/mach/mfp-pxa910.h @@ -160,7 +160,7 @@ #define MMC1_WP_MMC1_WP MFP_CFG_DRV(MMC1_WP, AF0, MEDIUM) /* PWM */ -#define GPIO27 PWM3 AF2 MFP_CFG(GPIO27, AF2) +#define GPIO27_PWM3_AF2 MFP_CFG(GPIO27, AF2) #define GPIO51_PWM2_OUT MFP_CFG(GPIO51, AF2) #define GPIO117_PWM1_OUT MFP_CFG(GPIO117, AF2) #define GPIO118_PWM2_OUT MFP_CFG(GPIO118, AF2) -- cgit v1.2.3 From 15f593cfcb1178f832aaf9ec0200acd8c3c3348c Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 8 Nov 2009 03:05:11 +0100 Subject: [ARM] pxa/colibri: fix AC97 ifdefs and add missing include The AC97 part wasn't initialized on Colibri/PXA320 because the macros were wrong. Also, the code didn't compile because of a header file not being included. Signed-off-by: Marek Vasut Signed-off-by: Eric Miao --- arch/arm/mach-pxa/colibri-pxa320.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c index 494572825c7..ec0e14b9668 100644 --- a/arch/arm/mach-pxa/colibri-pxa320.c +++ b/arch/arm/mach-pxa/colibri-pxa320.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "generic.h" #include "devices.h" @@ -145,7 +146,8 @@ static void __init colibri_pxa320_init_lcd(void) static inline void colibri_pxa320_init_lcd(void) {} #endif -#if defined(SND_AC97_CODEC) || defined(SND_AC97_CODEC_MODULE) +#if defined(CONFIG_SND_AC97_CODEC) || \ + defined(CONFIG_SND_AC97_CODEC_MODULE) static mfp_cfg_t colibri_pxa320_ac97_pin_config[] __initdata = { GPIO34_AC97_SYSCLK, GPIO35_AC97_SDATA_IN_0, -- cgit v1.2.3 From 9da4ea69f28cf2bd20be86eda34afbc03c2180c7 Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Fri, 13 Nov 2009 16:44:14 +0800 Subject: [ARM] pxa: fix incorrect mfp_to_gpio() conversion Since MFP_PIN_GPIO* now includes 128-255, mfp_to_gpio() is no longer valid for those additional pins, fix it. Signed-off-by: Eric Miao --- arch/arm/plat-pxa/include/plat/mfp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/plat-pxa/include/plat/mfp.h b/arch/arm/plat-pxa/include/plat/mfp.h index 22086e696e8..857a6839071 100644 --- a/arch/arm/plat-pxa/include/plat/mfp.h +++ b/arch/arm/plat-pxa/include/plat/mfp.h @@ -16,7 +16,7 @@ #ifndef __ASM_PLAT_MFP_H #define __ASM_PLAT_MFP_H -#define mfp_to_gpio(m) ((m) % 128) +#define mfp_to_gpio(m) ((m) % 256) /* list of all the configurable MFP pins */ enum { -- cgit v1.2.3 From 2bf30108435339c4cf149f9d279d0dc961345393 Mon Sep 17 00:00:00 2001 From: Lennert Buytenhek Date: Thu, 12 Nov 2009 20:31:14 +0100 Subject: [ARM] Kirkwood: disable propagation of mbus error to the CPU local bus Disable propagation of mbus errors to the CPU local bus, as this causes mbus errors (which can occur for example for PCI aborts) to throw CPU aborts, which we're not set up to deal with. Reported-by: Dieter Kiermaier Signed-off-by: Lennert Buytenhek Signed-off-by: Nicolas Pitre --- arch/arm/mach-kirkwood/common.c | 8 ++++++++ arch/arm/mach-kirkwood/include/mach/bridge-regs.h | 3 +++ 2 files changed, 11 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 7177c4aa634..242dd077534 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c @@ -915,6 +915,14 @@ void __init kirkwood_init(void) kirkwood_uart0_data[0].uartclk = kirkwood_tclk; kirkwood_uart1_data[0].uartclk = kirkwood_tclk; + /* + * Disable propagation of mbus errors to the CPU local bus, + * as this causes mbus errors (which can occur for example + * for PCI aborts) to throw CPU aborts, which we're not set + * up to deal with. + */ + writel(readl(CPU_CONFIG) & ~CPU_CONFIG_ERROR_PROP, CPU_CONFIG); + kirkwood_setup_cpu_mbus(); #ifdef CONFIG_CACHE_FEROCEON_L2 diff --git a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h index 9e80d9232c8..418f5017c50 100644 --- a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h +++ b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h @@ -13,6 +13,9 @@ #include +#define CPU_CONFIG (BRIDGE_VIRT_BASE | 0x0100) +#define CPU_CONFIG_ERROR_PROP 0x00000004 + #define CPU_CONTROL (BRIDGE_VIRT_BASE | 0x0104) #define CPU_RESET 0x00000002 -- cgit v1.2.3 From 378ce74bee4cb0183489bc0f850790a2264ca975 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Sat, 14 Nov 2009 01:03:24 +0100 Subject: ARM: 5787/1: U300 COH 901 331 fixes This will fix some small issues with the COH 901 331 RTC driver: - Interrupt is disabled after alarm so that we don't fire multiple interrupts. - We return 0 from the coh901331_alarm_irq_enable() ridding a compile warning. - We alter the name in the U300 device registry to match that of the driver so they sucessfully resolve. Signed-off-by: Linus Walleij Signed-off-by: Russell King --- arch/arm/mach-u300/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index be60d6deee8..653e25be3dd 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c @@ -408,7 +408,7 @@ static struct platform_device keypad_device = { }; static struct platform_device rtc_device = { - .name = "rtc0", + .name = "rtc-coh901331", .id = -1, .num_resources = ARRAY_SIZE(rtc_resources), .resource = rtc_resources, -- cgit v1.2.3 From 10d5d99e880692a31ddc59b9f5d063e928fc0c89 Mon Sep 17 00:00:00 2001 From: Paul Parsons Date: Sat, 14 Nov 2009 16:54:12 +0000 Subject: [ARM] pxa/hx4700: fix hx4700 touchscreen pressure values hx4700 touchscreen events were being dropped in ads7846_rx() because their pressure values consistently exceeded the platform maximum of 512; a sample of 256 pressure values were in the range 531 to 815. Doubling the platform maximum to 1024 allows hx4700 touchscreen events to pass the test. Signed-off-by: Paul Parsons Signed-off-by: Eric Miao --- arch/arm/mach-pxa/hx4700.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index abff9e13274..83bd3c6e388 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c @@ -604,7 +604,7 @@ static struct platform_device gpio_vbus = { static const struct ads7846_platform_data tsc2046_info = { .model = 7846, .vref_delay_usecs = 100, - .pressure_max = 512, + .pressure_max = 1024, .debounce_max = 10, .debounce_tol = 3, .debounce_rep = 1, -- cgit v1.2.3 From 7df56c2586049a06b007474ca059779c81ddb1ff Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Fri, 13 Nov 2009 11:37:34 +0100 Subject: [ARM] pxa: ensure mfp is in correct range in mfp_{read,write} Ensure we do not read/write outside array boundaries with a negative index. Signed-off-by: Roel Kluin Signed-off-by: Eric Miao --- arch/arm/plat-pxa/mfp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/arm/plat-pxa/mfp.c b/arch/arm/plat-pxa/mfp.c index 9405d0379c8..be58f9fe65b 100644 --- a/arch/arm/plat-pxa/mfp.c +++ b/arch/arm/plat-pxa/mfp.c @@ -207,7 +207,7 @@ unsigned long mfp_read(int mfp) { unsigned long val, flags; - BUG_ON(mfp >= MFP_PIN_MAX); + BUG_ON(mfp < 0 || mfp >= MFP_PIN_MAX); spin_lock_irqsave(&mfp_spin_lock, flags); val = mfpr_readl(mfp_table[mfp].mfpr_off); @@ -220,7 +220,7 @@ void mfp_write(int mfp, unsigned long val) { unsigned long flags; - BUG_ON(mfp >= MFP_PIN_MAX); + BUG_ON(mfp < 0 || mfp >= MFP_PIN_MAX); spin_lock_irqsave(&mfp_spin_lock, flags); mfpr_writel(mfp_table[mfp].mfpr_off, val); -- cgit v1.2.3