Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3409335imw; Mon, 18 Jul 2022 07:37:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uQEf5rgIzzOz1vRS2EZuq2iA/oilGGkVinmoeq4q0KDG5BccA99Ur2RifAQE6aT7HPyoKz X-Received: by 2002:a05:6214:c25:b0:473:2d88:f5ff with SMTP id a5-20020a0562140c2500b004732d88f5ffmr21542791qvd.101.1658155058698; Mon, 18 Jul 2022 07:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658155058; cv=none; d=google.com; s=arc-20160816; b=nn8db3uyIWzuBiVS1aNoE3XLNSXFBNimrVy/uf7/cU2bu7cOg+6mdmOx9hbHJ+aYjD TnP7oCUK6B/XQrlg+YeqbY/kyJHcQTTLYlziTx8gsiqxFoUbVhZWFUSHhGuUcZ2NO2ms nEgiDcB7Jr7yMpv1wVeKYRbxiVC5fhcypjsasumMYz1ZLBBw63aLRyPdCtFZBtktipmH 1iM6sQFf/Vau4MB7z8bcJP+7ERgzbzIy8XYS/Vo917bSFGBeucGyBpgqxXyNT1A3hDOs Py/xQQyQO6F4gDvypc9GXfat/sbHQuAymSt41IJ82GiFl02QUWxUJEsCHNyh4qFcUYnt ahDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=JusJASKyhtJEg7zal9THjivJesb7TlCQeIr6j+cvyaU=; b=zhruYIo59DFyiSgyyqVzoQRm0+KLa2PTw61t+jYlea/IGfndk9CXQ159qF1JeEWgyU jfyNL4QJI5n7A4TQwVp9cNDo0X+38+SjU+TxJ4X4BHcAlf3dV7xE5K+em1a0R5u2ZDjD PQVHo6EMkp9XlUf/p2X7V5mrYKGtxUvOADVCIV08wjdxsI3jBt71S1cNa6m91a13G3U3 BfKTQWefbXfYsdX/IdwmCxG5cLgi3XKvtMswfqPhucQx0El/5Nphqt68mTrBcLkTglDQ /7mTowvpF70g2GqnZA/5IsbAC2pOmdruTXYeXDi6vwP2OHnMWLhoC6qaoFQAYQebqN4v ZiMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ca15-20020a05622a1f0f00b0031798653d60si6339566qtb.321.2022.07.18.07.37.24; Mon, 18 Jul 2022 07:37:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235266AbiGROaq (ORCPT + 99 others); Mon, 18 Jul 2022 10:30:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235425AbiGROah (ORCPT ); Mon, 18 Jul 2022 10:30:37 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 0BEBF1EAD6 for ; Mon, 18 Jul 2022 07:30:35 -0700 (PDT) Received: (qmail 122695 invoked by uid 1000); 18 Jul 2022 10:30:34 -0400 Date: Mon, 18 Jul 2022 10:30:34 -0400 From: Alan Stern To: Tomer Maimon Cc: avifishman70@gmail.com, tali.perry1@gmail.com, joel@jms.id.au, venture@google.com, yuenn@google.com, benjaminfair@google.com, gregkh@linuxfoundation.org, tony@atomide.com, felipe.balbi@linux.intel.com, jgross@suse.com, lukas.bulwahn@gmail.com, arnd@arndb.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, openbmc@lists.ozlabs.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v1 1/3] usb: host: npcm7xx: remove USB EHCI host reset sequence Message-ID: References: <20220718122922.9396-1-tmaimon77@gmail.com> <20220718122922.9396-2-tmaimon77@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220718122922.9396-2-tmaimon77@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 18, 2022 at 03:29:20PM +0300, Tomer Maimon wrote: > Remove USB EHCI host controller reset sequence from NPCM7XX USB EHCI > host probe function because it is done in the NPCM reset driver. > > Due to it, NPCM7XX EHCI driver configuration is dependent on NPCM reset. > > Signed-off-by: Tomer Maimon > --- Regarding the changes to ehci-npcm7xx.c: Acked-by: Alan Stern But you probably should remove the "#include " line near the start of the source file. Alan Stern > drivers/usb/host/Kconfig | 2 +- > drivers/usb/host/ehci-npcm7xx.c | 47 --------------------------------- > 2 files changed, 1 insertion(+), 48 deletions(-) > > diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig > index 682b3d2da623..e05e2cf806f8 100644 > --- a/drivers/usb/host/Kconfig > +++ b/drivers/usb/host/Kconfig > @@ -206,7 +206,7 @@ config USB_EHCI_FSL > > config USB_EHCI_HCD_NPCM7XX > tristate "Support for Nuvoton NPCM7XX on-chip EHCI USB controller" > - depends on (USB_EHCI_HCD && ARCH_NPCM7XX) || COMPILE_TEST > + depends on (USB_EHCI_HCD && ARCH_NPCM7XX && RESET_NPCM) || COMPILE_TEST > default y if (USB_EHCI_HCD && ARCH_NPCM7XX) > help > Enables support for the on-chip EHCI controller on > diff --git a/drivers/usb/host/ehci-npcm7xx.c b/drivers/usb/host/ehci-npcm7xx.c > index 6b5a7a873e01..955e7c8f3db8 100644 > --- a/drivers/usb/host/ehci-npcm7xx.c > +++ b/drivers/usb/host/ehci-npcm7xx.c > @@ -28,13 +28,6 @@ > #define DRIVER_DESC "EHCI npcm7xx driver" > > static const char hcd_name[] = "npcm7xx-ehci"; > - > -#define USB2PHYCTL_OFFSET 0x144 > - > -#define IPSRST2_OFFSET 0x24 > -#define IPSRST3_OFFSET 0x34 > - > - > static struct hc_driver __read_mostly ehci_npcm7xx_hc_driver; > > static int __maybe_unused ehci_npcm7xx_drv_suspend(struct device *dev) > @@ -60,52 +53,12 @@ static int npcm7xx_ehci_hcd_drv_probe(struct platform_device *pdev) > { > struct usb_hcd *hcd; > struct resource *res; > - struct regmap *gcr_regmap; > - struct regmap *rst_regmap; > const struct hc_driver *driver = &ehci_npcm7xx_hc_driver; > int irq; > int retval; > > dev_dbg(&pdev->dev, "initializing npcm7xx ehci USB Controller\n"); > > - gcr_regmap = syscon_regmap_lookup_by_compatible("nuvoton,npcm750-gcr"); > - if (IS_ERR(gcr_regmap)) { > - dev_err(&pdev->dev, "%s: failed to find nuvoton,npcm750-gcr\n", > - __func__); > - return PTR_ERR(gcr_regmap); > - } > - > - rst_regmap = syscon_regmap_lookup_by_compatible("nuvoton,npcm750-rst"); > - if (IS_ERR(rst_regmap)) { > - dev_err(&pdev->dev, "%s: failed to find nuvoton,npcm750-rst\n", > - __func__); > - return PTR_ERR(rst_regmap); > - } > - > - /********* phy init ******/ > - // reset usb host > - regmap_update_bits(rst_regmap, IPSRST2_OFFSET, > - (0x1 << 26), (0x1 << 26)); > - regmap_update_bits(rst_regmap, IPSRST3_OFFSET, > - (0x1 << 25), (0x1 << 25)); > - regmap_update_bits(gcr_regmap, USB2PHYCTL_OFFSET, > - (0x1 << 28), 0); > - > - udelay(1); > - > - // enable phy > - regmap_update_bits(rst_regmap, IPSRST3_OFFSET, > - (0x1 << 25), 0); > - > - udelay(50); // enable phy > - > - regmap_update_bits(gcr_regmap, USB2PHYCTL_OFFSET, > - (0x1 << 28), (0x1 << 28)); > - > - // enable host > - regmap_update_bits(rst_regmap, IPSRST2_OFFSET, > - (0x1 << 26), 0); > - > if (usb_disabled()) > return -ENODEV; > > -- > 2.33.0 >