From patchwork Thu Aug 3 08:23:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Z.Q. Hou" X-Patchwork-Id: 9878467 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8A7A560360 for ; Thu, 3 Aug 2017 08:40:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D4542888D for ; Thu, 3 Aug 2017 08:40:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61F1F2888E; Thu, 3 Aug 2017 08:40:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E04612888F for ; Thu, 3 Aug 2017 08:40:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751701AbdHCIkf (ORCPT ); Thu, 3 Aug 2017 04:40:35 -0400 Received: from mail-dm3nam03on0086.outbound.protection.outlook.com ([104.47.41.86]:55207 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751213AbdHCIkb (ORCPT ); Thu, 3 Aug 2017 04:40:31 -0400 Received: from CY1PR03CA0007.namprd03.prod.outlook.com (2603:10b6:600::17) by DM2PR0301MB0910.namprd03.prod.outlook.com (2a01:111:e400:501d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1304.22; Thu, 3 Aug 2017 08:40:29 +0000 Received: from BN1BFFO11FD004.protection.gbl (2a01:111:f400:7c10::1:161) by CY1PR03CA0007.outlook.office365.com (2603:10b6:600::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1304.22 via Frontend Transport; Thu, 3 Aug 2017 08:40:29 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD004.mail.protection.outlook.com (10.58.144.67) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1282.16 via Frontend Transport; Thu, 3 Aug 2017 08:40:28 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v738eCtF031161; Thu, 3 Aug 2017 01:40:25 -0700 From: Zhiqiang Hou To: , , , CC: , , , Hou Zhiqiang Subject: [PATCHv2 4/6] PCI: layerscape: refactor the host_init function Date: Thu, 3 Aug 2017 16:23:38 +0800 Message-ID: <1501748620-42866-5-git-send-email-Zhiqiang.Hou@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 In-Reply-To: <1501748620-42866-1-git-send-email-Zhiqiang.Hou@nxp.com> References: <1501748620-42866-1-git-send-email-Zhiqiang.Hou@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131462232289169870; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39410400002)(39400400002)(39850400002)(39380400002)(39450400003)(39840400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(81156014)(626005)(2906002)(68736007)(8676002)(5660300001)(72206003)(81166006)(104016004)(4326008)(6666003)(2950100002)(356003)(498600001)(8936002)(50226002)(85426001)(305945005)(2201001)(105606002)(189998001)(5003940100001)(106466001)(97736004)(50986999)(76176999)(36756003)(8656003)(86362001)(47776003)(77096006)(54906002)(48376002)(50466002)(53936002)(38730400002)(39060400002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB0910; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1BFFO11FD004; 1:HOwzatfcUOHIavlOJx5ixBNl6QRs5gm96Yx3uwgto?= =?us-ascii?Q?ctEbCg7pnuK6jbyVwcQPWADv/a3XQ2oCdRD5kL7NKCB2UAyLS3f4mdz8LJZa?= =?us-ascii?Q?FRkV4XFalWVZCm70o4yPpSrHMDgfrg0W+FFyeSPOrUY2d1CBkenNDvsaDTlp?= =?us-ascii?Q?MTdtDxIzxa5bTpQurk3XeklY0hQ7/PcBykvITWG+1pUrGMtdwNUZCw9E9nJ1?= =?us-ascii?Q?BxwC2nDv4AZdSRE7kitw0BpeIC7qCKdRbjevPw2hh65xBMCXTt9r4p0wmvZ3?= =?us-ascii?Q?+FvYNAiBCwDjSFI8X/+r4DaPj5zYWXBRW7z294p9lbr+qlaWigvPBGLyWwBT?= =?us-ascii?Q?Qyrh+zJoW4hFLp0qUcymbseqPJi3/pRyOS4ASnCAC0oUkxrqYz8X1l36QZUt?= =?us-ascii?Q?mwhSaiSU82c8WEPfEceYbAF8SgMZt9Zf0d+JO/c2WKSrw/bKbDcWZUopwqlX?= =?us-ascii?Q?hb+p2xu2veMXow1QVxpneyLKrvOGkm4yN4aILz54+B40CfUBICm1ZhPR0f6k?= =?us-ascii?Q?vwyCuM3kBT7u15Y/07MJOyiG5MSZI7ijWdIrY1fx8GY9dCuacaUbWEDI9orI?= =?us-ascii?Q?sB0ZVnrEIDCpZSMkEso0O23qNiozSfHIBhOyTUY9qxGYoWu+X+7DN0oP2Rf5?= =?us-ascii?Q?iVQ6m6+C6BFW9Mey7lPDepdmKNoSnaz74BYhTKP3fc0ia//Pu3bCxuN1dguZ?= =?us-ascii?Q?peR4BSdonYlq/pMryvfRuyIo/oD1F4Z1xIS8rdrNWV7WmxmhSWSqmTN5zj9H?= =?us-ascii?Q?NG24/xZnDPQJzx+bWzchgZaFD28IPWRtfa5+PP0GV64pNcwB0rjtGTs2JFax?= =?us-ascii?Q?OnfqnvEVvw4sVPSy/i2F+e6p8EhqrkE/njFstXKOdzEKd3GtysovG7QX6ket?= =?us-ascii?Q?9/l4KAjjUby6Mttkj8KOXN5ZjDA+fwo3DO6wljvpnUUn+oEYuRk6ols/WM9J?= =?us-ascii?Q?fbtUa9js8bXlS5QizrBOEMZSc6tRkeOv5Fit6yjxQ=3D=3D?= MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c1db1ede-b111-4200-706d-08d4da4b4b6e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM2PR0301MB0910; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0910; 3:FWgdM+01sGRlf7CiY+0M99uaHbtyLcYqxkaHb2SU2EMMttuWzk0qX3P5HRA4/zf1/Cbbw7g+y8z0jj9HPOEldyKFJ7vrsAtPXKiCSf7ygeL84V7bic8RTmdAM+v9bNQuUeFCz4khHLrJJZfVdzcbhtizea++3ej4vabA1ilsDNpMg8Qhd/036CO41EISkmPy0doSy73kphth5/Z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Swuyw6F/pJSxJ7rSX2t76R7+Zb2MZ9ay756wD9yJKSzFMUcRJt4aoQNBfWhwDxCpZeXStGs8ozS+XGBWFdRi/xos09PA07anT9hqGwoDBiwMxcA3I3P/6P8hOl6f7a91yQCcZQvuJTQBVeVF5/lTn1YQbUOEffVpIIIhIsPX35Yxr3ubRdJpl2p8qtnX2iLBdw1LzCHuCQEc4zKjaFCTZarKIHi9Ir8PA6rjYzvzkf1WCs6pryxpf/kBZpxP7GbIykVVMOzVLTqNBZFcozWDq8j1LYMIxRCjcIRwx2i6Gv+vXy3QVDrpNOr8VSyozVppDw== X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(13018025)(8121501046)(5005006)(13016025)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6096035)(20161123561025)(20161123559100)(20161123556025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123565025)(20161123563025)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR0301MB0910; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR0301MB0910; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0910; 4:/Wh6poUfCtVksUX1vX6mg9dfJubdEo5S7+oKtjO9?= =?us-ascii?Q?kYm9fOb9RBFIPK9kBEOwT9dRBwj07Mc15OQihsZUcvgyHIagWhSdOJMW4kcW?= =?us-ascii?Q?pH6rqEdmGf0RvK0skG2NPKpgqFNWcf4qjyUiQEjxc/7oY1IqJhE7PXzxXIbG?= =?us-ascii?Q?F2G2i9mjxYolOI5TdABLqN2QHCmg//E/uE2Gadf6WWIQ4Xnz9b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bC0kmwN+nlul6/4vUbcYQ2beISjRL?= =?us-ascii?Q?RNyy7wHSYaxcUPhTqqYhDG/OYVizmiLus+UXpcZY/dh1aHSOoLI5qR88fre7?= =?us-ascii?Q?8yZQKanN/rz0LrRdTwbp7pejZkAV3cIQTEuKPgnqgee9IEs8JL74/ATjURl9?= =?us-ascii?Q?qdcMU0/owuwsZovicWs358pbMFQEsVEqkGI7lvmu?= X-Forefront-PRVS: 03883BD916 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0910; 23:f7EZRqcACFRMp5nKtgqixu2R2HbcnB+RjlMqMj+?= =?us-ascii?Q?iPk5iHHkHiOK63FBejnzlLbnLnAaC0zMq3QwD9kZ4b2l9eEzFFgIzeXgndQN?= =?us-ascii?Q?sC9IeNwrEFNVc/po2gyA/drR17Oiqs5sXYESGngkzsc/Rm5/uCH38cb+fyfo?= =?us-ascii?Q?MGEMX05xCFAJQafeRQkfmib/EHmgt3p3EEFPVGvMpfRs4w+u9JgxAQdYUW6Q?= =?us-ascii?Q?kwMzp30fsvDGuXNdKyM5O2wdC57nirtH7EzLUcJ3gFMjh1rTtZM/hvjfzU+d?= =?us-ascii?Q?GCZfiIJOHorz3H416VTgYlRXcQJomGTPdabRiWkBV3ZFjTHsvF+8XLE8Rn51?= =?us-ascii?Q?3DZH5CMnJoyHNjNUpeQoEW+WrtgcBD3kSdvmMzjiGTateRrMLQj/kvFgIkoY?= =?us-ascii?Q?yl2gkxUPjhoBOa37hSMSCF2jJN6awjQ100uxTGGvkonuQthE9nkxiN1//t12?= =?us-ascii?Q?jDxr/QZrbiL/RRxSauSYLT/HBUa9Xj5c/2q0L7/sRfHgjeHdSAxMJGIoitEv?= =?us-ascii?Q?isLRVs7X1830WoKjZVT/ZgS2G0kn4GBZRilNv7EsX7dOwl8kcmzn1H8mh11u?= =?us-ascii?Q?jqESqiDHy3eaRPt3VS+HhGoPng1OyRl/xnoFK95CZmTYv9JLCOeTVlqNnNej?= =?us-ascii?Q?4bPG4G9LDg8P0HWLyzbPQZ2ELQyOsVut3Hh6L+HWK8/dcBRCP8jo2IRwanVq?= =?us-ascii?Q?7+dhOMa6asXCZGwXNuySBpB1I+Xu1JfmQp0kqz2Al4ZVs2NMUTSU3Yebmsw3?= =?us-ascii?Q?XkICycZv7mP5Zy+Ms2OTob9zZP4mBbFhRyJn6liRvO7SVsLLCkYKbTKLGv9Y?= =?us-ascii?Q?qMA5NcgtlNT96aL6ToyvQALEM9OaXibhWB6o6biX8aZKF1AFRI4v2F71rTIR?= =?us-ascii?Q?PEE0b2hvIrnOtOp5Zcrlrz4MrtahPlIFTEYCM23JRgTjtsa8krmiMIW/pUns?= =?us-ascii?Q?AYOhXAwNnjU4xJHKWjD8IHxiJaJBDfSm+HYMUTeu6ebewTRcInxpvsUucqMR?= =?us-ascii?Q?0nniD7kEwp4eN4ytWmYsclgFbVieDpWw4P7/9CsrN9JpZilsTZ/H/Cd5CQFC?= =?us-ascii?Q?P2Zwl67yIY54Ocyvp8B6EDVoJ4mQ23JM91iFvByIhLck2REUTUePsKNccJ+x?= =?us-ascii?Q?ywpydfNshJMk0Clxl/fWQgZ+2yeGA6yaZjP5cICGmqQHH6XesdIdjpBcgo61?= =?us-ascii?Q?0nJCC/YJcejBPE4Kn0SaTzCGHctE1CQN9gv5bktnrfse0cPs22/9ZJ4nucFb?= =?us-ascii?Q?nTEONuvOYX3ggTTJqDf9C/xdnCf/C2i685y1+oUEt0yTo+oRcnW23yDY8iN7?= =?us-ascii?Q?W7g=3D=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0910; 6:fD9H4TggupwNpczZrHRrZwnndWibba9Ib2nPLVci?= =?us-ascii?Q?GcDq8uTk2QVkyuLdDS4zQrN4354w0jKWsXu+RX6eGev2/oFVD7QhY0qmL/TG?= =?us-ascii?Q?ZV2coC41tHl0rxmKUY47qhWczQhj76w46ZWEXaGIjRZEV7rUsvzGRU7kN81G?= =?us-ascii?Q?e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Geevny0YD7K/cNFkK3PnvInrgksX3GYQp5ngUvG5N+pCqYym3DdA4wb9B/QeLKU3LE5qFEu3QDHEauodlBvxLTi+Rdee1U1NEUdDxLJ8XXhrwwMI336YsKueOM/iXMf8jxQllckGdHm2knYA/Qb0dFL7zfKBgz+BnKFhd4WSgf5KnjozTVoQauhRJ+tyzrkB9uDKX57lqipmeWaZ+s4/reph+H6mJg7k47YgvocLb61dOt3D/qN80XbgDti19eR+OI3ktGLSqU/HvveP0itJaICcru8T7y4s1RAyhGnyJnTPYT2DlAQ9K81DYNV9at3eukybQOy4EM5KM3m37FNaxnf+T1+KbL/VVjNGyxys/5OkDlm12xou2ZTo4Y9qjl4XpOZtEoXryTkLWvdM2D1mKyTUftVGo70ylHH5NPCkFfs= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Aug 2017 08:40:28.7297 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0910 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hou Zhiqiang Make the ls1021a's host_init reuse layerscape platform's common host_init function. Signed-off-by: Hou Zhiqiang Reviewed-by: Joao Pinto --- V2: - Removed the disable outbound windows code and the remove duplicate class code fixup code from this patch. drivers/pci/dwc/pci-layerscape.c | 54 ++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/pci/dwc/pci-layerscape.c b/drivers/pci/dwc/pci-layerscape.c index 09056a6..3533a8c 100644 --- a/drivers/pci/dwc/pci-layerscape.c +++ b/drivers/pci/dwc/pci-layerscape.c @@ -107,33 +107,6 @@ static int ls1021_pcie_link_up(struct dw_pcie *pci) return 1; } -static void ls1021_pcie_host_init(struct pcie_port *pp) -{ - struct dw_pcie *pci = to_dw_pcie_from_pp(pp); - struct ls_pcie *pcie = to_ls_pcie(pci); - struct device *dev = pci->dev; - u32 index[2]; - - pcie->scfg = syscon_regmap_lookup_by_phandle(dev->of_node, - "fsl,pcie-scfg"); - if (IS_ERR(pcie->scfg)) { - dev_err(dev, "No syscfg phandle specified\n"); - pcie->scfg = NULL; - return; - } - - if (of_property_read_u32_array(dev->of_node, - "fsl,pcie-scfg", index, 2)) { - pcie->scfg = NULL; - return; - } - pcie->index = index[1]; - - dw_pcie_setup_rc(pp); - - ls_pcie_drop_msg_tlp(pcie); -} - static int ls_pcie_link_up(struct dw_pcie *pci) { struct ls_pcie *pcie = to_ls_pcie(pci); @@ -160,6 +133,33 @@ static void ls_pcie_host_init(struct pcie_port *pp) dw_pcie_dbi_ro_wr_dis(pci); ls_pcie_drop_msg_tlp(pcie); + + dw_pcie_setup_rc(pp); +} + +static void ls1021_pcie_host_init(struct pcie_port *pp) +{ + struct dw_pcie *pci = to_dw_pcie_from_pp(pp); + struct ls_pcie *pcie = to_ls_pcie(pci); + struct device *dev = pci->dev; + u32 index[2]; + + pcie->scfg = syscon_regmap_lookup_by_phandle(dev->of_node, + "fsl,pcie-scfg"); + if (IS_ERR(pcie->scfg)) { + dev_err(dev, "No syscfg phandle specified\n"); + pcie->scfg = NULL; + return; + } + + if (of_property_read_u32_array(dev->of_node, + "fsl,pcie-scfg", index, 2)) { + pcie->scfg = NULL; + return; + } + pcie->index = index[1]; + + ls_pcie_host_init(pp); } static int ls_pcie_msi_host_init(struct pcie_port *pp,