From patchwork Wed Oct 15 03:06:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 38742 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D88C220973 for ; Wed, 15 Oct 2014 02:29:17 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id y10sf141594wgg.6 for ; Tue, 14 Oct 2014 19:29:17 -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=R3V/HmGscjWHCm9H3AKlDxA240ILzKI4t3K2DCrVeW0=; b=lJ0w9NNBLb2ItR3EBtQlCfKkzdtHbabc/6VTgLuw3faXRw+1ttbqEdbPGKZGulZg34 9kkuLt8yQ1xgX7tkC668t1c1sGunQvqba22vJDfetS3n2+k4cy63Wf0hRxuc9Qapp/AO xSxZbkSruuq+ginIKvQK+3G3YisAqr7jP8bXrkV73H62i16K3erqhKJc9cZ6ibk6PM9H 1/Zp/1Y+MD15pX7agan7FpJ2qXZPRCOsXf3QKOofAiLU5aQS3bDtxaHegGsRf9hvjyk6 DtdxnJgfvEFmXK4mBC7qQP+bEQLDaMWD5glyV2w78p4yeZe0ud+MF/uqPirX9YsJQF+G DadA== X-Gm-Message-State: ALoCoQmAIY7LXre6WrHjmYjUj/k30C/3iWdB2Ix9Dl0/GOGw1/5xvv2WuL6yFDCbkA3ugE50E+sL X-Received: by 10.180.105.74 with SMTP id gk10mr1889396wib.0.1413340157080; Tue, 14 Oct 2014 19:29:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.39 with SMTP id 7ls7134lar.87.gmail; Tue, 14 Oct 2014 19:29:16 -0700 (PDT) X-Received: by 10.112.189.10 with SMTP id ge10mr9029211lbc.23.1413340156602; Tue, 14 Oct 2014 19:29:16 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com [209.85.217.180]) by mx.google.com with ESMTPS id m2si28583121lbp.105.2014.10.14.19.29.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Oct 2014 19:29:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by mail-lb0-f180.google.com with SMTP id n15so253895lbi.11 for ; Tue, 14 Oct 2014 19:29:16 -0700 (PDT) X-Received: by 10.112.24.108 with SMTP id t12mr8956862lbf.79.1413340156474; Tue, 14 Oct 2014 19:29:16 -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 c5csp517519lbz; Tue, 14 Oct 2014 19:29:15 -0700 (PDT) X-Received: by 10.69.21.33 with SMTP id hh1mr8300154pbd.42.1413340154681; Tue, 14 Oct 2014 19:29:14 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1si1584634pdr.157.2014.10.14.19.29.13 for ; Tue, 14 Oct 2014 19:29:14 -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 S1755933AbaJOC0I (ORCPT + 27 others); Tue, 14 Oct 2014 22:26:08 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:39162 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932666AbaJOCZr (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 CAT35331; Wed, 15 Oct 2014 10:25:27 +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:17 +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 05/27] PCI: tegra: Save msi chip in pci_sys_data Date: Wed, 15 Oct 2014 11:06:53 +0800 Message-ID: <1413342435-7876-6-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.217.180 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-tegra.c | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c index 3d43874..5af0525 100644 --- a/drivers/pci/host/pci-tegra.c +++ b/drivers/pci/host/pci-tegra.c @@ -694,15 +694,6 @@ static int tegra_pcie_map_irq(const struct pci_dev *pdev, u8 slot, u8 pin) return irq; } -static void tegra_pcie_add_bus(struct pci_bus *bus) -{ - if (IS_ENABLED(CONFIG_PCI_MSI)) { - struct tegra_pcie *pcie = sys_to_pcie(bus->sysdata); - - bus->msi = &pcie->msi.chip; - } -} - static struct pci_bus *tegra_pcie_scan_bus(int nr, struct pci_sys_data *sys) { struct tegra_pcie *pcie = sys_to_pcie(sys); @@ -1881,11 +1872,13 @@ static int tegra_pcie_enable(struct tegra_pcie *pcie) memset(&hw, 0, sizeof(hw)); +#ifdef CONFIG_PCI_MSI + hw.msi_chip = &pcie->msi.chip; +#endif hw.nr_controllers = 1; hw.private_data = (void **)&pcie; hw.setup = tegra_pcie_setup; hw.map_irq = tegra_pcie_map_irq; - hw.add_bus = tegra_pcie_add_bus; hw.scan = tegra_pcie_scan_bus; hw.ops = &tegra_pcie_ops;