From patchwork Tue Jun 30 18:22:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Duc Dang X-Patchwork-Id: 6697951 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E36F1C05AD for ; Tue, 30 Jun 2015 18:27:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EAC6F2053E for ; Tue, 30 Jun 2015 18:27:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2481820629 for ; Tue, 30 Jun 2015 18:27:03 +0000 (UTC) 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 1ZA0CB-0000Qi-4X; Tue, 30 Jun 2015 18:23:47 +0000 Received: from mail-pd0-x231.google.com ([2607:f8b0:400e:c02::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZA0C1-0000Ha-OQ for linux-arm-kernel@lists.infradead.org; Tue, 30 Jun 2015 18:23:38 +0000 Received: by pdbep18 with SMTP id ep18so10359814pdb.1 for ; Tue, 30 Jun 2015 11:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=oR2M3ZS/gt1wtxj/uIqGR0mRS4fGtEUdwlCEE05RIpU=; b=MnIYfrpDDfxELLGfLsdIVterU8loEMsp7El3CfwFYE0oBUeFxU5kY6C/HkfglDRT2e xU9DoSsPSY6KQCVbJzbXbD7TuZOZ+xbNAmlLk0vTXhj3dJiWw8NRTLxTiPDrQ0Y2DIju A3L+8GvmRsvA4zjUnEiGn5UHLQi+fDEKfcr+M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=oR2M3ZS/gt1wtxj/uIqGR0mRS4fGtEUdwlCEE05RIpU=; b=gpmWxDMeWmxvSFDMpTW5mfs+JM3eAMGntdS7meeoqjcwlJkiHMdkYdxDWH0R37GI2j RCovTqwRjmcDIZclc/NWyAqaL0RL95mgYQGXhoqkir82xPAzCh2O3mkzcSeF6ytCizWg asSkKeW1szJ9jiRjvB4yXnMH6ey9UZcmP5MbZPapnnVIcnJ7y/rLjvo5dg45ViovQ1yp guO0sY3Q+eQIQsTNczoC0XhG9n1mMVI+NCo36jb6XjNrdU1g1JjOpVx4e/2L/B+vNMGo pZE88aE/FnWDaH03K2Rx9EkZU8l52GGGb0B2uYLmVnIh7oYVmhy9Acc8OoZ4r8TwOzz4 7Xcg== X-Gm-Message-State: ALoCoQnqfYQZF67DuGu+uOJAMPhy0tkEbllQOtLGhNwrw4As7TI3oHUzpDQfiuwg/ut4gmiYLsv+ X-Received: by 10.68.235.38 with SMTP id uj6mr46204301pbc.57.1435688596493; Tue, 30 Jun 2015 11:23:16 -0700 (PDT) Received: from dhdang-Precision-WorkStation-T3400.amcc.com (67-207-112-226.static.wiline.com. [67.207.112.226]) by mx.google.com with ESMTPSA id us3sm46278208pbc.94.2015.06.30.11.23.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Jun 2015 11:23:15 -0700 (PDT) From: Duc Dang To: Bjorn Helgaas , Catalin Marinas , Ian Campbell , Pawel Moll , Rob Herring , Mark Rutland , Kumar Gala , Will Deacon , "David S. Miller" Subject: [PATCH v2 2/2] pci: xgene: Fix driver to handle multiple memory ranges Date: Tue, 30 Jun 2015 11:22:28 -0700 Message-Id: <67452792cee2b4275702fda8db9b9f59c7d5aa55.1435688121.git.dhdang@apm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: <46305464.n5SOjGAhJb@wuerfel> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150630_112337_877205_95C351BE X-CRM114-Status: GOOD ( 15.76 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-pci@vger.kernel.org, Duc Dang , patches@apm.com, linux-kernel@vger.kernel.org, Tanmay Inamdar , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP X-Gene PCIe controller has registers to support multiple memory ranges. This patch implement addtional register configuration required for the driver to support 1 additional huge 64-bit prefetch memory window. Signed-off-by: Duc Dang Signed-off-by: Tanmay Inamdar --- drivers/pci/host/pci-xgene.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c index a9dfb70..55fe865 100644 --- a/drivers/pci/host/pci-xgene.c +++ b/drivers/pci/host/pci-xgene.c @@ -321,8 +321,16 @@ static int xgene_pcie_map_ranges(struct xgene_pcie_port *port, return ret; break; case IORESOURCE_MEM: - xgene_pcie_setup_ob_reg(port, res, OMR1BARL, res->start, - res->start - window->offset); + if (res->flags & IORESOURCE_PREFETCH) + xgene_pcie_setup_ob_reg(port, res, OMR2BARL, + res->start, + res->start - + window->offset); + else + xgene_pcie_setup_ob_reg(port, res, OMR1BARL, + res->start, + res->start - + window->offset); break; case IORESOURCE_BUS: break;