Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5957994imu; Mon, 21 Jan 2019 00:18:20 -0800 (PST) X-Google-Smtp-Source: ALg8bN5tzPaVOgTO4eUJ1vi/KvrO4qc9C2eOwJsOCBsjhDHB4KQNHM5OsI3uqGv470Zr07Mav6I1 X-Received: by 2002:a17:902:7107:: with SMTP id a7mr29156284pll.290.1548058700399; Mon, 21 Jan 2019 00:18:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548058700; cv=none; d=google.com; s=arc-20160816; b=n3syShfhDRelY3X4fiX3O9LtDGU8oZu0ECdbfC99G9cngZALoesKarurZvBu6Np/0Y 9cMbaO4KHJ1k9kOBiR1kaFjLEW+7pBPvg9Oud4wOhufAx3PdffbbiEGSN21ZktHUoPyJ 14Cy/n0KeRb3pZpvuK8ClVP+6nVSvHMI+zsXqpgq5ISs2U1Hd+O/fqz3NdIW9YCLVJiV ct8romxgX7X41U3GTeye8P5nMDdw+OKdT3LzMrmwA2KwUQ0a9vfN8NsjrEvSRk+Vdqg3 cDGGw0kLfr49Jbp5HD2aX0sZfsoa84S5Z5VjdqtJSu1T3YTFPB29tZ1kqDQWkt9jfcY/ H7dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=rlHaZqfICvXZvssoWUnEoOPJG6mrezGKijxzU6NTe0Q=; b=m38rUQ06abWo8Mm16uQ/pSsZzRB6YXds7RLnNoeTNm4/VOZI13xJHd7/iudskbG/8B tI6yiiGjJuYsG+kpWpccCsEH6t2B6mWMq8yG7kUbouUk8l/7zGXlVtqttMTu84S/0WBp 3cZfwfkgsn7c85Xp2RPg2dbED3ufk8P5Ar8V1fRxu23aIznesBWxhH/zs+2EDZaqm/ky MXOwC4b73zM4Mx8eudGTUTdDC1QkTuaxSmJ3OLl55efl6C05eAVmjA7HVR7ZKpmxvL6u cTYxG611Ge/mEsk4lqQcQpAmA1IXcLnGYOORW3SEYfC1D+7J4S2GEkvXZdb+ZbAfqhQN wG/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=N+0tU9gm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h68si11407612plb.375.2019.01.21.00.18.04; Mon, 21 Jan 2019 00:18:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cogentembedded-com.20150623.gappssmtp.com header.s=20150623 header.b=N+0tU9gm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728398AbfAUIQ4 (ORCPT + 99 others); Mon, 21 Jan 2019 03:16:56 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:40216 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727885AbfAUIQ4 (ORCPT ); Mon, 21 Jan 2019 03:16:56 -0500 Received: by mail-lj1-f196.google.com with SMTP id n18-v6so16706614lji.7 for ; Mon, 21 Jan 2019 00:16:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=rlHaZqfICvXZvssoWUnEoOPJG6mrezGKijxzU6NTe0Q=; b=N+0tU9gmJM1zPIAq6rFUdLpyruAJpzOcyvubr3SOCdZq5czdgoVB0tzN6N8NB1SrmN P3gWVmi+A0kxAIcKbnqNFr+esfhwkAZC/QOkQ7iRKz69Ru2ReKTrEsZiaK6+V/JAm0rt hxrmiFBEXprIfToEmyO4CBdozwNveuJ+r7n7P4r5ZcdIOtH6OszAoELX3uJl87KB2pip Zn9+vGGLJIJvv+5KyKOGBlnMo4QOdBjPpzp6gAJFZoZebeU0tD4mRb5yXsXFBJcTZVxi ZFUCXemuUVRsUzLtUN53bA+QiBj/6s6ToeanY2QaGcsTfq93ysn0CGO6GX6v6sVGCGS3 pYXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rlHaZqfICvXZvssoWUnEoOPJG6mrezGKijxzU6NTe0Q=; b=Q3bp/x8KSSZRdfwPiOBBXikRz9p5elG3myttWNWeROKCaPNkooBsciM7QLY0K7AId2 /F5Kz0NkiCk1gL3p+PKUfWqFWk370TZTHnfzkqa7/at78KyU5IKalOFrjCMIfLcIMLDN GEhl72NjoJXe9wa8nGxfEVLjyDhpapZgKF3/xu09i9L/XKSi2/9L1uqEKjQHb6Ut2mSL xk24lIHzDOVxzZFS25m12R3tEKAC9oJ6CYSdN/o246m7w++RzZXHE77QHQgWt+UHp+1y 5XTIIUogIrqJqKn7lrxs+eFAAO1mKSUpPRsgvuUDKSihaB9AWD+Tz5UhUJUtEq0XSYWl Mp0g== X-Gm-Message-State: AJcUukf/lfzwvEnPNEj+Grg5zXIqX9xBKkuAp2ZPFnuNPbJjWb3L7H/u s8suoPBoSpJKbfymtBRXtdcNAsS57fQ= X-Received: by 2002:a2e:750a:: with SMTP id q10-v6mr19182435ljc.39.1548058614037; Mon, 21 Jan 2019 00:16:54 -0800 (PST) Received: from [192.168.0.199] ([31.173.84.221]) by smtp.gmail.com with ESMTPSA id k20sm2157872lfe.3.2019.01.21.00.16.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jan 2019 00:16:53 -0800 (PST) Subject: Re: [PATCH v1 3/6] usb: host: Stops USB controller init if PLL fails to lock To: Yinbo Zhu , Alan Stern Cc: xiaobo.xie@nxp.com, jerry.huang@nxp.com, ran.wang_1@nxp.com, Greg Kroah-Hartman , Ramneek Mehresh , Nikhil Badola , Suresh Gupta , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190121031304.31161-1-yinbo.zhu@nxp.com> <20190121031304.31161-3-yinbo.zhu@nxp.com> From: Sergei Shtylyov Message-ID: <47b5e88e-2886-d8ed-5700-fad31c58f9bd@cogentembedded.com> Date: Mon, 21 Jan 2019 11:16:52 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190121031304.31161-3-yinbo.zhu@nxp.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! On 21.01.2019 6:13, Yinbo Zhu wrote: > From: yinbo.zhu > > USB erratum-A006918 workaround tries to start internal PHY inside > uboot (when PLL fails to lock). However, if the workaround also > fails, then USB initialization is also stopped inside Linux. > Erratum-A006918 workaround failure creates "fsl,erratum_a006918" > node in device-tree. Presence of this node in device-tree is > used to stop USB controller initialization in Linux > > Signed-off-by: Ramneek Mehresh > Signed-off-by: Suresh Gupta > Signed-off-by: yinbo.zhu > --- > drivers/usb/host/ehci-fsl.c | 5 +++++ > drivers/usb/host/fsl-mph-dr-of.c | 5 +++++ > 2 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c > index a28ec1e..6884130 100644 > --- a/drivers/usb/host/ehci-fsl.c > +++ b/drivers/usb/host/ehci-fsl.c > @@ -224,6 +224,11 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd, > portsc |= PORT_PTS_PTW; > /* fall through */ > case FSL_USB2_PHY_UTMI: > + if (pdata->has_fsl_erratum_a006918) { > + pr_warn("fsl-ehci: USB PHY clock invalid\n"); > + return -EINVAL; > + } > + > case FSL_USB2_PHY_UTMI_DUAL: > /* PHY_CLK_VALID bit is de-featured from all controller > * versions below 2.4 and is to be checked only for > diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c > index 677f9d5..7e07701 100644 > --- a/drivers/usb/host/fsl-mph-dr-of.c > +++ b/drivers/usb/host/fsl-mph-dr-of.c > @@ -225,6 +225,11 @@ static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev) > pdata->has_fsl_erratum_a005697 = > of_property_read_bool(np, "fsl,usb_erratum-a005697"); > > + if (of_get_property(np, "fsl,erratum_a006918", NULL)) of_property_read_bool() perhaps? > + pdata->has_fsl_erratum_a006918 = 1; > + else > + pdata->has_fsl_erratum_a006918 = 0; > + > /* > * Determine whether phy_clk_valid needs to be checked > * by reading property in device tree MBR, Sergei