From patchwork Wed May 8 06:04:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinbo Zhu X-Patchwork-Id: 10934209 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 11ED092A for ; Wed, 8 May 2019 06:04:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 020C9285A5 for ; Wed, 8 May 2019 06:04:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8C132880D; Wed, 8 May 2019 06:04:45 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 49E7B285A5 for ; Wed, 8 May 2019 06:04:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726985AbfEHGEk (ORCPT ); Wed, 8 May 2019 02:04:40 -0400 Received: from mail-eopbgr30055.outbound.protection.outlook.com ([40.107.3.55]:31106 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725884AbfEHGEk (ORCPT ); Wed, 8 May 2019 02:04:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MsJBt/rh2JZdRN0sgVlRhpR8FAR3c3LN/urSjCC8uAE=; b=jEwn/rsfWXv6qEoTf+GqR74x3Ne2cby2jg0U2wNd/zq+lL+UAF7hAopR9TLOQ4fbUX395tlQWSHWcwCvbxtVVMsvHNRQT8sV8gmAk9N8Bg1Zyz6uWxUQaG1Hevcv8blxMqpCOSJz1TELs3g1/MER8KZRIr2QtGxwokYX+RHvftA= Received: from VI1PR04MB4158.eurprd04.prod.outlook.com (52.133.15.33) by VI1PR04MB4141.eurprd04.prod.outlook.com (52.133.14.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.12; Wed, 8 May 2019 06:04:35 +0000 Received: from VI1PR04MB4158.eurprd04.prod.outlook.com ([fe80::8015:ec84:d721:b566]) by VI1PR04MB4158.eurprd04.prod.outlook.com ([fe80::8015:ec84:d721:b566%5]) with mapi id 15.20.1856.012; Wed, 8 May 2019 06:04:35 +0000 From: Yinbo Zhu To: Alan Stern CC: Yinbo Zhu , Xiaobo Xie , Greg Kroah-Hartman , Ramneek Mehresh , Nikhil Badola , Ran Wang , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Jiafei Pan Subject: [PATCH v5 1/5] usb: fsl: Set USB_EN bit to select ULPI phy Thread-Topic: [PATCH v5 1/5] usb: fsl: Set USB_EN bit to select ULPI phy Thread-Index: AQHVBWPplmBKYnpFSEWIawQlwwrKjA== Date: Wed, 8 May 2019 06:04:35 +0000 Message-ID: <20190508060608.33882-1-yinbo.zhu@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK2PR06CA0023.apcprd06.prod.outlook.com (2603:1096:202:2e::35) To VI1PR04MB4158.eurprd04.prod.outlook.com (2603:10a6:803:46::33) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yinbo.zhu@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2ae5964b-d030-4304-627e-08d6d37b0b77 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:VI1PR04MB4141; x-ms-traffictypediagnostic: VI1PR04MB4141: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2331; x-forefront-prvs: 0031A0FFAF x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(376002)(346002)(136003)(39860400002)(366004)(199004)(189003)(52116002)(316002)(478600001)(8936002)(386003)(99286004)(102836004)(5660300002)(186003)(3846002)(66446008)(73956011)(66946007)(26005)(66556008)(64756008)(66476007)(71200400001)(256004)(71190400001)(6486002)(6436002)(14454004)(6512007)(305945005)(7736002)(44832011)(6116002)(486006)(81156014)(68736007)(2906002)(54906003)(8676002)(81166006)(66066001)(476003)(6506007)(2616005)(86362001)(4744005)(1076003)(36756003)(6916009)(53936002)(25786009)(4326008)(50226002)(2171002);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB4141;H:VI1PR04MB4158.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 6x1dB+kRU1AHLKH8jcHH2Lbxh5/wvwodYPFchbzwOkAbNbdP4d7FOmWhApqmQuDKAvRin3ImAa63OVU56Gx9zawUCryjg0lmIieiV0FCVjtjtYod+1P1ixQ8Dr+Cs5At5OMgRezUirRG5/P760KbzMU7tuSQyezvTzIzUXQJTyvFWKumudvfUAjb7uWuwJkWJsWQrgnRP5bjmGdMpb8XQBtaOKVbTCgTKlj2UhQkSp87pgj8TeL9VnlNeCPWLE99B/Kr25axb2TUgE7Nd6we37AI+0mtu13cRpdJ0Q3R4vpohPPxVTAzsbkIdoSw8CQt7/eG+pEOi8KbtbCZ8YaziXL6r4s4p5xYj6ds39N5WZhbQag79C41odJihsHZhi7knG4XTXZTYT5DIuLZ/iGE/t1qe22hWmgpGemsNVA+j40= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ae5964b-d030-4304-627e-08d6d37b0b77 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2019 06:04:35.0948 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4141 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Nikhil Badola Set USB_EN bit to select ULPI phy for USB controller version 2.5 Signed-off-by: Nikhil Badola Signed-off-by: Yinbo Zhu --- drivers/usb/host/ehci-fsl.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index e3d0c1c..38674b7 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -122,6 +122,12 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) tmp |= 0x4; iowrite32be(tmp, hcd->regs + FSL_SOC_USB_CTRL); } + + /* Set USB_EN bit to select ULPI phy for USB controller version 2.5 */ + if (pdata->controller_ver == FSL_USB_VER_2_5 && + pdata->phy_mode == FSL_USB2_PHY_ULPI) + iowrite32be(USB_CTRL_USB_EN, hcd->regs + FSL_SOC_USB_CTRL); + /* * Enable UTMI phy and program PTS field in UTMI mode before asserting * controller reset for USB Controller version 2.5 From patchwork Wed May 8 06:04:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinbo Zhu X-Patchwork-Id: 10934211 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 25D34912 for ; Wed, 8 May 2019 06:05:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 104742880D for ; Wed, 8 May 2019 06:05:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01153287CD; Wed, 8 May 2019 06:05:29 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 78CD8287CD for ; Wed, 8 May 2019 06:05:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727078AbfEHGFY (ORCPT ); Wed, 8 May 2019 02:05:24 -0400 Received: from mail-eopbgr30055.outbound.protection.outlook.com ([40.107.3.55]:31106 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726982AbfEHGFX (ORCPT ); Wed, 8 May 2019 02:05:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sGVQKTtk29XmA74Zj+03hkkWomk236lfR0HowWJjf0U=; b=Jqt2f6WYt4thWz62dYQdqITVj7kuT9IdVEIfMdwILlUDbXtvlLSK2VXh4Hosu/hFiGP3EvMfwYE/7uVbaILozLUab78GsvePsmS3Gf52aALdmFZQDPI0Xaw4sSl/Kf9c542Zcy7cwIUpHCpt4+vNR54hwbJ+ATNr3TpMX1TMh5c= Received: from VI1PR04MB4158.eurprd04.prod.outlook.com (52.133.15.33) by VI1PR04MB4141.eurprd04.prod.outlook.com (52.133.14.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.12; Wed, 8 May 2019 06:04:39 +0000 Received: from VI1PR04MB4158.eurprd04.prod.outlook.com ([fe80::8015:ec84:d721:b566]) by VI1PR04MB4158.eurprd04.prod.outlook.com ([fe80::8015:ec84:d721:b566%5]) with mapi id 15.20.1856.012; Wed, 8 May 2019 06:04:39 +0000 From: Yinbo Zhu To: Alan Stern CC: Yinbo Zhu , Xiaobo Xie , Greg Kroah-Hartman , Ramneek Mehresh , Nikhil Badola , Ran Wang , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Jiafei Pan , Suresh Gupta Subject: [PATCH v5 2/5] usb: phy: Workaround for USB erratum-A005728 Thread-Topic: [PATCH v5 2/5] usb: phy: Workaround for USB erratum-A005728 Thread-Index: AQHVBWPrsnmaeqJdaEa/eR5Ny2mKMg== Date: Wed, 8 May 2019 06:04:38 +0000 Message-ID: <20190508060608.33882-2-yinbo.zhu@nxp.com> References: <20190508060608.33882-1-yinbo.zhu@nxp.com> In-Reply-To: <20190508060608.33882-1-yinbo.zhu@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK2PR06CA0023.apcprd06.prod.outlook.com (2603:1096:202:2e::35) To VI1PR04MB4158.eurprd04.prod.outlook.com (2603:10a6:803:46::33) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yinbo.zhu@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 61d51b99-87cb-4132-f03f-08d6d37b0de3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:VI1PR04MB4141; x-ms-traffictypediagnostic: VI1PR04MB4141: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 0031A0FFAF x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(376002)(346002)(136003)(39860400002)(366004)(199004)(189003)(52116002)(316002)(478600001)(8936002)(386003)(99286004)(102836004)(5660300002)(186003)(3846002)(66446008)(73956011)(66946007)(26005)(66556008)(64756008)(66476007)(71200400001)(256004)(71190400001)(6486002)(6436002)(14454004)(6512007)(305945005)(7736002)(44832011)(6116002)(11346002)(486006)(81156014)(446003)(68736007)(2906002)(54906003)(8676002)(81166006)(66066001)(76176011)(476003)(6506007)(2616005)(86362001)(1076003)(36756003)(6916009)(53936002)(25786009)(4326008)(107886003)(50226002)(2171002);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB4141;H:VI1PR04MB4158.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: ExyJtlWYmwqB8VHH1SdyxQH3qZ4/hnY8D1eVIIIVD4pSLztf1eS/5E7ZdbdgzGpTsHgo88igtRPolBI+kGX/0vyrZO3K494ZI2yvQ92W2/fx4MeyfQSX9eqr8xm3SEiJFSNWX4iDz56pkQTLYkjaqu/RnWN+32f4xHBuEpyNhUbsIJ0i9SjBcrMHynWPfg1itDO9SBmvxAu+vQ1rTEO7CWU1/HSjn9xvgT1MrZ9d4ArupcyErbsvNEBSk27nuDbxombREJR844snLNSSYzTI092vFY2KmCKapJ6iw9GJUJs0a4EGsr2wbwhYE3Dd7856dT29VV0bXZmO+WvF+q8G6eGjnL04vLZe/c5Iog2kEXUgWCRGijOcealHwlkwg3H1AwGcOVVT6qrb1CgOGUqdrHHF6XMqQYqe0ijTGknk20Q= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 61d51b99-87cb-4132-f03f-08d6d37b0de3 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2019 06:04:38.9685 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4141 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Suresh Gupta PHY_CLK_VALID bit for UTMI PHY in USBDR does not set even if PHY is providing valid clock. Workaround for this involves resetting of PHY and check PHY_CLK_VALID bit multiple times. If PHY_CLK_VALID bit is still not set even after 5 retries, it would be safe to deaclare that PHY clock is not available. This erratum is applicable for USBDR less then ver 2.4. Signed-off-by: Suresh Gupta Signed-off-by: Yinbo Zhu --- Change in v5: remove dev_err function unnecessary parameters drivers/usb/host/ehci-fsl.c | 37 ++++++++++++++++++++++++++----------- drivers/usb/host/ehci-fsl.h | 3 +++ 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 38674b7..1634ac8 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -183,6 +183,17 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) return retval; } +static bool usb_phy_clk_valid(struct usb_hcd *hcd) +{ + void __iomem *non_ehci = hcd->regs; + bool ret = true; + + if (!(ioread32be(non_ehci + FSL_SOC_USB_CTRL) & PHY_CLK_VALID)) + ret = false; + + return ret; +} + static int ehci_fsl_setup_phy(struct usb_hcd *hcd, enum fsl_usb2_phy_modes phy_mode, unsigned int port_offset) @@ -226,6 +237,16 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd, /* fall through */ case FSL_USB2_PHY_UTMI: 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 + * internal UTMI phy + */ + if (pdata->controller_ver > FSL_USB_VER_2_4 && + pdata->have_sysif_regs && !usb_phy_clk_valid(hcd)) { + dev_err(dev, "USB PHY clock invalid\n"); + return -EINVAL; + } + if (pdata->have_sysif_regs && pdata->controller_ver) { /* controller version 1.6 or above */ tmp = ioread32be(non_ehci + FSL_SOC_USB_CTRL); @@ -249,17 +270,11 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd, break; } - /* - * check PHY_CLK_VALID to determine phy clock presence before writing - * to portsc - */ - if (pdata->check_phy_clk_valid) { - if (!(ioread32be(non_ehci + FSL_SOC_USB_CTRL) & - PHY_CLK_VALID)) { - dev_warn(hcd->self.controller, - "USB PHY clock invalid\n"); - return -EINVAL; - } + if (pdata->have_sysif_regs && + pdata->controller_ver > FSL_USB_VER_1_6 && + !usb_phy_clk_valid(hcd)) { + dev_warn(hcd->self.controller, "USB PHY clock invalid\n"); + return -EINVAL; } ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]); diff --git a/drivers/usb/host/ehci-fsl.h b/drivers/usb/host/ehci-fsl.h index cbc4220..9d18c6e 100644 --- a/drivers/usb/host/ehci-fsl.h +++ b/drivers/usb/host/ehci-fsl.h @@ -50,4 +50,7 @@ #define UTMI_PHY_EN (1<<9) #define ULPI_PHY_CLK_SEL (1<<10) #define PHY_CLK_VALID (1<<17) + +/* Retry count for checking UTMI PHY CLK validity */ +#define UTMI_PHY_CLK_VALID_CHK_RETRY 5 #endif /* _EHCI_FSL_H */ From patchwork Wed May 8 06:04:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinbo Zhu X-Patchwork-Id: 10934217 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7E976912 for ; Wed, 8 May 2019 06:05:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EA7A287CD for ; Wed, 8 May 2019 06:05:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 632CF28827; Wed, 8 May 2019 06:05:39 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 0D527287CD for ; Wed, 8 May 2019 06:05:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727028AbfEHGFT (ORCPT ); Wed, 8 May 2019 02:05:19 -0400 Received: from mail-eopbgr60080.outbound.protection.outlook.com ([40.107.6.80]:3088 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725884AbfEHGFT (ORCPT ); Wed, 8 May 2019 02:05:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w5HcUnI7n/IagTVqPKdOVRgCZ2PwXt52Vwz1y5MvR4A=; b=bBJHDRkJfLiqHEkrY67vpIDq17a5HAEi2pWl8CWWatp0eiks4Y1djYz0iEknwLY7Bg3mlb4rgONttASJxzp7nRwthbmq/eFuQeftIrcmUoV1YoT7Wx7WZBuUgUzx2zbJeugfm7kZc+yhhxeB/ToE9sXJSkehkOEkDXRYFFnEfJA= Received: from VI1PR04MB4158.eurprd04.prod.outlook.com (52.133.15.33) by VI1PR04MB4141.eurprd04.prod.outlook.com (52.133.14.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.12; Wed, 8 May 2019 06:04:42 +0000 Received: from VI1PR04MB4158.eurprd04.prod.outlook.com ([fe80::8015:ec84:d721:b566]) by VI1PR04MB4158.eurprd04.prod.outlook.com ([fe80::8015:ec84:d721:b566%5]) with mapi id 15.20.1856.012; Wed, 8 May 2019 06:04:42 +0000 From: Yinbo Zhu To: Alan Stern CC: Yinbo Zhu , Xiaobo Xie , Greg Kroah-Hartman , Ramneek Mehresh , Nikhil Badola , Ran Wang , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Jiafei Pan Subject: [PATCH v5 3/5] usb: linux/fsl_device: Add platform member has_fsl_erratum_a006918 Thread-Topic: [PATCH v5 3/5] usb: linux/fsl_device: Add platform member has_fsl_erratum_a006918 Thread-Index: AQHVBWPtfEHsDOgUrECiiuPrEjxPLw== Date: Wed, 8 May 2019 06:04:42 +0000 Message-ID: <20190508060608.33882-3-yinbo.zhu@nxp.com> References: <20190508060608.33882-1-yinbo.zhu@nxp.com> In-Reply-To: <20190508060608.33882-1-yinbo.zhu@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK2PR06CA0023.apcprd06.prod.outlook.com (2603:1096:202:2e::35) To VI1PR04MB4158.eurprd04.prod.outlook.com (2603:10a6:803:46::33) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yinbo.zhu@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7ccc80b5-30b4-4a5f-8710-08d6d37b100e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:VI1PR04MB4141; x-ms-traffictypediagnostic: VI1PR04MB4141: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1388; x-forefront-prvs: 0031A0FFAF x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(39860400002)(346002)(376002)(396003)(136003)(189003)(199004)(68736007)(446003)(54906003)(2906002)(6116002)(81156014)(11346002)(486006)(476003)(6506007)(2616005)(66066001)(81166006)(8676002)(76176011)(7736002)(305945005)(44832011)(6916009)(36756003)(2171002)(50226002)(53936002)(4326008)(25786009)(86362001)(1076003)(4744005)(8936002)(186003)(5660300002)(3846002)(52116002)(99286004)(102836004)(316002)(386003)(478600001)(256004)(71190400001)(71200400001)(14444005)(14454004)(6512007)(6486002)(6436002)(66446008)(73956011)(66946007)(26005)(66476007)(66556008)(64756008);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB4141;H:VI1PR04MB4158.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: +AkbYLMEeAZORaurYOT+9TZ/zd9RlczwVgOLMrRVE5jVvyx7ZnwGlfOG1B4af2qgrv9oTWPFojfGCRNGHmdVer7xcPNoVcKqgkThXOjxeDfDa3RObIW4lcNAmLY9bmArFPGIFnYgUoTtsOUvX60X0WfR+yy02JO45eJMOB7pLeYQE7OvqjGxLkpKo3yW0dg26aAsvEHAeI+r0CoTyg3L4sHgC2hFj76SdI9WeZWnsZiqjP2O2X8YdBWhc51kR2Bv8S8H8bc8LTQSYBJ1d8b/qau7acrZMYatg7HI9Y7Qbs89uKkXLxlyWO/LM2SSyDkfJ0HT7q9/eNArQyGGz0eKV5g/5pUa60HHTGqKGCLZ3Pg1hcZk3GDiONGu3By919KqLY9semm5/Lth5miqPLMpKI1kqaKsrfpY3VDH3Riw3IE= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ccc80b5-30b4-4a5f-8710-08d6d37b100e X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2019 06:04:42.7502 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4141 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yinbo Zhu This patch is to add member has_fsl_erratum_a006918 in platform data Signed-off-by: Yinbo Zhu --- include/linux/fsl_devices.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 5da56a6..4c613da 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h @@ -102,6 +102,7 @@ struct fsl_usb2_platform_data { unsigned has_fsl_erratum_14:1; unsigned has_fsl_erratum_a005275:1; unsigned has_fsl_erratum_a005697:1; + unsigned has_fsl_erratum_a006918:1; unsigned check_phy_clk_valid:1; /* register save area for suspend/resume */ From patchwork Wed May 8 06:04:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinbo Zhu X-Patchwork-Id: 10934215 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 81E5A912 for ; Wed, 8 May 2019 06:05:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 720A5287CD for ; Wed, 8 May 2019 06:05:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6663028827; Wed, 8 May 2019 06:05:36 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 F403D287CD for ; Wed, 8 May 2019 06:05:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727055AbfEHGFV (ORCPT ); Wed, 8 May 2019 02:05:21 -0400 Received: from mail-eopbgr60080.outbound.protection.outlook.com ([40.107.6.80]:3088 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727025AbfEHGFU (ORCPT ); Wed, 8 May 2019 02:05:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rpeZCp1ZplV19AO3dEl5NELaJLD6by4v5QQpk1RDHlU=; b=Ato9ysgZv5fWfIXvOgm98ITczXgacPSCMQAjxbD9UcjwKTnlROwNQ5S2eFlbTOj8kleH7mf7nanVC/5KYAI55fGydKFSp06k8FtnWPPmRzt/ofnjtl87hmwyK5I1umUjqzcGYXxSxI1htukRVwyANzXdKU/Kmi+hzxVJ3fW0A0A= Received: from VI1PR04MB4158.eurprd04.prod.outlook.com (52.133.15.33) by VI1PR04MB4141.eurprd04.prod.outlook.com (52.133.14.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.12; Wed, 8 May 2019 06:04:47 +0000 Received: from VI1PR04MB4158.eurprd04.prod.outlook.com ([fe80::8015:ec84:d721:b566]) by VI1PR04MB4158.eurprd04.prod.outlook.com ([fe80::8015:ec84:d721:b566%5]) with mapi id 15.20.1856.012; Wed, 8 May 2019 06:04:47 +0000 From: Yinbo Zhu To: Alan Stern CC: Yinbo Zhu , Xiaobo Xie , Greg Kroah-Hartman , Ramneek Mehresh , Nikhil Badola , Ran Wang , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Jiafei Pan , Suresh Gupta Subject: [PATCH v5 4/5] usb: host: Stops USB controller init if PLL fails to lock Thread-Topic: [PATCH v5 4/5] usb: host: Stops USB controller init if PLL fails to lock Thread-Index: AQHVBWPwtPsu0fLjhE+qRODS4vtH+w== Date: Wed, 8 May 2019 06:04:47 +0000 Message-ID: <20190508060608.33882-4-yinbo.zhu@nxp.com> References: <20190508060608.33882-1-yinbo.zhu@nxp.com> In-Reply-To: <20190508060608.33882-1-yinbo.zhu@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK2PR06CA0023.apcprd06.prod.outlook.com (2603:1096:202:2e::35) To VI1PR04MB4158.eurprd04.prod.outlook.com (2603:10a6:803:46::33) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yinbo.zhu@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 131968bf-08a6-417b-edea-08d6d37b12e0 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:VI1PR04MB4141; x-ms-traffictypediagnostic: VI1PR04MB4141: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-forefront-prvs: 0031A0FFAF x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(39860400002)(346002)(376002)(396003)(136003)(189003)(199004)(68736007)(446003)(54906003)(2906002)(6116002)(81156014)(11346002)(486006)(476003)(6506007)(2616005)(66066001)(81166006)(8676002)(76176011)(7736002)(305945005)(44832011)(6916009)(36756003)(2171002)(50226002)(107886003)(53936002)(4326008)(25786009)(86362001)(1076003)(8936002)(186003)(5660300002)(3846002)(52116002)(99286004)(102836004)(316002)(386003)(478600001)(256004)(71190400001)(71200400001)(14444005)(14454004)(6512007)(6486002)(6436002)(66446008)(73956011)(66946007)(26005)(66476007)(66556008)(64756008);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB4141;H:VI1PR04MB4158.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: S3BvBkG5ABbCkZIzG6isQi9G4ER8x/hNghmhMrY0wVd+dlvW/Ol1T2r3hK7oytVLc0WI92XGWxGJYC5KntyAIrLecNDzJrm1/2r+EVaBXYuz5xdUDJrxkSzFZVQXQSV3K8D+qxuSK2t1LWDAYsO7kCN0D7kWndmxn7wymvvHtvTMSXWVJP3lzBg/kQFioINdsIXC0GPUud3XF78skoRJiviZKpBCJDHiqTmgRO2aibq8+f0ouHCvhbh/pHQI1kUi8PC+afXQWmfA70bP61I3jpClpRsSO4JLB8Q3Axab0iqPFaKr0zew5HnFo5YHQXWi+wf7ZxCUMSAa0dP5Vx9pt0zi3ELxYBkahSnFmd6mzFRoKGEZJvrf3fWGQ6jow9ymEccmGIpxSBE1kF7/RptpKk+v65VAqa2jJIueksFluMY= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 131968bf-08a6-417b-edea-08d6d37b12e0 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2019 06:04:47.3334 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4141 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ramneek Mehresh 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 --- Change in v5: use dev_warn() instead of pr_warn() drivers/usb/host/ehci-fsl.c | 5 +++++ drivers/usb/host/fsl-mph-dr-of.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 1634ac8..90550a6 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -236,6 +236,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) { + dev_warn(dev, "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 4f8b8a0..762b976 100644 --- a/drivers/usb/host/fsl-mph-dr-of.c +++ b/drivers/usb/host/fsl-mph-dr-of.c @@ -224,13 +224,14 @@ static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev) of_property_read_bool(np, "fsl,usb-erratum-a005275"); pdata->has_fsl_erratum_a005697 = of_property_read_bool(np, "fsl,usb_erratum-a005697"); + pdata->has_fsl_erratum_a006918 = + of_property_read_bool(np, "fsl,usb_erratum-a006918"); if (of_get_property(np, "fsl,usb_erratum_14", NULL)) pdata->has_fsl_erratum_14 = 1; else pdata->has_fsl_erratum_14 = 0; - /* * Determine whether phy_clk_valid needs to be checked * by reading property in device tree From patchwork Wed May 8 06:04:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinbo Zhu X-Patchwork-Id: 10934213 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0716A912 for ; Wed, 8 May 2019 06:05:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E985F287CD for ; Wed, 8 May 2019 06:05:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC24D28827; Wed, 8 May 2019 06:05:33 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 7CDC9287CD for ; Wed, 8 May 2019 06:05:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727138AbfEHGF3 (ORCPT ); Wed, 8 May 2019 02:05:29 -0400 Received: from mail-eopbgr60080.outbound.protection.outlook.com ([40.107.6.80]:3088 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725884AbfEHGFW (ORCPT ); Wed, 8 May 2019 02:05:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k0Hc6tTNhU2tbeyQ7npKX21/+g0fc8jbGr09+06MYKk=; b=RbqFnpttveBArY5h/+CUiaS3kM0aGn0X3U7JY6T91dmEzLVK6kqS+GvDrTtZxc0ONlCpAyUcOE+GMIw0nIUcAYf1u9OFWleCT9OGaek7DXGiDgC1/pw25VRIFbgl/cGvFlTCLBdAYW1CDirBcQK0X9eTIrpyC5P7RnOLW45EBCc= Received: from VI1PR04MB4158.eurprd04.prod.outlook.com (52.133.15.33) by VI1PR04MB4141.eurprd04.prod.outlook.com (52.133.14.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.12; Wed, 8 May 2019 06:04:52 +0000 Received: from VI1PR04MB4158.eurprd04.prod.outlook.com ([fe80::8015:ec84:d721:b566]) by VI1PR04MB4158.eurprd04.prod.outlook.com ([fe80::8015:ec84:d721:b566%5]) with mapi id 15.20.1856.012; Wed, 8 May 2019 06:04:52 +0000 From: Yinbo Zhu To: Alan Stern CC: Yinbo Zhu , Xiaobo Xie , Greg Kroah-Hartman , Ramneek Mehresh , Nikhil Badola , Ran Wang , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Jiafei Pan Subject: [PATCH v5 5/5] usb :fsl: Change string format for errata property Thread-Topic: [PATCH v5 5/5] usb :fsl: Change string format for errata property Thread-Index: AQHVBWPz2g/D/q2EjUyq8am/kxgoRg== Date: Wed, 8 May 2019 06:04:52 +0000 Message-ID: <20190508060608.33882-5-yinbo.zhu@nxp.com> References: <20190508060608.33882-1-yinbo.zhu@nxp.com> In-Reply-To: <20190508060608.33882-1-yinbo.zhu@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK2PR06CA0023.apcprd06.prod.outlook.com (2603:1096:202:2e::35) To VI1PR04MB4158.eurprd04.prod.outlook.com (2603:10a6:803:46::33) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yinbo.zhu@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 52e14233-a72d-451b-fa6d-08d6d37b160a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:VI1PR04MB4141; x-ms-traffictypediagnostic: VI1PR04MB4141: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2512; x-forefront-prvs: 0031A0FFAF x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(39860400002)(346002)(376002)(396003)(136003)(189003)(199004)(68736007)(446003)(54906003)(2906002)(6116002)(81156014)(11346002)(486006)(476003)(6506007)(2616005)(66066001)(81166006)(8676002)(76176011)(7736002)(305945005)(44832011)(6916009)(36756003)(2171002)(50226002)(53936002)(4326008)(25786009)(86362001)(1076003)(8936002)(186003)(5660300002)(3846002)(52116002)(99286004)(102836004)(316002)(386003)(478600001)(256004)(71190400001)(71200400001)(14454004)(6512007)(6486002)(6436002)(66446008)(73956011)(66946007)(26005)(66476007)(66556008)(64756008);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB4141;H:VI1PR04MB4158.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: rNPYK9UxBdtF7FePgTTMiR2ur3cMV1IpYAdjLANXUIC6z9BNyDFu6kgdAF/lNX/ucUTwgQsMhukC3/NCyHkmD8RT5DWEf0BHYh++bU6hItSfem2Yl6XxYjM2qZnJvbarZki+6HXVJYP++i11AR8o2o466HECKol3SNhw/r8qu7/OStL3CKHzl0FeDNBlW2qU4oSB+baGe2f7jn8GljkDWUkQC3GslvB/iXWlwymFtSgEI3o9TDd7euDkywqJtJQv9+wOT3YxYbB5soZx/s/c6joJd2ERU7MXYGxa0YYQaxe1iqpda2JpA5enfgp5t1pivUd9j6YohwC272A1qjCfDurxouGlYGTFYvjO469Wtqkp5Huq6XifSpMP581PBBtIZYyyQNIPikV7aSMjf/xu4DXkBkmChLC4GhYmUQ7adeo= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 52e14233-a72d-451b-fa6d-08d6d37b160a X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2019 06:04:52.7823 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4141 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Nikhil Badola Remove USB errata checking code from driver. Applicability of erratum is retrieved by reading corresponding property in device tree. This property is written during device tree fixup. Signed-off-by: Ramneek Mehresh Signed-off-by: Nikhil Badola Signed-off-by: Yinbo Zhu --- drivers/usb/host/fsl-mph-dr-of.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c index 762b976..ae8f60f 100644 --- a/drivers/usb/host/fsl-mph-dr-of.c +++ b/drivers/usb/host/fsl-mph-dr-of.c @@ -226,11 +226,8 @@ static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev) of_property_read_bool(np, "fsl,usb_erratum-a005697"); pdata->has_fsl_erratum_a006918 = of_property_read_bool(np, "fsl,usb_erratum-a006918"); - - if (of_get_property(np, "fsl,usb_erratum_14", NULL)) - pdata->has_fsl_erratum_14 = 1; - else - pdata->has_fsl_erratum_14 = 0; + pdata->has_fsl_erratum_14 = + of_property_read_bool(np, "fsl,usb_erratum-14"); /* * Determine whether phy_clk_valid needs to be checked