Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1000187rdb; Sat, 6 Jan 2024 21:55:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IE0vo2S/pe211QBlXSeuOR13HeWnzBceT8klsIr8xjARyGpI+KCeUbUvdnDxOeD1Ixe8G97 X-Received: by 2002:a17:907:26c8:b0:a26:a4bf:e8c0 with SMTP id bp8-20020a17090726c800b00a26a4bfe8c0mr1047478ejc.21.1704606933460; Sat, 06 Jan 2024 21:55:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704606933; cv=none; d=google.com; s=arc-20160816; b=CcyTwsHeoPi70ZZ5jqISNmvDjmwnqQmjucjVs9b9IFy3sDeTfI96qUxM8LdEM1NYQO AIu7PvbrcfdnDyp+jdyTmB3WAAZLc7i+8kHFi1Om4Lf3m5dUleWA3/Jq4/n3Cd2ax5rb HZjQE/ZMKq0SSqn+UEyG9RrapGwIzeHZlM+X21qK35rtOX8BdIumi8ZrkzzH/oCre3/Z vETNGoiCXZshKZ+1RLLK0XG3UfrNidnHX7AGLw3xWV3DnhAKJGt9lH7Qv8mmc+dI1bDg dpvf0fStfCXJ3N2QLoCPLJmYe8/RYIBlT+sNsz+S/FZ0tHX1oqGbulKOOgFs4kd2BIvT dM3g== ARC-Message-Signature: i=1; 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=npkPTWZbSrPT/J2qTivWUqWZDlbUUJa861d4n1crd6s=; fh=iWBv4He8s+xpzrJY93iuua2RS8H3PW0G6YXgJrUCrjQ=; b=wbxczkub2kAHc/evZDshOQRSUvgPqOsL+ILtqaqEOO70tEHtbj5U6NDZ0TLOLV5bhL C45wa7YEKk0NeoI4cMVBeqAKUgE+CqaYS8SDY4J96LFNvObv+1Bu1EJA58QONSZ8gTca yWvdta5uY7UZmR7YHK4IOH0OoHNKemzU4dgItJbUdVtMso6jSAKx6dflf5E4WMd3kGNT 1+4occw8IL9Z1TVGgMo14jTL41nZCkyQmLMbEBW0Z71Xz4MH8mOk/Hffu8/H2/VhLeys o7TAjVdO2Yeifu55z6BCqKbLuhzDHtLoKi79F0UYRJ/0xmnV5xOjNH+MF+uQiBWOtdIs /DNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AOzVSo3X; spf=pass (google.com: domain of linux-kernel+bounces-18792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s23-20020a170906355700b00a23513c830asi2051320eja.1042.2024.01.06.21.55.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 21:55:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AOzVSo3X; spf=pass (google.com: domain of linux-kernel+bounces-18792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18792-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3453D1F220F3 for ; Sun, 7 Jan 2024 05:55:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26F6B125BA; Sun, 7 Jan 2024 05:55:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="AOzVSo3X" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (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 E8AB2125B1 for ; Sun, 7 Jan 2024 05:55:20 +0000 (UTC) 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-pj1-f46.google.com with SMTP id 98e67ed59e1d1-28bcc273833so778935a91.1 for ; Sat, 06 Jan 2024 21:55:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704606920; x=1705211720; 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=npkPTWZbSrPT/J2qTivWUqWZDlbUUJa861d4n1crd6s=; b=AOzVSo3XuBr//L8//JwBoD9vygIZwyOMjsRiMaAzqaAPi1+Y+thjiOYBNEiXpUeGSh S2ar7i8r5IEpK7ENCra3pCU/IMWRpwMbnACdGXkB81OfR7YXoZA4YVfafllDFhmQlLRO QS+I1XSupkAscskSOJLVsOFmc77n8sGuhL5KFQBwKw/zlmuvhYYomS1ohZHLRAnsKrXM kXVSs/pIm36f6gcxRmMasPLl8V83skDO6gUJR3GylJoroqPzZuPxv2x1YSvtEmgSh1u1 tAMxwrZnWYDEl/J/vJx7x8NXPzPw0usn+D+j784jwWusupsZPve3ufiwGlg/bYMAXJEq QuWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704606920; x=1705211720; 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=npkPTWZbSrPT/J2qTivWUqWZDlbUUJa861d4n1crd6s=; b=te7w92ZY/7l5RhTWJKJx9nUgFIAcHqx/KB4TnQBrd7YnbtpFQFSKsX0v0c6BqjOpSt HzpG3seGkUZ+YLE/cBZYK6LNjqNVuHsozIlbtXVqW4gOygmpcN66qsWol8azQcJgTH4W gN5uJ/xkzkCizOjbPVxR/sHbH2BXoyoEJ7KVL83tBsYYXaEzd0W700Q6RF7EkgjvPKra MsFsYWy0pwqajtZZXvWTjZF89sYvIOs4yuTfPDR7ZBXAyrGPTUgWa1+F4wizr+uRDzXj d4hB36WGEFxucil299vqmpSla0sWNHPalvRziXNJabJRkIhdjZ1HNkSrjEOjewI0e4CP jcEg== X-Gm-Message-State: AOJu0YzOZZymOYYyWaJ9Yjj78I5HxZgKqgMIjGpnAFxBDidNxwqqYDM2 RwHCN+/YL5HvJCYkdvUD+FggZxaxmuQ9 X-Received: by 2002:a05:6a20:7a82:b0:199:8953:6e0c with SMTP id u2-20020a056a207a8200b0019989536e0cmr1255512pzh.52.1704606920277; Sat, 06 Jan 2024 21:55:20 -0800 (PST) Received: from thinkpad ([103.197.115.97]) by smtp.gmail.com with ESMTPSA id 9-20020a17090a018900b0028a4c85a55csm4287287pjc.27.2024.01.06.21.55.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 21:55:19 -0800 (PST) Date: Sun, 7 Jan 2024 11:25:10 +0530 From: Manivannan Sadhasivam To: Frank Li Cc: krzysztof.kozlowski@linaro.org, bhelgaas@google.com, conor+dt@kernel.org, devicetree@vger.kernel.org, festevam@gmail.com, helgaas@kernel.org, hongxing.zhu@nxp.com, imx@lists.linux.dev, kernel@pengutronix.de, krzysztof.kozlowski+dt@linaro.org, kw@linux.com, l.stach@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lpieralisi@kernel.org, robh@kernel.org, s.hauer@pengutronix.de, shawnguo@kernel.org Subject: Re: [PATCH v7 13/16] PCI: imx6: Clean up get addr_space code Message-ID: <20240107055510.GM3416@thinkpad> References: <20231227182727.1747435-1-Frank.Li@nxp.com> <20231227182727.1747435-14-Frank.Li@nxp.com> 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: <20231227182727.1747435-14-Frank.Li@nxp.com> On Wed, Dec 27, 2023 at 01:27:24PM -0500, Frank Li wrote: Subject: PCI: imx6: Rely on DWC core to fetch 'addr_space' region > The common dw_pcie_ep_init() already do the same thing. Needn't platform > driver do it again. > 'Since the dw_pcie_ep_init() function is already fetching the 'addr_space' region, no need to do the same in this driver.' > Signed-off-by: Frank Li With above changes, Reviewed-by: Manivannan Sadhasivam - Mani > --- > > Notes: > Change from v1 to v3 > - new patches > > drivers/pci/controller/dwc/pci-imx6.c | 9 +-------- > 1 file changed, 1 insertion(+), 8 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c > index 9e60ab6f1885a..4b2b9aafad1b4 100644 > --- a/drivers/pci/controller/dwc/pci-imx6.c > +++ b/drivers/pci/controller/dwc/pci-imx6.c > @@ -1080,7 +1080,6 @@ static int imx6_add_pcie_ep(struct imx6_pcie *imx6_pcie, > int ret; > unsigned int pcie_dbi2_offset; > struct dw_pcie_ep *ep; > - struct resource *res; > struct dw_pcie *pci = imx6_pcie->pci; > struct dw_pcie_rp *pp = &pci->pp; > struct device *dev = pci->dev; > @@ -1099,14 +1098,8 @@ static int imx6_add_pcie_ep(struct imx6_pcie *imx6_pcie, > pcie_dbi2_offset = SZ_4K; > break; > } > - pci->dbi_base2 = pci->dbi_base + pcie_dbi2_offset; > - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "addr_space"); > - if (!res) > - return -EINVAL; > > - ep->phys_base = res->start; > - ep->addr_size = resource_size(res); > - ep->page_size = SZ_64K; > + pci->dbi_base2 = pci->dbi_base + pcie_dbi2_offset; > > ret = dw_pcie_ep_init(ep); > if (ret) { > -- > 2.34.1 > -- மணிவண்ணன் சதாசிவம்