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: 6697921 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 792DF9F3A0 for ; Tue, 30 Jun 2015 18:23:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B4A9D20544 for ; Tue, 30 Jun 2015 18:23:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D3ECF2053D for ; Tue, 30 Jun 2015 18:23:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753357AbbF3SXr (ORCPT ); Tue, 30 Jun 2015 14:23:47 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:33049 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752369AbbF3SXS (ORCPT ); Tue, 30 Jun 2015 14:23:18 -0400 Received: by pacws9 with SMTP id ws9so9420107pac.0 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=EQGaNf/uI7nqljqJWhvjGayjCZWmHBbhgZK23V8xVkVeGu449vtlXms03IXWFXn1Zc GtXVocZwraYb8gBupTrbNX28qeTArdiTLqA0VHw593QIqwF1DFDvR5pG+EJLLJJbjbRH 98Yxe+A6PKIpN53BqS1woCkVwVSCvObFJOj2Pn47lRvcAnCc/mDb0jynk5nqMfp3xdcY AWNLMnypv3Kh61Iio9R04lV6eTYrlkC1fk4Q2l2ky3z53k9qwtG8gIL+MY2BbQakU82v ds06sgMLxZWXgrrtG0KISp1yO6el2DntT7qYd6QlSTaWbuIKss5JZgfFHgP1Y3hj8mWq 66Qw== X-Gm-Message-State: ALoCoQmEH8WgtXsPqfG/DsYAMss4CBQAoYwO63YiLixnhURvdas6cjjYKdvPrteBMWXQLBl9luZB 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" 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 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> 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.4 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;