]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - lib_i386/pci_type1.c
* Added support for both PCMCIA slots (at the same time!) on MPC8xx
[karo-tx-uboot.git] / lib_i386 / pci_type1.c
index 8d35716eed094f0848ce56992cbb76802cfc1a2b..5dfa8ab4fdc39b7b4228372183db9ab11d296303 100644 (file)
 #include <asm/io.h>
 #include <pci.h>
 
-#define cfg_read(val, addr, type, op)  *val = op((type)(addr))
-#define cfg_write(val, addr, type, op) op((val), (type *)(addr))
+#define cfg_read(val, addr, op)        *val = op((int)(addr))
+#define cfg_write(val, addr, op)       op((val), (int)(addr))
 
 #define TYPE1_PCI_OP(rw, size, type, op, mask)                  \
 static int                                                              \
 type1_##rw##_config_##size(struct pci_controller *hose,                 \
                              pci_dev_t dev, int offset, type val)       \
 {                                                                       \
-       outl(dev | (offset & 0xfc) | 0x80000000, hose->cfg_addr);        \
-       cfg_##rw(val, hose->cfg_data + (offset & mask), type, op);       \
+       outl(dev | (offset & 0xfc) | 0x80000000, (int)hose->cfg_addr);   \
+       cfg_##rw(val, hose->cfg_data + (offset & mask), op);     \
        return 0;                                                        \
 }