From patchwork Fri Oct 20 06:43:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 736396 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C743CDB474 for ; Fri, 20 Oct 2023 06:44:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235662AbjJTGoP (ORCPT ); Fri, 20 Oct 2023 02:44:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347021AbjJTGoC (ORCPT ); Fri, 20 Oct 2023 02:44:02 -0400 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCCF910DE for ; Thu, 19 Oct 2023 23:43:48 -0700 (PDT) Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6b89ab5ddb7so489822b3a.0 for ; Thu, 19 Oct 2023 23:43:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697784228; x=1698389028; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RIRbF0ojAg9xFaalNOKQP8+O57Je1nCdZOHBfvcS3gw=; b=mE1HReKCTYK6dctPvKJEBs3VkoDnPFll0xkZEZuxES0bAJNigwC8+Dw3UVo5ADjK01 wgP6L40kAkgKsM6/5xeYTS3bMbNDG86khhjISe2nZ6/0BEInESka4+wAIhcfhdPZe6UU 2kjLil3+74wHzusBxUkuP8HYzCyJLHJcr3lUwUTUDPeW7k69ylJ/u55B7VXt1NVbok5L 10rTI/2BXTYqfWuNV0DW5NzTM7foNFL1YleARkyZq/8qi9gqF3uXF25j02Vq6PiyAz9z aeujbzOpipAAe29hVf4Ti3eckCBGOLpno5PjBUEiJPdjGm6/wEvqRS3cEOUbo91QAFin rfAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697784228; x=1698389028; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RIRbF0ojAg9xFaalNOKQP8+O57Je1nCdZOHBfvcS3gw=; b=KLp19v+MBIDYmUYwhFv2Yvet3j+ys/jyYuSctern907z94g9H4PzbzPZR3fhBLVpDo aLHr6BA4weGNfSF8WdPev2/RKOkRse7jQoEkth2/l9Y26rqLx54c03v8/BEs+o9L+kP2 3ZQ4mm7gj9+8TNL4X6PeR21povpekiDFsn4RYtQUKLOoEvx3pdTjHLbKX68aHhLpFcXs Xf9YwjyKZmhBHooXT4ree29vGL4z9cPyTrPgTbvuvbjLejtVA8Yn4CBXpjrDx6dIwteM FAEVAleH31sdtOuTLi+i6jY4Z5ce30MGeXqGj0YOTom5GkzXRSdKbDxbwaFwMPq1FWDj Kvqw== X-Gm-Message-State: AOJu0Yzmbnq+foVbw2KTdj6yvp+8Vrr4ztl/2uhxK69Fb7G8yFu7duBh wzGStF8SgImeW+MQqRID1qCG X-Google-Smtp-Source: AGHT+IH26TsR370CFGtCUUbUlg4dDjpRRH/7q7TzX9DrIU1FlzPbc3yC77jhiCPIGWY97+oQegX3TA== X-Received: by 2002:a05:6a21:4886:b0:16b:8498:d9bc with SMTP id av6-20020a056a21488600b0016b8498d9bcmr917350pzc.62.1697784228243; Thu, 19 Oct 2023 23:43:48 -0700 (PDT) Received: from localhost.localdomain ([117.202.186.40]) by smtp.gmail.com with ESMTPSA id t3-20020a170902bc4300b001c60ba709b7sm760951plz.125.2023.10.19.23.43.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 23:43:47 -0700 (PDT) From: Manivannan Sadhasivam To: jingoohan1@gmail.com, gustavo.pimentel@synopsys.com, lpieralisi@kernel.org, robh@kernel.org, kw@linux.com, bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, vidyas@nvidia.com, Manivannan Sadhasivam Subject: [PATCH v6 2/3] PCI: qcom-ep: Refactor EP initialization completion Date: Fri, 20 Oct 2023 12:13:19 +0530 Message-Id: <20231020064320.5302-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231020064320.5302-1-manivannan.sadhasivam@linaro.org> References: <20231020064320.5302-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Vidya Sagar Instead of doing the initialization complete and notifying it to the EPF drivers at two different places, let's call the dw_pcie_ep_init_notify() function that takes care of both. Signed-off-by: Vidya Sagar [mani: removed ep_init_late() callback and modified commit message] Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-qcom-ep.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c index 32c8d9e37876..3d5196291192 100644 --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c @@ -447,7 +447,7 @@ static int qcom_pcie_perst_deassert(struct dw_pcie *pci) PARF_INT_ALL_LINK_UP | PARF_INT_ALL_EDMA; writel_relaxed(val, pcie_ep->parf + PARF_INT_ALL_MASK); - ret = dw_pcie_ep_init_complete(&pcie_ep->pci.ep); + ret = dw_pcie_ep_init_notify(&pcie_ep->pci.ep); if (ret) { dev_err(dev, "Failed to complete initialization: %d\n", ret); goto err_disable_resources; @@ -466,8 +466,6 @@ static int qcom_pcie_perst_deassert(struct dw_pcie *pci) val &= ~PARF_MSTR_AXI_CLK_EN; writel_relaxed(val, pcie_ep->parf + PARF_MHI_CLOCK_RESET_CTRL); - dw_pcie_ep_init_notify(&pcie_ep->pci.ep); - /* Enable LTSSM */ val = readl_relaxed(pcie_ep->parf + PARF_LTSSM); val |= BIT(8);