aboutsummaryrefslogtreecommitdiff
path: root/lib_i386/pci_type1.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib_i386/pci_type1.c')
-rw-r--r--lib_i386/pci_type1.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib_i386/pci_type1.c b/lib_i386/pci_type1.c
index 8d35716ee..5dfa8ab4f 100644
--- a/lib_i386/pci_type1.c
+++ b/lib_i386/pci_type1.c
@@ -17,16 +17,16 @@
#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; \
}