From patchwork Tue Aug 12 16:25:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 35294 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A58DF203C5 for ; Tue, 12 Aug 2014 16:28:34 +0000 (UTC) Received: by mail-pa0-f71.google.com with SMTP id et14sf72514881pad.6 for ; Tue, 12 Aug 2014 09:28:33 -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=cRZo3YAy8dHnexWxEzGMSUZ3kWuDKaRDbNly5T8VKPo=; b=WjfH0JMyXDxsDAdAXI+TXa6Ysygs2PgAjGT1x7/sysCU/uWirWhlo8t1R+LYgTilrP h/5sBMQ/X4HA+Tt2HbaY2lZXhoGpExiU6ilcCtZzfRdrXNTEAws+RoLZGUEUalfuGrx+ z+lkqyQ1DbqsJ6dp3UoOyRgzuWJQrrFd2E/nnazx4BfrwjW9TEwLb0mD9NEz1jntQUW5 8fUsRcsvWqmDG2eRggthEWbU+1kHnxINkA6PZKpzYixRNR2/wiHL0DCtczAee98DegO3 6wcAB+h9N2EM/5NYTXp/80fhe3c/ArWbp0TwvGKAALVT7745GDKmupu9ZvO1UddgJb3D VPbg== X-Gm-Message-State: ALoCoQmWcZlzc50OtdaMfk3J8C/X27oBrwMKSoGPmnhjBXiGeOMRau8xJW4d/xzZ1nSa2WnsJqra X-Received: by 10.66.147.227 with SMTP id tn3mr2954923pab.4.1407860913870; Tue, 12 Aug 2014 09:28:33 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.38.176 with SMTP id t45ls197823qgt.60.gmail; Tue, 12 Aug 2014 09:28:33 -0700 (PDT) X-Received: by 10.221.68.66 with SMTP id xx2mr5113838vcb.1.1407860913697; Tue, 12 Aug 2014 09:28:33 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id s15si6137916vdj.75.2014.08.12.09.28.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 09:28:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id im17so13590993vcb.31 for ; Tue, 12 Aug 2014 09:28:33 -0700 (PDT) X-Received: by 10.220.118.136 with SMTP id v8mr2075567vcq.50.1407860913603; Tue, 12 Aug 2014 09:28:33 -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 tc5csp262664vcb; Tue, 12 Aug 2014 09:28:33 -0700 (PDT) X-Received: by 10.68.68.131 with SMTP id w3mr5312913pbt.90.1407860912625; Tue, 12 Aug 2014 09:28:32 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id on3si12830509pdb.203.2014.08.12.09.28.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Aug 2014 09:28:32 -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 1XHEv3-0003QU-Rc; Tue, 12 Aug 2014 16:27:29 +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 1XHEuK-0002ua-FL for linux-arm-kernel@lists.infradead.org; Tue, 12 Aug 2014 16:26:46 +0000 Received: from e106497-lin.cambridge.arm.com (e106497-lin.cambridge.arm.com [10.1.195.53]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id s7CGPPgW026280; Tue, 12 Aug 2014 17:25:27 +0100 From: Liviu Dudau To: Bjorn Helgaas , Catalin Marinas , Will Deacon , Benjamin Herrenschmidt , Arnd Bergmann , Russell King , Tanmay Inamdar , Grant Likely , Sinan Kaya , Jingoo Han , Kukjin Kim , Suravee Suthikulanit , linux-pci Subject: [PATCH v9 02/12] PCI: OF: Parse and map the IRQ when adding the PCI device. Date: Tue, 12 Aug 2014 17:25:15 +0100 Message-Id: <1407860725-25202-3-git-send-email-Liviu.Dudau@arm.com> X-Mailer: git-send-email 2.0.4 In-Reply-To: <1407860725-25202-1-git-send-email-Liviu.Dudau@arm.com> References: <1407860725-25202-1-git-send-email-Liviu.Dudau@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140812_092644_917851_1460AB10 X-CRM114-Status: UNSURE ( 9.44 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -3.0 (---) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-3.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [217.140.96.21 listed in list.dnswl.org] -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record Cc: linux-arch , 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.172 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. Cc: Bjorn Helgaas Cc: Grant Likely Cc: Rob Herring Signed-off-by: Liviu Dudau --- drivers/pci/pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 1c8592b..29d1775 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,8 @@ EXPORT_SYMBOL(pcim_pin_device); */ int __weak pcibios_add_device(struct pci_dev *dev) { + dev->irq = of_irq_parse_and_map_pci(dev, 0, 0); + return 0; }