diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-03 16:55:18 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-13 16:51:08 -0700 |
commit | caa4daa2ae3dc0a3e516addea5772c9af76abcb0 (patch) | |
tree | 0abbc5b538894532f4db28d56e4645d3be230d27 /drivers/pci | |
parent | 41575d8e4c334df148c4cdd7c40cc825dc0fcaa1 (diff) | |
download | u-boot-caa4daa2ae3dc0a3e516addea5772c9af76abcb0.zip u-boot-caa4daa2ae3dc0a3e516addea5772c9af76abcb0.tar.gz u-boot-caa4daa2ae3dc0a3e516addea5772c9af76abcb0.tar.bz2 |
dm: treewide: Rename 'platdata' variables to just 'plat'
We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).
Rename some of the latter variables to end with 'plat' for consistency.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci-emul-uclass.c | 4 | ||||
-rw-r--r-- | drivers/pci/pci-rcar-gen3.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci-uclass.c | 24 | ||||
-rw-r--r-- | drivers/pci/pci_mvebu.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci_rom.c | 6 | ||||
-rw-r--r-- | drivers/pci/pci_sandbox.c | 2 | ||||
-rw-r--r-- | drivers/pci/pcie_mediatek.c | 2 |
7 files changed, 21 insertions, 21 deletions
diff --git a/drivers/pci/pci-emul-uclass.c b/drivers/pci/pci-emul-uclass.c index 3ca9a15..f71ba42 100644 --- a/drivers/pci/pci-emul-uclass.c +++ b/drivers/pci/pci-emul-uclass.c @@ -110,9 +110,9 @@ UCLASS_DRIVER(pci_emul) = { }; /* - * This uclass is a child of the pci bus. Its platdata is not defined here so + * This uclass is a child of the pci bus. Its plat is not defined here so * is defined by its parent, UCLASS_PCI, which uses struct pci_child_platdata. - * See per_child_platdata_auto in UCLASS_DRIVER(pci). + * See per_child_plat_auto in UCLASS_DRIVER(pci). */ UCLASS_DRIVER(pci_emul_parent) = { .id = UCLASS_PCI_EMUL_PARENT, diff --git a/drivers/pci/pci-rcar-gen3.c b/drivers/pci/pci-rcar-gen3.c index f01fcf6..3a0a4b5 100644 --- a/drivers/pci/pci-rcar-gen3.c +++ b/drivers/pci/pci-rcar-gen3.c @@ -400,5 +400,5 @@ U_BOOT_DRIVER(rcar_gen3_pcie) = { .ops = &rcar_gen3_pcie_ops, .probe = rcar_gen3_pcie_probe, .ofdata_to_platdata = rcar_gen3_pcie_ofdata_to_platdata, - .platdata_auto = sizeof(struct rcar_gen3_pcie_priv), + .plat_auto = sizeof(struct rcar_gen3_pcie_priv), }; diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index 6093072..7625d43 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -49,7 +49,7 @@ struct udevice *pci_get_controller(struct udevice *dev) pci_dev_t dm_pci_get_bdf(const struct udevice *dev) { - struct pci_child_platdata *pplat = dev_get_parent_platdata(dev); + struct pci_child_platdata *pplat = dev_get_parent_plat(dev); struct udevice *bus = dev->parent; /* @@ -138,7 +138,7 @@ int pci_bus_find_devfn(const struct udevice *bus, pci_dev_t find_devfn, device_find_next_child(&dev)) { struct pci_child_platdata *pplat; - pplat = dev_get_parent_platdata(dev); + pplat = dev_get_parent_plat(dev); if (pplat && pplat->devfn == find_devfn) { *devp = dev; return 0; @@ -165,7 +165,7 @@ static int pci_device_matches_ids(struct udevice *dev, struct pci_child_platdata *pplat; int i; - pplat = dev_get_parent_platdata(dev); + pplat = dev_get_parent_plat(dev); if (!pplat) return -EINVAL; for (i = 0; ids[i].vendor != 0; i++) { @@ -224,7 +224,7 @@ static int dm_pci_bus_find_device(struct udevice *bus, unsigned int vendor, for (device_find_first_child(bus, &dev); dev; device_find_next_child(&dev)) { - pplat = dev_get_parent_platdata(dev); + pplat = dev_get_parent_plat(dev); if (pplat->vendor == vendor && pplat->device == device) { if (!(*indexp)--) { *devp = dev; @@ -261,7 +261,7 @@ int dm_pci_find_class(uint find_class, int index, struct udevice **devp) for (pci_find_first_device(&dev); dev; pci_find_next_device(&dev)) { - struct pci_child_platdata *pplat = dev_get_parent_platdata(dev); + struct pci_child_platdata *pplat = dev_get_parent_plat(dev); if (pplat->class == find_class && !index--) { *devp = dev; @@ -548,7 +548,7 @@ int pci_auto_config_devices(struct udevice *bus) max_bus = ret; sub_bus = max(sub_bus, max_bus); - pplat = dev_get_parent_platdata(dev); + pplat = dev_get_parent_plat(dev); if (pplat->class == (PCI_CLASS_DISPLAY_VGA << 8)) set_vga_bridge_bits(dev); } @@ -744,7 +744,7 @@ static int pci_find_and_bind_driver(struct udevice *parent, /* * We could pass the descriptor to the driver as - * platdata (instead of NULL) and allow its bind() + * plat (instead of NULL) and allow its bind() * method to return -ENOENT if it doesn't support this * device. That way we could continue the search to * find another driver. For now this doesn't seem @@ -868,7 +868,7 @@ int pci_bind_bus_devices(struct udevice *bus) return ret; /* Update the platform data */ - pplat = dev_get_parent_platdata(dev); + pplat = dev_get_parent_plat(dev); pplat->devfn = PCI_MASK_BUS(bdf); pplat->vendor = vendor; pplat->device = device; @@ -1085,7 +1085,7 @@ static int pci_uclass_child_post_bind(struct udevice *dev) if (!dev_of_valid(dev)) return 0; - pplat = dev_get_parent_platdata(dev); + pplat = dev_get_parent_plat(dev); /* Extract vendor id and device id if available */ ofnode_read_pci_vendev(dev_ofnode(dev), &pplat->vendor, &pplat->device); @@ -1523,7 +1523,7 @@ static void *dm_pci_map_ea_bar(struct udevice *dev, int bar, int flags, void *dm_pci_map_bar(struct udevice *dev, int bar, int flags) { - struct pci_child_platdata *pdata = dev_get_parent_platdata(dev); + struct pci_child_platdata *pdata = dev_get_parent_plat(dev); struct udevice *udev = dev; pci_addr_t pci_bus_addr; u32 bar_response; @@ -1753,7 +1753,7 @@ int pci_sriov_init(struct udevice *pdev, int vf_en) } /* Update the platform data */ - pplat = dev_get_parent_platdata(dev); + pplat = dev_get_parent_plat(dev); pplat->devfn = PCI_MASK_BUS(bdf); pplat->vendor = vendor; pplat->device = device; @@ -1797,7 +1797,7 @@ UCLASS_DRIVER(pci) = { .post_probe = pci_uclass_post_probe, .child_post_bind = pci_uclass_child_post_bind, .per_device_auto = sizeof(struct pci_controller), - .per_child_platdata_auto = + .per_child_plat_auto = sizeof(struct pci_child_platdata), }; diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c index 207ae33..7deb15f 100644 --- a/drivers/pci/pci_mvebu.c +++ b/drivers/pci/pci_mvebu.c @@ -471,7 +471,7 @@ static struct driver pcie_mvebu_drv = { .ops = &mvebu_pcie_ops, .probe = mvebu_pcie_probe, .ofdata_to_platdata = mvebu_pcie_ofdata_to_platdata, - .platdata_auto = sizeof(struct mvebu_pcie), + .plat_auto = sizeof(struct mvebu_pcie), }; /* diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c index fa29d69..9c98496 100644 --- a/drivers/pci/pci_rom.c +++ b/drivers/pci/pci_rom.c @@ -68,7 +68,7 @@ __weak uint32_t board_map_oprom_vendev(uint32_t vendev) static int pci_rom_probe(struct udevice *dev, struct pci_rom_header **hdrp) { - struct pci_child_platdata *pplat = dev_get_parent_platdata(dev); + struct pci_child_platdata *pplat = dev_get_parent_plat(dev); struct pci_rom_header *rom_header; struct pci_rom_data *rom_data; u16 rom_vendor, rom_device; @@ -236,7 +236,7 @@ void setup_video(struct screen_info *screen_info) int dm_pci_run_vga_bios(struct udevice *dev, int (*int15_handler)(void), int exec_method) { - struct pci_child_platdata *pplat = dev_get_parent_platdata(dev); + struct pci_child_platdata *pplat = dev_get_parent_plat(dev); struct pci_rom_header *rom = NULL, *ram = NULL; int vesa_mode = -1; bool emulate, alloced; @@ -363,7 +363,7 @@ int vbe_setup_video_priv(struct vesa_mode_info *vesa, int vbe_setup_video(struct udevice *dev, int (*int15_handler)(void)) { - struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *plat = dev_get_uclass_plat(dev); struct video_priv *uc_priv = dev_get_uclass_priv(dev); int ret; diff --git a/drivers/pci/pci_sandbox.c b/drivers/pci/pci_sandbox.c index d318b33..6de9af9 100644 --- a/drivers/pci/pci_sandbox.c +++ b/drivers/pci/pci_sandbox.c @@ -132,6 +132,6 @@ U_BOOT_DRIVER(pci_sandbox) = { /* Attach an emulator if we can */ .child_post_bind = dm_scan_fdt_dev, - .per_child_platdata_auto = + .per_child_plat_auto = sizeof(struct pci_child_platdata), }; diff --git a/drivers/pci/pcie_mediatek.c b/drivers/pci/pcie_mediatek.c index 2ebe4a4..41c38ed 100644 --- a/drivers/pci/pcie_mediatek.c +++ b/drivers/pci/pcie_mediatek.c @@ -264,7 +264,7 @@ static struct mtk_pcie_port *mtk_pcie_find_port(const struct udevice *bus, while (dev->parent->seq != 0) dev = dev->parent; - pplat = dev_get_parent_platdata(dev); + pplat = dev_get_parent_plat(dev); } list_for_each_entry(port, &pcie->ports, list) { |