From patchwork Tue Sep 23 14:28:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minghuan Lian X-Patchwork-Id: 4956801 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1DDC1BEEA5 for ; Tue, 23 Sep 2014 14:29:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AC97320155 for ; Tue, 23 Sep 2014 14:29:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F2F0D2015E for ; Tue, 23 Sep 2014 14:29:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756058AbaIWO25 (ORCPT ); Tue, 23 Sep 2014 10:28:57 -0400 Received: from mail-bl2on0141.outbound.protection.outlook.com ([65.55.169.141]:43032 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755744AbaIWO24 (ORCPT ); Tue, 23 Sep 2014 10:28:56 -0400 Received: from BN3PR0301CA0071.namprd03.prod.outlook.com (25.160.152.167) by BY2PR03MB571.namprd03.prod.outlook.com (10.141.143.145) with Microsoft SMTP Server (TLS) id 15.0.1015.19; Tue, 23 Sep 2014 14:28:53 +0000 Received: from BN1BFFO11FD055.protection.gbl (2a01:111:f400:7c10::1:162) by BN3PR0301CA0071.outlook.office365.com (2a01:111:e400:401e::39) with Microsoft SMTP Server (TLS) id 15.0.1034.13 via Frontend Transport; Tue, 23 Sep 2014 14:28:52 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD055.mail.protection.outlook.com (10.58.145.10) with Microsoft SMTP Server (TLS) id 15.0.1029.15 via Frontend Transport; Tue, 23 Sep 2014 14:28:52 +0000 Received: from lmh.ap.freescale.net (lmh.ap.freescale.net [10.193.20.46]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s8NESkfw024223; Tue, 23 Sep 2014 07:28:47 -0700 From: Minghuan Lian To: CC: , Zang Roy-R61911 , Hu Mingkai-B21284 , Scott Wood , Yoder Stuart-B08248 , Arnd Bergmann , Bjorn Helgaas , "Minghuan Lian" Subject: [PATCH] PCI: designware: Fix configuration base address Date: Tue, 23 Sep 2014 22:28:56 +0800 Message-ID: <1411482540-31297-1-git-send-email-Minghuan.Lian@freescale.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(77982003)(50226001)(76482002)(21056001)(88136002)(80022003)(46102003)(74502003)(68736004)(93916002)(85852003)(19580405001)(90102001)(6806004)(83072002)(110136001)(86362001)(229853001)(87936001)(92726001)(92566001)(83322001)(10300001)(19580395003)(74662003)(62966002)(97736003)(50986999)(79102003)(104016003)(84676001)(81342003)(105606002)(64706001)(81542003)(99396002)(47776003)(4396001)(31966008)(95666004)(104166001)(106466001)(50466002)(2351001)(48376002)(36756003)(44976005)(89996001)(85306004)(20776003)(120916001)(107046002)(77156001)(87286001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR03MB571; H:tx30smr01.am.freescale.net; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;UriScan:; X-Forefront-PRVS: 0343AC1D30 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; Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=Minghuan.Lian@freescale.com; X-OriginatorOrg: freescale.com Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 The code has calculated cfg0_base and cfg1_base when parsing 'reg' or 'ranges' property of PCI DTS node. so remove duplicate calculation. And when using 'reg', resource cfg is not used, the removed code will get incorrect configuration base. Signed-off-by: Minghuan Lian --- drivers/pci/host/pcie-designware.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index c28ca05..0f3cb2a 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -515,7 +515,6 @@ int __init dw_pcie_host_init(struct pcie_port *pp) pp->mem_base = pp->mem.start; if (!pp->va_cfg0_base) { - pp->cfg0_base = pp->cfg.start; pp->va_cfg0_base = devm_ioremap(pp->dev, pp->cfg0_base, pp->cfg0_size); if (!pp->va_cfg0_base) { @@ -525,7 +524,6 @@ int __init dw_pcie_host_init(struct pcie_port *pp) } if (!pp->va_cfg1_base) { - pp->cfg1_base = pp->cfg.start + pp->cfg0_size; pp->va_cfg1_base = devm_ioremap(pp->dev, pp->cfg1_base, pp->cfg1_size); if (!pp->va_cfg1_base) {