Commit:     8a93c4968fc177844680987b31d00d1fc3bc02aa
Parent:     e16d8df0be26c8e82c4a1188af8143f2d466b12a
Author:     Alexander Bigga <[EMAIL PROTECTED]>
AuthorDate: Thu Dec 21 11:25:19 2006 +0100
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Wed Jan 10 20:02:24 2007 +0000

        [MIPS] Alchemy:  Fix PCI-memory access
        The problem was introduced in 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 
        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 
        With this patch pci works again like in, the gcc-compile 
        in pci.c are gone and it doesn't depend on CONFIG_EXPERIMENTAL.
        Signed-off-by: Alexander Bigga <[EMAIL PROTECTED]>
        Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
 arch/mips/au1000/common/pci.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/mips/au1000/common/pci.c b/arch/mips/au1000/common/pci.c
index da591f6..9f8ce08 100644
--- a/arch/mips/au1000/common/pci.c
+++ b/arch/mips/au1000/common/pci.c
@@ -39,15 +39,15 @@
 /* TBD */
 static struct resource pci_io_resource = {
-       .start  = PCI_IO_START,
-       .end    = PCI_IO_END,
+       .start  = (resource_size_t)PCI_IO_START,
+       .end    = (resource_size_t)PCI_IO_END,
        .name   = "PCI IO space",
        .flags  = IORESOURCE_IO
 static struct resource pci_mem_resource = {
-       .start  = PCI_MEM_START,
-       .end    = PCI_MEM_END,
+       .start  = (resource_size_t)PCI_MEM_START,
+       .end    = (resource_size_t)PCI_MEM_END,
        .name   = "PCI memory space",
        .flags  = IORESOURCE_MEM
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to