Skip to content

Commit c49f1fa

Browse files
palitrini
authored andcommitted
m68k: mcf5445x: pci: Use PCI_CONF1_ADDRESS() macro
mcf5445x platform uses standard format of Config Address for PCI Configuration Mechanism #1. So use new U-Boot macro PCI_CONF1_ADDRESS(). Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
1 parent 7598759 commit c49f1fa

File tree

1 file changed

+3
-4
lines changed
  • arch/m68k/cpu/mcf5445x

1 file changed

+3
-4
lines changed

arch/m68k/cpu/mcf5445x/pci.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@
2626
int pci_##rw##_cfg_##size(struct pci_controller *hose, \
2727
pci_dev_t dev, int offset, type val) \
2828
{ \
29-
u32 addr = 0; \
30-
u16 cfg_type = 0; \
31-
addr = ((offset & 0xfc) | cfg_type | (dev) | 0x80000000); \
29+
u32 addr = PCI_CONF1_ADDRESS(PCI_BUS(dev), PCI_DEV(dev), \
30+
PCI_FUNC(dev), offset); \
3231
out_be32(hose->cfg_addr, addr); \
3332
cfg_##rw(val, hose->cfg_data + (offset & mask), type, op); \
34-
out_be32(hose->cfg_addr, addr & 0x7fffffff); \
33+
out_be32(hose->cfg_addr, addr & ~PCI_CONF1_ENABLE); \
3534
return 0; \
3635
}
3736

0 commit comments

Comments
 (0)