From patchwork Thu May 29 16:03:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kumar Gala X-Patchwork-Id: 4266121 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 739379F30B for ; Thu, 29 May 2014 16:04:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 038BD2035C for ; Thu, 29 May 2014 16:04:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2A994202F8 for ; Thu, 29 May 2014 16:04:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757213AbaE2QDw (ORCPT ); Thu, 29 May 2014 12:03:52 -0400 Received: from smtp.codeaurora.org ([198.145.11.231]:47231 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756336AbaE2QDu (ORCPT ); Thu, 29 May 2014 12:03:50 -0400 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 3FF8513F414; Thu, 29 May 2014 16:03:50 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 2B4CC13F4C8; Thu, 29 May 2014 16:03:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from galak-ubuntu.qualcomm.com (rrcs-67-52-129-61.west.biz.rr.com [67.52.129.61]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: galak@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6BBCB13F414; Thu, 29 May 2014 16:03:48 +0000 (UTC) From: Kumar Gala To: Rob Herring , Grant Likely , Pawel Moll , Mark Rutland , Ian Campbell , Bjorn Helgaas Cc: Kumar Gala , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Liviu Dudau , Kishon Vijay Abraham I Subject: [PATCH] of: treat PCI config space as IORESOURCE_MEM type Date: Thu, 29 May 2014 11:03:46 -0500 Message-Id: <1401379426-9701-1-git-send-email-galak@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If we have a PCI config space specified in something like a ranges property we should treat it as memory type resource. Signed-off-by: Kumar Gala --- drivers/of/address.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/of/address.c b/drivers/of/address.c index cb4242a..4e7ee59 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -122,6 +122,9 @@ static unsigned int of_bus_pci_get_flags(const __be32 *addr) u32 w = be32_to_cpup(addr); switch((w >> 24) & 0x03) { + case 0x00: /* cfg space */ + flags |= IORESOURCE_MEM; + break; case 0x01: flags |= IORESOURCE_IO; break;