From patchwork Fri Oct 16 07:19:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minghuan Lian X-Patchwork-Id: 7411261 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 43AA3BEEA4 for ; Fri, 16 Oct 2015 07:18:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 81E53207C6 for ; Fri, 16 Oct 2015 07:18:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 844A920795 for ; Fri, 16 Oct 2015 07:18:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751518AbbJPHSi (ORCPT ); Fri, 16 Oct 2015 03:18:38 -0400 Received: from mail-by2on0118.outbound.protection.outlook.com ([207.46.100.118]:22592 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751082AbbJPHSh (ORCPT ); Fri, 16 Oct 2015 03:18:37 -0400 Received: from BN3PR0301CA0057.namprd03.prod.outlook.com (10.160.152.153) by BY1PR0301MB1253.namprd03.prod.outlook.com (10.161.203.25) with Microsoft SMTP Server (TLS) id 15.1.300.14; Fri, 16 Oct 2015 07:18:35 +0000 Received: from BN1BFFO11FD006.protection.gbl (2a01:111:f400:7c10::1:118) by BN3PR0301CA0057.outlook.office365.com (2a01:111:e400:401e::25) with Microsoft SMTP Server (TLS) id 15.1.300.14 via Frontend Transport; Fri, 16 Oct 2015 07:18:35 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; freescale.mail.onmicrosoft.com; dmarc=none action=none header.from=freescale.com; Received-SPF: Fail (protection.outlook.com: domain of freescale.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 BN1BFFO11FD006.mail.protection.outlook.com (10.58.144.69) with Microsoft SMTP Server (TLS) id 15.1.293.9 via Frontend Transport; Fri, 16 Oct 2015 07:18:35 +0000 Received: from lmh.ap.freescale.net (lmh.ap.freescale.net [10.193.20.20]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t9G7ISIH004957; Fri, 16 Oct 2015 00:18:29 -0700 From: Minghuan Lian To: CC: , Zang Roy-R61911 , Hu Mingkai-B21284 , "Yoder Stuart-B08248" , Li Yang , Arnd Bergmann , Bjorn Helgaas , "Jingoo Han" , Zhou Wang , "Minghuan Lian" Subject: [PATCH v4 1/6] PCI: layerscape: remove ls_pcie_establish_link() Date: Fri, 16 Oct 2015 15:19:15 +0800 Message-ID: <1444979960-24100-1-git-send-email-Minghuan.Lian@freescale.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD006; 1:4LatDVIe9coBAjfKZT1tXLuTefngzq7velpjcvgzp3zx+us9Z98mxa1OvomglziOgMhX9QOJJU5txGYaaiGnLm7fI/PZlMldJk78P0xEO8A10zOdx3eCM1lyp3/nuU6Bxho8oMyLEBj2+8lyP4edxxTUYgFnUSboA8pgbE4AjgFtZ++3mXw3WKUbarIlDkxFard2NJo+b9QIVCm9kjZdZB2JQ//Jqook/OWBp1AKUIMBhhF5O3I1etFmEMKwlXWywMLUrDPCYLaA//b0q/rct4DOlX1N7dPcXdjF7pNPrgnnzOYrDpSELH0yvV7hVG02v8ieWggMwOXer3zdFfFU3MAMqdvKe2Rc5KpRxydGo6HfXcIel8XW1KJzEakhSOOkcq6TPeyHQViTrenUx48b5g== X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(1110001)(1109001)(339900001)(54534003)(199003)(189002)(92566002)(36756003)(64706001)(47776003)(77096005)(5008740100001)(11100500001)(85426001)(50986999)(81156007)(6806005)(97736004)(5001960100002)(50466002)(50226001)(2351001)(46102003)(107886002)(86362001)(87936001)(189998001)(104016004)(19580405001)(105606002)(110136002)(19580395003)(48376002)(106466001)(5007970100001)(5003940100001)(229853001)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0301MB1253; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1253; 2:yjKvK0b2Z2EN8zQUWWEMPg/q9SH96Ww2exuVWV6WSiG9FiN8W0wHSWNfFG/EtJcq8juGeaUUOc8KkBWR5AN02iYwVAeKLQInTAVFXwxYV0tA5NIy2HaeXPi4i3eRJaJl3G7uo78IAtzG7zJSaf/hNlclAWOYD1bNmvuYfFQYCKc=; 3:pFtiCkNL3VSW7suJqnOlmx6XNScie7fW7hxQn0oG0Y054O0kgGf419QHcsZmrQZoabJ3a7Hy2a1VHZ8Od49GD1H9NPoJcg/H4XL5izWHwFVa/l+pOQZKo9RtHAIZ05cFvbVUsC6TxLIoaOabIm8iRzvgaxVKGLCuPOvnn3KVT/Ei2jL02XESgjGektLrTMwUw2JWG3KPMq5aeApgDFwvs36M8Df27pQQjWqkU8mE0CM=; 25:A9V1CuL13cgefD0IcpfqzHQVzt7SOCIovJI1VMXAOWp3lLniczZNYLX+S5+XM1cMvgDKm444vBFSIBpP5Xljrdoyb0ZI/uuJutX31EQLqP0a3/jkL78/zjklokci1bWmZc6KVvuXxWa87/yL7K0BOYiEX3AmjBj9Zi1v9nDVwVvACcl7tJwKdV/ANzxsf61bu4STJ5OAQUGKO/hh0mxtoskA+a3CAYGGeUabpTqYcwtjpCycM+GfgFGPtDMUTNuf X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB1253; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1253; 20:qGqoalRTZ9Vq3W0brvsKYUrWIH79DtWff4dKM60AeTRkfrKwzCeFltAhif+S0RMMRpv9I8+aKqda+N9IPlAwQ0XtLqiKlBQj9/woRp6HmrHOyd01qUtR/XexCW33poUUJPeqJj1j704+f3N8sGM3iYRR32GrGYHVM/ckiiKM3q47de3xDPixnGhJxQnO/lAMIFqH7wiAjcCopk4Kcjmg8iG52fMDzZy0Az5RwaIfbh5h8WBq2fDhdZfqk+06HydDOUv7Zugh1WMSVYgNSWGwJxqXX0eEf4kkRGCBES2eGSQ9i1dKMIwPxcDC+9AeuiO4fbnYNzKOuk4/imu5SoWQSdag9kj1/N+GROtyPR6yx+s=; 4:58FKdoZaNO0L/TPoW6/WdO//Oe0EI86tT39/nDRBX8i/G7lZKPgeGRuUFwgWpq7cOKJ6CgFi3ARSVCI/5lhXEdhEBQtcpJVuDKVWZvT+3ohZ0YSzfnyxae4OlNYOxQOU4rX2vZuR1uJA5T7QsSp9Gt0iuu/kAvDW6tR8EVtALpOU/dezd5c0o/ZeMCEgmhWfJH9bS/hKYSetiUA5wjViaLB5UJxBgGG4HOtExfkYTzT4MhsQDWj54l80qQyZVZ8S018QBXoaVlfi8Tya3iROsTk2hog3QAhRuJSb4Uu768zuC1hvykLO08gEbnnzjps+Gqf4aRX/8uL3PCQhX2vW70rZMlfW593SkI2GLLrQAoM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(101931422205132); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(3002001); SRVR:BY1PR0301MB1253; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0301MB1253; X-Forefront-PRVS: 0731AA2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Uxo9mEi6PsV/+VYZQdwhqJvfSxIKU/Brkb7eIv8ElPTQgY/Ff+2NS1RDt?= =?us-ascii?Q?0RGa217i1FB6YhVdTCqPWjWVOMXUFDTDT5bBrzCe2MXKLnC0KOxbUy4fmj7Z?= =?us-ascii?Q?/P5XOdAEvur44Wxwg6uf6t8NY+/sUxSVTQz+ISWBoKPAldj7apLCQKvxXvgs?= =?us-ascii?Q?RhSv9Uy4tGnnG99IeiTfGjN71dD+CoQA60SWSfLNEPTgbeGPeDE6jFr1YyQy?= =?us-ascii?Q?09LwnWcsfRvvA+OlMl0mhpZugIJqH?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1253; 5:H+F2LpEHKKn0F1DSThqdXTs12V5SlrFBJxq7MHufoySRpklGP9TayFigjGVXv0cEJv5+vQa8rhVg3C9wkPYFCoUaWLfuat8HWMFMGuX9E3CQEVxWrjLzTjT7zLu8oB4xMNSz58qpay4YkTypbwUAxw==; 24:YI0lwtSImwrIOzZmcmsksuWGnVdR9AGtBCiV18mjhsUddHijXNanDLxJbJuX+f2+3oUR/qscjszfshzBUcscGPwSj0Foqae9TaheHZAtrzQ=; 20:ojzscXBKCiVAnN+vDcFwX+jm7gMPVQjkrPbV6AkhhwvmfwgX5oikj959gY7wc1UuzH7GXM9FVWFrh8kZANHQTg== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2015 07:18:35.0194 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB1253 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ls_pcie_establish_link() does not do any real operation, except to wait for the linkup establishment. In fact, this is not necessary. Moreover, each PCIe controller not inserted device will increase the Linux startup time about 200ms. Signed-off-by: Minghuan Lian --- Change log v4: split from [PATCH v3] PCI: layerscape: Add PCIe support for LS1043a and LS2080a drivers/pci/host/pci-layerscape.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c index b2328ea1..6dd44a0 100644 --- a/drivers/pci/host/pci-layerscape.c +++ b/drivers/pci/host/pci-layerscape.c @@ -11,7 +11,6 @@ */ #include -#include #include #include #include @@ -62,27 +61,12 @@ static int ls_pcie_link_up(struct pcie_port *pp) return 1; } -static int ls_pcie_establish_link(struct pcie_port *pp) -{ - unsigned int retries; - - for (retries = 0; retries < 200; retries++) { - if (dw_pcie_link_up(pp)) - return 0; - usleep_range(100, 1000); - } - - dev_err(pp->dev, "phy link never came up\n"); - return -EINVAL; -} - static void ls_pcie_host_init(struct pcie_port *pp) { struct ls_pcie *pcie = to_ls_pcie(pp); u32 val; dw_pcie_setup_rc(pp); - ls_pcie_establish_link(pp); /* * LS1021A Workaround for internal TKT228622