From patchwork Mon Sep 29 14:29:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 38081 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 03019201F1 for ; Mon, 29 Sep 2014 14:32:56 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id e51sf627282eek.7 for ; Mon, 29 Sep 2014 07:32: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: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=S/HJkrfZYlexwmgdRoRP7/iXrgFy13+G0yujJ4PNp60=; b=EZjDiQ4ImvlxvRps3P8RPfsaZAqin7VhNdJJJKBeeSQH7UmnlSl62DfNgnwbCOfVNQ 5QrDUrkkYTb5qlaBOb8Jpz7c91IuIJAhyEvwozJHAS7xCe8ujRv/6uAlWLJ1aGAyJoLo MaZPdO5JLpq4c6tQ7I6KmI+1wJlOhnoYXdQyNYKlI6cMod1oWuywr0R3SlwIUWKCU0te qeFUek4UoDJ0/WqFhdBHjR/j8ZfEzbFrEXu5wFLhmxxXVHOnoyPpy33+YGFx2ZHuW7I6 U5Yyf+oUGY/z6ygzXYUBVMmhSguDZbN4DiNgT5zswrybYEuItWI1r88hI0RUS4PXsuxJ PDpQ== X-Gm-Message-State: ALoCoQk4p4KvtlWaO4kflIcnwPxoNd5OfEXR2Fn82aKKKmFr0psBHVpwmdWlFjctmQC7oiw3J5DI X-Received: by 10.180.38.11 with SMTP id c11mr278713wik.5.1412001175869; Mon, 29 Sep 2014 07:32:55 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.40 with SMTP id 8ls595138laj.65.gmail; Mon, 29 Sep 2014 07:32:55 -0700 (PDT) X-Received: by 10.152.22.200 with SMTP id g8mr40286606laf.1.1412001175694; Mon, 29 Sep 2014 07:32:55 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com [209.85.215.48]) by mx.google.com with ESMTPS id jn7si18645993lbc.7.2014.09.29.07.32.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Sep 2014 07:32:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by mail-la0-f48.google.com with SMTP id q1so6438943lam.21 for ; Mon, 29 Sep 2014 07:32:55 -0700 (PDT) X-Received: by 10.112.75.233 with SMTP id f9mr3400619lbw.102.1412001175360; Mon, 29 Sep 2014 07:32:55 -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.130.169 with SMTP id of9csp184584lbb; Mon, 29 Sep 2014 07:32:54 -0700 (PDT) X-Received: by 10.68.224.99 with SMTP id rb3mr61896291pbc.115.1412001173905; Mon, 29 Sep 2014 07:32:53 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id pd9si23396067pac.49.2014.09.29.07.32.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Sep 2014 07:32:53 -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 1XYbzG-00054e-31; Mon, 29 Sep 2014 14:31:38 +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 1XYbyQ-0004Fs-M5 for linux-arm-kernel@lists.infradead.org; Mon, 29 Sep 2014 14:30:48 +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 s8TETVYG004719; Mon, 29 Sep 2014 15:29:34 +0100 From: Liviu Dudau To: Bjorn Helgaas , Arnd Bergmann , Rob Herring , Jason Gunthorpe , Benjamin Herrenschmidt , Catalin Marinas , Will Deacon , Russell King , linux-pci , Linus Walleij Subject: [PATCH v13 05/12] of/pci: Move of_pci_range_to_resources() to of/address.c Date: Mon, 29 Sep 2014 15:29:24 +0100 Message-Id: <1412000971-9242-6-git-send-email-Liviu.Dudau@arm.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1412000971-9242-1-git-send-email-Liviu.Dudau@arm.com> References: <1412000971-9242-1-git-send-email-Liviu.Dudau@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140929_073047_093798_F960D622 X-CRM114-Status: GOOD ( 10.68 ) X-Spam-Score: -3.1 (---) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-3.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [217.140.96.21 listed in wl.mailspike.net] -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.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: linux-arch , Sinan Kaya , Kukjin Kim , Device Tree ML , Jingoo Han , LKML , Grant Likely , Tanmay Inamdar , Suravee Suthikulanit , Grant Likely , Yinghai Lu , Jiang Liu , 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.215.48 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 We need to enhance of_pci_range_to_resources() enough that it won't make sense for it to be inline anymore. Move it to drivers/of/address.c, keeping it under #ifdef CONFIG_PCI. [bhelgaas: drop extra detail from changelog, move def under CONFIG_PCI] Signed-off-by: Liviu Dudau Signed-off-by: Bjorn Helgaas CC: Grant Likely CC: Rob Herring CC: Arnd Bergmann CC: Catalin Marinas --- drivers/of/address.c | 9 +++++++++ include/linux/of_address.h | 15 +++------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/of/address.c b/drivers/of/address.c index 758d4f0..327a574 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -295,6 +295,15 @@ struct of_pci_range *of_pci_range_parser_one(struct of_pci_range_parser *parser, } EXPORT_SYMBOL_GPL(of_pci_range_parser_one); +void of_pci_range_to_resource(struct of_pci_range *range, + struct device_node *np, struct resource *res) +{ + res->flags = range->flags; + res->start = range->cpu_addr; + res->end = range->cpu_addr + range->size - 1; + res->parent = res->child = res->sibling = NULL; + res->name = np->full_name; +} #endif /* CONFIG_PCI */ /* diff --git a/include/linux/of_address.h b/include/linux/of_address.h index ecf913c..fa20aa1 100644 --- a/include/linux/of_address.h +++ b/include/linux/of_address.h @@ -129,18 +129,9 @@ extern const __be32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size, unsigned int *flags); extern int of_pci_address_to_resource(struct device_node *dev, int bar, struct resource *r); - -static inline void of_pci_range_to_resource(struct of_pci_range *range, - struct device_node *np, - struct resource *res) -{ - res->flags = range->flags; - res->start = range->cpu_addr; - res->end = range->cpu_addr + range->size - 1; - res->parent = res->child = res->sibling = NULL; - res->name = np->full_name; -} - +extern void of_pci_range_to_resource(struct of_pci_range *range, + struct device_node *np, + struct resource *res); #else /* CONFIG_OF_ADDRESS && CONFIG_PCI */ static inline int of_pci_address_to_resource(struct device_node *dev, int bar, struct resource *r)