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: 6759721 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CC7469F38C for ; Thu, 9 Jul 2015 21:21:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F238E2079F for ; Thu, 9 Jul 2015 21:21:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 22D012078F for ; Thu, 9 Jul 2015 21:21:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754188AbbGIVVg (ORCPT ); Thu, 9 Jul 2015 17:21:36 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:34928 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754016AbbGIVVY (ORCPT ); Thu, 9 Jul 2015 17:21:24 -0400 Received: by pactm7 with SMTP id tm7so156495284pac.2 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=BIeRknCUeshcOHdo5R9HaD8sYoBzofgykL66RRCk5OlTh6gyHJ8YLkNV3UmvtzDZP8 od4Z9MGY/Tg+0C3GjWu8aQhx+sMrx7h+00iz6mrLlSWwABwAbNKXqMfoexA140GIzpHO ogpYd9ebasBQjNEnA6Ea4KkPM6VRWMtg/0UQhlrrk3lLvKjoHSl5PQDz/vqDWYYu/FVj DdX1LqELr/3LbdQ+VWeZU7d0Jw2+kGzzLYIjS89H7dO5/gMTrw7O546yXa8aBHO2kHPW hdAwfEEMuyNvgmIRCDxjBQv3/cUO6xMq3mkFz1X4fLJpe0ltBACb4a7I1pEDNYhLXBSd eU+A== X-Gm-Message-State: ALoCoQnDwurKApRHT1tbcrqW5TzvSBkWV6cxJoo9OzERizeUbUnsB/G8+RcZLT4OMzm8SytGIyJb 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" Cc: devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tanmay Inamdar , patches@apm.com, Duc Dang 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> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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;