From patchwork Wed Oct 15 03:06:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 38739 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A077920973 for ; Wed, 15 Oct 2014 02:28:29 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id b6sf143735lbj.3 for ; Tue, 14 Oct 2014 19:28:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=wkMhr3c2bTDgtXF0rKvoFhimnP8hGFkIJy29LpF4/DQ=; b=L5Txda67AcDR08U0ss83qmSxKrXxE+a+uCJaIyXle+lmTpngEnHF4iu59GJeAk6GgY 8/tCmgtA7cLTzn5Lo/k9iDUbXkvd3JhQbr61Uxx2/1+fK20LkriswTkzt8FlSnx/9E0w ypxuCQ7XhOwUeUIAY2MA9QyaWZfHTnYBITNH0C8MmxPlzPil6OKQhvg6oJJI8ERbNcfp WnTxnApDjveze4Drdey2y3AfqH8oCl/lcYAPS9qEcU/+SLMkepwJz1CIvNt8bqZKmKGk F4R5UTPMv3WnoaIDKe1YGPIIsdcXLgOgtBBUQxexJrM0idCdOwQu29PxwMO3cWMt4+nw qimA== X-Gm-Message-State: ALoCoQkRKdTIKFMv2eXUX5Yj+qPVYbRLzpOYSo4y+RtyJbRLuZUtUvE82CPebruc63QFD025H0uS X-Received: by 10.180.105.74 with SMTP id gk10mr1888899wib.0.1413340108331; Tue, 14 Oct 2014 19:28:28 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.170 with SMTP id l10ls8321lah.18.gmail; Tue, 14 Oct 2014 19:28:27 -0700 (PDT) X-Received: by 10.112.52.33 with SMTP id q1mr9483194lbo.42.1413340107945; Tue, 14 Oct 2014 19:28:27 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com [209.85.215.53]) by mx.google.com with ESMTPS id h5si28574891laf.110.2014.10.14.19.28.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Oct 2014 19:28:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id gq15so258160lab.12 for ; Tue, 14 Oct 2014 19:28:27 -0700 (PDT) X-Received: by 10.152.28.227 with SMTP id e3mr9323910lah.54.1413340107869; Tue, 14 Oct 2014 19:28:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp517454lbz; Tue, 14 Oct 2014 19:28:27 -0700 (PDT) X-Received: by 10.66.243.36 with SMTP id wv4mr9177074pac.36.1413340106305; Tue, 14 Oct 2014 19:28:26 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mz10si14366045pdb.256.2014.10.14.19.28.25 for ; Tue, 14 Oct 2014 19:28:26 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755986AbaJOC0O (ORCPT + 27 others); Tue, 14 Oct 2014 22:26:14 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:39153 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932675AbaJOCZr (ORCPT ); Tue, 14 Oct 2014 22:25:47 -0400 Received: from 172.24.2.119 (EHLO szxeml412-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CAT35351; Wed, 15 Oct 2014 10:25:32 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml412-hub.china.huawei.com (10.82.67.91) with Microsoft SMTP Server id 14.3.158.1; Wed, 15 Oct 2014 10:25:24 +0800 From: Yijing Wang To: Bjorn Helgaas CC: , , Xinwei Hu , Wuyun , , Russell King , , , , , Arnd Bergmann , Thomas Gleixner , "Konrad Rzeszutek Wilk" , , Joerg Roedel , , , Benjamin Herrenschmidt , , , Sebastian Ott , "Tony Luck" , , "David S. Miller" , , Chris Metcalf , Ralf Baechle , Lucas Stach , David Vrabel , "Sergei Shtylyov" , Michael Ellerman , Thierry Reding , "Thomas Petazzoni" , Liviu Dudau , Yijing Wang Subject: [PATCH v3 08/27] PCI: mvebu: Save msi chip in pci_sys_data Date: Wed, 15 Oct 2014 11:06:56 +0800 Message-ID: <1413342435-7876-9-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1413342435-7876-1-git-send-email-wangyijing@huawei.com> References: <1413342435-7876-1-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.100.166] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: wangyijing@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Save msi chip in pci_sys_data instead of assign msi chip to every pci bus in .add_bus(). Signed-off-by: Yijing Wang --- drivers/pci/host/pci-mvebu.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index b1315e1..f8e9c6c 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c @@ -774,12 +774,6 @@ static struct pci_bus *mvebu_pcie_scan_bus(int nr, struct pci_sys_data *sys) return bus; } -static void mvebu_pcie_add_bus(struct pci_bus *bus) -{ - struct mvebu_pcie *pcie = sys_to_pcie(bus->sysdata); - bus->msi = pcie->msi; -} - static resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev, const struct resource *res, resource_size_t start, @@ -816,6 +810,9 @@ static void mvebu_pcie_enable(struct mvebu_pcie *pcie) memset(&hw, 0, sizeof(hw)); +#ifdef CONFIG_PCI_MSI + hw.msi_chip = pcie->msi; +#endif hw.nr_controllers = 1; hw.private_data = (void **)&pcie; hw.setup = mvebu_pcie_setup; @@ -823,7 +820,6 @@ static void mvebu_pcie_enable(struct mvebu_pcie *pcie) hw.map_irq = of_irq_parse_and_map_pci; hw.ops = &mvebu_pcie_ops; hw.align_resource = mvebu_pcie_align_resource; - hw.add_bus = mvebu_pcie_add_bus; pci_common_init(&hw); }