summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-03-25 16:50:56 +0000
committerwdenk <wdenk>2003-03-25 16:50:56 +0000
commit4d75a504d00e65253229e1d1b798a7c37041f078 (patch)
tree47a665a7382343883c5d28c741c39d5c36d4a855 /drivers
parent44e5c5c4f1b46991477140540b73df224eb1e4fc (diff)
downloadu-boot-imx-4d75a504d00e65253229e1d1b798a7c37041f078.zip
u-boot-imx-4d75a504d00e65253229e1d1b798a7c37041f078.tar.gz
u-boot-imx-4d75a504d00e65253229e1d1b798a7c37041f078.tar.bz2
Add PCI support for MPC8250 Boards (PM825 module)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci_indirect.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/pci_indirect.c b/drivers/pci_indirect.c
index 08be082..f7b4422 100644
--- a/drivers/pci_indirect.c
+++ b/drivers/pci_indirect.c
@@ -21,15 +21,28 @@
#define cfg_read(val, addr, type, op) *val = op((type)(addr))
#define cfg_write(val, addr, type, op) op((type *)(addr), (val))
+#ifdef CONFIG_PM826
#define INDIRECT_PCI_OP(rw, size, type, op, mask) \
static int \
indirect_##rw##_config_##size(struct pci_controller *hose, \
pci_dev_t dev, int offset, type val) \
{ \
out_le32(hose->cfg_addr, dev | (offset & 0xfc) | 0x80000000); \
+ sync(); \
cfg_##rw(val, hose->cfg_data + (offset & mask), type, op); \
return 0; \
}
+#else
+#define INDIRECT_PCI_OP(rw, size, type, op, mask) \
+static int \
+indirect_##rw##_config_##size(struct pci_controller *hose, \
+ pci_dev_t dev, int offset, type val) \
+{ \
+ out_le32(hose->cfg_addr, dev | (offset & 0xfc) | 0x80000000); \
+ cfg_##rw(val, hose->cfg_data + (offset & mask), type, op); \
+ return 0; \
+}
+#endif
#define INDIRECT_PCI_OP_ERRATA6(rw, size, type, op, mask) \
static int \