From patchwork Tue Feb 23 17:44:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 12100645 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03D52C433DB for ; Tue, 23 Feb 2021 17:46:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BD0A064E83 for ; Tue, 23 Feb 2021 17:46:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD0A064E83 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Zwlv7qvaXbYSiXZ1YcpJM3BhwCWUkKZ85jEx2iHrViA=; b=M51raCju0XhxvUF9I8JSyONjg 59pgV/DxvGciVxqSVMIGCGbOQ5iH0rUJzkf4oZO7P9lvVYsA/UejpFShWeeowmYNfeVhJyfkjvi4K /wEiI1Z99K3aqF4uWyqm7d64CyfqHtjDGyr4O902MEz7JBVOCqSeQtbvNQwJRsCjmfhsxgQeB/vYO CFrHEdOg3pHxl6IALwhMsadA5SVCn7AplqUqccP+ZX29mQZYWbp7c2P9VzU0ZGPuDmSfHUfAyBv27 fJWN0vE78g3Oi+othlQJHjTxic51OwZWqYWUeJX483VF/qJ8mC09x6VmZ6du8pL4EzztaFWrjI6+w NSvOYRXcw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEbkB-0001yN-4J; Tue, 23 Feb 2021 17:45:07 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEbk4-0001vO-Vi for linux-arm-kernel@lists.infradead.org; Tue, 23 Feb 2021 17:45:02 +0000 Received: by mail-wm1-x32b.google.com with SMTP id f137so3248259wmf.3 for ; Tue, 23 Feb 2021 09:45:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Y1ebTmxylMMNhfzmMvoYVmlP+/kjTLY+kX8ILsVeGAE=; b=eLPiNIlZhCgXEwZBB2NYuErw41gBNhTCzs9hJKxI9E0LyUrUF1Posv1DOLZNtaUQpz LRt9OR7oy9WGSdpOqX8Bf3KTNo2sJLclB64jNUYtsQXQ5v4jjOEVTvtr45Evz1EIIB25 BJrXf/veBVLTIMR8aNnwLhMYbBV522reDL3F4tHRHSy8+N6jWisHdpUR6dPydPiYC3Ng zGruznq6TiUEfGpteig+uvjEcAgKb22tF7kFiXlJPG0PKDH81Tz6nx79SrPYoUIOS9w3 OM6thfHJEkOEyk4Z5YiK0Y41UsgtJPv8SkrNdBp+388KpxD/9jqe4x7WXQNP8aqvsNzj iyjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Y1ebTmxylMMNhfzmMvoYVmlP+/kjTLY+kX8ILsVeGAE=; b=CZz+wxcTcupioD+sHMCfW6OVOUN3j9RcoBK8Y80NgsSY5eWI4Vtr3Qq8GRE41Qlvo7 XutcU/KhjuPgsa8FOP5cCCz5p3vnbPgOf9wNG2QqS5J9Fc96E07FJ62GtJgxbBlo7H1D 0qUna0bD9KpE7T68Inn01zXysmOkwsZpkmwYgzy2kOdjTZJbmyx8eJb24Un0ju4mC55T 3ccyNT2ROJ3ZuE8AV4OVk+hEePnH/oxOljyPQzSAXuZL8BC7t/cueot4pnFbsGAnjxp9 lhH47tiyfpE24eBrGsiAzZva3Fz27a33X40Av3DhK6rISga7copUSknUbE7c7FgSXRwp pbeQ== X-Gm-Message-State: AOAM5311D0C9NsXmMs/UjpTKCXSHmMDpHHhonTnzUUEUaz18WNgYslGX jlBk5Nj5Yek9V7kkII0JllYUkZ6Sngg/BlPi X-Google-Smtp-Source: ABdhPJwZTjU+7SUuMXu7kZwaMwVbjaiEa9h+praKw+z60VcKxG/R2nXI6WghzXSLZnLJkyPmBMm7jA== X-Received: by 2002:a7b:c18b:: with SMTP id y11mr18954565wmi.132.1614102299471; Tue, 23 Feb 2021 09:44:59 -0800 (PST) Received: from skynet.lan (170.red-88-1-105.dynamicip.rima-tde.net. [88.1.105.170]) by smtp.gmail.com with ESMTPSA id u7sm32408428wrt.67.2021.02.23.09.44.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 09:44:59 -0800 (PST) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: f.fainelli@gmail.com, jonas.gorski@gmail.com, Greg Kroah-Hartman , Rob Herring , Alan Stern , Tony Prisk , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 1/3] usb: ehci: add spurious flag to disable overcurrent checking Date: Tue, 23 Feb 2021 18:44:53 +0100 Message-Id: <20210223174455.1378-2-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210223174455.1378-1-noltari@gmail.com> References: <20210223155005.21712-1-noltari@gmail.com> <20210223174455.1378-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210223_124501_112932_50ABE543 X-CRM114-Status: GOOD ( 18.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= , Florian Fainelli Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Florian Fainelli This patch adds an ignore_oc flag which can be set by EHCI controller not supporting or wanting to disable overcurrent checking. The EHCI platform data in include/linux/usb/ehci_pdriver.h is also augmented to take advantage of this new flag. Signed-off-by: Florian Fainelli Signed-off-by: Álvaro Fernández Rojas --- drivers/usb/host/ehci-hcd.c | 2 +- drivers/usb/host/ehci-hub.c | 4 ++-- drivers/usb/host/ehci-platform.c | 2 ++ drivers/usb/host/ehci.h | 1 + include/linux/usb/ehci_pdriver.h | 1 + 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 1926b328b6aa..2237d22d292a 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -651,7 +651,7 @@ static int ehci_run (struct usb_hcd *hcd) "USB %x.%x started, EHCI %x.%02x%s\n", ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f), temp >> 8, temp & 0xff, - ignore_oc ? ", overcurrent ignored" : ""); + (ignore_oc || ehci->spurious_oc) ? ", overcurrent ignored" : ""); ehci_writel(ehci, INTR_MASK, &ehci->regs->intr_enable); /* Turn On Interrupts */ diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 9f9ab5ccea88..159cc27b1a36 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -643,7 +643,7 @@ ehci_hub_status_data (struct usb_hcd *hcd, char *buf) * always set, seem to clear PORT_OCC and PORT_CSC when writing to * PORT_POWER; that's surprising, but maybe within-spec. */ - if (!ignore_oc) + if (!ignore_oc && !ehci->spurious_oc) mask = PORT_CSC | PORT_PEC | PORT_OCC; else mask = PORT_CSC | PORT_PEC; @@ -1013,7 +1013,7 @@ int ehci_hub_control( if (temp & PORT_PEC) status |= USB_PORT_STAT_C_ENABLE << 16; - if ((temp & PORT_OCC) && !ignore_oc){ + if ((temp & PORT_OCC) && (!ignore_oc && !ehci->spurious_oc)){ status |= USB_PORT_STAT_C_OVERCURRENT << 16; /* diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index a48dd3fac153..4d7b17f4f82b 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c @@ -327,6 +327,8 @@ static int ehci_platform_probe(struct platform_device *dev) hcd->has_tt = 1; if (pdata->reset_on_resume) priv->reset_on_resume = true; + if (pdata->spurious_oc) + ehci->spurious_oc = 1; #ifndef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO if (ehci->big_endian_mmio) { diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index eabf22a78eae..80bb823aa9fe 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -218,6 +218,7 @@ struct ehci_hcd { /* one per controller */ unsigned frame_index_bug:1; /* MosChip (AKA NetMos) */ unsigned need_oc_pp_cycle:1; /* MPC834X port power */ unsigned imx28_write_fix:1; /* For Freescale i.MX28 */ + unsigned spurious_oc:1; /* required for usb32 quirk */ #define OHCI_CTRL_HCFS (3 << 6) diff --git a/include/linux/usb/ehci_pdriver.h b/include/linux/usb/ehci_pdriver.h index dd742afdc03f..89fc901e778f 100644 --- a/include/linux/usb/ehci_pdriver.h +++ b/include/linux/usb/ehci_pdriver.h @@ -50,6 +50,7 @@ struct usb_ehci_pdata { unsigned no_io_watchdog:1; unsigned reset_on_resume:1; unsigned dma_mask_64:1; + unsigned spurious_oc:1; /* Turn on all power and clocks */ int (*power_on)(struct platform_device *pdev); From patchwork Tue Feb 23 17:44:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 12100641 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42452C433DB for ; Tue, 23 Feb 2021 17:46:16 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0952E64E83 for ; Tue, 23 Feb 2021 17:46:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0952E64E83 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ICyWwwf1U5bITI9N+JwuNMNAnvpdHYMtiStqetsaneQ=; b=IDS3ULR2NKtCVdGMtNn2+faeh g0y07DhSmUHyYaue/6b9JhwcAQthfpjIK8HRBUMa03QoLiFVKM3vr6xrvjWRvU2h1PKdUICxK2A/B kyfx5EMoLzPFf3Q+9SbYbFe5bn6Aky8UfX0DlkbqW2t9gg0ZdNtgiNm44MlsSAviN/tAADcS1dxXZ 6ZiuCrkyPnGSgY2p5e47kcX3pf6Hbsl9R3yjHB1sf5gV1RnM+ZEVWEtSuzb8DriRVXq6OIGpXoG20 NU3YhPMfyHo5cWE2sb4pIfeTir1QgkVeoZFpvOVQB0/KMVgMo0HPrnCJtM22fzR2g06F9c3eg496h S0VjmqhkA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEbkC-0001yk-Ry; Tue, 23 Feb 2021 17:45:08 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEbk5-0001vn-Ph for linux-arm-kernel@lists.infradead.org; Tue, 23 Feb 2021 17:45:03 +0000 Received: by mail-wm1-x335.google.com with SMTP id m1so3260309wml.2 for ; Tue, 23 Feb 2021 09:45:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IPaM4EX6V47/9lZ1DVmPyYKV5xLEHFqT5NGooxhgdBI=; b=Ck5uCe8ERGA3i2QCmNtEOJkOmUI4YtcOO1UjGTDk3XG4XYOB2scOlknlkx5m1S3pVI fxT/yEXoKO/MShBCl1bOw7LWXLxCZRr2QpwMg6ppsy74pOiWyFZDsscokCdQYM3aKjhQ bqE8gZ3aODPefOObLf02p+d2+FY2myDETHM3siEvlBP3ZU1kyaWCsjJWuizNHfdY0j71 k2GapB5rtkXrdv5OJkXNe7yjGgVQHrzu1TXGRqtc2kgmm/nNEE53s3xaEEraYNmW+Q/v c6AmGZyAqVkqTZHrpVXa43Z/gBzkfQLbobiLB6H/vkXY0Y6L2KZ9XaYaViAfS8xYTluV WWmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IPaM4EX6V47/9lZ1DVmPyYKV5xLEHFqT5NGooxhgdBI=; b=QqnEmfuX6lDRUTjpZAU7+YQvb9GM9nHKdOs7YWM5L0d5x98ftIGhDZAOpH3DmPZpvs Byh2HUZlsH9nGmwGHJZxQhn6w4soI90qWGGmZxUkTkIF9QJyqrqQdrRsh79Of6Ig4E5Z mwD11HQUc5JvOk/qJ4xTCeg/0hEsrehlZHNAVwj8V3PfQa148ljU07NQCVod0ra1q+/m IcrsCPQjTURy9csCd6v8a8LnYZrXc6yylumLRLDwVDISczkLs8a6QPI+aS6C2KGpU3uP sShwklbFeDhuKL8+RBqBrNMMrrRdrzSGvNxTXOGBK8+5R8w6orCJKRDoZJgisDR5n9uH EDIg== X-Gm-Message-State: AOAM531FqAwwAL7QOCfwewQJV1FKAWsSL3uiY29aJVJ05dCwSbOutJ6h EoG4l4fIqxeHoTkUSnGRQmU= X-Google-Smtp-Source: ABdhPJxQooaU+YomFGG2yb8vJWqmTMPGkVlCCIvt0VFUfBkO+2/hsbNm0MKWYrRs4EiUN/O7iEwToA== X-Received: by 2002:a05:600c:35c4:: with SMTP id r4mr25425356wmq.138.1614102300688; Tue, 23 Feb 2021 09:45:00 -0800 (PST) Received: from skynet.lan (170.red-88-1-105.dynamicip.rima-tde.net. [88.1.105.170]) by smtp.gmail.com with ESMTPSA id u7sm32408428wrt.67.2021.02.23.09.44.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 09:45:00 -0800 (PST) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: f.fainelli@gmail.com, jonas.gorski@gmail.com, Greg Kroah-Hartman , Rob Herring , Alan Stern , Tony Prisk , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 2/3] dt-bindings: usb: generic-ehci: document spurious-oc flag Date: Tue, 23 Feb 2021 18:44:54 +0100 Message-Id: <20210223174455.1378-3-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210223174455.1378-1-noltari@gmail.com> References: <20210223155005.21712-1-noltari@gmail.com> <20210223174455.1378-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210223_124502_258094_334A5BED X-CRM114-Status: GOOD ( 12.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Over-current reporting isn't supported on some platforms such as bcm63xx. These devices will incorrectly report over-current if this flag isn't properly activated. Signed-off-by: Álvaro Fernández Rojas Acked-by: Alan Stern Acked-by: Rob Herring --- v3: no changes. v2: change flag name and improve documentation as suggested by Alan Stern. Documentation/devicetree/bindings/usb/generic-ehci.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml index cf83f2d9afac..8089dc956ba3 100644 --- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml +++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml @@ -122,6 +122,12 @@ properties: description: Set this flag to force EHCI reset after resume. + spurious-oc: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set this flag to indicate that the hardware sometimes turns on + the OC bit when an over-current isn't actually present. + companion: $ref: /schemas/types.yaml#/definitions/phandle description: From patchwork Tue Feb 23 17:44:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 12100643 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E999C433E6 for ; Tue, 23 Feb 2021 17:46:17 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 569FB6146D for ; Tue, 23 Feb 2021 17:46:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 569FB6146D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PplFsWjLKoQiJREWJ3bCdQbQYjMZwdsZ7ghNARWQzp8=; b=b6OB9iTlj4oBkevd12HzLCKRh MDK3CHyHFeq/pqLpJXnklaEHvoEsqlBs5Myoix2lvwblPs+vMbuQOYOguGICsHYa8MRv4En+W4iQ4 idSzwxy/EVQfrdo8E0ppwXsDEn1OSTpHIry2rGrAmgarnHlHLsr7/YxlQVUFKBMOsfkA+xpthTOmJ C2OAX721fcwzO/6G7S5gBrhvmANmfcbUF5mnFCI74jpolcqBv8u+cpTprTxXOHVWsj4vJvAMHODlt ecpV9iL39PgH5aC9L3sphssgK0oICBArpKH+76Tx8y+JrDmqDkXvsczAIihpotC3nMxHYTjZUojIf tKReoVFCA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEbkG-0001zH-6i; Tue, 23 Feb 2021 17:45:12 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEbk7-0001wb-3j for linux-arm-kernel@lists.infradead.org; Tue, 23 Feb 2021 17:45:04 +0000 Received: by mail-wm1-x32b.google.com with SMTP id v62so3247361wmg.4 for ; Tue, 23 Feb 2021 09:45:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YCOFQSDEe/3sfY1ZtH3CdhiCYHMFhIU+OK5qjpWOXbw=; b=Iay8qIdKim0AaBvFytQmd2LztS7tKQoPDdMD2n9uQvjsYM2Se/agQnN/BA9j+p39AM TeI4ZcoRBcRYQsMbXUiywTJwmPKB1jm8v6OktshpBpSHwlFOV+TRU6MekAH2puAHhV3/ MG8sET4lkGQFXC6O8V49XMgz0NXAkhLIFnHAzNdlp0KNAOEAlrUp+IoLXHQlVnSmK6cJ qCqm/7kaoIVVqxp6EzYXVlSN6FDz+4rCT30Q65yD8xhoh1eguIL4cA2UjHMDbtC6K8n/ K4rn3UL9h/aT6PXTEgjJu1nCGX6nyzl1mGMjxz8nfKjqS0F9NPx2xAKVFA/H/C2urt0a CpCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YCOFQSDEe/3sfY1ZtH3CdhiCYHMFhIU+OK5qjpWOXbw=; b=aj5tLhvWDlUv0iY22DqhBkX4A1FOc96L0/yn0GGhQn+SUbngq+/9Fd+b6cQngvrHPm himnoKofhdl1Xlwe5EjsF4DjHGRVhTdvYfuGLPAAYgra8geaZE1d1maJGh9tS6yd+iwE LyU2iT8N111U9PnIeTy66JtGhsiuvlsYa18l878Adpbq6D+C2CyqndETsYSUrA2uBew7 GqWFO4/fBSjuq1b4Qy9zUTMACrRa0aMBib2I83qJZ42XKUs65KrlSZr6qasxi0lhlhgI j6/4kLChSH46QvtkN1uIbVvfcdGCdY6bBPUHB1vMfq16+BF3fhU/nQ0f8ieX8z1xHuwv S1Lw== X-Gm-Message-State: AOAM532HYQa7/99NrfC7LuhpVUOpkDqdGV5Owp11Mer6sDQbiDnaEbKt 1KIQnTa0tCoZ0krubVAyC3s= X-Google-Smtp-Source: ABdhPJzwLEfBk1TtTHISe2r3iq6YoGW0Nct69tWU2II6kIvPJhlAmm8KgAmFL+Yt+cpws7PCCqYCDw== X-Received: by 2002:a1c:f312:: with SMTP id q18mr26018356wmq.79.1614102302274; Tue, 23 Feb 2021 09:45:02 -0800 (PST) Received: from skynet.lan (170.red-88-1-105.dynamicip.rima-tde.net. [88.1.105.170]) by smtp.gmail.com with ESMTPSA id u7sm32408428wrt.67.2021.02.23.09.45.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 09:45:01 -0800 (PST) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: f.fainelli@gmail.com, jonas.gorski@gmail.com, Greg Kroah-Hartman , Rob Herring , Alan Stern , Tony Prisk , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 3/3] usb: host: ehci-platform: add spurious_oc DT support Date: Tue, 23 Feb 2021 18:44:55 +0100 Message-Id: <20210223174455.1378-4-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210223174455.1378-1-noltari@gmail.com> References: <20210223155005.21712-1-noltari@gmail.com> <20210223174455.1378-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210223_124503_256827_9676A21A X-CRM114-Status: GOOD ( 13.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Over-current reporting isn't supported on some platforms such as bcm63xx. These devices will incorrectly report over-current if this flag isn't properly activated. Signed-off-by: Álvaro Fernández Rojas --- v3: no changes. drivers/usb/host/ehci-platform.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index 4d7b17f4f82b..c70f2d0b4aaf 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c @@ -286,6 +286,9 @@ static int ehci_platform_probe(struct platform_device *dev) if (of_property_read_bool(dev->dev.of_node, "big-endian")) ehci->big_endian_mmio = ehci->big_endian_desc = 1; + if (of_property_read_bool(dev->dev.of_node, "spurious-oc")) + ehci->spurious_oc = 1; + if (of_property_read_bool(dev->dev.of_node, "needs-reset-on-resume")) priv->reset_on_resume = true;