Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1658474lqg; Sun, 3 Mar 2024 22:26:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUAxsCwBXb0SnYOJUCyfP8BszHjbszhT6T2PAkf+7jY26I/iqHMRZ2LERjYCWZYfPP3uvjRvbIVOr0u+R2wgdCjqOdrapaFomeVFIj6Qg== X-Google-Smtp-Source: AGHT+IFVH1p9h18bz6wXvec2eydKaWMMuwy6XSUKSWfvq1JBZ7LcRZ9DYaewIT0Lmn9+g9Xuzaue X-Received: by 2002:a05:6a00:c82:b0:6e5:2633:5d78 with SMTP id a2-20020a056a000c8200b006e526335d78mr10944716pfv.4.1709533616439; Sun, 03 Mar 2024 22:26:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709533616; cv=pass; d=google.com; s=arc-20160816; b=Y/gUCx72xgV6PJ5nAAHiFMbS9DojFbqty5FKP8/hPM6IDCUInAmrLrSu8WzQULxSGC DpNFw/s/2Q6FLeUrYPoNGDcoFGzmgcEh2dqLr+25mg5XURwArEJP4AtisvBcZuxieF3r t00mPK2wnUtC60+0xisQoDcvuufTPjx/T4C/85qE9PXLLCIAb+ZLIEuX9MFtxawlhT3H quGTzwbYW41VcRDpidVIxL6VkPCXJQPLQAOAPpuKEOa/JZcGjytMFQFvT3ypJKL0yG45 VeregvtjW0l78Gn0BSbQvNM+MMeLT52E6xORqTNfvR6Hj0JHvFCuz2s5THnqgWuMgoxw plMA== 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=f6SxR2LLsQ+g6a8hA+U1gdEFbl1WMiIH+9Qs8EKoBKQ=; fh=MZ5h9KTBGvNXRVLCTafyI82Kn4Q/syl89u8RgnaAQGY=; b=h/fbR0Zlq34nFnwyrVKeS8WL4AorC+xNRY+PRG8mn1UTKJMzhkTAFmb1kH+9PzjoLi cyzQxHCICzi4Zvto3Enuw0NDNE/NomyKTAT/YNA+DiUmSiRKJ4ZsQz5XGK72kti8gWEU PgJduaEWw4pEJ9CvQpBJDl20BJSmyWr+inB4BN1fXNgmAjsn7Zr63UaIFB1IKgIrho6t oX/7Lsa5/yoHHmEq1Fn5/5FlRJyuvx7UaCBOcB43xH9Camg9agWwMal1Fg6chHxbpYWI BYnAU3jxCEzWmhIqgUI+gsF+WLGeiuK8bA4zUs0NieE5wL9EMRDukM3kegDOVnJxTieZ D/XQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lQXfRR3v; 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-90086-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90086-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k74-20020a62844d000000b006e5602e0dafsi7686762pfd.304.2024.03.03.22.26.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 22:26:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90086-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lQXfRR3v; 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-90086-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90086-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id AAD0F281609 for ; Mon, 4 Mar 2024 06:26:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73BA1D52A; Mon, 4 Mar 2024 06:26:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="lQXfRR3v" Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) (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 92A16CA73 for ; Mon, 4 Mar 2024 06:26:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709533604; cv=none; b=PotMxlZ8+x+lvieb1E0opTxCswrCVrlTOO0eTMsQEohRx+nZ02EuR74l0kNHxbos29qgGdEJ+tdSrZkzgSBp/4F+hE5Y8VfsSyMtTENsiQz3ltSUEDtSt5+vhigVPEdgJjNEN1wplv2qgDlktlyhAVtVPuHm1iW0ms8s8/d+L5o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709533604; c=relaxed/simple; bh=xyQs9VtsBlLZ4Ylk//6q1rePA4Ild7tMp8ripotGz9g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JFsOab1UqrPcAhIDnzdfWUjcRxnkHRrmoZmm3Sm01LfGRWNQoTkSbcNqc3umQNFD198vDK9qMbekZgRxXpHUM96duxzvAiwg/U0TQFamdVJO5eF0A7TUZ/b9SdbushJvIi4TF4YEfTqUj0+kvF8ecSHu4oJ5OHQe50eiGveg25I= 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=lQXfRR3v; arc=none smtp.client-ip=209.85.219.51 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-qv1-f51.google.com with SMTP id 6a1803df08f44-68ee2c0a237so31297956d6.1 for ; Sun, 03 Mar 2024 22:26:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709533601; x=1710138401; 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=f6SxR2LLsQ+g6a8hA+U1gdEFbl1WMiIH+9Qs8EKoBKQ=; b=lQXfRR3vwoCfhYH01W4GqhxsLu0h0/CC8JMTV7I0oR1PlbNngSfr/jbr7YiHy0MGhY P7fkBBwFxpgs5pm8PvL1WmnzSr2vEDpWmqZozS9LwoQYiB5DMcNmClldKb3KFzGIEYzX MZtFQ08YCyjift+H4yOZnP55S94WUJxgKcbTwgNlbmEZN7cEsOsAMcR3zWSRUhTp+6/+ kAE4wWQL6Bdtm8SZ8KgnQXEhtcvT9D2nIcwRNGnx+OUZQh9YnbJoagR59jaDw/NINolG VGySz5htpOQp1U0ApMSQE4iKhi124Lt1iH2mj3M372fcY/mxv6mCoxLYlQ10lmbjRvy3 85Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709533601; x=1710138401; 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=f6SxR2LLsQ+g6a8hA+U1gdEFbl1WMiIH+9Qs8EKoBKQ=; b=LRf+yhXIzELekMSNFMX3OHXx2POzg3rZQtbN+LNaAcbETlJz21b71tujHmrRoHUnEg DQy8hW9Ct1e+QJSySfrl1AEReLardy63ofT0HJIxiwHdTd9mb81dl+GyoR3lwApXr/Jn q7Xycdzj6OSAhvrBeRtKTnOZLA/DUiTAnCxuSTcjn3wT/EhRKY1X0rwTP097EKg8mL4h O96mhBwV7Pa2Uc0sdogtIHoMADKDdIjpkrrMWMjq9ISYL3LnewxEeZNFami2ahB2WqHi cB299nU4FCjErFEIknF5Fr2CqZ89RU5yfl5RLYJ6zetr7yZ9AZ4QQ6v6qoGGxWqAtjXO kHOg== X-Forwarded-Encrypted: i=1; AJvYcCXp6iI59Tg8ft/w66x9ILM83RIBFcW/LDh953EMLke2yxw4B34++JFMaqgTKMAso32vrxQOZRt0w7cd7bYcDlbF1oDZoP3C0JL1Oej/ X-Gm-Message-State: AOJu0Yx3FvG1SSmBG+OQKDiTj9PBo+aBbddNvLFh6Pfv+z9Tju+/ULbq NActnHB8o471ROPeJkjAas4Qp6VQ+6GjROXIUgioO+tY7zswGLYsHripHuHG0w== X-Received: by 2002:a05:6214:9aa:b0:690:6e8d:5f8f with SMTP id du10-20020a05621409aa00b006906e8d5f8fmr4779413qvb.7.1709533601528; Sun, 03 Mar 2024 22:26:41 -0800 (PST) Received: from thinkpad ([117.207.30.163]) by smtp.gmail.com with ESMTPSA id mm9-20020a0562145e8900b00690732feaadsm939670qvb.125.2024.03.03.22.26.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 22:26:41 -0800 (PST) Date: Mon, 4 Mar 2024 11:56:25 +0530 From: Manivannan Sadhasivam To: Niklas Cassel 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 Subject: Re: [PATCH v8 07/10] PCI: dwc: ep: Remove "core_init_notifier" flag Message-ID: <20240304062625.GG2647@thinkpad> References: <20240224-pci-dbi-rework-v8-0-64c7fd0cfe64@linaro.org> <20240224-pci-dbi-rework-v8-7-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 Thu, Feb 29, 2024 at 12:23:16PM +0100, Niklas Cassel wrote: > Hello Mani, > > On Sat, Feb 24, 2024 at 12:24:13PM +0530, Manivannan Sadhasivam wrote: > > "core_init_notifier" flag is set by the glue drivers requiring refclk from > > the host to complete the DWC core initialization. Also, those drivers will > > send a notification to the EPF drivers once the initialization is fully > > completed using the pci_epc_init_notify() API. Only then, the EPF drivers > > will start functioning. > > > > For the rest of the drivers generating refclk locally, EPF drivers will > > start functioning post binding with them. EPF drivers rely on the > > 'core_init_notifier' flag to differentiate between the drivers. > > Unfortunately, this creates two different flows for the EPF drivers. > > > > So to avoid that, let's get rid of the "core_init_notifier" flag and follow > > a single initialization flow for the EPF drivers. This is done by calling > > the dw_pcie_ep_init_notify() from all glue drivers after the completion of > > dw_pcie_ep_init_registers() API. This will allow all the glue drivers to > > send the notification to the EPF drivers once the initialization is fully > > completed. > > > > Only difference here is that, the drivers requiring refclk from host will > > send the notification once refclk is received, while others will send it > > during probe time itself. > > > > Signed-off-by: Manivannan Sadhasivam > > --- > > drivers/pci/controller/dwc/pci-dra7xx.c | 2 ++ > > drivers/pci/controller/dwc/pci-imx6.c | 2 ++ > > drivers/pci/controller/dwc/pci-keystone.c | 2 ++ > > drivers/pci/controller/dwc/pci-layerscape-ep.c | 2 ++ > > drivers/pci/controller/dwc/pcie-designware-plat.c | 2 ++ > > drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 - > > drivers/pci/controller/dwc/pcie-rcar-gen4.c | 2 ++ > > drivers/pci/controller/dwc/pcie-tegra194.c | 1 - > > drivers/pci/controller/dwc/pcie-uniphier-ep.c | 2 ++ > > drivers/pci/endpoint/functions/pci-epf-test.c | 18 +++++------------- > > include/linux/pci-epc.h | 3 --- > > pcie-artpec6.c:static const struct dw_pcie_ep_ops pcie_ep_ops = { > pcie-keembay.c:static const struct dw_pcie_ep_ops keembay_pcie_ep_ops = { > > Where is the love for these drivers? ;) > Ah, my grep skills got exposed :( Will fix them. - Mani -- மணிவண்ணன் சதாசிவம்