From patchwork Thu Dec 8 18:44:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 9466949 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1B4146071E for ; Thu, 8 Dec 2016 18:44:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F6BA285F1 for ; Thu, 8 Dec 2016 18:44:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02C82285EF; Thu, 8 Dec 2016 18:44:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82AC8285E7 for ; Thu, 8 Dec 2016 18:44:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753207AbcLHSod (ORCPT ); Thu, 8 Dec 2016 13:44:33 -0500 Received: from muru.com ([72.249.23.125]:51544 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752342AbcLHSoa (ORCPT ); Thu, 8 Dec 2016 13:44:30 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 586FE80CD; Thu, 8 Dec 2016 18:44:28 +0000 (UTC) Date: Thu, 8 Dec 2016 10:44:26 -0800 From: Tony Lindgren To: Felipe Balbi Cc: Greg Kroah-Hartman , Grygorii Strashko , Roger Quadros , Sekhar Nori , linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, Nishanth Menon Subject: Re: [PATCH] usb: dwc3: omap: Fix imprecise external abort and oops on boot Message-ID: <20161208184425.GB4920@atomide.com> References: <20161208032108.21962-1-tony@atomide.com> <87lgvqkb6f.fsf@linux.intel.com> <20161208153734.GF4264@atomide.com> <87a8c6pavm.fsf@linux.intel.com> <20161208182521.GA4920@atomide.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20161208182521.GA4920@atomide.com> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP * Tony Lindgren [161208 10:25]: > * Felipe Balbi [161208 09:52]: > > > > Hi, > > > > Tony Lindgren writes: > > > * Felipe Balbi [161208 01:45]: > > >> > > >> Hi, > > >> > > >> Tony Lindgren writes: > > >> > Somehow starting with v4.9-rc7 there have been imprecise > > >> > > >> There's nothing touching dwc3 since v4.9-rc5. > > > > > > Right, nothing obvious has changed. I think it's just a slight timing > > > change in the code that started triggering it. > > > > could be > > > > >> > external aborts on omap5-uevm dwc3 controller. I have not been > > >> > able to bisect what exactly triggered this as it does not always > > >> > happen. It seems that something changed with probing that > > >> > now exposes the issue: > > >> > > > >> > Unhandled fault: imprecise external abort (0x1406) at 0x00000000 > > >> > > >> hmmm, clock disabled... dwc3-omap shouldn't have pm runtime at all. > > > > > > It does for the interconnect target module clkctrl register via PM > > > runtime. That's the "usb_otg_ss" module. > > > > but that's all hidden in omap_device.c, we don't touch it from driver > > perspective. > > The call to pm_runtime_get_sync() in dwc3_omap_probe() will use it. > > Is there also some dwc3 internal clock? If we assume the usb_otg_ss > module is properly enabled it could be some dwc3 internal clock not > enabled? > > We do have a srst_udelay needed for enabling musb controller for some > SoCs, I'll check if that's the case here. If there are no dwc3 internal clocks that may be causing the imprecise external abort, then most likely we should apply the following change for srst_udelay. Looks like srst_udelay value of 2 is not enough here but 3 seems to do the job. The issue of the spurious interrupts on dwc3 probe remains though. Regards, Tony 8< ------------------------------------ --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/arch/arm/mach-omap2/omap_hwmod_54xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_54xx_data.c @@ -1952,6 +1952,7 @@ static struct omap_hwmod omap54xx_usb_tll_hs_hwmod = { static struct omap_hwmod_class_sysconfig omap54xx_usb_otg_ss_sysc = { .rev_offs = 0x0000, .sysc_offs = 0x0010, + .srst_udelay = 3, .sysc_flags = (SYSC_HAS_DMADISABLE | SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE), .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |