From patchwork Thu Jul 9 21:20:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Duc Dang X-Patchwork-Id: 6759761 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 73619C05AC for ; Thu, 9 Jul 2015 21:24:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9315320721 for ; Thu, 9 Jul 2015 21:24:25 +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 BBD9620790 for ; Thu, 9 Jul 2015 21:24:24 +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 1ZDJGW-0002yN-W9; Thu, 09 Jul 2015 21:21:57 +0000 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZDJGK-0002m5-EP for linux-arm-kernel@lists.infradead.org; Thu, 09 Jul 2015 21:21:44 +0000 Received: by pabvl15 with SMTP id vl15so156233062pab.1 for ; Thu, 09 Jul 2015 14:21:23 -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=Rt6Ewv3ju7JL+m/u2Q/2lVQ53jTQ5GkO8LQ5dMjoOvZn5jQD7DMtLRcm4LSoOGcQQB 7SYat8QlElBQUqUnKRSQoPy5+bxECylx7/RKVcLC4TDgSJm+5XhiP19frDuYp2iBQaZl T6pmCScgs+Fu4KTq/kR0yG7ZkBHkL2imDWHLA= 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=Zrw9eNncu6daTBKcHTOgv63vYGrt2gQCscVrLEpusTNlp2h1ENn+daw2swagvvlP4r I11IE/WaS1N4MLHtdQdAMFRdqw6kggX68+oJFr65qkT0GIWJ2KR680ZIN3VpNGFKn9Ff Ul8OC2X9THI6WVFhWH1P0nPCQ3lz3nRoIfTneVhkvQK1RpZaRmqjWo+2hxuGf8v15x8G ntxONrhJIuKpmOktvoKgelP2U7Yzg7Gnx3YD0M+np2Nkca6GlOG97n+/cmk/YHER7M3Q MxuAvdLdmNUApjxxlYMBpkqAzu6NdCCZOvkCp18El+DLHonL00mEMjG1AoPpZIKB6FOo Or2g== X-Gm-Message-State: ALoCoQlodygW98jAYjI9f3e+v1IVZRA2AAJ2HQ6fWulyg2V/oIBI0Rjlkz1ltQRgCBpmIvTBfpui X-Received: by 10.66.155.102 with SMTP id vv6mr34283327pab.150.1436476883674; Thu, 09 Jul 2015 14:21:23 -0700 (PDT) Received: from dhdang-Precision-WorkStation-T3400.amcc.com (67-207-112-226.static.wiline.com. [67.207.112.226]) by smtp.gmail.com with ESMTPSA id ia3sm6965664pbc.31.2015.07.09.14.21.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Jul 2015 14:21:22 -0700 (PDT) From: Duc Dang To: Bjorn Helgaas , Arnd Bergmann , Catalin Marinas , Ian Campbell , Pawel Moll , Rob Herring , Mark Rutland , Kumar Gala , Will Deacon , "David S. Miller" Subject: [PATCH v3 2/2] pci: xgene: Fix driver to handle multiple memory ranges Date: Thu, 9 Jul 2015 14:20:12 -0700 Message-Id: <844cb76fe55ce4ce45411281500bdb93e0d6932a.1436476100.git.dhdang@apm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: <1481643.dA4ocqzitg@wuerfel> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150709_142144_509987_44B25BF7 X-CRM114-Status: GOOD ( 14.39 ) 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.4 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;