aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAlexander Bigga <ab@mycable.de>2006-12-21 05:25:19 -0500
committerRalf Baechle <ralf@linux-mips.org>2007-01-10 15:02:24 -0500
commit8a93c4968fc177844680987b31d00d1fc3bc02aa (patch)
tree11d46ea7250a309ff3e26e6568d2096a36e82fe8 /arch
parente16d8df0be26c8e82c4a1188af8143f2d466b12a (diff)
[MIPS] Alchemy: Fix PCI-memory access
The problem was introduced in 2.6.18.3 with the casting of some 36bit-defines (PCI memory) in au1000.h to resource_size_t which may be u32 or u64 depending on the experimental CONFIG_RESOURCES_64BIT. With unset CONFIG_RESOURCES_64BIT, the pci-memory cannot be accessed because the ioremap in arch/mips/au1000/common/pci.c already used the truncated addresses. With set CONFIG_RESOURCES_64BIT, things get even worse, because PCI-scan aborts, due to resource conflict: request_resource() in arch/mips/pci/pci.c fails because the maximum iomem-address is 0xffffffff (32bit) but the pci-memory-start-address is 0x440000000 (36bit). To get pci working again, I propose the following patch: 1. remove the resource_size_t-casting from au1000.h again 2. make the casting in arch/mips/au1000/common/pci.c (it's allowed and necessary here. The 36bit-handling will be done in __fixup_bigphys_addr). With this patch pci works again like in 2.6.18.2, the gcc-compile warnings in pci.c are gone and it doesn't depend on CONFIG_EXPERIMENTAL. Signed-off-by: Alexander Bigga <ab@mycable.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> ---
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/au1000/common/pci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/au1000/common/pci.c b/arch/mips/au1000/common/pci.c
index da591f674893..9f8ce08e173b 100644
--- a/arch/mips/au1000/common/pci.c
+++ b/arch/mips/au1000/common/pci.c
@@ -39,15 +39,15 @@
39 39
40/* TBD */ 40/* TBD */
41static struct resource pci_io_resource = { 41static struct resource pci_io_resource = {
42 .start = PCI_IO_START, 42 .start = (resource_size_t)PCI_IO_START,
43 .end = PCI_IO_END, 43 .end = (resource_size_t)PCI_IO_END,
44 .name = "PCI IO space", 44 .name = "PCI IO space",
45 .flags = IORESOURCE_IO 45 .flags = IORESOURCE_IO
46}; 46};
47 47
48static struct resource pci_mem_resource = { 48static struct resource pci_mem_resource = {
49 .start = PCI_MEM_START, 49 .start = (resource_size_t)PCI_MEM_START,
50 .end = PCI_MEM_END, 50 .end = (resource_size_t)PCI_MEM_END,
51 .name = "PCI memory space", 51 .name = "PCI memory space",
52 .flags = IORESOURCE_MEM 52 .flags = IORESOURCE_MEM
53}; 53};