mirror of
https://xff.cz/git/u-boot/
synced 2025-09-25 12:31:17 +02:00
sandbox: pci: Drop the get_devfn() method
This method is not used anymore since the bus/device/function of PCI devices can be obtained from their (parent's per-child) platform data. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
@@ -54,13 +54,6 @@ struct swap_case_priv {
|
|||||||
char mem_text[MEM_TEXT_SIZE];
|
char mem_text[MEM_TEXT_SIZE];
|
||||||
};
|
};
|
||||||
|
|
||||||
static int sandbox_swap_case_get_devfn(struct udevice *dev)
|
|
||||||
{
|
|
||||||
struct pci_child_platdata *plat = dev_get_parent_platdata(dev);
|
|
||||||
|
|
||||||
return plat->devfn;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int sandbox_swap_case_use_ea(struct udevice *dev)
|
static int sandbox_swap_case_use_ea(struct udevice *dev)
|
||||||
{
|
{
|
||||||
return !!ofnode_get_property(dev->node, "use-ea", NULL);
|
return !!ofnode_get_property(dev->node, "use-ea", NULL);
|
||||||
@@ -393,7 +386,6 @@ static int sandbox_swap_case_unmap_physmem(struct udevice *dev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct dm_pci_emul_ops sandbox_swap_case_emul_ops = {
|
static struct dm_pci_emul_ops sandbox_swap_case_emul_ops = {
|
||||||
.get_devfn = sandbox_swap_case_get_devfn,
|
|
||||||
.read_config = sandbox_swap_case_read_config,
|
.read_config = sandbox_swap_case_read_config,
|
||||||
.write_config = sandbox_swap_case_write_config,
|
.write_config = sandbox_swap_case_write_config,
|
||||||
.read_io = sandbox_swap_case_read_io,
|
.read_io = sandbox_swap_case_read_io,
|
||||||
|
@@ -1490,13 +1490,6 @@ int dm_pci_find_class(uint find_class, int index, struct udevice **devp);
|
|||||||
* struct dm_pci_emul_ops - PCI device emulator operations
|
* struct dm_pci_emul_ops - PCI device emulator operations
|
||||||
*/
|
*/
|
||||||
struct dm_pci_emul_ops {
|
struct dm_pci_emul_ops {
|
||||||
/**
|
|
||||||
* get_devfn(): Check which device and function this emulators
|
|
||||||
*
|
|
||||||
* @dev: device to check
|
|
||||||
* @return the device and function this emulates, or -ve on error
|
|
||||||
*/
|
|
||||||
int (*get_devfn)(struct udevice *dev);
|
|
||||||
/**
|
/**
|
||||||
* read_config() - Read a PCI configuration value
|
* read_config() - Read a PCI configuration value
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user