mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-27 15:10:26 +09:00
pci: mpc85xx: Wrap LAW programming with CONFIG_FSL_LAW
For the QEMU ppce500 machine, LAW registers are not implemented hence CONFIG_FSL_LAW is not turned on and all LAW APIs are not available. We should wrap all LAW registers programming in the mpc85xx PCI driver with CONFIG_FSL_LAW. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
This commit is contained in:
parent
2e91e8b332
commit
5a40f5c09d
@ -46,6 +46,7 @@ static int mpc85xx_pci_dm_write_config(struct udevice *dev, pci_dev_t bdf,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FSL_LAW
|
||||
static int
|
||||
mpc85xx_pci_dm_setup_laws(struct pci_region *io, struct pci_region *mem,
|
||||
struct pci_region *pre)
|
||||
@ -68,6 +69,7 @@ mpc85xx_pci_dm_setup_laws(struct pci_region *io, struct pci_region *mem,
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int mpc85xx_pci_dm_probe(struct udevice *dev)
|
||||
{
|
||||
@ -85,7 +87,9 @@ static int mpc85xx_pci_dm_probe(struct udevice *dev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FSL_LAW
|
||||
mpc85xx_pci_dm_setup_laws(io, mem, pre);
|
||||
#endif
|
||||
|
||||
pcix = priv->cfg_addr;
|
||||
/* BAR 1: memory */
|
||||
|
Loading…
Reference in New Issue
Block a user