From patchwork Wed Oct 15 03:07:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 38753 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EDF5E20973 for ; Wed, 15 Oct 2014 02:33:01 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id d17sf264140eek.10 for ; Tue, 14 Oct 2014 19:33:01 -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=gpu3pUsckUzYjylIowV+wI/o/tAcqSH2ovUV78XQG0A=; b=JQ2NH2g1JewLo+tdtAhP0x9tVzCfGFyGbYqssOAt5oCiUk2hRaQQsji9MjECUoxuir KJs7C/cH4DDzL9tdnCDmhNrHGHdkoPSm+YxEiQBzeu5VfG3DmWEcBQpkb0lpRg93d6oJ Ylrw0eVwYnKVWX3tPwBlQ8r+qEa6jgELoV6PyLTXUJ9Ze4O/LXmOwgdTf7sMD3teNQie 4dNdSM+iLefkOr150k6LLG2//RZZ+tJ+BdYm5wP3Hg0kBiYZ9BLzGfXkQGxLP+rCxYmq xM8RFIAM3979YOeYlFM2SAScSrQ75pj4PkjS9BZ7fOCL9Ankw8v597ZXLkXGGifnQzGt M81Q== X-Gm-Message-State: ALoCoQkiRhamxUVwXPcbWgEAZ+kR9z2BkjOYTSOCb4Qi/dG/lNpxRyFGJ9lRgZ1GwdixYGQhd8kh X-Received: by 10.180.96.101 with SMTP id dr5mr1591373wib.0.1413340381145; Tue, 14 Oct 2014 19:33:01 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.169 with SMTP id k9ls8516laa.91.gmail; Tue, 14 Oct 2014 19:33:00 -0700 (PDT) X-Received: by 10.112.218.98 with SMTP id pf2mr9121099lbc.41.1413340380954; Tue, 14 Oct 2014 19:33:00 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx.google.com with ESMTPS id v2si28543436lav.132.2014.10.14.19.33.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Oct 2014 19:33:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by mail-la0-f54.google.com with SMTP id gm9so238769lab.41 for ; Tue, 14 Oct 2014 19:33:00 -0700 (PDT) X-Received: by 10.152.44.233 with SMTP id h9mr9019490lam.73.1413340380842; Tue, 14 Oct 2014 19:33:00 -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 c5csp517825lbz; Tue, 14 Oct 2014 19:33:00 -0700 (PDT) X-Received: by 10.70.5.194 with SMTP id u2mr9505370pdu.34.1413340379212; Tue, 14 Oct 2014 19:32:59 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bi2si14494975pbb.68.2014.10.14.19.32.58 for ; Tue, 14 Oct 2014 19:32:59 -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 S1756116AbaJOCc4 (ORCPT + 27 others); Tue, 14 Oct 2014 22:32:56 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:39540 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932687AbaJOCZw (ORCPT ); Tue, 14 Oct 2014 22:25:52 -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 CAT35393; Wed, 15 Oct 2014 10:25:47 +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:41 +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 16/27] Mips/MSI: Save msi chip in pci sysdata Date: Wed, 15 Oct 2014 11:07:04 +0800 Message-ID: <1413342435-7876-17-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.54 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 sysdata, add arch pci_find_msi_chip() to extract out msi chip. Signed-off-by: Yijing Wang --- arch/mips/include/asm/pci.h | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h index 974b0e3..287661b 100644 --- a/arch/mips/include/asm/pci.h +++ b/arch/mips/include/asm/pci.h @@ -43,6 +43,9 @@ struct pci_controller { int iommu; +#ifdef CONFIG_PCI_MSI + struct msi_chip *msi_chip; +#endif /* Optional access methods for reading/writing the bus number of the PCI controller */ int (*get_busno)(void); @@ -54,6 +57,17 @@ struct pci_controller { */ extern void register_pci_controller(struct pci_controller *hose); +#ifdef CONFIG_PCI_MSI + +static inline struct msi_chip *pci_msi_chip(struct pci_bus *bus) +{ + struct pci_controller *control = (struct pci_controller *)bus->sysdata; + + return control->msi_chip; +} + +#endif + /* * board supplied pci irq fixup routine */