Skip to content

Commit

Permalink
m68k: mcf5445x: pci: Use PCI_CONF1_ADDRESS() macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pali authored and trini committed Jan 12, 2022
1 parent 7598759 commit c49f1fa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions arch/m68k/cpu/mcf5445x/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@
int pci_##rw##_cfg_##size(struct pci_controller *hose, \
pci_dev_t dev, int offset, type val) \
{ \
u32 addr = 0; \
u16 cfg_type = 0; \
addr = ((offset & 0xfc) | cfg_type | (dev) | 0x80000000); \
u32 addr = PCI_CONF1_ADDRESS(PCI_BUS(dev), PCI_DEV(dev), \
PCI_FUNC(dev), offset); \
out_be32(hose->cfg_addr, addr); \
cfg_##rw(val, hose->cfg_data + (offset & mask), type, op); \
out_be32(hose->cfg_addr, addr & 0x7fffffff); \
out_be32(hose->cfg_addr, addr & ~PCI_CONF1_ENABLE); \
return 0; \
}

Expand Down

0 comments on commit c49f1fa

Please sign in to comment.