From patchwork Mon Oct 27 07:48:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 39561 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 174AD2118A for ; Mon, 27 Oct 2014 07:09:56 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id gi9sf3696204lab.6 for ; Mon, 27 Oct 2014 00:09:55 -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=zYIqhsSO5E7cH/rEmDQh0h++F0sNympdDkZDTfej34k=; b=hQZtQA1wgPzKnLiLGpE5vRxmH9T+dxmcqblH6J8FcbpVeiUBc5Og5iktl+O1X06O/8 NVD6ihRWqgU776tbAO8SHi1jGJJ6BIHTyjo1wmhl3+TcE90YJiC7/HnCgV0OiGFPocqX vuzEESFijfdZHlLV0LSC3510HiBkgW7oudbxlq38wywCk82W/w4DfXX3WiA6fj3oN5LX oT26XNGRjLNMLp8PzuwNETBQ7/xXl3NqUBTWOJfdWSgP6+PpjA9kJg1yQ49o49o8brB1 tFhqX1kCSaDmV0oIhX80iOmjPl2sMzCOi47kuB3ZCX6Hty5GMHFyBS+50IG7lSVENzg9 rNPA== X-Gm-Message-State: ALoCoQl0UpyJR3vtZMA+y9szg3wQBqSY+t3YiEN82cBDsxX2HdLKnA62FfA390PlLwTle+klI0A9 X-Received: by 10.152.6.4 with SMTP id w4mr16866law.7.1414393795775; Mon, 27 Oct 2014 00:09:55 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.135 with SMTP id v7ls682014lae.40.gmail; Mon, 27 Oct 2014 00:09:55 -0700 (PDT) X-Received: by 10.112.138.196 with SMTP id qs4mr20170542lbb.83.1414393795252; Mon, 27 Oct 2014 00:09:55 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id jl10si18442585lbc.96.2014.10.27.00.09.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Oct 2014 00:09:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id l4so121601lbv.4 for ; Mon, 27 Oct 2014 00:09:54 -0700 (PDT) X-Received: by 10.112.12.35 with SMTP id v3mr21349653lbb.80.1414393794914; Mon, 27 Oct 2014 00:09:54 -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 c5csp242576lbz; Mon, 27 Oct 2014 00:09:54 -0700 (PDT) X-Received: by 10.66.141.142 with SMTP id ro14mr22049222pab.111.1414393793332; Mon, 27 Oct 2014 00:09:53 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bc11si9696444pdb.255.2014.10.27.00.09.52 for ; Mon, 27 Oct 2014 00:09:53 -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 S1752652AbaJ0HJu (ORCPT + 26 others); Mon, 27 Oct 2014 03:09:50 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:10274 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752473AbaJ0HIX (ORCPT ); Mon, 27 Oct 2014 03:08:23 -0400 Received: from 172.24.2.119 (EHLO szxeml409-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CBJ05369; Mon, 27 Oct 2014 15:07:33 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml409-hub.china.huawei.com (10.82.67.136) with Microsoft SMTP Server id 14.3.158.1; Mon, 27 Oct 2014 15:07:22 +0800 From: Yijing Wang To: Bjorn Helgaas CC: , , Xinwei Hu , Wuyun , , Russell King , Thomas Gleixner , "Thierry Reding" , Thomas Petazzoni , Yijing Wang Subject: [PATCH 06/10] PCI: rcar: Save MSI controller in pci_sys_data Date: Mon, 27 Oct 2014 15:48:43 +0800 Message-ID: <1414396127-30023-7-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1414396127-30023-1-git-send-email-wangyijing@huawei.com> References: <1414396127-30023-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.173 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 controller in pci_sys_data instead of assigning MSI controller pointer to every pci bus in .add_bus(). Signed-off-by: Yijing Wang --- drivers/pci/host/pcie-rcar.c | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c index 48221aa..0dd9c75 100644 --- a/drivers/pci/host/pcie-rcar.c +++ b/drivers/pci/host/pcie-rcar.c @@ -380,20 +380,10 @@ static int rcar_pcie_setup(int nr, struct pci_sys_data *sys) return 1; } -static void rcar_pcie_add_bus(struct pci_bus *bus) -{ - if (IS_ENABLED(CONFIG_PCI_MSI)) { - struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata); - - bus->msi = &pcie->msi.ctrl; - } -} - struct hw_pci rcar_pci = { .setup = rcar_pcie_setup, .map_irq = of_irq_parse_and_map_pci, .ops = &rcar_pcie_ops, - .add_bus = rcar_pcie_add_bus, }; static void rcar_pcie_enable(struct rcar_pcie *pcie) @@ -402,6 +392,9 @@ static void rcar_pcie_enable(struct rcar_pcie *pcie) rcar_pci.nr_controllers = 1; rcar_pci.private_data = (void **)&pcie; +#ifdef CONFIG_PCI_MSI + rcar_pci.msi_ctrl = &pcie->msi.ctrl; +#endif pci_common_init_dev(&pdev->dev, &rcar_pci); #ifdef CONFIG_PCI_DOMAINS