From cae399880f82fdc6b0afccf42224fc2a759aa6b3 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Mon, 10 Jan 2011 16:35:34 -0600 Subject: ARM: sa1111: fix typo in sa1111_retrigger_lowirq() Signed-off-by: Pavel Machek Signed-off-by: Eric Miao --- arch/arm/common/sa1111.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index d6c784e78c83..eb9796b0dab2 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -279,7 +279,7 @@ static int sa1111_retrigger_lowirq(struct irq_data *d) for (i = 0; i < 8; i++) { sa1111_writel(ip0 ^ mask, mapbase + SA1111_INTPOL0); sa1111_writel(ip0, mapbase + SA1111_INTPOL0); - if (sa1111_readl(mapbase + SA1111_INTSTATCLR1) & mask) + if (sa1111_readl(mapbase + SA1111_INTSTATCLR0) & mask) break; } -- cgit v1.2.1 From bc3e55c69c404158ef3c5b1a6515f5e9f1294403 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 10 Jan 2011 00:29:02 +0100 Subject: ARM: pxa: fix warning in zeus.c Signed-off-by: Marek Vasut Signed-off-by: Eric Miao --- arch/arm/mach-pxa/zeus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index a894770d203b..f4b053b35815 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -830,8 +830,8 @@ static void __init zeus_init(void) pr_info("Zeus CPLD V%dI%d\n", (system_rev & 0xf0) >> 4, (system_rev & 0x0f)); /* Fix timings for dm9000s (CS1/CS2)*/ - msc0 = __raw_readl(MSC0) & 0x0000ffff | (dm9000_msc << 16); - msc1 = __raw_readl(MSC1) & 0xffff0000 | dm9000_msc; + msc0 = (__raw_readl(MSC0) & 0x0000ffff) | (dm9000_msc << 16); + msc1 = (__raw_readl(MSC1) & 0xffff0000) | dm9000_msc; __raw_writel(msc0, MSC0); __raw_writel(msc1, MSC1); -- cgit v1.2.1 From b6aec3a5d6d8e898baef3ed0d1b2911ee5e718a3 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 10 Jan 2011 00:29:03 +0100 Subject: ARM: pxa: remove unused variable in clock-pxa3xx.c Signed-off-by: Marek Vasut Signed-off-by: Eric Miao --- arch/arm/mach-pxa/clock-pxa3xx.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-pxa/clock-pxa3xx.c b/arch/arm/mach-pxa/clock-pxa3xx.c index 1b08a34ab234..3f864cd0bd28 100644 --- a/arch/arm/mach-pxa/clock-pxa3xx.c +++ b/arch/arm/mach-pxa/clock-pxa3xx.c @@ -115,7 +115,6 @@ static unsigned long clk_pxa3xx_smemc_getrate(struct clk *clk) { unsigned long acsr = ACSR; unsigned long memclkcfg = __raw_readl(MEMCLKCFG); - unsigned int smcfs = (acsr >> 23) & 0x7; return BASE_CLK * smcfs_mult[(acsr >> 23) & 0x7] / df_clkdiv[(memclkcfg >> 16) & 0x3]; -- cgit v1.2.1 From 57879b8c40d4c254f1feba3adbeb69614fe5e4c9 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 10 Jan 2011 00:29:04 +0100 Subject: ARM: pxa: use cpu_has_ipr() consistently in irq.c Signed-off-by: Marek Vasut Signed-off-by: Eric Miao --- arch/arm/mach-pxa/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index 3f7f5bf05f3a..8f947002c0bf 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c @@ -226,7 +226,7 @@ static int pxa_irq_resume(struct sys_device *dev) __raw_writel(0, base + ICLR); } - if (!cpu_is_pxa25x()) + if (cpu_has_ipr()) for (i = 0; i < pxa_internal_irq_nr; i++) __raw_writel(saved_ipr[i], IRQ_BASE + IPR(i)); -- cgit v1.2.1 From 1b624fb64c2de44c00576cc9695680983f05c1ce Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 10 Jan 2011 23:53:12 +0100 Subject: ARM: pxa: fix suspend/resume array index miscalculation Signed-off-by: Marek Vasut Signed-off-by: Eric Miao --- arch/arm/mach-pxa/irq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index 8f947002c0bf..b71677bce548 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c @@ -156,7 +156,7 @@ static inline void __iomem *irq_base(int i) 0x40d00130, }; - return (void __iomem *)io_p2v(phys_base[i >> 5]); + return (void __iomem *)io_p2v(phys_base[i]); } void __init pxa_init_irq(int irq_nr, set_wake_t fn) @@ -168,7 +168,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn) pxa_internal_irq_nr = irq_nr; for (n = 0; n < irq_nr; n += 32) { - void __iomem *base = irq_base(n); + void __iomem *base = irq_base(n >> 5); __raw_writel(0, base + ICMR); /* disable all IRQs */ __raw_writel(0, base + ICLR); /* all IRQs are IRQ, not FIQ */ @@ -200,7 +200,7 @@ static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state) { int i; - for (i = 0; i < pxa_internal_irq_nr; i += 32) { + for (i = 0; i < pxa_internal_irq_nr / 32; i++) { void __iomem *base = irq_base(i); saved_icmr[i] = __raw_readl(base + ICMR); @@ -219,7 +219,7 @@ static int pxa_irq_resume(struct sys_device *dev) { int i; - for (i = 0; i < pxa_internal_irq_nr; i += 32) { + for (i = 0; i < pxa_internal_irq_nr / 32; i++) { void __iomem *base = irq_base(i); __raw_writel(saved_icmr[i], base + ICMR); -- cgit v1.2.1 From a1015a159530391fc498482656bab6c99dcd3c70 Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Wed, 12 Jan 2011 16:42:24 -0600 Subject: ARM: pxa: fix recursive calls in pxa_low_gpio_chip Signed-off-by: Eric Miao Tested-by: Marek Vasut --- arch/arm/mach-pxa/irq.c | 41 ++++++++++++++--------------------------- 1 file changed, 14 insertions(+), 27 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index b71677bce548..2693e3c3776f 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c @@ -53,6 +53,17 @@ static inline int cpu_has_ipr(void) return !cpu_is_pxa25x(); } +static inline void __iomem *irq_base(int i) +{ + static unsigned long phys_base[] = { + 0x40d00000, + 0x40d0009c, + 0x40d00130, + }; + + return (void __iomem *)io_p2v(phys_base[i]); +} + static void pxa_mask_irq(struct irq_data *d) { void __iomem *base = irq_data_get_irq_chip_data(d); @@ -108,25 +119,11 @@ static void pxa_ack_low_gpio(struct irq_data *d) GEDR0 = (1 << (d->irq - IRQ_GPIO0)); } -static void pxa_mask_low_gpio(struct irq_data *d) -{ - struct irq_desc *desc = irq_to_desc(d->irq); - - desc->irq_data.chip->irq_mask(d); -} - -static void pxa_unmask_low_gpio(struct irq_data *d) -{ - struct irq_desc *desc = irq_to_desc(d->irq); - - desc->irq_data.chip->irq_unmask(d); -} - static struct irq_chip pxa_low_gpio_chip = { .name = "GPIO-l", .irq_ack = pxa_ack_low_gpio, - .irq_mask = pxa_mask_low_gpio, - .irq_unmask = pxa_unmask_low_gpio, + .irq_mask = pxa_mask_irq, + .irq_unmask = pxa_unmask_irq, .irq_set_type = pxa_set_low_gpio_type, }; @@ -141,6 +138,7 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn) for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) { set_irq_chip(irq, &pxa_low_gpio_chip); + set_irq_chip_data(irq, irq_base(0)); set_irq_handler(irq, handle_edge_irq); set_irq_flags(irq, IRQF_VALID); } @@ -148,17 +146,6 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn) pxa_low_gpio_chip.irq_set_wake = fn; } -static inline void __iomem *irq_base(int i) -{ - static unsigned long phys_base[] = { - 0x40d00000, - 0x40d0009c, - 0x40d00130, - }; - - return (void __iomem *)io_p2v(phys_base[i]); -} - void __init pxa_init_irq(int irq_nr, set_wake_t fn) { int irq, i, n; -- cgit v1.2.1 From ee309d3d6e60e19e93cde22e49b87c434dc826ba Mon Sep 17 00:00:00 2001 From: Philip Rakity Date: Fri, 7 Jan 2011 11:26:52 -0800 Subject: ARM: mmp: MMP2 drive strength FAST using wrong value Drive strength for MMP2 is a 2 bit value but because of the mapping in plat-pxa/mfp.h needs to be shifted up one bit to handle real location in mfp registers. (MMP2 and PXA910 drive strength start at bit 11 while PXA168 starts at bit 10). Values 0, 1, 2, and 3 effectively need to be 0, 2, 4, and 6 to fit into register. 8 does not work. Signed-off-by: Philip Rakity Tested-by: John Watlington Signed-off-by: Eric Miao --- arch/arm/mach-mmp/include/mach/mfp-mmp2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-mmp/include/mach/mfp-mmp2.h b/arch/arm/mach-mmp/include/mach/mfp-mmp2.h index 117e30366087..4ad38629c3f6 100644 --- a/arch/arm/mach-mmp/include/mach/mfp-mmp2.h +++ b/arch/arm/mach-mmp/include/mach/mfp-mmp2.h @@ -6,7 +6,7 @@ #define MFP_DRIVE_VERY_SLOW (0x0 << 13) #define MFP_DRIVE_SLOW (0x2 << 13) #define MFP_DRIVE_MEDIUM (0x4 << 13) -#define MFP_DRIVE_FAST (0x8 << 13) +#define MFP_DRIVE_FAST (0x6 << 13) /* GPIO */ #define GPIO0_GPIO MFP_CFG(GPIO0, AF0) -- cgit v1.2.1 From 33e739973defbe6b88a2375f174571bf7e72d8fd Mon Sep 17 00:00:00 2001 From: Philip Rakity Date: Fri, 7 Jan 2011 11:27:46 -0800 Subject: ARM: mmp: PXA910 drive strength FAST using wrong value Drive strength for PXA910 is a 2 bit value but because of the mapping in plat-pxa/mfp.h needs to be shifted up one bit to handle real location in mfp registers. (MMP2 and PXA910 drive strength start at bit 11 while PXA168 starts at bit 10). Values 0, 1, 2, and 3 effectively need to be 0, 2, 4, and 6 to fit into register. 8 does not work. Signed-off-by: Philip Rakity 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 7e8a80f25ddc..fbd7ee8e4897 100644 --- a/arch/arm/mach-mmp/include/mach/mfp-pxa910.h +++ b/arch/arm/mach-mmp/include/mach/mfp-pxa910.h @@ -6,7 +6,7 @@ #define MFP_DRIVE_VERY_SLOW (0x0 << 13) #define MFP_DRIVE_SLOW (0x2 << 13) #define MFP_DRIVE_MEDIUM (0x4 << 13) -#define MFP_DRIVE_FAST (0x8 << 13) +#define MFP_DRIVE_FAST (0x6 << 13) /* UART2 */ #define GPIO47_UART2_RXD MFP_CFG(GPIO47, AF6) -- cgit v1.2.1 From ea0c4f3ca8a55e7e3138c2c4b3e9f7fe34d3ecab Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Fri, 14 Jan 2011 11:01:00 -0600 Subject: ARM: pxa: fix building issue of missing physmap.h Signed-off-by: Eric Miao --- arch/arm/mach-pxa/spitz.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 0bc938729c4c..b49a2c21124c 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.1