aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/pci_common.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-14 15:09:26 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-14 15:09:26 -0700
commit0127d6d5d925321650e7b92364420325689a03ef (patch)
tree341c0d70c0c21829bc69d28dcdad55d8a90f2153 /arch/sparc64/kernel/pci_common.c
parent1e0e76cf1376a0a1b49a23396e945456c329814e (diff)
parentfc395f8d589f4f0b3fcdd9b8bb84b7cacf711a4f (diff)
downloadkernel_samsung_smdk4412-0127d6d5d925321650e7b92364420325689a03ef.tar.gz
kernel_samsung_smdk4412-0127d6d5d925321650e7b92364420325689a03ef.tar.bz2
kernel_samsung_smdk4412-0127d6d5d925321650e7b92364420325689a03ef.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: Fix args to sun4v_ldc_revoke(). [SPARC64]: Really fix parport. [SPARC64]: Fix IO/MEM space sizing for PCI. [SPARC64]: Wire up cookie based sun4v interrupt registry.
Diffstat (limited to 'arch/sparc64/kernel/pci_common.c')
-rw-r--r--arch/sparc64/kernel/pci_common.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c
index f974fefc3eb..4249214608a 100644
--- a/arch/sparc64/kernel/pci_common.c
+++ b/arch/sparc64/kernel/pci_common.c
@@ -291,8 +291,9 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
for (i = 0; i < num_pbm_ranges; i++) {
const struct linux_prom_pci_ranges *pr = &pbm_ranges[i];
- unsigned long a;
+ unsigned long a, size;
u32 parent_phys_hi, parent_phys_lo;
+ u32 size_hi, size_lo;
int type;
parent_phys_hi = pr->parent_phys_hi;
@@ -300,9 +301,14 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
if (tlb_type == hypervisor)
parent_phys_hi &= 0x0fffffff;
+ size_hi = pr->size_hi;
+ size_lo = pr->size_lo;
+
type = (pr->child_phys_hi >> 24) & 0x3;
a = (((unsigned long)parent_phys_hi << 32UL) |
((unsigned long)parent_phys_lo << 0UL));
+ size = (((unsigned long)size_hi << 32UL) |
+ ((unsigned long)size_lo << 0UL));
switch (type) {
case 0:
@@ -313,7 +319,7 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
case 1:
/* 16-bit IO space, 16MB */
pbm->io_space.start = a;
- pbm->io_space.end = a + ((16UL*1024UL*1024UL) - 1UL);
+ pbm->io_space.end = a + size - 1UL;
pbm->io_space.flags = IORESOURCE_IO;
saw_io = 1;
break;
@@ -321,7 +327,7 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
case 2:
/* 32-bit MEM space, 2GB */
pbm->mem_space.start = a;
- pbm->mem_space.end = a + (0x80000000UL - 1UL);
+ pbm->mem_space.end = a + size - 1UL;
pbm->mem_space.flags = IORESOURCE_MEM;
saw_mem = 1;
break;