aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-09 17:14:47 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-09 17:14:47 -0500
commit0a9e0acddb2f0975e7c9a379171c82e158e93a9a (patch)
treec6635560b0f9c34b58202c93c2e3a3c4650b6c63 /arch/arm/mach-imx
parentb64bb1d758163814687eb3b84d74e56f04d0c9d1 (diff)
parent65bb688aab9424849e94f74d555542fa76cd3d5a (diff)
Merge tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC non-critical bug fixes from Arnd Bergmann: "These are bug fixes for harmless problems that were not important enough to get fixed in 3.19. This contains updates to the MAINTAINERS file, in particular: - Ben Dooks stepped down as Samsung co-maintainer (thanks Ben for long years of maintaining this). Kukjin Kim, who has been doing the work de-facto by himself recently is now the only maintainer. - Liviu, Sudeep and Lorenzo from ARM now officially maintain the Versatile Express platform, which was orphaned (thanks for - Gregory Fong and Florian Fainelli help out on the Broadcom BCM7XXX platform - Ray Jui and Scott Branden are the future maintainers for the newly merged Broadcom Cygnus platform. Welcome! In terms of actual fixes, we have the usual set of OMAP bug fixes, which Tony Lindgren separates out well from the other OMAP changes, one really ep93xx regression fix against 3.11 that didn't make it for 3.18, a few GIC changes from Marc Zyngier as a preparation for later rework (the current code is wrong in a harmless way), on Tegra regression and one samsung spelling fix" * tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: imx6: fix bogus use of irq_get_irq_data ARM: imx: irq: fix buggy usage of irq_data irq field MAINTAINERS: ARM Versatile Express platform, add missing pattern MAINTAINERS: ARM Versatile Express platform arm: ep93xx: add dma_masks for the M2P and M2M DMA controllers MAINTAINERS: Add ahci_st.c to ARCH/STI architecture MAINTAINERS: add entry for the GISB arbiter driver MAINTAINERS: update brcmstb entries MAINTAINERS: update email address and cleanup for exynos entry ARM: tegra: Re-add removed SoC id macro to tegra_resume() MAINTAINERS: Entry for Cygnus/iproc arm architecture ARM: OMAP: serial: remove last vestige of DTR_gpio support. ARM: OMAP2+: gpmc: Get rid of "ti,elm-id not found" warning ARM: EXYNOS: fix typo in static struct name "exynos5_list_diable_wfi_wfe" ARM: OMAP2: Remove unnecessary KERN_* in omap_phy_internal.c ARM: OMAP4+: Remove unused omap_l3_noc platform init ARM: dts: Add twl keypad map for omap3 EVM ARM: dts: Add twl keypad map for LDP ARM: dts: Fix NAND last partition size on LDP ARM: OMAP3: Fix errors for omap_l3_smx when booted with device tree
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/common.h4
-rw-r--r--arch/arm/mach-imx/gpc.c42
-rw-r--r--arch/arm/mach-imx/pm-imx6.c5
3 files changed, 30 insertions, 21 deletions
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h
index 1dabf435c592..66662a1e36de 100644
--- a/arch/arm/mach-imx/common.h
+++ b/arch/arm/mach-imx/common.h
@@ -108,8 +108,8 @@ void imx_gpc_pre_suspend(bool arm_power_off);
108void imx_gpc_post_resume(void); 108void imx_gpc_post_resume(void);
109void imx_gpc_mask_all(void); 109void imx_gpc_mask_all(void);
110void imx_gpc_restore_all(void); 110void imx_gpc_restore_all(void);
111void imx_gpc_irq_mask(struct irq_data *d); 111void imx_gpc_hwirq_mask(unsigned int hwirq);
112void imx_gpc_irq_unmask(struct irq_data *d); 112void imx_gpc_hwirq_unmask(unsigned int hwirq);
113void imx_anatop_init(void); 113void imx_anatop_init(void);
114void imx_anatop_pre_suspend(void); 114void imx_anatop_pre_suspend(void);
115void imx_anatop_post_resume(void); 115void imx_anatop_post_resume(void);
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c
index 82ea74e68482..5f3602ec74fa 100644
--- a/arch/arm/mach-imx/gpc.c
+++ b/arch/arm/mach-imx/gpc.c
@@ -56,14 +56,14 @@ void imx_gpc_post_resume(void)
56 56
57static int imx_gpc_irq_set_wake(struct irq_data *d, unsigned int on) 57static int imx_gpc_irq_set_wake(struct irq_data *d, unsigned int on)
58{ 58{
59 unsigned int idx = d->irq / 32 - 1; 59 unsigned int idx = d->hwirq / 32 - 1;
60 u32 mask; 60 u32 mask;
61 61
62 /* Sanity check for SPI irq */ 62 /* Sanity check for SPI irq */
63 if (d->irq < 32) 63 if (d->hwirq < 32)
64 return -EINVAL; 64 return -EINVAL;
65 65
66 mask = 1 << d->irq % 32; 66 mask = 1 << d->hwirq % 32;
67 gpc_wake_irqs[idx] = on ? gpc_wake_irqs[idx] | mask : 67 gpc_wake_irqs[idx] = on ? gpc_wake_irqs[idx] | mask :
68 gpc_wake_irqs[idx] & ~mask; 68 gpc_wake_irqs[idx] & ~mask;
69 69
@@ -91,34 +91,44 @@ void imx_gpc_restore_all(void)
91 writel_relaxed(gpc_saved_imrs[i], reg_imr1 + i * 4); 91 writel_relaxed(gpc_saved_imrs[i], reg_imr1 + i * 4);
92} 92}
93 93
94void imx_gpc_irq_unmask(struct irq_data *d) 94void imx_gpc_hwirq_unmask(unsigned int hwirq)
95{ 95{
96 void __iomem *reg; 96 void __iomem *reg;
97 u32 val; 97 u32 val;
98 98
99 /* Sanity check for SPI irq */ 99 reg = gpc_base + GPC_IMR1 + (hwirq / 32 - 1) * 4;
100 if (d->irq < 32)
101 return;
102
103 reg = gpc_base + GPC_IMR1 + (d->irq / 32 - 1) * 4;
104 val = readl_relaxed(reg); 100 val = readl_relaxed(reg);
105 val &= ~(1 << d->irq % 32); 101 val &= ~(1 << hwirq % 32);
106 writel_relaxed(val, reg); 102 writel_relaxed(val, reg);
107} 103}
108 104
109void imx_gpc_irq_mask(struct irq_data *d) 105void imx_gpc_hwirq_mask(unsigned int hwirq)
110{ 106{
111 void __iomem *reg; 107 void __iomem *reg;
112 u32 val; 108 u32 val;
113 109
110 reg = gpc_base + GPC_IMR1 + (hwirq / 32 - 1) * 4;
111 val = readl_relaxed(reg);
112 val |= 1 << (hwirq % 32);
113 writel_relaxed(val, reg);
114}
115
116static void imx_gpc_irq_unmask(struct irq_data *d)
117{
118 /* Sanity check for SPI irq */
119 if (d->hwirq < 32)
120 return;
121
122 imx_gpc_hwirq_unmask(d->hwirq);
123}
124
125static void imx_gpc_irq_mask(struct irq_data *d)
126{
114 /* Sanity check for SPI irq */ 127 /* Sanity check for SPI irq */
115 if (d->irq < 32) 128 if (d->hwirq < 32)
116 return; 129 return;
117 130
118 reg = gpc_base + GPC_IMR1 + (d->irq / 32 - 1) * 4; 131 imx_gpc_hwirq_mask(d->hwirq);
119 val = readl_relaxed(reg);
120 val |= 1 << (d->irq % 32);
121 writel_relaxed(val, reg);
122} 132}
123 133
124void __init imx_gpc_init(void) 134void __init imx_gpc_init(void)
diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c
index 5c3af8f993d0..d815d1ba27a5 100644
--- a/arch/arm/mach-imx/pm-imx6.c
+++ b/arch/arm/mach-imx/pm-imx6.c
@@ -261,7 +261,6 @@ static void imx6q_enable_wb(bool enable)
261 261
262int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) 262int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode)
263{ 263{
264 struct irq_data *iomuxc_irq_data = irq_get_irq_data(32);
265 u32 val = readl_relaxed(ccm_base + CLPCR); 264 u32 val = readl_relaxed(ccm_base + CLPCR);
266 265
267 val &= ~BM_CLPCR_LPM; 266 val &= ~BM_CLPCR_LPM;
@@ -316,9 +315,9 @@ int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode)
316 * 3) Software should mask IRQ #32 right after CCM Low-Power mode 315 * 3) Software should mask IRQ #32 right after CCM Low-Power mode
317 * is set (set bits 0-1 of CCM_CLPCR). 316 * is set (set bits 0-1 of CCM_CLPCR).
318 */ 317 */
319 imx_gpc_irq_unmask(iomuxc_irq_data); 318 imx_gpc_hwirq_unmask(32);
320 writel_relaxed(val, ccm_base + CLPCR); 319 writel_relaxed(val, ccm_base + CLPCR);
321 imx_gpc_irq_mask(iomuxc_irq_data); 320 imx_gpc_hwirq_mask(32);
322 321
323 return 0; 322 return 0;
324} 323}