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>
This commit is contained in:
		
							parent
							
								
									7598759d19
								
							
						
					
					
						commit
						c49f1fa892
					
				|  | @ -26,12 +26,11 @@ | ||||||
| int pci_##rw##_cfg_##size(struct pci_controller *hose,			\ | int pci_##rw##_cfg_##size(struct pci_controller *hose,			\ | ||||||
| 	pci_dev_t dev, int offset, type val)				\ | 	pci_dev_t dev, int offset, type val)				\ | ||||||
| {									\ | {									\ | ||||||
| 	u32 addr = 0;							\ | 	u32 addr = PCI_CONF1_ADDRESS(PCI_BUS(dev), PCI_DEV(dev),	\ | ||||||
| 	u16 cfg_type = 0;						\ | 				     PCI_FUNC(dev), offset);		\ | ||||||
| 	addr = ((offset & 0xfc) | cfg_type | (dev)  | 0x80000000);	\ |  | ||||||
| 	out_be32(hose->cfg_addr, addr);					\ | 	out_be32(hose->cfg_addr, addr);					\ | ||||||
| 	cfg_##rw(val, hose->cfg_data + (offset & mask), type, op);	\ | 	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;							\ | 	return 0;							\ | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue