diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-02-05 02:11:25 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-02-05 02:11:25 -0500 |
commit | 3b0be1a4f2f7d8280574aa6e5eac2dd3dd57e2b7 (patch) | |
tree | b51654617a5ceec1417dcfa4c5fde0cfe87731f2 /arch/sh/drivers/pci | |
parent | 8e04221029067cbaff3fc8f4daf991532afbcbaf (diff) |
sh: Fix an off-by-1 in SH7780 PCIC memory resource mapping.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers/pci')
-rw-r--r-- | arch/sh/drivers/pci/pci-sh7780.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/sh/drivers/pci/pci-sh7780.c b/arch/sh/drivers/pci/pci-sh7780.c index 1e147f445c1a..ffdcbf10b95e 100644 --- a/arch/sh/drivers/pci/pci-sh7780.c +++ b/arch/sh/drivers/pci/pci-sh7780.c | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | static struct resource sh7785_pci_resources[] = { | 24 | static struct resource sh7785_pci_resources[] = { |
25 | { | 25 | { |
26 | .name = "SH7785_IO", | 26 | .name = "PCI IO", |
27 | .start = 0x1000, | 27 | .start = 0x1000, |
28 | .end = SZ_4M - 1, | 28 | .end = SZ_4M - 1, |
29 | .flags = IORESOURCE_IO, | 29 | .flags = IORESOURCE_IO, |
@@ -338,8 +338,8 @@ static int __init sh7780_pci_init(void) | |||
338 | /* | 338 | /* |
339 | * Setup the memory BARs | 339 | * Setup the memory BARs |
340 | */ | 340 | */ |
341 | for (i = 0; i < chan->nr_resources; i++) { | 341 | for (i = 1; i < chan->nr_resources; i++) { |
342 | struct resource *res = chan->resources + (i + 1); | 342 | struct resource *res = chan->resources + i; |
343 | resource_size_t size; | 343 | resource_size_t size; |
344 | 344 | ||
345 | if (unlikely(res->flags & IORESOURCE_IO)) | 345 | if (unlikely(res->flags & IORESOURCE_IO)) |
@@ -361,8 +361,8 @@ static int __init sh7780_pci_init(void) | |||
361 | * keeps things pretty simple. | 361 | * keeps things pretty simple. |
362 | */ | 362 | */ |
363 | __raw_writel(((roundup_pow_of_two(size) / SZ_256K) - 1) << 18, | 363 | __raw_writel(((roundup_pow_of_two(size) / SZ_256K) - 1) << 18, |
364 | chan->reg_base + SH7780_PCIMBMR(i)); | 364 | chan->reg_base + SH7780_PCIMBMR(i - 1)); |
365 | __raw_writel(res->start, chan->reg_base + SH7780_PCIMBR(i)); | 365 | __raw_writel(res->start, chan->reg_base + SH7780_PCIMBR(i - 1)); |
366 | } | 366 | } |
367 | 367 | ||
368 | /* | 368 | /* |