From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Phidias Chiang <phidias.chiang@canonical.com>
Cc: Anisse Astier <anisse@astier.eu>,
Linus Walleij <linus.walleij@linaro.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Yu C Chen <yu.c.chen@intel.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pinctrl: cherryview: Do not mask all interrupts on probe
Date: Sun, 11 Sep 2016 11:05:06 +0300 [thread overview]
Message-ID: <20160911080506.GO15313@lahna.fi.intel.com> (raw)
In-Reply-To: <20160909085832.GK15313@lahna.fi.intel.com>
On Fri, Sep 09, 2016 at 11:58:32AM +0300, Mika Westerberg wrote:
> On Fri, Sep 09, 2016 at 04:23:58PM +0800, Phidias Chiang wrote:
> > On Fri, Sep 09, 2016 at 09:18:34AM +0300, Mika Westerberg wrote:
> > > On Fri, Sep 09, 2016 at 12:28:43AM +0800, Phidias Chiang wrote:
> > >
> > > Hmm, how can that happen? The patch removes clearing of INTMASK and only
> > > other place where it is cleared temporarily is on resume. Can you add
> > > dev_info() calls like:
> > >
> > > /* Clear all interrupts */
> > > chv_writel(0xffff, pctrl->regs + CHV_INTSTAT);
> > > dev_info(pctrl->dev, "INTMASK0: 0x%08x\n", readl(pctrl->regs + CHV_INTMASK));
> > >
> > > ...
> > >
> > > gpiochip_set_chained_irqchip(chip, &chv_gpio_irqchip, irq,
> > > chv_gpio_irq_handler);
> > > dev_info(pctrl->dev, "INTMASK1: 0x%08x\n", readl(pctrl->regs + CHV_INTMASK));
> > > return 0;
> > >
> > > It should print the same values both time.
> > >
> > > Also which interrupt does not work and can you send me output of
> > > /proc/interrupts?
> >
> > Output in dmesg:
> > [ 2.054475] cherryview-pinctrl INT33FF:00: INTMASK0: 0x00000006
> > [ 2.055247] cherryview-pinctrl INT33FF:00: INTMASK1: 0x00000000
> > [ 2.055375] cherryview-pinctrl INT33FF:01: INTMASK0: 0x00004000
> > [ 2.056931] cherryview-pinctrl INT33FF:01: INTMASK1: 0x00000000
> > [ 2.057036] cherryview-pinctrl INT33FF:02: INTMASK0: 0x00000000
> > [ 2.057367] cherryview-pinctrl INT33FF:02: INTMASK1: 0x00000000
> > [ 2.057489] cherryview-pinctrl INT33FF:03: INTMASK0: 0x00000000
> > [ 2.058337] cherryview-pinctrl INT33FF:03: INTMASK1: 0x00000000
> >
> > So it's somehow got cleared in the process after.
>
> Only other place where we touch INTMASK register is
> chv_gpio_irq_mask_unmask(). Can you add some debug there to find out the
> caller?
Something like this:
diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
index 0fe8fad..95fa3b1 100644
--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
@@ -1357,6 +1357,11 @@ static void chv_gpio_irq_mask_unmask(struct irq_data *d, bool mask)
value |= BIT(intr_line);
chv_writel(value, pctrl->regs + CHV_INTMASK);
+ if (printk_ratelimit()) {
+ dev_info(pctrl->dev, "%smask pin %u intmask 0x%08x\n",
+ mask ? "" : "un", pin, readl(pctrl->regs + CHV_INTMASK));
+ }
+
raw_spin_unlock_irqrestore(&chv_lock, flags);
}
next prev parent reply other threads:[~2016-09-11 8:05 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 7:56 Mika Westerberg
2015-06-01 9:23 ` Mika Westerberg
2015-06-02 13:53 ` Linus Walleij
2015-06-02 14:15 ` Mika Westerberg
2016-08-16 16:12 ` Anisse Astier
2016-08-17 8:13 ` Mika Westerberg
2016-08-17 13:42 ` Anisse Astier
2016-08-18 12:13 ` Mika Westerberg
2016-08-18 13:52 ` Anisse Astier
2016-08-18 13:58 ` Mika Westerberg
2016-09-08 10:13 ` Phidias Chiang
2016-09-08 10:24 ` Mika Westerberg
2016-09-08 16:28 ` Phidias Chiang
2016-09-09 6:18 ` Mika Westerberg
2016-09-09 8:23 ` Phidias Chiang
2016-09-09 8:58 ` Mika Westerberg
2016-09-11 8:05 ` Mika Westerberg [this message]
2016-09-12 6:56 ` Phidias Chiang
2016-09-12 9:04 ` Mika Westerberg
2016-09-12 13:04 ` Phidias Chiang
2016-09-12 13:11 ` Mika Westerberg
2016-09-13 9:18 ` Linus Walleij
2016-09-13 9:33 ` Mika Westerberg
2016-09-13 12:22 ` Linus Walleij
2016-09-13 12:52 ` Mika Westerberg
2016-09-13 20:57 ` Linus Walleij
2016-09-14 8:26 ` Mika Westerberg
2016-09-14 12:46 ` Linus Walleij
2016-09-14 15:12 ` Mika Westerberg
2016-09-15 12:39 ` Linus Walleij
2016-09-15 15:42 ` Mika Westerberg
2016-09-15 15:52 ` [PATCH 1/2] gpiolib: Add possibility to mask which GPIOs are added to IRQ domain Mika Westerberg
2016-09-15 15:52 ` [PATCH 2/2] pinctrl: cherryview: Do not add all southwest and north GPIOs " Mika Westerberg
2016-09-15 16:07 ` [PATCH 1/2] gpiolib: Add possibility to mask which GPIOs are added " Marc Zyngier
2016-09-15 18:12 ` Mika Westerberg
2016-09-15 18:50 ` Thomas Gleixner
2016-09-18 11:16 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160911080506.GO15313@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=anisse@astier.eu \
--cc=heikki.krogerus@linux.intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phidias.chiang@canonical.com \
--cc=yu.c.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome