1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

dm: pci: Add a function to read a PCI BAR

Add a driver-model function for reading the PCI BAR from a device.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Simon Glass
2015-11-29 13:17:53 -07:00
parent a0eb835635
commit bab17cf143
2 changed files with 22 additions and 0 deletions

View File

@@ -1166,6 +1166,15 @@ struct udevice *pci_get_controller(struct udevice *dev);
int pci_get_regions(struct udevice *dev, struct pci_region **iop,
struct pci_region **memp, struct pci_region **prefp);
/**
* dm_pci_read_bar32() - read a base address register from a device
*
* @dev: Device to check
* @barnum: Bar number to read (numbered from 0)
* @return: value of BAR
*/
u32 dm_pci_read_bar32(struct udevice *dev, int barnum);
/**
* dm_pci_find_device() - find a device by vendor/device ID
*