linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>,
	linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/6] PCI: tegra: Fix extended configuration space mapping
Date: Tue, 26 Aug 2014 16:57:42 +0200	[thread overview]
Message-ID: <1409065064-17617-5-git-send-email-thierry.reding@gmail.com> (raw)
In-Reply-To: <1409065064-17617-1-git-send-email-thierry.reding@gmail.com>

From: Peter Daifuku <pdaifuku@nvidia.com>

The 16 chunks of 64 KiB that need to be stitched together to make up the
configuration space for one bus (1 MiB) are located 24 bits (== 16 MiB)
apart in physical address space. This is determined by the start of the
extended register field (bits 24-27) in the physical mapping.

Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/pci/host/pci-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index bd53b123218b..8264bce77750 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -383,7 +383,7 @@ static struct tegra_pcie_bus *tegra_pcie_bus_alloc(struct tegra_pcie *pcie,
 	for (i = 0; i < 16; i++) {
 		unsigned long virt = (unsigned long)bus->area->addr +
 				     i * SZ_64K;
-		phys_addr_t phys = cs + i * SZ_1M + busnr * SZ_64K;
+		phys_addr_t phys = cs + i * SZ_16M + busnr * SZ_64K;
 
 		err = ioremap_page_range(virt, virt + SZ_64K, phys, prot);
 		if (err < 0) {
-- 
2.0.4


  parent reply	other threads:[~2014-08-26 14:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 14:57 [PATCH v2 0/6] PCI: tegra: Fixes and Tegra124 support Thierry Reding
2014-08-26 14:57 ` [PATCH v2 1/6] resource: Add device-managed request/release_resource() Thierry Reding
2014-08-26 14:57 ` [PATCH v2 2/6] PCI: tegra: Implement a proper resource hierarchy Thierry Reding
2014-08-26 14:57 ` [PATCH v2 3/6] PCI: tegra: Clear CLKREQ# enable on port disable Thierry Reding
2014-08-26 14:57 ` Thierry Reding [this message]
2014-08-26 14:57 ` [PATCH v2 5/6] PCI: tegra: Make sure the PCIe PLL is really reset Thierry Reding
2014-08-26 14:57 ` [PATCH v2 6/6] PCI: tegra: Add Tegra124 support Thierry Reding
2014-08-26 15:08 ` [PATCH v2 0/6] PCI: tegra: Fixes and " Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1409065064-17617-5-git-send-email-thierry.reding@gmail.com \
    --to=thierry.reding@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=swarren@wwwdotorg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).