From patchwork Wed Jan 8 05:02:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minghuan Lian X-Patchwork-Id: 3451651 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1DE8D9F1C4 for ; Wed, 8 Jan 2014 05:02:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7A3532010E for ; Wed, 8 Jan 2014 05:02:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 159A920120 for ; Wed, 8 Jan 2014 05:02:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751104AbaAHFCL (ORCPT ); Wed, 8 Jan 2014 00:02:11 -0500 Received: from am1ehsobe005.messaging.microsoft.com ([213.199.154.208]:8075 "EHLO am1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751756AbaAHFCJ (ORCPT ); Wed, 8 Jan 2014 00:02:09 -0500 Received: from mail91-am1-R.bigfish.com (10.3.201.244) by AM1EHSOBE026.bigfish.com (10.3.207.148) with Microsoft SMTP Server id 14.1.225.22; Wed, 8 Jan 2014 05:02:08 +0000 Received: from mail91-am1 (localhost [127.0.0.1]) by mail91-am1-R.bigfish.com (Postfix) with ESMTP id EDCF0100302; Wed, 8 Jan 2014 05:02:07 +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(zz154dIzz1f42h2148h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h2189h1d1ah1d2ah1fc6hzz1de098h17326ah8275bh8275dh1de097h186068hz2dh2a8h839he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh2222h224fh1fb3h1d0ch1d2eh1d3fh1dfeh1dffh1e23h1fe8h1ff5h2218h2216h226dh22d0h2327h2336h1155h) Received: from mail91-am1 (localhost.localdomain [127.0.0.1]) by mail91-am1 (MessageSwitch) id 1389157326403422_22722; Wed, 8 Jan 2014 05:02:06 +0000 (UTC) Received: from AM1EHSMHS011.bigfish.com (unknown [10.3.201.227]) by mail91-am1.bigfish.com (Postfix) with ESMTP id 3FEAA44005A; Wed, 8 Jan 2014 05:02:01 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS011.bigfish.com (10.3.207.111) with Microsoft SMTP Server (TLS) id 14.16.227.3; Wed, 8 Jan 2014 05:02:00 +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, 8 Jan 2014 05:01:59 +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 s0851V2K018463; Tue, 7 Jan 2014 22:01:56 -0700 From: Minghuan Lian To: CC: Zang Roy-R61911 , Scott Wood , Kumar Gala , Bjorn Helgaas , , Minghuan Lian Subject: [PATCH 09/12][v4] pci: fsl: update PCI PM driver Date: Wed, 8 Jan 2014 13:02:00 +0800 Message-ID: <1389157323-3088-9-git-send-email-Minghuan.Lian@freescale.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1389157323-3088-1-git-send-email-Minghuan.Lian@freescale.com> References: <1389157323-3088-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% X-FOPE-CONNECTOR: Id%0$Dn%FREESCALE.MAIL.ONMICROSOFT.COM$RO%1$TLS%0$FQDN%$TlsDn% Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, UNRESOLVED_TEMPLATE 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 patch updates PCI PM driver, uses fsl_pci instead of pci_controller. Signed-off-by: Minghuan Lian --- change log: v4: no change 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 d608550..e3696eb 100644 --- a/drivers/pci/host/pci-fsl-common.c +++ b/drivers/pci/host/pci-fsl-common.c @@ -702,19 +702,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; }