Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756769AbbLHOfl (ORCPT ); Tue, 8 Dec 2015 09:35:41 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:56344 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756708AbbLHOfh (ORCPT ); Tue, 8 Dec 2015 09:35:37 -0500 From: Felipe Balbi To: Bin Liu , Gregory CLEMENT CC: Greg Kroah-Hartman , , , , Subject: Re: [PATCH] usb: musb: dsps: handle the otg_state_a_wait_vrise_timeout case In-Reply-To: <5666E9BE.5070907@ti.com> References: <1440087153-31084-1-git-send-email-gregory.clement@free-electrons.com> <55D719B1.8010700@free-electrons.com> <87twrfsbed.fsf@free-electrons.com> <87d1wtf5ir.fsf@saruman.tx.rr.com> <87a8rde96m.fsf@free-electrons.com> <87poyiegc7.fsf@free-electrons.com> <87poyinjpc.fsf@saruman.tx.rr.com> <874mft9ukx.fsf@free-electrons.com> <87h9jtm37m.fsf@saruman.tx.rr.com> <5666E9BE.5070907@ti.com> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Tue, 8 Dec 2015 08:35:04 -0600 Message-ID: <87egexm2jr.fsf@saruman.tx.rr.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3560 Lines: 103 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Bin Liu writes: > Felipe, > > On 12/08/2015 08:20 AM, Felipe Balbi wrote: >> >> Hi, >> >> Gregory CLEMENT writes: >>>>>> if it is the case then it didn't fix the issue I had. >>>>>> >>>>>> I activated the following debug line: >>>>>> >>>>>> [musb_hdrc]musb_interrupt =3D_ "** IRQ %s usb%04x tx%04x rx%04x\012" >>>>>> [musb_dsps]dsps_interrupt =3Dp "usbintr (%x) epintr(%x)\012" >>>>>> >>>>>> But I didn't get any interrupt while disconnecting the cable without= any >>>>>> device connected on it (whereas I got an interrupt when I connected = it). >>>>>> >>>>>> Note that I applied this patch instead of the "usb: musb: dsps: hand= le >>>>>> the otg_state_a_wait_vrise_timeout case", is what you had in mind ? >>>> >>>> yeah, that's what I had in mind. But your patch seems wrong :-) >>>> >>>> I tried writing a more correct version here and found 2 issues: >>>> >>>> a) bit 3 doesn't do anything :-p I cannot read IRQs from mentor's >>>> registers >>>> >>>> b) when setting RESET_ISOLATION bit, reads of CTRL register hang. Note >>>> that according to TRM, RESET_ISOLATION _must_ be set prior to a soft >>>> reset and cleared afterwards. But right after setting RESET_ISOLATION, >>>> if I try a read of CTRL, it'll hang forever. >>> >>> The datasheet seems not very coherent about it, >>> >>> on one side we have: >>> "This bit should be set high prior to setting bit 0 and cleared after b= it 0 >>> is cleared." >>> >>> and on the other side: >>> "Both the soft_reset and soft_reset_isolation bits should be asserted >>> simultaneously." >>> >>> The hang you saw could be explained by the following: >>> "Setting only the soft_reset_isolation bit will cause all USB0 output >>> signals to go to a known constant value via multiplexers. >>> This will >>> prevent future access to USB0." page 2567 >> >> good catch. Setting them together makes the hang go away. >> >> I still have the other problem, which is legacy IRQ reporting mode not >> really working. >> > > I never tried to change the IRQ mapping. The 8 MUSB interrupt will be=20 > the same no matter where they are reported from. What do you expect when= =20 > switch to the MUSB IRQ reporting mode? read events from MUSB's registers instead of TI's :-) so, MUSB_INTRUSB, MUSB_INTRRX and MUSB_INTRTX. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWZuqZAAoJEIaOsuA1yqREuRIP/0Yh4HorZ9ZiCJ/3kCt3FnW1 QaY/GMq9HfPrd1zD77kh7pqqM87c6oEa4iwiq8dkjybkZ+7zx+xvV+J/BfrhDheD Xi1OFG6j0xj0FFGKeBQL7gvWAcRUJR3BcWJSEXPMlVV8T6JLWpvU0h1+r8Td5FEK M556jVsV1aHZvkSkUvFvtlfBuMC9ZjGxw10uRGdIawqZpLmnz4n58rqZh1pd3EXw Pf5i/+XRy05orXXc+FCkRu+Tg7/Jd8aDj9AUean1RP5kCnxlU0WKniqWnTGL9QRu 0Mg3ZEa6R+n5CTz+bYt4a+Waq3gxd/BZ02/uH3EVqVF8K67KHd8MY/DbpPFo1bsZ rTmXmjHlth+xdFM9/72WPQuEUPdV12IpeK3tDh4CO6QfcCzA8vk1nUbmI3BF3XtG REDNOO3q1pQV4H5tmNBHr2spb+6T681bPMahZiFSBISKPQlE7iWPlu1It4zdFWyW eRrLm9mBkGssiCwOPP28MEprUBv6ZYogprF1LaVtt9rdy0pbBDylOTYEaDaEgjhS 9ck1BZy+/Lst8d1FKFky7lXY/uK/TvtbL+Ke2iSYUJmRWlX0kPl6wZlI04x1kL78 IC1GiraKK3nLftgX+fnKwfJixiVk7kIF0lJ2Dq+S+RX5Tkl/Vm9/XbKm7yPP92Yx OW+kUDWgSq69bOOdoHGH =qDhs -----END PGP SIGNATURE----- --=-=-=-- -- 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/