From patchwork Wed Jul 25 18:02:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 1239121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 44AB8DFFCD for ; Wed, 25 Jul 2012 18:06:33 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Su5vL-0000Wg-KZ; Wed, 25 Jul 2012 18:03:03 +0000 Received: from avon.wwwdotorg.org ([2001:470:1f0f:bd7::2]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Su5vB-0000WS-3c for linux-arm-kernel@lists.infradead.org; Wed, 25 Jul 2012 18:02:54 +0000 Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id 418B59EAD0; Wed, 25 Jul 2012 12:08:22 -0600 (MDT) Received: from localhost.localdomain (searspoint.nvidia.com [216.228.112.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id E5EDDE40E1; Wed, 25 Jul 2012 12:02:44 -0600 (MDT) From: Stephen Warren To: Rob Herring , arm@kernel.org Subject: [PATCH] ARM: tegra: fix PCIe resource calculation Date: Wed, 25 Jul 2012 12:02:38 -0600 Message-Id: <1343239358-3239-1-git-send-email-swarren@wwwdotorg.org> X-Mailer: git-send-email 1.7.0.4 X-NVConfidentiality: public X-Virus-Scanned: clamav-milter 0.96.5 at avon.wwwdotorg.org X-Virus-Status: Clean X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-tegra@vger.kernel.org, Stephen Warren , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Stephen Warren Commit 0acc43c "ARM: tegra: use fixed PCI i/o mapping" re-numbered the resource array entries that the driver used, but missed one location. This causes request_resource() to fail, and the driver to panic. Signed-off-by: Stephen Warren --- Rob, I'm not sure if you can squash this into your PCIE commit, or if we need to apply it on top? arch/arm/mach-tegra/pcie.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c index 576347a..3463fb5 100644 --- a/arch/arm/mach-tegra/pcie.c +++ b/arch/arm/mach-tegra/pcie.c @@ -406,7 +406,7 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys) pp->res[1].name = pp->prefetch_space_name; if (pp->index == 0) { pp->res[1].start = PREFETCH_MEM_BASE_0; - pp->res[1].end = pp->res[2].start + PREFETCH_MEM_SIZE_0 - 1; + pp->res[1].end = pp->res[1].start + PREFETCH_MEM_SIZE_0 - 1; } else { pp->res[1].start = PREFETCH_MEM_BASE_1; pp->res[1].end = pp->res[1].start + PREFETCH_MEM_SIZE_1 - 1;