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 241880608ac6..a73bc86a3c26 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-59-g8ed1b 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 bf1189ff9a34..7e8a80f25ddc 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-59-g8ed1b 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 494572825c7d..ec0e14b96682 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-59-g8ed1b 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 22086e696e8e..857a6839071c 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-59-g8ed1b 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 abff9e132749..83bd3c6e3884 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-59-g8ed1b 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 9405d0379c85..be58f9fe65b0 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-59-g8ed1b