From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A957C48BF6 for ; Mon, 4 Mar 2024 06:27:31 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=H1BuvmMd; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Tp7z60c3Gz3dVj for ; Mon, 4 Mar 2024 17:27:30 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=H1BuvmMd; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2607:f8b0:4864:20::f2e; helo=mail-qv1-xf2e.google.com; envelope-from=manivannan.sadhasivam@linaro.org; receiver=lists.ozlabs.org) Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Tp7yJ0t42z3bXk for ; Mon, 4 Mar 2024 17:26:47 +1100 (AEDT) Received: by mail-qv1-xf2e.google.com with SMTP id 6a1803df08f44-68f5cdca7a3so38204616d6.1 for ; Sun, 03 Mar 2024 22:26:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709533601; x=1710138401; darn=lists.ozlabs.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=H1BuvmMdrGwGwfNhwWWnuRxlfrH08flcVnoxcO9xifOi1NqUQHETwZ5YBKkKAnTVBH J55u4o8/ycoBLYuCqsQSIID01Kvr44k63NtX/KBbiBN6CoRCofWFCg6mkYiTxcuSmIF2 uBx7Yh55fCdPHB9aqAVb0B+1ARpdIZx0IVl3bCt2OEBeV4RMcBPrgriMQt3Tbo31sIqA dfTcKgxG4SduBbIN8Co5t/YlPYfHOJNKWRPT0ssUYgm6zEc08+oat3sa1B4XTKHG2khr leY8ahPojucrdaYUWljjTn9X+HrfDBFFhFVmqmL8N/YnRCo8KFUJIJcjbx/a9w5TfPsx q2TA== 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=ox2cFG42onds0lYfo0R7WTIHU/wimdSbYORfTsAppnpz5SASvUwFx72FMdSApuGZZz U4EceEjHF5ABvFHKT/aJ0rBG5dwu2ZP8tvRvsvrlYzNLjxOYSnQP3gJjPqVNC1dGk1mx a+lJR9z4+F7Rda6rKN+d54Y02uE880XEanVlZZ9OzSwbWhgj40SZbF2L2DLVQ0ZaN/ZV f4KhLKnSq7Wgm0AmCLL47B20ROFfzGTqyQ6HQLoXBVCb9AS0hsM4+/Egx22t9uEO2OVo 6Xa4XOxXexaoXIx62jRpu66HBncMp2PSxWzGPQqpBkbYtxEXtMlpVEYiFtgXFiefuTPe YO3Q== X-Forwarded-Encrypted: i=1; AJvYcCUwOQJfbMZxsBFdIyIwizbqTdLktq3xCRfJ1DyS34EgMG91ZyGbpFaBo+3sTN1DLfbO9YHa0UnY+KngBebaXJxjckEdax3UU4qi0W/raA== X-Gm-Message-State: AOJu0YxbLEun980qeR4OoThToRr/aJkO0+7iDKgFzjVTFrNPA5ZLjPkn 7Kiv6IhuM9OrO9C+CM2KyLLOuxLNYLpUbz7+dAl0DgQQ+IOueg6VJioBnDIlnw== X-Google-Smtp-Source: AGHT+IGh16i8bKazRcKjIf+8mD1oHLxasc4gBXAtPUXGYbbq10g//g9iQu5psYwYR67+pyj7tPVbIg== 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 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Vignesh Raghavendra , Kunihiko Hayashi , linux-pci@vger.kernel.org, Lorenzo Pieralisi , Minghuan Lian , Thierry Reding , Kishon Vijay Abraham I , Fabio Estevam , Marek Vasut , Kishon Vijay Abraham I , Rob Herring , linux-tegra@vger.kernel.org, Jonathan Hunter , NXP Linux Team , Richard Zhu , linux-arm-msm@vger.kernel.org, Sascha Hauer , linuxppc-dev@lists.ozlabs.org, Bjorn Helgaas , linux-omap@vger.kernel.org, Mingkai Hu , linux-arm-kernel@lists.infradead.org, Roy Zang , Jingoo Han , Yoshihiro Shimoda , linux- kernel@vger.kernel.org, Vidya Sagar , linux-renesas-soc@vger.kernel.org, Masami Hiramatsu , Pengutronix Kernel Team , Gustavo Pimentel , Shawn Guo , Lucas Stach Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 -- மணிவண்ணன் சதாசிவம்