Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp438001lqc; Fri, 8 Mar 2024 01:44:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUokghbhjs72etp5mPoBcJDItK5LQ0WrEl1Pk2oEaAuJAINuLxOTfZqNxcPbv6BBaTv2oSdNI+BiDiXy04GTaD2a6B95J/byP/EmefQpg== X-Google-Smtp-Source: AGHT+IEPqAJ1uyqcEYFND0PxS8CJ5q+kI44aPW7q97IrhlPk8FBR35KjVVUQZX1U6ez6XW+bBPp3 X-Received: by 2002:a05:620a:56d3:b0:787:fd8e:6195 with SMTP id wh19-20020a05620a56d300b00787fd8e6195mr9628840qkn.51.1709891073810; Fri, 08 Mar 2024 01:44:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709891073; cv=pass; d=google.com; s=arc-20160816; b=umuUojGZWfdLBD45Ug0Cv14gtUpbjJQBcw5IHpXJwq5OOIgfu+ktMkwocEYWQFsttr KYCB7uzDQJUhxICJ8T/0sTKCMeFS9hEJG4QoiuO9EB3LnK/R2PBdVbqvsVzGr2tIPosd mNbTplfPMG1D7wpgMQ8Tf9Kxd6Md0IKK3agLa3I6C01S1CErIzGoeBkHi/NXEssAu0P6 T6RGlOkGWkoVjstNlXqoCvN8rthcVCouQKLTeQLm9yNd9Lcplobdtk154jxg81nIHc+u rido6w6JNsnguAVqYIbu/9lLbj96VYLfwXFprvE3CBiZHSpntR9IJDC3jxFrDUvlk+13 919Q== 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=cdMdoK0AVaUo9V+wul4fyguoktaqDabkYBWscL2ezsE=; fh=eCG7rNtS6mllv1euu6L4vYMILmXsyTOordedTpz8N/c=; b=KzwOvUdnk2uzE/FdcKhgGlEV1zQdAFbOwgw6npegCcQ+LSqhGOC9ccev1APPQteby/ 0nCz+mb7kGUt6j4c42wNozRZ9bjcVWEK/2rp/kQS7FWx1ARY5KF/SdEVep4MQ7LrSFjQ MrsOFYBfNuKnGHd3lhe2mHO1dIvkYmjl02zBpiTEyW5yCWjMXcsij/02nowP17YC4cwz r9IQCJ1U1Tm6XbDslbxKmeCv7VceQYPtvXu9gjU27hQcW4nB2aC6qwL8K9CYIK170CUT w5meuXCRMl/A186VbHSXJsLrePuSr0PG0AkOUlfNcu9Dg3AE43zopcMCSQaNUxKJ1Aav Zu4Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=scNnxe+e; 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-96766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j10-20020a37ef0a000000b007881ece55c7si13360484qkk.283.2024.03.08.01.44.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 01:44:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=scNnxe+e; 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-96766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96766-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7A9A11C2011F for ; Fri, 8 Mar 2024 09:44:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9152F537EF; Fri, 8 Mar 2024 09:44:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="scNnxe+e" Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (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 D1DF4535B8 for ; Fri, 8 Mar 2024 09:44:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709891062; cv=none; b=mDKu6/sVDaqaulgmetFKSSgzBQJz9LgJkV90kE301EJCgMxppe962c9cH5mgR3NagKarW2/rXYC8FcovPcPsKNBBAuSm50hV+VtPKn7mavq2gxub5HT4w8KFDeKKaR5cmazONFr6BTbpr+3QRywEbqu5xTWsBNI0P9Fa4PT9aPI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709891062; c=relaxed/simple; bh=0HEUZNyW463A0kgIICyd/mFsEgweSIiAp5zW9wvwQAQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=i/oQDpFHWEHO7zFtFkbV5aPolJMdooMb3p3FRsSVsgnXobJWgLdAFlWcmCNf49c4PntntED2Lw/kYcQrjYu3Bp1udWf+lDJ2frrkEWL6jiPdePBOphEZAxgTRd3Kefqws4hwRlbw+/oo3DXXfIUGJx58OZK9Jf4sX0tkQZEKo6w= 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=scNnxe+e; arc=none smtp.client-ip=209.85.210.180 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-pf1-f180.google.com with SMTP id d2e1a72fcca58-6e63e9abf6aso515085b3a.2 for ; Fri, 08 Mar 2024 01:44:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709891060; x=1710495860; 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=cdMdoK0AVaUo9V+wul4fyguoktaqDabkYBWscL2ezsE=; b=scNnxe+eH0gJxpLD0BEvB7iGN2bbDV3x3kfx59zaTZPi8My/LQzAyQCdqZI3PhYc1J 6lQEh9CPLTemfcQpPYXAqYpSOnV42pha+24/QSs8Rv5XyvF1Jl7Xy58mXLEN0lspq8mw nzB9N5d7NoGM92r2JY6lMAMKdXznKYIRMjkZZ9l5cWzw5ZiqRbp1awaJ+9FdScEP/MvU 1x28YZpIxM8HZvGeyF42lUoRbJ2ZQUJrWQgYE8FvywAEZ3cSUuhhBo7oqziYapoD1FW3 FSb0ut2COKfFVrLeAzgf2kuJAj0PWN0jL8IPwMagx/fET4usxx4CBS+LbPkoTFM9sJYJ FHsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709891060; x=1710495860; 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=cdMdoK0AVaUo9V+wul4fyguoktaqDabkYBWscL2ezsE=; b=L6tzhp606n/J9/GN9zjrEQQxtD2KIiQ8lvVG/EAqVD5zkowWTTjnNkpr4+KNbJfJI0 u+JAi+HBXMJ1wjSasuRk3KJhVWmf7lOmxuq3Sucx+IEBhUvbeCjtEZvLs0KdmDBhhbI9 qS/GGjWuL3WO7B+OtSJv4l6T0HE9HFHQEv041nLum+JoNQFeff2Sd4X2kw6Hf0G51oMi lOCvnlA1vsmeYBwk9E5EK9htizeigifnQKTf8Z5eSzpzRbYRp1FUI521j8fa4f5nZa4K njMSYgbWHKhdBJbOTQy6UaQcZo90Bd0dvnHgkKMcJUwkQbxFMXi2JXnUMxULm5G2L26o A86Q== X-Forwarded-Encrypted: i=1; AJvYcCW8G2uctLHp0DymBpXGAZZTAFywgMuoTYwqUDhsbw2MvoeyNbLDYpEywUj9F9y503r+44Z2xj1Mcj+6qhzbMM2H54MOaZSa6RIh0iaW X-Gm-Message-State: AOJu0YxivshiO7QVXHwxrr0qWkXAPvMHdIDU8tvkwjQmwYV5mJYK05sv 6eAEgmXvXKkUsEe3pl66KlW4t9/O7T+ZD/VU0RwbYi2l1uvBhYeFznFiz93ilw== X-Received: by 2002:a05:6a20:4284:b0:1a1:6b04:9f2e with SMTP id o4-20020a056a20428400b001a16b049f2emr7419660pzj.9.1709891060050; Fri, 08 Mar 2024 01:44:20 -0800 (PST) Received: from thinkpad ([117.217.183.232]) by smtp.gmail.com with ESMTPSA id b1-20020aa78101000000b006e6350986a8sm6625169pfi.215.2024.03.08.01.44.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 01:44:19 -0800 (PST) Date: Fri, 8 Mar 2024 15:14:04 +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 , Jesper Nilsson , Srikanth Thokala , 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, linux-arm-kernel@axis.com, Frank Li Subject: Re: [PATCH v9 07/10] PCI: dwc: ep: Remove "core_init_notifier" flag Message-ID: <20240308094404.GF3789@thinkpad> References: <20240304-pci-dbi-rework-v9-0-29d433d99cda@linaro.org> <20240304-pci-dbi-rework-v9-7-29d433d99cda@linaro.org> <20240308053829.GC3789@thinkpad> 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 Fri, Mar 08, 2024 at 09:48:07AM +0100, Niklas Cassel wrote: > On Fri, Mar 08, 2024 at 11:08:29AM +0530, Manivannan Sadhasivam wrote: > > On Thu, Mar 07, 2024 at 10:09:06PM +0100, Niklas Cassel wrote: > > > On Mon, Mar 04, 2024 at 02:52:19PM +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. > > > > > > > > Reviewed-by: Frank Li > > > > Signed-off-by: Manivannan Sadhasivam > > > > --- > > > > > > You have removed the .core_init_notifier from EPC drivers, > > > but the callback in EPF drivers is still called .core_init. > > > > > > Yes, this was a confusing name even before this patch, but > > > after this patch, it is probably even worse :) > > > > > > The callback should be named from the perspective of EPF drivers IMO. > > > .core_init sounds like a EPF driver should initialize the core. > > > (But that is of course done by the EPC driver.) > > > > > > The .link_up() callback name is better, the EPF driver is informed > > > that the link is up. > > > > > > Perhaps we could rename .core_init to .core_up ? > > > > > > It tells the EPF drivers that the core is now up. > > > (And the EPF driver can configure the BARs.) > > > > > > > I don't disagree :) I thought about it but then decided to not extend the scope > > of this series further. So saved that for next series. > > > > But yeah, it is good to clean it up here itself. > > If you intend to create a .core_deinit or .core_down (or whatever name > you decide on), perhaps it is better to leave this cleanup to be part > of that same series? > I already added a patch. So let's do it here itself :) - Mani -- மணிவண்ணன் சதாசிவம்