Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5947966imu; Mon, 21 Jan 2019 00:05:22 -0800 (PST) X-Google-Smtp-Source: ALg8bN6rRPp5bwLqXBvisMA2JmdgoIvSSpV5raSiiltUsUydb/q0Y8inh/H8+FBksiQwbQdTm48g X-Received: by 2002:a65:5bc4:: with SMTP id o4mr27499962pgr.426.1548057922936; Mon, 21 Jan 2019 00:05:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548057922; cv=none; d=google.com; s=arc-20160816; b=TPEPtU2UO83ZwfhFL0MzXNCNhPeTmMrAEPbiQCUMqP2yvuWVs0u38rSXxSZnD4S48f pY1PVil7QEqpZ9K8wdhVhekD/aSEKUEauMwj5TSZ4FcG2vL57I+MPXn3GUsrY62EAGy8 54JbPcENyfxxpqkxsldLDJ3TpkV+nzeWX/VLoXPU5DZLoLwg60m7sbA+XNkQV+nyk939 PXLumh+hmfaSNfJHzD+glnVDcaXazsd17k7ta19bOgoTjhtRBl/HzG9t93xn1nIMybxP IGs2mZl0w4r0jaT1oHuv/7smBXepqLmZE4dSSuSQc82UYtEas8Tilz2jV13CEqTm5DE3 hceg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=Om/e+gAM1Z07jWMpDNkF0/e+wvCmn9kz18p06gEkLmQ=; b=I8KWH1jSwMV2sY7Hr28PM9Dk/En05caJ3ZdEMdmz08tzJHaWOjRPbR8y/XAUlxB4ke IdPitM4D38sUhUO+S2CvxvC8RNiR1nfK2IGwTrpwC9JQz0Hxw/mcvCfAs8I2jnJJDi7W zeAMDVNPa6zDBnXxOmKRyP+vK5Q7DNKXnIhE/xf9LrGAHGAllNJfiPsp9tXzn8l8LY83 ck9JiFaOCxy3OAJl9cqm20v6u2yv8sN35tJDf/WBcUL4YgcR/rVHETApiZHIXLc51Dfy dBBUAnj63jrVlACcohJgT/Svjg+2PtTSTz8t8kpZaWUdR86bQuBFTuKp1Rwk/noZIAj4 NpiQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j20si11948523pgh.224.2019.01.21.00.05.07; Mon, 21 Jan 2019 00:05:22 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729461AbfAUIEC (ORCPT + 99 others); Mon, 21 Jan 2019 03:04:02 -0500 Received: from inva020.nxp.com ([92.121.34.13]:42444 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728853AbfAUID7 (ORCPT ); Mon, 21 Jan 2019 03:03:59 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A00411A03B5; Mon, 21 Jan 2019 04:18:42 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 86D0D1A00C2; Mon, 21 Jan 2019 04:18:37 +0100 (CET) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 0C5E1402FF; Mon, 21 Jan 2019 11:18:30 +0800 (SGT) From: Yinbo Zhu To: Alan Stern Cc: yinbo.zhu@nxp.com, 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 Subject: [PATCH v1 6/6] usb :fsl: Change string format for errata property Date: Mon, 21 Jan 2019 11:13:04 +0800 Message-Id: <20190121031304.31161-6-yinbo.zhu@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20190121031304.31161-1-yinbo.zhu@nxp.com> References: <20190121031304.31161-1-yinbo.zhu@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/ehci-fsl.c | 7 +------ drivers/usb/host/fsl-mph-dr-of.c | 9 ++++----- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 6884130..c71680e 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -310,14 +310,9 @@ static int ehci_fsl_usb_setup(struct ehci_hcd *ehci) return -EINVAL; if (pdata->operating_mode == FSL_USB2_MPH_HOST) { - unsigned int chip, rev, svr; - - svr = mfspr(SPRN_SVR); - chip = svr >> 16; - rev = (svr >> 4) & 0xf; /* Deal with USB Erratum #14 on MPC834x Rev 1.0 & 1.1 chips */ - if ((rev == 1) && (chip >= 0x8050) && (chip <= 0x8055)) + if (pdata->has_fsl_erratum_14 == 1) ehci->has_fsl_port_bug = 1; if (pdata->port_enables & FSL_USB2_PORT0_ENABLED) diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c index 7e07701..ae8f60f 100644 --- a/drivers/usb/host/fsl-mph-dr-of.c +++ b/drivers/usb/host/fsl-mph-dr-of.c @@ -224,11 +224,10 @@ 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"); - - if (of_get_property(np, "fsl,erratum_a006918", NULL)) - pdata->has_fsl_erratum_a006918 = 1; - else - pdata->has_fsl_erratum_a006918 = 0; + pdata->has_fsl_erratum_a006918 = + of_property_read_bool(np, "fsl,usb_erratum-a006918"); + pdata->has_fsl_erratum_14 = + of_property_read_bool(np, "fsl,usb_erratum-14"); /* * Determine whether phy_clk_valid needs to be checked -- 1.7.1