From a297ec8e13d10274155e0850228bb06c7648e541 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 30 Aug 2014 09:32:58 +0000 Subject: ipq806x: Add support for IPQ806x chip family Patches are generated using the "format-patch" command from the following location: *https://www.codeaurora.org/cgit/quic/kernel/galak-msm/log/?h=apq_ipq_base *rev=0771849495b4128cac2faf7d49c85c729fc48b20 Patches numbered 76/77/102/103 have already been integrated in 3.14.12, so they're not in this list. All these patches are either integrated are pending integration into kernel.org, therefore these patches should go away once the kernel gets upgraded to 3.16. Support is currently limited to AP148 board but can be extended to other platforms in the future. These changes do not cover ethernet connectivity. Signed-off-by: Mathieu Olivari git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42334 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../0025-pinctrl-msm-drop-wake_irqs-bitmap.patch | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 target/linux/ipq806x/patches/0025-pinctrl-msm-drop-wake_irqs-bitmap.patch (limited to 'target/linux/ipq806x/patches/0025-pinctrl-msm-drop-wake_irqs-bitmap.patch') diff --git a/target/linux/ipq806x/patches/0025-pinctrl-msm-drop-wake_irqs-bitmap.patch b/target/linux/ipq806x/patches/0025-pinctrl-msm-drop-wake_irqs-bitmap.patch new file mode 100644 index 0000000000..fba5e4f9e3 --- /dev/null +++ b/target/linux/ipq806x/patches/0025-pinctrl-msm-drop-wake_irqs-bitmap.patch @@ -0,0 +1,71 @@ +From ef8eb0991f291df12c12477648235f955cc388b0 Mon Sep 17 00:00:00 2001 +From: Josh Cartwright +Date: Wed, 5 Mar 2014 13:33:08 -0600 +Subject: [PATCH 025/182] pinctrl: msm: drop wake_irqs bitmap + +Currently, the wake_irqs bitmap is used to track whether there are any +gpio's which are configured as wake irqs, and uses this to determine +whether or not to call enable_irq_wake()/disable_irq_wake() on the +summary interrupt. + +However, the genirq core already handles this case, by maintaining a +'wake_count' per irq_desc, and only calling into the controlling +irq_chip when wake_count transitions 0 <-> 1. + +Drop this bitmap, and unconditionally call irq_set_irq_wake() on the +summary interrupt. + +Signed-off-by: Josh Cartwright +Acked-by: Bjorn Andersson +Signed-off-by: Linus Walleij +--- + drivers/pinctrl/pinctrl-msm.c | 14 +------------- + 1 file changed, 1 insertion(+), 13 deletions(-) + +diff --git a/drivers/pinctrl/pinctrl-msm.c b/drivers/pinctrl/pinctrl-msm.c +index ef2bf31..0e43fdd 100644 +--- a/drivers/pinctrl/pinctrl-msm.c ++++ b/drivers/pinctrl/pinctrl-msm.c +@@ -50,7 +50,6 @@ + * @enabled_irqs: Bitmap of currently enabled irqs. + * @dual_edge_irqs: Bitmap of irqs that need sw emulated dual edge + * detection. +- * @wake_irqs: Bitmap of irqs with requested as wakeup source. + * @soc; Reference to soc_data of platform specific data. + * @regs: Base address for the TLMM register map. + */ +@@ -65,7 +64,6 @@ struct msm_pinctrl { + + DECLARE_BITMAP(dual_edge_irqs, MAX_NR_GPIO); + DECLARE_BITMAP(enabled_irqs, MAX_NR_GPIO); +- DECLARE_BITMAP(wake_irqs, MAX_NR_GPIO); + + const struct msm_pinctrl_soc_data *soc; + void __iomem *regs; +@@ -783,22 +781,12 @@ static int msm_gpio_irq_set_wake(struct irq_data *d, unsigned int on) + { + struct msm_pinctrl *pctrl; + unsigned long flags; +- unsigned ngpio; + + pctrl = irq_data_get_irq_chip_data(d); +- ngpio = pctrl->chip.ngpio; + + spin_lock_irqsave(&pctrl->lock, flags); + +- if (on) { +- if (bitmap_empty(pctrl->wake_irqs, ngpio)) +- enable_irq_wake(pctrl->irq); +- set_bit(d->hwirq, pctrl->wake_irqs); +- } else { +- clear_bit(d->hwirq, pctrl->wake_irqs); +- if (bitmap_empty(pctrl->wake_irqs, ngpio)) +- disable_irq_wake(pctrl->irq); +- } ++ irq_set_irq_wake(pctrl->irq, on); + + spin_unlock_irqrestore(&pctrl->lock, flags); + +-- +1.7.10.4 + -- cgit v1.2.3