From patchwork Wed Oct 23 10:41:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minghuan Lian X-Patchwork-Id: 285638 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id C40F02C0BE3 for ; Wed, 23 Oct 2013 21:46:08 +1100 (EST) Received: from va3outboundpool.messaging.microsoft.com (va3ehsobe006.messaging.microsoft.com [216.32.180.16]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "MSIT Machine Auth CA 2" (not verified)) by ozlabs.org (Postfix) with ESMTPS id C518A2C0338 for ; Wed, 23 Oct 2013 21:42:09 +1100 (EST) Received: from mail65-va3-R.bigfish.com (10.7.14.238) by VA3EHSOBE001.bigfish.com (10.7.40.21) with Microsoft SMTP Server id 14.1.225.22; Wed, 23 Oct 2013 10:42:06 +0000 Received: from mail65-va3 (localhost [127.0.0.1]) by mail65-va3-R.bigfish.com (Postfix) with ESMTP id F24804C0091; Wed, 23 Oct 2013 10:42:06 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: -1 X-BigFish: VS-1(zz154dIzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzz1de098h17326ah8275bh8275dh1de097h186068hz2dh2a8h839he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh1fb3h1d0ch1d2eh1d3fh1dfeh1dffh1e23h1fe8h1ff5h1155h) Received: from mail65-va3 (localhost.localdomain [127.0.0.1]) by mail65-va3 (MessageSwitch) id 1382524924987203_28562; Wed, 23 Oct 2013 10:42:04 +0000 (UTC) Received: from VA3EHSMHS007.bigfish.com (unknown [10.7.14.251]) by mail65-va3.bigfish.com (Postfix) with ESMTP id EC9B114003E; Wed, 23 Oct 2013 10:42:04 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS007.bigfish.com (10.7.99.17) with Microsoft SMTP Server (TLS) id 14.16.227.3; Wed, 23 Oct 2013 10:42:04 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-005.039d.mgd.msft.net (10.84.1.17) with Microsoft SMTP Server (TLS) id 14.3.158.2; Wed, 23 Oct 2013 10:42:03 +0000 Received: from lmh.ap.freescale.net (lmh.ap.freescale.net [10.193.20.65]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id r9NAfX7B020247; Wed, 23 Oct 2013 03:42:01 -0700 From: Minghuan Lian To: Subject: [PATCH 09/12][v3] pci: fsl: update PCI PM driver Date: Wed, 23 Oct 2013 18:41:31 +0800 Message-ID: <1382524894-15164-9-git-send-email-Minghuan.Lian@freescale.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1382524894-15164-1-git-send-email-Minghuan.Lian@freescale.com> References: <1382524894-15164-1-git-send-email-Minghuan.Lian@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Cc: Minghuan Lian , linux-pci@vger.kernel.org, Zang Roy-R61911 , Bjorn Helgaas , Scott Wood X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16rc2 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The patch updates PCI PM driver, uses fsl_pci instead of pci_controller. Signed-off-by: Minghuan Lian --- change log: v1-v3: Derived from http://patchwork.ozlabs.org/patch/278965/ Based on upstream master. Based on the discussion of RFC version here http://patchwork.ozlabs.org/patch/274487/ drivers/pci/host/pci-fsl-common.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/pci/host/pci-fsl-common.c b/drivers/pci/host/pci-fsl-common.c index c7bc472..729a5f4 100644 --- a/drivers/pci/host/pci-fsl-common.c +++ b/drivers/pci/host/pci-fsl-common.c @@ -699,19 +699,12 @@ static int fsl_pci_remove(struct platform_device *pdev) #ifdef CONFIG_PM static int fsl_pci_resume(struct device *dev) { - struct pci_controller *hose; - struct resource pci_rsrc; + struct fsl_pci *pci = dev_get_drvdata(dev); - hose = pci_find_hose_for_OF_device(dev->of_node); - if (!hose) + if (!pci) return -ENODEV; - if (of_address_to_resource(dev->of_node, 0, &pci_rsrc)) { - dev_err(dev, "Get pci register base failed."); - return -ENODEV; - } - - setup_pci_atmu(hose); + setup_pci_atmu(pci); return 0; }