From: Felipe Balbi <balbi@ti.com>
To: George Cherian <george.cherian@ti.com>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<balbi@ti.com>, <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] usb: dwc3: dwc3-omap: Fix disable IRQ
Date: Thu, 12 Feb 2015 12:22:22 -0600 [thread overview]
Message-ID: <20150212182222.GD31034@saruman.tx.rr.com> (raw)
In-Reply-To: <1423719796-11670-1-git-send-email-george.cherian@ti.com>
[-- Attachment #1: Type: text/plain, Size: 2409 bytes --]
On Thu, Feb 12, 2015 at 11:13:16AM +0530, George Cherian wrote:
> In the wrapper the IRQ disable should be done by writing 1's to the
> IRQ*_CLR register. Existing code is broken because it instead writes
> zeros to IRQ*_SET register.
>
> Fix this by adding functions dwc3_omap_write_irqmisc_clr() and
> dwc3_omap_write_irq0_clr() which do the right thing.
>
> Signed-off-by: George Cherian <george.cherian@ti.com>
please resend with:
Fixes: 72246da40f37 (usb: Introduce DesignWare USB3 DRD Driver)
Cc: <stable@vger.kernel.org> # v3.2+
> ---
> drivers/usb/dwc3/dwc3-omap.c | 30 ++++++++++++++++++++++++++++--
> 1 file changed, 28 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
> index 172d64e..52e0c4e 100644
> --- a/drivers/usb/dwc3/dwc3-omap.c
> +++ b/drivers/usb/dwc3/dwc3-omap.c
> @@ -205,6 +205,18 @@ static void dwc3_omap_write_irq0_set(struct dwc3_omap *omap, u32 value)
> omap->irq0_offset, value);
> }
>
> +static void dwc3_omap_write_irqmisc_clr(struct dwc3_omap *omap, u32 value)
> +{
> + dwc3_omap_writel(omap->base, USBOTGSS_IRQENABLE_CLR_MISC +
> + omap->irqmisc_offset, value);
> +}
> +
> +static void dwc3_omap_write_irq0_clr(struct dwc3_omap *omap, u32 value)
> +{
> + dwc3_omap_writel(omap->base, USBOTGSS_IRQENABLE_CLR_0 -
> + omap->irq0_offset, value);
> +}
> +
> static void dwc3_omap_set_mailbox(struct dwc3_omap *omap,
> enum omap_dwc3_vbus_id_status status)
> {
> @@ -345,9 +357,23 @@ static void dwc3_omap_enable_irqs(struct dwc3_omap *omap)
>
> static void dwc3_omap_disable_irqs(struct dwc3_omap *omap)
> {
> + u32 reg;
> +
> /* disable all IRQs */
> - dwc3_omap_write_irqmisc_set(omap, 0x00);
> - dwc3_omap_write_irq0_set(omap, 0x00);
> + reg = USBOTGSS_IRQO_COREIRQ_ST;
> + dwc3_omap_write_irq0_clr(omap, reg);
> +
> + reg = (USBOTGSS_IRQMISC_OEVT |
> + USBOTGSS_IRQMISC_DRVVBUS_RISE |
> + USBOTGSS_IRQMISC_CHRGVBUS_RISE |
> + USBOTGSS_IRQMISC_DISCHRGVBUS_RISE |
> + USBOTGSS_IRQMISC_IDPULLUP_RISE |
> + USBOTGSS_IRQMISC_DRVVBUS_FALL |
> + USBOTGSS_IRQMISC_CHRGVBUS_FALL |
> + USBOTGSS_IRQMISC_DISCHRGVBUS_FALL |
> + USBOTGSS_IRQMISC_IDPULLUP_FALL);
> +
> + dwc3_omap_write_irqmisc_clr(omap, reg);
> }
>
> static u64 dwc3_omap_dma_mask = DMA_BIT_MASK(32);
> --
> 1.8.3.1
>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-02-12 18:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-12 5:43 [PATCH] usb: dwc3: dwc3-omap: Fix disable IRQ George Cherian
2015-02-12 18:22 ` Felipe Balbi [this message]
2015-02-13 4:44 ` George Cherian
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=20150212182222.GD31034@saruman.tx.rr.com \
--to=balbi@ti.com \
--cc=george.cherian@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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