Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp3529rdd; Mon, 8 Jan 2024 15:26:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IGBwuWg8uFX3uj8dMgiu1WwIEf1cMAwAXMNmXFBO7FKUQaWe2jc1L2RCNXK9NbJ9KfFXWPq X-Received: by 2002:a17:906:55:b0:a29:4002:4af0 with SMTP id 21-20020a170906005500b00a2940024af0mr39754ejg.6.1704756394490; Mon, 08 Jan 2024 15:26:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704756394; cv=pass; d=google.com; s=arc-20160816; b=SvhPOZ/fmKBlYqMS8gDouD5D1HD67DawdsA/+yKD6rEZzIuahWXgtbsfOTqhVa/7qB GrfA/MrGW/JWkfwLmEIaFJg9W3MW8crKBp7XL23/vKYVA5609YTInj3NlrwaGwayOst5 prMFzbxc723S2xnz5DUkLf7ZzTvd1jCYZXdE8s/h4cPVhnIamJv83Mv90skJ9JfJQ128 rqyYIYAv5RmQwdSLaSZ4iEGyyczELQY9o1MvuAx+dRsBhd62/WOyJSrEof2MkKUZguo1 x76Ic/kcsBwE8oIKVr31lTCHhvJiGeEdyMvhwIZHo1jcEE0ybZrHyBkc0Izsx2zzcgQl v0UA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=oS8GOBtjyYsM5TTt9VOeMwD3uwYQ9z5yK4nGqHNF3Ww=; fh=492Ek0Vpabbqz4y1lk9p/Id6JH5wlBXcD/z8VK8wbWM=; b=sImUHNiXFVX8gZNUOwfWGGDe8+c+fOF1tqzIlhcCyQVv30km/Ub9LSXCljORdkCCoK vOQVlAhdY3Zf5TvyD16OY+JWs0oiJjC/wIuGnv3kteU+S+71gLfR0OPPIs/rCvetGyKd z+wMVyWo0jYpoGo/5agYx69bizRAFniBccC8nvscIwUbYEPENUSlYzISlJW/FgsxNs63 1BkSKfmhrSvwgp4kcNCzgJme3ly6I/Z4r9b6DhHGB2jLKEnVn3ZYISqYm4O7VA1ESymp PVoUVR9kODADuiNqWqwb79Krfgsv8r4Qbsz4jUylqA2DN/EsSwA/XwKoMJTwek8yghYC n5xg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=nioc+jll; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel+bounces-20187-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20187-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c10-20020a1709060fca00b00a28f023581csi202178ejk.630.2024.01.08.15.26.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 15:26:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20187-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=nioc+jll; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel+bounces-20187-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20187-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com 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 0C9591F22BF7 for ; Mon, 8 Jan 2024 23:26:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B514E58AA2; Mon, 8 Jan 2024 23:23:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="nioc+jll" Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2068.outbound.protection.outlook.com [40.107.104.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1549458225; Mon, 8 Jan 2024 23:23:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WuW9fhDL4NOQxacUAVDcwBXQi6xVYOFLLHPxuJ4QTQjFRkWiJiKBcSJVUNKD/Otghj7mR3D3F7VLFubF6VPa6QiHErJPnmMpJsw4SQJzYLrfF7JdIknGdtm96UmGylaJqTsfLJOOGpMMdK/mQ+YgiC/K2OGk1nLD1f/rZS4qMbzFRsa4gwkC7R0Ngf7bmIGVGV7VzG3iGoIRYq8qd1aJ5Mei/bIj07HQk20OYpy/dqHZe8FBwOwAdGvulCXezGHdHL3SklQY6E0mh81A+x42ljhzQNQGH7Cy1F6ow+CaU1lAdgba8aqhbSI01YHT+6mSKcB1nVOaqSZ5Kabm/Wejzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oS8GOBtjyYsM5TTt9VOeMwD3uwYQ9z5yK4nGqHNF3Ww=; b=W0BXGgQK1dgPesKlyEtudh8t1MulB/i/5YNlQM2pLc5f9UKEjZy/ZszRivN6GAVN3LqGCciqYgwszgW2JLtmuWAqYhGHRRmdHT5CoCatrFpQWzxRDxoRg80bfGrSfr165FM9Li/78l8/h2lg9/5w1D1Hk7rgS1HD3N107j6vIFaB1QWSodzX8ENLXr3gWr2jG1Lxr0LItT2oIxvPZ+ZLbSqAnzRj7x+Hg6VMTa67ViN98p8rSqVQtlfoZK7t8Ri41hkLMHILjXu0IevJCnkujmwKo7gf3IZdTrNiXiysN4UW/Ocnm+TyVJuK7qfbZgesuOu1RVFniJOlPz5WhlWgEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oS8GOBtjyYsM5TTt9VOeMwD3uwYQ9z5yK4nGqHNF3Ww=; b=nioc+jllbinh/5eHj8DPwTC8uF3zPbT+HweX93OlSDWWQN+EG1c9ksgSeIzl0vFevlaJoMtWz8Xr6+2a9DD2qKK5p4w+1lcOXo2jp45kSLpXlvD9mL+Fe7+GqgAt4TEK2u50gBJ6BedM+HZVPCKq/XDSXDZpADa8K7f5zWXYXXY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB7511.eurprd04.prod.outlook.com (2603:10a6:20b:23f::5) by AS4PR04MB9338.eurprd04.prod.outlook.com (2603:10a6:20b:4e6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.21; Mon, 8 Jan 2024 23:23:15 +0000 Received: from AS8PR04MB7511.eurprd04.prod.outlook.com ([fe80::8ee3:bac5:a2da:d469]) by AS8PR04MB7511.eurprd04.prod.outlook.com ([fe80::8ee3:bac5:a2da:d469%4]) with mapi id 15.20.7159.020; Mon, 8 Jan 2024 23:23:15 +0000 From: Frank Li To: krzysztof.kozlowski@linaro.org Cc: Frank.Li@nxp.com, 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, manivannan.sadhasivam@linaro.org, robh@kernel.org, s.hauer@pengutronix.de, shawnguo@kernel.org Subject: [PATCH v8 13/16] PCI: imx6: Clean up get addr_space code Date: Mon, 8 Jan 2024 18:21:42 -0500 Message-Id: <20240108232145.2116455-14-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240108232145.2116455-1-Frank.Li@nxp.com> References: <20240108232145.2116455-1-Frank.Li@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR02CA0063.namprd02.prod.outlook.com (2603:10b6:a03:54::40) To AS8PR04MB7511.eurprd04.prod.outlook.com (2603:10a6:20b:23f::5) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB7511:EE_|AS4PR04MB9338:EE_ X-MS-Office365-Filtering-Correlation-Id: 9010b052-e6f6-4825-22e3-08dc10a0ca0a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ui3GAbNUcqP+dexQrFBe/z64EJGtTtRyCIrKjNJl6wsgd+L8qDPVUaOuYqY5zlNluXqY/nIhslz0W6LtoSGbIYx0UgXvpAZU+qWJO/sDIJrMB5AULPSH5yhw8HW9dYikkolUjXU+rCbXxlj1ZN6UN89sYwz2ib5g7x9yqlTTpZY0/8RiAEoUG8+SHji+e8dZXompcdX/KtBV5cZss/6tekU20/y2yqe0opRzu80U/XAaLf9OtIm/VJS6C74M08CAODZNYX5negezxnyt8zWub7ztlGXksOMN8n0k/KdWz3OzlX7RdS4vOmBK7FcDZMfjHCJoPbsbw1eRW1ZhPELc5aehhKT2GbXGeoasT9PImIT5FUoh2JBWgU+A8IqTOK68YJdFe19c/dHszeMyT8AK1UYkQjz19/qih2ls+LMwoJNiONcPfw3sRwfezjx/t9E7W8f1Yi928esTvYOPA041pnk14AtCVZKIV3wt1YX/C+SvVddSVE1tcO7T4hJHoHbu/sNg4C9Wzj3HN/D1a7osIPR4pQq9RvHKW0S7TBkhYUCi0T2VxPYyMOvO0cWvU0YoxPqch3qUVarh2CsKpLHnv3Ne4N99FzxKKp+z1ZMUhfU0wJMjEYToQ8DXfdR7ykEH X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB7511.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(39860400002)(376002)(346002)(396003)(366004)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(52116002)(6506007)(2616005)(1076003)(6666004)(6512007)(478600001)(26005)(6486002)(38100700002)(86362001)(38350700005)(36756003)(41300700001)(83380400001)(7416002)(66556008)(2906002)(316002)(66476007)(6916009)(4326008)(5660300002)(8676002)(8936002)(66946007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?K/SZ5BkdA+5vW5+Yd0Ehvy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nzI?= =?us-ascii?Q?j7Eqe3Uvr9xSIauZv1IGrOqHC1HUS0LyfP+yV82BLIsoM88tY3BreTtVC8eE?= =?us-ascii?Q?N6AGGdA3Mh8JB7EB00sbztwpuzvG3ux3sKp/StVvEFL84WlqJNjxyqVqW0cZ?= =?us-ascii?Q?wZwID48BNHavG+RAvGQGMVJvTQo3LDGIlYsp90iE7aBQv+Ydl5r3rTF0AqSp?= =?us-ascii?Q?mVcBOl5oP4U40QKlrFXWayy7/66pZQtDYVbw4TQuLdROpUrInV5UWvAx2HTE?= =?us-ascii?Q?vEqFxDTygaaRBkwHkvhma5eBs6x2BsWlk96aE2gDvC7e3OAb8uRXgEUKaSy4?= =?us-ascii?Q?n4tzmd8rpUA/FwrcjBR62tumqZr0eyYmzoZtSqGDwQtdNWs8TdtZudRwbza0?= =?us-ascii?Q?lNPHZ41U61rkLJazL+8CX4ezkFLTlPwQhPb/ZvNpIOs9Rb0Lnfxu3brj/hNv?= =?us-ascii?Q?zwY96sybSf1u0zikePWS05+v5zkyT8vvXRuVTAX5hEY1Y1MFv2EbH7jPUCqc?= =?us-ascii?Q?xUjRwgkvXVarGDZFdzUCBRABPWG4LWqsYYSPvuTVms22fOgP903Cl5RE6ctR?= =?us-ascii?Q?WDjVl9vgiv4dd6kDJQcbbvND+xAmxJqTvBx2yGhecJ2woEVHF4wUAWmXSXG8?= =?us-ascii?Q?Od5q+NQKMHL9H3VPJydasCBe+N/xUdqC7Ff3QxHs5I1P2efjW1zb2k09IKvT?= =?us-ascii?Q?osdIXg+l3BDgloFV4uGVSJqUR5D+dNqj5YDcP3/t?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9010b052-e6f6-4825-22e3-08dc10a0ca0a X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB7511.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2024 23:23:15.1813 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +39VItxanu+vlhWtxQ5XPWCTNhMrR1CRXEk2teC58qAMQfSuM7HRYPCg9Yp/f1WwJ8mFhiSbF8YzutWKaJEmaw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9338 Since the dw_pcie_ep_init() function is already fetching the 'addr_space' region, no need to do the same in this driver. Reviewed-by: Manivannan Sadhasivam Signed-off-by: Frank Li --- Notes: Change from v7 to v8 - update commit message - Add Manivannan Sadhasivam's review tag Change from v4 to v7 - none 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 c0d08cd55d681..1741af88040be 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1067,7 +1067,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; @@ -1086,14 +1085,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