Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1890544rbb; Tue, 27 Feb 2024 04:44:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUOW0hYxDBZGWa7dz9PfaXEKDlhWs2RGde9qlRrIVnDT18cZq4YJcZ2wKaexwsa3OFowt7pAaZJyGN4EU2zXO+dG+6LXR5jzPgOFR0h7w== X-Google-Smtp-Source: AGHT+IGcOhGMqdLuaByefA71yzxFR67qLygorGebd+crZu7Q/xDdLAnq5+rQsQLbup55yv8If1Ls X-Received: by 2002:a17:902:ec8b:b0:1db:2ad9:9393 with SMTP id x11-20020a170902ec8b00b001db2ad99393mr13029295plg.48.1709037857601; Tue, 27 Feb 2024 04:44:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709037857; cv=pass; d=google.com; s=arc-20160816; b=gdZnQcNQPWxZGTnUzLZYjNV/vwBeDM2kNTCAjfXCVw6hEejYbHXcDdgQDRZOmLn5rQ GwowRnfmBpC3RrY3iuehNbEGdVuf8aq7YfPZNvRjZkdrxeZ+svOaxexPB0eBSIP/YNoV KyuWZcSxmQfo3d7gQ2rQr1a83sXPD9R1/akfrdgq5saeVYHO89JSQggwX3Bbm47okN3H GtQf92TbvfOwnwmsy/dyE8uttk42i0Dq6hFgaH0cn0gDQCQyYq8+uTgP3tKYMJlQQ+5l Xt9QExAk/OnMFaWpLUSfRUPvYTaQYLB+wBE/FDi8P/OLr6N6lzk8sqx/los71w0p1Bdx dBng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Fox2FOTrnn7H7ARtUpilsDQjBFro1sbb1UtQfPOSFHk=; fh=yc4UR9rkIG1FCovz4/K1g6qXKCe1PD3WN6aRpAMtx3o=; b=vo7h+qQK//1s32vNsSUDxvtvqYQbg74ffqYDWALp7V28lq7qBVOKqi5fBV802x7Fws 31+CIiJG0A3NcGy2ppqe3XXcjtTLyJiRV/sH124ysUCyNMbxYN1jX7xBSgOKkGx4bSa4 aGl8pGNyl9r3rdHnBZUrkQxZnZPTMvnggXyo8Lh8Q33sLvOHf1G+yJ/nU5FAi7yod6Gi LNnA58+kBvOvKhEFqLvH+NWCCS/D/ET+P2JLCkumLdwONe9mhx5wzH4YJVGtyOLFf8ms /c/IVhdl1eTI2aaR+tRJJrNfKuc/T9eWzv5TxGk5icBFaEBV1FThCG6mKorZ8ha/fp7c cJqQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GewXukva; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-83215-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83215-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id c17-20020a170902d49100b001d93b25f1c5si1338443plg.474.2024.02.27.04.44.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 04:44:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83215-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GewXukva; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-83215-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83215-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 24843B2194E for ; Tue, 27 Feb 2024 12:24:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C62DA13A24E; Tue, 27 Feb 2024 12:21:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GewXukva" Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBB7213F006 for ; Tue, 27 Feb 2024 12:21:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709036517; cv=none; b=JqJdfXbbSKYBbHJz9irfOkbQV34oIGkd6qg6z+8BqPCGVkr8j8QMI3yEow0/0g4mZSikXi0kRKbCPkMsQE8WZAfh+mipsyc555EapIqBpXJ8KRQHmZnV04FpHPWoWZRa4M9to+mF8RtOK9R1umkRM4wBg/oNmjVhTcAdUL7jeq8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709036517; c=relaxed/simple; bh=OS7E+/QQezCuwcjLO9iExKTfqPQ2LbBPhoHoghWs9UE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FfyXT0ts7rISe59D+W2MQKgimRHBrLGEwQX6YjHTk9aJxrNs+2dDD9i9cOeJZJKjvlVFCGOBNBQ2dGu5barPlgyIuqE3vNRICcVaD6io7QoQMJP0YT/IB0nw3RMJ8cCTkCF6i8+eHh5rILb8c8or93F1YrXo4vnFzyITOuhtNw8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=GewXukva; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1dcad814986so13795195ad.0 for ; Tue, 27 Feb 2024 04:21:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709036515; x=1709641315; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=Fox2FOTrnn7H7ARtUpilsDQjBFro1sbb1UtQfPOSFHk=; b=GewXukvadPyjq8mmPdVrgdexPxxyZVm5taQLw4UE8uzO1qUZywn25e1hJOamHZRCwn yY+fYRQ8cx2oj0K3Cn0m0LlooL1bgs+2XFfZJwLd2QmFcpgqANpbYHXxKYXJRTtr/IY5 54ykV2o0Lwwn2FjqEAhg5xUQj9vmNHZ24yruwhr6w7w6Nw/fz8WwRIg/HvWqz6JmzNTK NGvIyAFIELJm2LZ539C/VM+BNa1k9PKPHXKVhOxVPtyXRJBTFys9lI3XaxtMM3MXeo/N as6NuVHKMzRAOzFJ9NXZBZFLeLvQptX86wJ0CeHmULxbgBk9ACo8WuXLMj05/Bnsad29 hBMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709036515; x=1709641315; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Fox2FOTrnn7H7ARtUpilsDQjBFro1sbb1UtQfPOSFHk=; b=q2mmM6069SIbN48E4i6wmpMJ3lRQWXC1s8cRCzg4cM3vCmClxdp9A0QV9BfevS2zk9 VPGgp4acWrS2HDW83ySofkOwtJlJ2URcSB83yVsJu9w/3gkLDFlKHu17HSl7VcvLRHuU 2Rety1HhqikBOkAxHM66zUZruPwrF/U9T/UTrj5ph1l+ZJRWN2tphqV1Mxr7oRJfE8Mh eKxR6mykEGvdTgYHcc8Y7GCjIiWghI2cH5mh77mg6SJ4DAAixdo5IXUPy1pXvhGIhSTT o5F25BVGKNOemEU4SHjzI5fBnFrSQpCsEoVgVf/HfTtpvDC50vDwvHoUZusyZcO1E1Rw xWgw== X-Forwarded-Encrypted: i=1; AJvYcCUa/NC7m636+ySRGkC31iXiarZ9u/Ni0m1SH4zv4yxbSpjxwriqJE4SrVA5f3n5f7Q0uPleD5CqWB0vbqEQ4qO/xMWMJP8bJhlrPR41 X-Gm-Message-State: AOJu0YzWbaKBzw8OoyOITsSjro1LcISODuEfl8OmCLc0J677uHNzJxRF zqN8CBNu3NB4UKpx86Eb71m9ex0cIwV7LalfeUBdhGiCMvdC2WcHXovIxzidew== X-Received: by 2002:a17:903:181:b0:1dc:b173:f27b with SMTP id z1-20020a170903018100b001dcb173f27bmr4528891plg.32.1709036515334; Tue, 27 Feb 2024 04:21:55 -0800 (PST) Received: from thinkpad ([117.213.97.177]) by smtp.gmail.com with ESMTPSA id h8-20020a170902b94800b001dba356b96esm1406270pls.306.2024.02.27.04.21.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 04:21:54 -0800 (PST) Date: Tue, 27 Feb 2024 17:51:41 +0530 From: Manivannan Sadhasivam To: Frank Li Cc: Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Marek Vasut , Yoshihiro Shimoda , Thierry Reding , Jonathan Hunter , Kishon Vijay Abraham I , Vidya Sagar , Vignesh Raghavendra , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Minghuan Lian , Mingkai Hu , Roy Zang , Kunihiko Hayashi , Masami Hiramatsu , Kishon Vijay Abraham I , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Niklas Cassel Subject: Re: [PATCH v8 06/10] PCI: dwc: ep: Call dw_pcie_ep_init_registers() API directly from all glue drivers Message-ID: <20240227122141.GN2587@thinkpad> References: <20240224-pci-dbi-rework-v8-0-64c7fd0cfe64@linaro.org> <20240224-pci-dbi-rework-v8-6-64c7fd0cfe64@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Feb 26, 2024 at 12:04:33PM -0500, Frank Li wrote: > On Sat, Feb 24, 2024 at 12:24:12PM +0530, Manivannan Sadhasivam wrote: > > Currently, dw_pcie_ep_init_registers() API is directly called by the glue > > drivers requiring active refclk from host. But for the other drivers, it is > > getting called implicitly by dw_pcie_ep_init(). This is due to the fact > > that this API initializes DWC EP specific registers and that requires an > > active refclk (either from host or generated locally by endpoint itsef). > > > > But, this causes a discrepancy among the glue drivers. So to avoid this > > confusion, let's call this API directly from all glue drivers irrespective > > of refclk dependency. Only difference here is that the drivers requiring > > refclk from host will call this API only after the refclk is received and > > other drivers without refclk dependency will call this API right after > > dw_pcie_ep_init(). > > > > This change will also allow us to remove the "core_init_notifier" flag in > > the later commits. > > > > Signed-off-by: Manivannan Sadhasivam > > --- > > drivers/pci/controller/dwc/pci-dra7xx.c | 7 +++++++ > > drivers/pci/controller/dwc/pci-imx6.c | 8 ++++++++ > > drivers/pci/controller/dwc/pci-keystone.c | 9 +++++++++ > > drivers/pci/controller/dwc/pci-layerscape-ep.c | 7 +++++++ > > drivers/pci/controller/dwc/pcie-designware-ep.c | 22 ---------------------- > > drivers/pci/controller/dwc/pcie-designware-plat.c | 9 +++++++++ > > drivers/pci/controller/dwc/pcie-rcar-gen4.c | 12 +++++++++++- > > drivers/pci/controller/dwc/pcie-uniphier-ep.c | 13 ++++++++++++- > > 8 files changed, 63 insertions(+), 24 deletions(-) [...] > > diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c > > index ed1f2afd830a..278bdc9b2269 100644 > > --- a/drivers/pci/controller/dwc/pcie-designware-ep.c > > +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c > > @@ -729,7 +729,6 @@ int dw_pcie_ep_init(struct dw_pcie_ep *ep) > > struct device *dev = pci->dev; > > struct platform_device *pdev = to_platform_device(dev); > > struct device_node *np = dev->of_node; > > - const struct pci_epc_features *epc_features; > > > > INIT_LIST_HEAD(&ep->func_list); > > > > @@ -775,29 +774,8 @@ int dw_pcie_ep_init(struct dw_pcie_ep *ep) > > goto err_exit_epc_mem; > > } > > > > - if (ep->ops->get_features) { > > - epc_features = ep->ops->get_features(ep); > > - if (epc_features->core_init_notifier) > > - return 0; > > - } > > why remove this check? > There is no point in keeping this check since we are removing the call to dw_pcie_ep_init_registers() below. But I should've described this change in the commit message. - Mani -- மணிவண்ணன் சதாசிவம்