Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751300AbbBLSWe (ORCPT ); Thu, 12 Feb 2015 13:22:34 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:43593 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750871AbbBLSWd (ORCPT ); Thu, 12 Feb 2015 13:22:33 -0500 Date: Thu, 12 Feb 2015 12:22:22 -0600 From: Felipe Balbi To: George Cherian CC: , , , Subject: Re: [PATCH] usb: dwc3: dwc3-omap: Fix disable IRQ Message-ID: <20150212182222.GD31034@saruman.tx.rr.com> Reply-To: References: <1423719796-11670-1-git-send-email-george.cherian@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OROCMA9jn6tkzFBc" Content-Disposition: inline In-Reply-To: <1423719796-11670-1-git-send-email-george.cherian@ti.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3708 Lines: 111 --OROCMA9jn6tkzFBc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Fix this by adding functions dwc3_omap_write_irqmisc_clr() and > dwc3_omap_write_irq0_clr() which do the right thing. >=20 > Signed-off-by: George Cherian please resend with: Fixes: 72246da40f37 (usb: Introduce DesignWare USB3 DRD Driver) Cc: # v3.2+ > --- > drivers/usb/dwc3/dwc3-omap.c | 30 ++++++++++++++++++++++++++++-- > 1 file changed, 28 insertions(+), 2 deletions(-) >=20 > 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_oma= p *omap, u32 value) > omap->irq0_offset, value); > } > =20 > +static void dwc3_omap_write_irqmisc_clr(struct dwc3_omap *omap, u32 valu= e) > +{ > + 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) > =20 > 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 =3D USBOTGSS_IRQO_COREIRQ_ST; > + dwc3_omap_write_irq0_clr(omap, reg); > + > + reg =3D (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); > } > =20 > static u64 dwc3_omap_dma_mask =3D DMA_BIT_MASK(32); > --=20 > 1.8.3.1 >=20 --=20 balbi --OROCMA9jn6tkzFBc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJU3O9eAAoJEIaOsuA1yqRENK8QAIa16pMYAyJezA8QfNmMNUnk 8GpPw7vpGxNMRlQahlRhBH2Sh1FrEn76mwqTlRIZ6oWxWYQH3s+XJNAiRGGDJakK WhcXnw7m6UxDYrm/JpA9thiL/fnlDrom6H4qFZ4NkrBDvtkLTSt9a71CvzGP7nNR 5xeg/JUvTe8KVwo6FhQSlyS8Y3B6q2w2i/XRP+EpR5HE5U6NKNiOKhFi0DMFh8sg dVnbhp62X+WMTADah+KrAzobndN33/t5uWwvS+5PSOOmKw+KTAAc5L+fiwFPQggE Vn8w2x9olaY+gS+S9q9cR5bDSHs8+V/9StGgbWXsSUhj3HZkGUrM4MfBx0AZCUeq EMMhnYR6Jxql9tMwEVshUwvAFKah7kr7v/cDxQT4XE6A309rRlexkYzhNC3+F/P7 VGGq5p3xuod1V2Y6J4H9M6meIpKLbUSnDqmRRXBIUuFkxBMOyjgr4C4ZY8k2nUU/ yoDungLVrUmkOZaUGfAIZ1nKwwiZEpR7m4+m8Wv6Duv7GLs7LHRBrj75UkfTgXiN hIxPjNpnEadKXVub7aN5LKdvrVazmpbDkHgRPXF3Rd9JgiKIXSHKXq46SjcObQtH 2OfBprv+cTpIDGPei1wqMWifBBp1N6wkHiteIN2LTmF8u/SEvc45M3KPL1PCm228 NOsIHX5VW43UCeXTk2mq =CiHh -----END PGP SIGNATURE----- --OROCMA9jn6tkzFBc-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/