Commit:     fd046eb5378f2bc59851fcbc91957d01529fc3db
Parent:     37f26742437df885ddd72150ab352d0a931cd3a7
Author:     Alexander Bigga <[EMAIL PROTECTED]>
AuthorDate: Thu Dec 21 11:25:19 2006 +0100
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Tue Feb 6 16:53: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 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, the gcc-compile warnings
    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]>
 include/asm-mips/mach-au1x00/au1000.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/asm-mips/mach-au1x00/au1000.h 
index 43beeaa..58fca8a 100644
--- a/include/asm-mips/mach-au1x00/au1000.h
+++ b/include/asm-mips/mach-au1x00/au1000.h
@@ -1665,12 +1665,12 @@ extern au1xxx_irq_map_t au1xxx_irq_map[];
  * addresses.  For PCI IO, it's simpler because we get to do the ioremap
  * ourselves and then adjust the device's resources.
-#define Au1500_EXT_CFG            ((resource_size_t) 0x600000000ULL)
-#define Au1500_EXT_CFG_TYPE1      ((resource_size_t) 0x680000000ULL)
-#define Au1500_PCI_IO_START       ((resource_size_t) 0x500000000ULL)
-#define Au1500_PCI_IO_END         ((resource_size_t) 0x5000FFFFFULL)
-#define Au1500_PCI_MEM_START      ((resource_size_t) 0x440000000ULL)
-#define Au1500_PCI_MEM_END        ((resource_size_t) 0x44FFFFFFFULL)
+#define Au1500_EXT_CFG            0x600000000ULL
+#define Au1500_EXT_CFG_TYPE1      0x680000000ULL
+#define Au1500_PCI_IO_START       0x500000000ULL
+#define Au1500_PCI_IO_END         0x5000FFFFFULL
+#define Au1500_PCI_MEM_START      0x440000000ULL
+#define Au1500_PCI_MEM_END        0x44FFFFFFFULL
 #define PCI_IO_START    (Au1500_PCI_IO_START + 0x1000)
 #define PCI_IO_END      (Au1500_PCI_IO_END)
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