mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
dm: pci: Update the PCI read_config() method to const dev *
At present this method uses a non-const udevice pointer, but the call should not modify the device. Use a const pointer. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
fc347fbdd4
commit
c4e72c4ad8
26 changed files with 67 additions and 60 deletions
|
@ -899,8 +899,8 @@ struct dm_pci_ops {
|
|||
* @size: Access size
|
||||
* @return 0 if OK, -ve on error
|
||||
*/
|
||||
int (*read_config)(struct udevice *bus, pci_dev_t bdf, uint offset,
|
||||
ulong *valuep, enum pci_size_t size);
|
||||
int (*read_config)(const struct udevice *bus, pci_dev_t bdf,
|
||||
uint offset, ulong *valuep, enum pci_size_t size);
|
||||
/**
|
||||
* write_config() - Write a PCI configuration value
|
||||
*
|
||||
|
@ -974,7 +974,7 @@ int dm_pci_bus_find_bdf(pci_dev_t bdf, struct udevice **devp);
|
|||
* @devp: Returns the device for this address, if found
|
||||
* @return 0 if OK, -ENODEV if not found
|
||||
*/
|
||||
int pci_bus_find_devfn(struct udevice *bus, pci_dev_t find_devfn,
|
||||
int pci_bus_find_devfn(const struct udevice *bus, pci_dev_t find_devfn,
|
||||
struct udevice **devp);
|
||||
|
||||
/**
|
||||
|
@ -1155,8 +1155,9 @@ int pci_read_config8(pci_dev_t pcidev, int offset, u8 *valuep);
|
|||
* Return: 0 on success, else -EINVAL
|
||||
*/
|
||||
int pci_generic_mmap_write_config(
|
||||
struct udevice *bus,
|
||||
int (*addr_f)(struct udevice *bus, pci_dev_t bdf, uint offset, void **addrp),
|
||||
const struct udevice *bus,
|
||||
int (*addr_f)(const struct udevice *bus, pci_dev_t bdf, uint offset,
|
||||
void **addrp),
|
||||
pci_dev_t bdf,
|
||||
uint offset,
|
||||
ulong value,
|
||||
|
@ -1180,8 +1181,9 @@ int pci_generic_mmap_write_config(
|
|||
* Return: 0 on success, else -EINVAL
|
||||
*/
|
||||
int pci_generic_mmap_read_config(
|
||||
struct udevice *bus,
|
||||
int (*addr_f)(struct udevice *bus, pci_dev_t bdf, uint offset, void **addrp),
|
||||
const struct udevice *bus,
|
||||
int (*addr_f)(const struct udevice *bus, pci_dev_t bdf, uint offset,
|
||||
void **addrp),
|
||||
pci_dev_t bdf,
|
||||
uint offset,
|
||||
ulong *valuep,
|
||||
|
@ -1523,8 +1525,8 @@ struct dm_pci_emul_ops {
|
|||
* @size: Access size
|
||||
* @return 0 if OK, -ve on error
|
||||
*/
|
||||
int (*read_config)(struct udevice *dev, uint offset, ulong *valuep,
|
||||
enum pci_size_t size);
|
||||
int (*read_config)(const struct udevice *dev, uint offset,
|
||||
ulong *valuep, enum pci_size_t size);
|
||||
/**
|
||||
* write_config() - Write a PCI configuration value
|
||||
*
|
||||
|
@ -1609,7 +1611,7 @@ struct dm_pci_emul_ops {
|
|||
* @emulp: Returns emulated device if found
|
||||
* @return 0 if found, -ENODEV if not found
|
||||
*/
|
||||
int sandbox_pci_get_emul(struct udevice *bus, pci_dev_t find_devfn,
|
||||
int sandbox_pci_get_emul(const struct udevice *bus, pci_dev_t find_devfn,
|
||||
struct udevice **containerp, struct udevice **emulp);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue