From patchwork Tue Jul 1 18:43:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 32929 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f200.google.com (mail-yk0-f200.google.com [209.85.160.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8B354203C0 for ; Tue, 1 Jul 2014 18:46:03 +0000 (UTC) Received: by mail-yk0-f200.google.com with SMTP id 20sf16810341yks.3 for ; Tue, 01 Jul 2014 11:46:03 -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:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=MuZA+JpnoiuSQbRVE/CkW7mG9VR10Io8diYhZ0CtR3A=; b=C2bNyNYL4EaVUXN6aPiZnPaqr7l/ekiRngAEX2SoeGY8OBq/K9KeSSh5QK82IAwHsg CYdimFpP3AF8QgQpi2brHAcivA6rwfQQfnNkJ+ixA0UXi1Az+Fd8Fl6uJCUKXr/39H3Y Xe39jrG7CXQMcE6U0xxq5vBUOiE1QnnKYqjBqGsdY92eXWYh+bEBACHq5jT/i3CM7Zkf ePkN6bfqTE5bdBRivaGfsl138xu65BPSHcxcdlM0jufZJdglREGryoOSD+YsW+wrMF7T EXwIhjLD/KiOgshPIxdAmdFMrcqRs+ty1Xv8XbHxH9M1Tf7sgcQaKP5ML/L9fIG7EL1Z cAQQ== X-Gm-Message-State: ALoCoQm1SV3l67ymXe3sHmVHbyU29cmqR1D6mq2YSnL9x5TxKgR3fS9jTJnkdpvHnKYJGkMxnNBG X-Received: by 10.58.37.164 with SMTP id z4mr26886966vej.28.1404240363369; Tue, 01 Jul 2014 11:46:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.165 with SMTP id t34ls2108720qgd.93.gmail; Tue, 01 Jul 2014 11:46:03 -0700 (PDT) X-Received: by 10.220.15.8 with SMTP id i8mr1974026vca.45.1404240363243; Tue, 01 Jul 2014 11:46:03 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id em7si11762898vdb.53.2014.07.01.11.46.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Jul 2014 11:46:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id hy4so9362595vcb.19 for ; Tue, 01 Jul 2014 11:46:03 -0700 (PDT) X-Received: by 10.221.26.10 with SMTP id rk10mr45444606vcb.0.1404240363129; Tue, 01 Jul 2014 11:46:03 -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.221.37.5 with SMTP id tc5csp236977vcb; Tue, 1 Jul 2014 11:46:02 -0700 (PDT) X-Received: by 10.42.186.2 with SMTP id cq2mr45252105icb.25.1404240361896; Tue, 01 Jul 2014 11:46:01 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ym1si27884234pac.25.2014.07.01.11.46.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Jul 2014 11:46:01 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X232W-0006g4-Rt; Tue, 01 Jul 2014 18:44:24 +0000 Received: from fw-tnat.cambridge.arm.com ([217.140.96.21] helo=cam-smtp0.cambridge.arm.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X232R-0006aj-DT for linux-arm-kernel@lists.infradead.org; Tue, 01 Jul 2014 18:44:20 +0000 Received: from e106497-lin.cambridge.arm.com (e106497-lin.cambridge.arm.com [10.1.195.170]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id s61IhYJb027921; Tue, 1 Jul 2014 19:43:38 +0100 From: Liviu Dudau To: linux-pci , Bjorn Helgaas , Catalin Marinas , Will Deacon , Benjamin Herrenschmidt , Arnd Bergmann , linaro-kernel , Tanmay Inamdar , Grant Likely , Sinan Kaya , Jingoo Han , Kukjin Kim , Suravee Suthikulanit Subject: [PATCH v8 7/9] pci: of: Parse and map the IRQ when adding the PCI device. Date: Tue, 1 Jul 2014 19:43:32 +0100 Message-Id: <1404240214-9804-8-git-send-email-Liviu.Dudau@arm.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1404240214-9804-1-git-send-email-Liviu.Dudau@arm.com> References: <1404240214-9804-1-git-send-email-Liviu.Dudau@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140701_114419_841988_F32F428C X-CRM114-Status: UNSURE ( 8.71 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [217.140.96.21 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record Cc: Device Tree ML , LKML , LAKML X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: liviu.dudau@arm.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.220.174 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 Enhance the default implementation of pcibios_add_device() to parse and map the IRQ of the device if a DT binding is available. Signed-off-by: Liviu Dudau --- drivers/pci/pci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 63a54a3..8e65dc3 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -1453,6 +1454,9 @@ EXPORT_SYMBOL(pcim_pin_device); */ int __weak pcibios_add_device(struct pci_dev *dev) { +#ifdef CONFIG_OF + dev->irq = of_irq_parse_and_map_pci(dev, 0, 0); +#endif return 0; }