diff options
author | wdenk <wdenk> | 2003-03-25 16:50:56 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2003-03-25 16:50:56 +0000 |
commit | 4d75a504d00e65253229e1d1b798a7c37041f078 (patch) | |
tree | 47a665a7382343883c5d28c741c39d5c36d4a855 /drivers/pci_indirect.c | |
parent | 44e5c5c4f1b46991477140540b73df224eb1e4fc (diff) |
Add PCI support for MPC8250 Boards (PM825 module)
Diffstat (limited to 'drivers/pci_indirect.c')
-rw-r--r-- | drivers/pci_indirect.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/pci_indirect.c b/drivers/pci_indirect.c index 08be082e31..f7b4422451 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 \ |