Browse Source

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>
Simon Glass 3 years ago
parent
commit
caa4daa2ae
100 changed files with 280 additions and 281 deletions
  1. 1 1
      arch/arm/mach-imx/mx6/soc.c
  2. 1 1
      arch/arm/mach-imx/mx7/soc.c
  3. 1 1
      arch/arm/mach-omap2/am33xx/board.c
  4. 2 2
      arch/arm/mach-rockchip/spl-boot-order.c
  5. 1 1
      arch/arm/mach-stm32mp/bsec.c
  6. 6 6
      arch/arm/mach-stm32mp/pwr_regulator.c
  7. 1 1
      arch/x86/cpu/apollolake/hostbridge.c
  8. 1 1
      arch/x86/cpu/apollolake/pmc.c
  9. 2 2
      arch/x86/cpu/apollolake/spl.c
  10. 3 3
      arch/x86/cpu/apollolake/uart.c
  11. 1 1
      arch/x86/cpu/broadwell/sata.c
  12. 1 1
      arch/x86/cpu/cpu_x86.c
  13. 1 1
      arch/x86/cpu/intel_common/itss.c
  14. 3 3
      arch/x86/cpu/intel_common/p2sb.c
  15. 2 2
      arch/x86/cpu/mp_init.c
  16. 1 1
      arch/x86/cpu/qfw_cpu.c
  17. 2 2
      arch/x86/cpu/slimbootloader/serial.c
  18. 1 1
      arch/x86/include/asm/intel_pinctrl.h
  19. 1 1
      arch/x86/lib/acpi_table.c
  20. 2 2
      arch/x86/lib/fsp/fsp_graphics.c
  21. 1 1
      arch/x86/lib/mpspec.c
  22. 1 1
      arch/x86/lib/sfi.c
  23. 1 1
      board/armltd/integrator/integrator.c
  24. 1 1
      board/armltd/total_compute/total_compute.c
  25. 1 1
      board/armltd/vexpress64/vexpress64.c
  26. 1 1
      board/bluewater/gurnard/gurnard.c
  27. 1 1
      board/bluewater/snapper9260/snapper9260.c
  28. 1 1
      board/cadence/xtfpga/xtfpga.c
  29. 2 2
      board/cavium/thunderx/thunderx.c
  30. 1 1
      board/compulab/cm_fx6/cm_fx6.c
  31. 2 2
      board/davinci/da8xxevm/omapl138_lcdk.c
  32. 2 2
      board/freescale/ls1012afrdm/eth.c
  33. 2 2
      board/freescale/ls1012aqds/eth.c
  34. 2 2
      board/freescale/ls1012ardb/eth.c
  35. 2 2
      board/freescale/lx2160a/lx2160a.c
  36. 1 1
      board/gateworks/gw_ventana/gw_ventana.c
  37. 1 1
      board/hisilicon/hikey/hikey.c
  38. 1 1
      board/hisilicon/hikey960/hikey960.c
  39. 1 1
      board/hisilicon/poplar/poplar.c
  40. 1 1
      board/lg/sniper/sniper.c
  41. 1 1
      board/siemens/corvus/board.c
  42. 1 1
      board/st/stv0991/stv0991.c
  43. 1 1
      board/sysam/amcore/amcore.c
  44. 4 4
      board/ti/am335x/board.c
  45. 1 1
      board/toradex/apalis_imx6/apalis_imx6.c
  46. 1 1
      board/toradex/colibri-imx6ull/colibri-imx6ull.c
  47. 1 1
      board/toradex/colibri_imx6/colibri_imx6.c
  48. 2 2
      board/toradex/colibri_pxa270/colibri_pxa270.c
  49. 1 1
      cmd/Kconfig
  50. 1 1
      cmd/button.c
  51. 1 1
      cmd/cpu.c
  52. 1 1
      cmd/demo.c
  53. 2 2
      cmd/i2c.c
  54. 1 1
      cmd/led.c
  55. 1 1
      cmd/lsblk.c
  56. 1 1
      cmd/pci.c
  57. 16 16
      cmd/regulator.c
  58. 1 1
      cmd/remoteproc.c
  59. 1 1
      common/lcd_simplefb.c
  60. 1 1
      common/usb_hub.c
  61. 6 6
      common/usb_storage.c
  62. 30 30
      doc/driver-model/design.rst
  63. 3 3
      doc/driver-model/ethernet.rst
  64. 7 7
      doc/driver-model/of-plat.rst
  65. 1 1
      doc/driver-model/remoteproc-framework.rst
  66. 5 5
      doc/driver-model/spi-howto.rst
  67. 2 2
      doc/driver-model/usb-info.rst
  68. 16 16
      drivers/adc/adc-uclass.c
  69. 1 1
      drivers/adc/exynos-adc.c
  70. 1 1
      drivers/adc/meson-saradc.c
  71. 2 2
      drivers/adc/rockchip-saradc.c
  72. 1 1
      drivers/adc/sandbox.c
  73. 3 3
      drivers/adc/stm32-adc.c
  74. 3 3
      drivers/ata/ahci.c
  75. 3 3
      drivers/ata/dwc_ahsata.c
  76. 2 2
      drivers/ata/fsl_sata.c
  77. 3 3
      drivers/ata/sata_mv.c
  78. 2 2
      drivers/ata/sata_sil.c
  79. 14 14
      drivers/block/blk-uclass.c
  80. 3 3
      drivers/block/ide.c
  81. 4 4
      drivers/block/sandbox.c
  82. 2 2
      drivers/button/button-gpio.c
  83. 2 2
      drivers/button/button-uclass.c
  84. 1 1
      drivers/cache/cache-v5l2.c
  85. 1 1
      drivers/clk/altera/clk-agilex.c
  86. 1 1
      drivers/clk/altera/clk-arria10.c
  87. 9 9
      drivers/clk/at91/compat.c
  88. 1 1
      drivers/clk/clk_boston.c
  89. 1 1
      drivers/clk/clk_fixed_factor.c
  90. 1 1
      drivers/clk/clk_fixed_rate.c
  91. 1 1
      drivers/clk/rockchip/clk_rk3188.c
  92. 1 1
      drivers/clk/rockchip/clk_rk3288.c
  93. 1 1
      drivers/clk/rockchip/clk_rk3368.c
  94. 2 2
      drivers/clk/rockchip/clk_rk3399.c
  95. 6 6
      drivers/core/device-remove.c
  96. 31 32
      drivers/core/device.c
  97. 1 1
      drivers/core/dump.c
  98. 2 2
      drivers/core/root.c
  99. 3 3
      drivers/core/simple-bus.c
  100. 1 1
      drivers/cpu/at91_cpu.c

+ 1 - 1
arch/arm/mach-imx/mx6/soc.c

@@ -46,7 +46,7 @@ static const struct imx_thermal_plat imx6_thermal_plat = {
 
 U_BOOT_DEVICE(imx6_thermal) = {
 	.name = "imx_thermal",
-	.platdata = &imx6_thermal_plat,
+	.plat = &imx6_thermal_plat,
 };
 #endif
 

+ 1 - 1
arch/arm/mach-imx/mx7/soc.c

@@ -62,7 +62,7 @@ static const struct imx_thermal_plat imx7_thermal_plat = {
 
 U_BOOT_DEVICE(imx7_thermal) = {
 	.name = "imx_thermal",
-	.platdata = &imx7_thermal_plat,
+	.plat = &imx7_thermal_plat,
 };
 #endif
 

+ 1 - 1
arch/arm/mach-omap2/am33xx/board.c

@@ -157,7 +157,7 @@ static const struct omap3_spi_plat omap3_spi_pdata = {
 
 U_BOOT_DEVICE(am33xx_spi) = {
 	.name = "omap3_spi",
-	.platdata = &omap3_spi_pdata,
+	.plat = &omap3_spi_pdata,
 };
 #endif
 #endif

+ 2 - 2
arch/arm/mach-rockchip/spl-boot-order.c

@@ -46,7 +46,7 @@ static int spl_node_to_boot_device(int node)
 		     dev;
 		     device_find_next_child(&dev)) {
 			if (device_get_uclass_id(dev) == UCLASS_BLK) {
-				desc = dev_get_uclass_platdata(dev);
+				desc = dev_get_uclass_plat(dev);
 				break;
 			}
 		}
@@ -99,7 +99,7 @@ __weak const char *board_spl_was_booted_from(void)
 
 void board_boot_order(u32 *spl_boot_list)
 {
-	/* In case of no fdt (or only platdata), use spl_boot_device() */
+	/* In case of no fdt (or only plat), use spl_boot_device() */
 	if (!CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_PLATDATA)) {
 		spl_boot_list[0] = spl_boot_device();
 		return;

+ 1 - 1
arch/arm/mach-stm32mp/bsec.c

@@ -513,7 +513,7 @@ U_BOOT_DRIVER(stm32mp_bsec) = {
 	.id = UCLASS_MISC,
 	.of_match = stm32mp_bsec_ids,
 	.ofdata_to_platdata = stm32mp_bsec_ofdata_to_platdata,
-	.platdata_auto	= sizeof(struct stm32mp_bsec_platdata),
+	.plat_auto	= sizeof(struct stm32mp_bsec_platdata),
 	.ops = &stm32mp_bsec_ops,
 	.probe = stm32mp_bsec_probe,
 };

+ 6 - 6
arch/arm/mach-stm32mp/pwr_regulator.c

@@ -135,9 +135,9 @@ static const struct stm32mp_pwr_reg_info *stm32mp_pwr_reg_infos[] = {
 static int stm32mp_pwr_regulator_probe(struct udevice *dev)
 {
 	const struct stm32mp_pwr_reg_info **p = stm32mp_pwr_reg_infos;
-	struct dm_regulator_uclass_platdata *uc_pdata;
+	struct dm_regulator_uclass_plat *uc_pdata;
 
-	uc_pdata = dev_get_uclass_platdata(dev);
+	uc_pdata = dev_get_uclass_plat(dev);
 
 	while (*p) {
 		int rc;
@@ -172,9 +172,9 @@ static int stm32mp_pwr_regulator_probe(struct udevice *dev)
 
 static int stm32mp_pwr_regulator_set_value(struct udevice *dev, int uV)
 {
-	struct dm_regulator_uclass_platdata *uc_pdata;
+	struct dm_regulator_uclass_plat *uc_pdata;
 
-	uc_pdata = dev_get_uclass_platdata(dev);
+	uc_pdata = dev_get_uclass_plat(dev);
 	if (!uc_pdata)
 		return -ENXIO;
 
@@ -188,9 +188,9 @@ static int stm32mp_pwr_regulator_set_value(struct udevice *dev, int uV)
 
 static int stm32mp_pwr_regulator_get_value(struct udevice *dev)
 {
-	struct dm_regulator_uclass_platdata *uc_pdata;
+	struct dm_regulator_uclass_plat *uc_pdata;
 
-	uc_pdata = dev_get_uclass_platdata(dev);
+	uc_pdata = dev_get_uclass_plat(dev);
 	if (!uc_pdata)
 		return -ENXIO;
 

+ 1 - 1
arch/x86/cpu/apollolake/hostbridge.c

@@ -403,7 +403,7 @@ U_BOOT_DRIVER(intel_apl_hostbridge) = {
 	.ofdata_to_platdata = apl_hostbridge_ofdata_to_platdata,
 	.probe		= apl_hostbridge_probe,
 	.remove		= apl_hostbridge_remove,
-	.platdata_auto	= sizeof(struct apl_hostbridge_platdata),
+	.plat_auto	= sizeof(struct apl_hostbridge_platdata),
 	ACPI_OPS_PTR(&apl_hostbridge_acpi_ops)
 	.flags		= DM_FLAG_OS_PREPARE,
 };

+ 1 - 1
arch/x86/cpu/apollolake/pmc.c

@@ -224,5 +224,5 @@ U_BOOT_DRIVER(intel_apl_pmc) = {
 	.ofdata_to_platdata = apl_pmc_ofdata_to_uc_platdata,
 	.probe		= apl_pmc_probe,
 	.ops		= &apl_pmc_ops,
-	.platdata_auto	= sizeof(struct apl_pmc_platdata),
+	.plat_auto	= sizeof(struct apl_pmc_platdata),
 };

+ 2 - 2
arch/x86/cpu/apollolake/spl.c

@@ -85,7 +85,7 @@ static int apl_flash_probe(struct udevice *dev)
 
 /*
  * Manually set the parent of the SPI flash to SPI, since dtoc doesn't. We also
- * need to allocate the parent_platdata since by the time this function is
+ * need to allocate the parent_plat since by the time this function is
  * called device_bind() has already gone past that step.
  */
 static int apl_flash_bind(struct udevice *dev)
@@ -104,7 +104,7 @@ static int apl_flash_bind(struct udevice *dev)
 		plat = calloc(sizeof(*plat), 1);
 		if (!plat)
 			return -ENOMEM;
-		dev->parent_platdata = plat;
+		dev->parent_plat = plat;
 	}
 
 	return 0;

+ 3 - 3
arch/x86/cpu/apollolake/uart.c

@@ -92,7 +92,7 @@ static int apl_ns16550_ofdata_to_platdata(struct udevice *dev)
 	struct ns16550_platdata *plat;
 
 	/*
-	 * Convert our platdata to the ns16550's platdata, so we can just use
+	 * Convert our plat to the ns16550's plat, so we can just use
 	 * that driver
 	 */
 	plat = malloc(sizeof(*plat));
@@ -105,7 +105,7 @@ static int apl_ns16550_ofdata_to_platdata(struct udevice *dev)
 	plat->clock = dtplat->clock_frequency;
 	plat->fcr = UART_FCR_DEFVAL;
 	plat->bdf = pci_ofplat_get_devfn(dtplat->reg[0]);
-	dev->platdata = plat;
+	dev->plat = plat;
 #else
 	int ret;
 
@@ -126,7 +126,7 @@ U_BOOT_DRIVER(intel_apl_ns16550) = {
 	.name	= "intel_apl_ns16550",
 	.id	= UCLASS_SERIAL,
 	.of_match = apl_ns16550_serial_ids,
-	.platdata_auto	= sizeof(struct ns16550_platdata),
+	.plat_auto	= sizeof(struct ns16550_platdata),
 	.priv_auto	= sizeof(struct NS16550),
 	.ops	= &ns16550_serial_ops,
 	.ofdata_to_platdata = apl_ns16550_ofdata_to_platdata,

+ 1 - 1
arch/x86/cpu/broadwell/sata.c

@@ -266,5 +266,5 @@ U_BOOT_DRIVER(ahci_broadwell_drv) = {
 	.of_match	= broadwell_ahci_ids,
 	.ofdata_to_platdata	= broadwell_sata_ofdata_to_platdata,
 	.probe		= broadwell_sata_probe,
-	.platdata_auto	 = sizeof(struct sata_platdata),
+	.plat_auto	 = sizeof(struct sata_platdata),
 };

+ 1 - 1
arch/x86/cpu/cpu_x86.c

@@ -13,7 +13,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int cpu_x86_bind(struct udevice *dev)
 {
-	struct cpu_platdata *plat = dev_get_parent_platdata(dev);
+	struct cpu_platdata *plat = dev_get_parent_plat(dev);
 	struct cpuid_result res;
 
 	plat->cpu_id = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),

+ 1 - 1
arch/x86/cpu/intel_common/itss.c

@@ -242,6 +242,6 @@ U_BOOT_DRIVER(intel_itss) = {
 	.ops		= &itss_ops,
 	.bind		= itss_bind,
 	.ofdata_to_platdata = itss_ofdata_to_platdata,
-	.platdata_auto	= sizeof(struct itss_platdata),
+	.plat_auto	= sizeof(struct itss_platdata),
 	.priv_auto	= sizeof(struct itss_priv),
 };

+ 3 - 3
arch/x86/cpu/intel_common/p2sb.c

@@ -167,7 +167,7 @@ static int p2sb_remove(struct udevice *dev)
 static int p2sb_child_post_bind(struct udevice *dev)
 {
 #if !CONFIG_IS_ENABLED(OF_PLATDATA)
-	struct p2sb_child_platdata *pplat = dev_get_parent_platdata(dev);
+	struct p2sb_child_platdata *pplat = dev_get_parent_plat(dev);
 	int ret;
 	u32 pid;
 
@@ -197,8 +197,8 @@ U_BOOT_DRIVER(intel_p2sb) = {
 	.remove		= p2sb_remove,
 	.ops		= &p2sb_ops,
 	.ofdata_to_platdata = p2sb_ofdata_to_platdata,
-	.platdata_auto	= sizeof(struct p2sb_platdata),
-	.per_child_platdata_auto	=
+	.plat_auto	= sizeof(struct p2sb_platdata),
+	.per_child_plat_auto	=
 		sizeof(struct p2sb_child_platdata),
 	.child_post_bind = p2sb_child_post_bind,
 	.flags		= DM_FLAG_OS_PREPARE,

+ 2 - 2
arch/x86/cpu/mp_init.c

@@ -221,7 +221,7 @@ static int find_cpu_by_apic_id(int apic_id, struct udevice **devp)
 	for (uclass_find_first_device(UCLASS_CPU, &dev);
 	     dev;
 	     uclass_find_next_device(&dev)) {
-		struct cpu_platdata *plat = dev_get_parent_platdata(dev);
+		struct cpu_platdata *plat = dev_get_parent_plat(dev);
 
 		if (plat->cpu_id == apic_id) {
 			*devp = dev;
@@ -706,7 +706,7 @@ static int ap_wait_for_instruction(struct udevice *cpu, void *unused)
 
 static int mp_init_cpu(struct udevice *cpu, void *unused)
 {
-	struct cpu_platdata *plat = dev_get_parent_platdata(cpu);
+	struct cpu_platdata *plat = dev_get_parent_plat(cpu);
 
 	plat->ucode_version = microcode_read_rev();
 	plat->device_id = gd->arch.x86_device;

+ 1 - 1
arch/x86/cpu/qfw_cpu.c

@@ -67,7 +67,7 @@ int qemu_cpu_fixup(void)
 			printf("binding cpu@%d failed: %d\n", cpu_num, ret);
 			return ret;
 		}
-		plat = dev_get_parent_platdata(dev);
+		plat = dev_get_parent_plat(dev);
 		plat->cpu_id = cpu_num;
 	}
 	return 0;

+ 2 - 2
arch/x86/cpu/slimbootloader/serial.c

@@ -18,7 +18,7 @@ static int slimbootloader_serial_ofdata_to_platdata(struct udevice *dev)
 {
 	const efi_guid_t guid = SBL_SERIAL_PORT_INFO_GUID;
 	struct sbl_serial_port_info *data;
-	struct ns16550_platdata *plat = dev->platdata;
+	struct ns16550_platdata *plat = dev->plat;
 
 	if (!gd->arch.hob_list)
 		panic("hob list not found!");
@@ -58,7 +58,7 @@ U_BOOT_DRIVER(serial_slimbootloader) = {
 	.id	= UCLASS_SERIAL,
 	.of_match = slimbootloader_serial_ids,
 	.ofdata_to_platdata = slimbootloader_serial_ofdata_to_platdata,
-	.platdata_auto	= sizeof(struct ns16550_platdata),
+	.plat_auto	= sizeof(struct ns16550_platdata),
 	.priv_auto	= sizeof(struct NS16550),
 	.probe	= ns16550_serial_probe,
 	.ops	= &ns16550_serial_ops,

+ 1 - 1
arch/x86/include/asm/intel_pinctrl.h

@@ -162,7 +162,7 @@ extern const struct pinctrl_ops intel_pinctrl_ops;
 int intel_pinctrl_probe(struct udevice *dev);
 
 /**
- * intel_pinctrl_ofdata_to_platdata() - Handle common platdata setup
+ * intel_pinctrl_ofdata_to_platdata() - Handle common plat setup
  *
  * @dev: Pinctrl device
  * @comm: Pad community for this device

+ 1 - 1
arch/x86/lib/acpi_table.c

@@ -74,7 +74,7 @@ int acpi_create_madt_lapics(u32 current)
 	for (uclass_find_first_device(UCLASS_CPU, &dev);
 	     dev;
 	     uclass_find_next_device(&dev)) {
-		struct cpu_platdata *plat = dev_get_parent_platdata(dev);
+		struct cpu_platdata *plat = dev_get_parent_plat(dev);
 		int length;
 
 		length = acpi_create_madt_lapic(

+ 2 - 2
arch/x86/lib/fsp/fsp_graphics.c

@@ -80,7 +80,7 @@ static int save_vesa_mode(struct vesa_mode_info *vesa)
 
 static int fsp_video_probe(struct udevice *dev)
 {
-	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);
 	struct vesa_mode_info *vesa = &mode_info.vesa;
 	int ret;
@@ -124,7 +124,7 @@ err:
 
 static int fsp_video_bind(struct udevice *dev)
 {
-	struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
+	struct video_uc_platdata *plat = dev_get_uclass_plat(dev);
 
 	/* Set the maximum supported resolution */
 	plat->size = 2560 * 1600 * 4;

+ 1 - 1
arch/x86/lib/mpspec.c

@@ -81,7 +81,7 @@ void mp_write_processor(struct mp_config_table *mc)
 	for (uclass_find_first_device(UCLASS_CPU, &dev);
 	     dev;
 	     uclass_find_next_device(&dev)) {
-		struct cpu_platdata *plat = dev_get_parent_platdata(dev);
+		struct cpu_platdata *plat = dev_get_parent_plat(dev);
 		u8 cpuflag = MPC_CPU_EN;
 
 		if (!device_active(dev))

+ 1 - 1
arch/x86/lib/sfi.c

@@ -84,7 +84,7 @@ static int sfi_write_cpus(struct table_info *tab)
 	for (uclass_find_first_device(UCLASS_CPU, &dev);
 	     dev;
 	     uclass_find_next_device(&dev)) {
-		struct cpu_platdata *plat = dev_get_parent_platdata(dev);
+		struct cpu_platdata *plat = dev_get_parent_plat(dev);
 
 		if (!device_active(dev))
 			continue;

+ 1 - 1
board/armltd/integrator/integrator.c

@@ -45,7 +45,7 @@ static const struct pl01x_serial_platdata serial_platdata = {
 
 U_BOOT_DEVICE(integrator_serials) = {
 	.name = "serial_pl01x",
-	.platdata = &serial_platdata,
+	.plat = &serial_platdata,
 };
 
 void peripheral_power_enable (void);

+ 1 - 1
board/armltd/total_compute/total_compute.c

@@ -17,7 +17,7 @@ static const struct pl01x_serial_platdata serial_platdata = {
 
 U_BOOT_DEVICE(total_compute_serials) = {
 	.name = "serial_pl01x",
-	.platdata = &serial_platdata,
+	.plat = &serial_platdata,
 };
 
 static struct mm_region total_compute_mem_map[] = {

+ 1 - 1
board/armltd/vexpress64/vexpress64.c

@@ -28,7 +28,7 @@ static const struct pl01x_serial_platdata serial_platdata = {
 
 U_BOOT_DEVICE(vexpress_serials) = {
 	.name = "serial_pl01x",
-	.platdata = &serial_platdata,
+	.plat = &serial_platdata,
 };
 
 static struct mm_region vexpress64_mem_map[] = {

+ 1 - 1
board/bluewater/gurnard/gurnard.c

@@ -422,5 +422,5 @@ static struct atmel_serial_platdata at91sam9260_serial_plat = {
 
 U_BOOT_DEVICE(at91sam9260_serial) = {
 	.name	= "serial_atmel",
-	.platdata = &at91sam9260_serial_plat,
+	.plat = &at91sam9260_serial_plat,
 };

+ 1 - 1
board/bluewater/snapper9260/snapper9260.c

@@ -149,5 +149,5 @@ static struct atmel_serial_platdata at91sam9260_serial_plat = {
 
 U_BOOT_DEVICE(at91sam9260_serial) = {
 	.name	= "serial_atmel",
-	.platdata = &at91sam9260_serial_plat,
+	.plat = &at91sam9260_serial_plat,
 };

+ 1 - 1
board/cadence/xtfpga/xtfpga.c

@@ -106,5 +106,5 @@ static struct ethoc_eth_pdata ethoc_pdata = {
 
 U_BOOT_DEVICE(ethoc) = {
 	.name = "ethoc",
-	.platdata = &ethoc_pdata,
+	.plat = &ethoc_pdata,
 };

+ 2 - 2
board/cavium/thunderx/thunderx.c

@@ -27,7 +27,7 @@ static const struct pl01x_serial_platdata serial0 = {
 
 U_BOOT_DEVICE(thunderx_serial0) = {
 	.name = "serial_pl01x",
-	.platdata = &serial0,
+	.plat = &serial0,
 };
 
 static const struct pl01x_serial_platdata serial1 = {
@@ -39,7 +39,7 @@ static const struct pl01x_serial_platdata serial1 = {
 
 U_BOOT_DEVICE(thunderx_serial1) = {
 	.name = "serial_pl01x",
-	.platdata = &serial1,
+	.plat = &serial1,
 };
 #endif
 

+ 1 - 1
board/compulab/cm_fx6/cm_fx6.c

@@ -730,7 +730,7 @@ static struct mxc_serial_platdata cm_fx6_mxc_serial_plat = {
 
 U_BOOT_DEVICE(cm_fx6_serial) = {
 	.name	= "serial_mxc",
-	.platdata = &cm_fx6_mxc_serial_plat,
+	.plat = &cm_fx6_mxc_serial_plat,
 };
 
 #if CONFIG_IS_ENABLED(AHCI)

+ 2 - 2
board/davinci/da8xxevm/omapl138_lcdk.c

@@ -365,7 +365,7 @@ static const struct ns16550_platdata serial_pdata = {
 
 U_BOOT_DEVICE(omapl138_uart) = {
 	.name = "ns16550_serial",
-	.platdata = &serial_pdata,
+	.plat = &serial_pdata,
 };
 
 static const struct davinci_mmc_plat mmc_platdata = {
@@ -381,7 +381,7 @@ static const struct davinci_mmc_plat mmc_platdata = {
 };
 U_BOOT_DEVICE(omapl138_mmc) = {
 	.name = "ti_da830_mmc",
-	.platdata = &mmc_platdata,
+	.plat = &mmc_platdata,
 };
 
 void spl_board_init(void)

+ 2 - 2
board/freescale/ls1012afrdm/eth.c

@@ -116,10 +116,10 @@ static struct pfe_eth_pdata pfe_pdata1 = {
 
 U_BOOT_DEVICE(ls1012a_pfe0) = {
 	.name = "pfe_eth",
-	.platdata = &pfe_pdata0,
+	.plat = &pfe_pdata0,
 };
 
 U_BOOT_DEVICE(ls1012a_pfe1) = {
 	.name = "pfe_eth",
-	.platdata = &pfe_pdata1,
+	.plat = &pfe_pdata1,
 };

+ 2 - 2
board/freescale/ls1012aqds/eth.c

@@ -300,10 +300,10 @@ static struct pfe_eth_pdata pfe_pdata1 = {
 
 U_BOOT_DEVICE(ls1012a_pfe0) = {
 	.name = "pfe_eth",
-	.platdata = &pfe_pdata0,
+	.plat = &pfe_pdata0,
 };
 
 U_BOOT_DEVICE(ls1012a_pfe1) = {
 	.name = "pfe_eth",
-	.platdata = &pfe_pdata1,
+	.plat = &pfe_pdata1,
 };

+ 2 - 2
board/freescale/ls1012ardb/eth.c

@@ -162,10 +162,10 @@ static struct pfe_eth_pdata pfe_pdata1 = {
 
 U_BOOT_DEVICE(ls1012a_pfe0) = {
 	.name = "pfe_eth",
-	.platdata = &pfe_pdata0,
+	.plat = &pfe_pdata0,
 };
 
 U_BOOT_DEVICE(ls1012a_pfe1) = {
 	.name = "pfe_eth",
-	.platdata = &pfe_pdata1,
+	.plat = &pfe_pdata1,
 };

+ 2 - 2
board/freescale/lx2160a/lx2160a.c

@@ -64,7 +64,7 @@ static struct pl01x_serial_platdata serial0 = {
 
 U_BOOT_DEVICE(nxp_serial0) = {
 	.name = "serial_pl01x",
-	.platdata = &serial0,
+	.plat = &serial0,
 };
 
 static struct pl01x_serial_platdata serial1 = {
@@ -74,7 +74,7 @@ static struct pl01x_serial_platdata serial1 = {
 
 U_BOOT_DEVICE(nxp_serial1) = {
 	.name = "serial_pl01x",
-	.platdata = &serial1,
+	.plat = &serial1,
 };
 
 int select_i2c_ch_pca9547(u8 ch)

+ 1 - 1
board/gateworks/gw_ventana/gw_ventana.c

@@ -1377,5 +1377,5 @@ static struct mxc_serial_platdata ventana_mxc_serial_plat = {
 
 U_BOOT_DEVICE(ventana_serial) = {
 	.name   = "serial_mxc",
-	.platdata = &ventana_mxc_serial_plat,
+	.plat = &ventana_mxc_serial_plat,
 };

+ 1 - 1
board/hisilicon/hikey/hikey.c

@@ -91,7 +91,7 @@ static const struct pl01x_serial_platdata serial_platdata = {
 
 U_BOOT_DEVICE(hikey_seriala) = {
 	.name = "serial_pl01x",
-	.platdata = &serial_platdata,
+	.plat = &serial_platdata,
 };
 #endif
 

+ 1 - 1
board/hisilicon/hikey960/hikey960.c

@@ -34,7 +34,7 @@ static const struct pl01x_serial_platdata serial_platdata = {
 
 U_BOOT_DEVICE(hikey960_serial0) = {
 	.name = "serial_pl01x",
-	.platdata = &serial_platdata,
+	.plat = &serial_platdata,
 };
 #endif
 

+ 1 - 1
board/hisilicon/poplar/poplar.c

@@ -48,7 +48,7 @@ static const struct pl01x_serial_platdata serial_platdata = {
 
 U_BOOT_DEVICE(poplar_serial) = {
 	.name = "serial_pl01x",
-	.platdata = &serial_platdata,
+	.plat = &serial_platdata,
 };
 #endif
 

+ 1 - 1
board/lg/sniper/sniper.c

@@ -39,7 +39,7 @@ static const struct ns16550_platdata serial_omap_platdata = {
 
 U_BOOT_DEVICE(sniper_serial) = {
 	.name = "ns16550_serial",
-	.platdata = &serial_omap_platdata
+	.plat = &serial_omap_platdata
 };
 
 static struct musb_hdrc_config musb_config = {

+ 1 - 1
board/siemens/corvus/board.c

@@ -320,5 +320,5 @@ static struct atmel_serial_platdata at91sam9260_serial_plat = {
 
 U_BOOT_DEVICE(at91sam9260_serial) = {
 	.name	= "serial_atmel",
-	.platdata = &at91sam9260_serial_plat,
+	.plat = &at91sam9260_serial_plat,
 };

+ 1 - 1
board/st/stv0991/stv0991.c

@@ -32,7 +32,7 @@ static const struct pl01x_serial_platdata serial_platdata = {
 
 U_BOOT_DEVICE(stv09911_serials) = {
 	.name = "serial_pl01x",
-	.platdata = &serial_platdata,
+	.plat = &serial_platdata,
 };
 #endif
 

+ 1 - 1
board/sysam/amcore/amcore.c

@@ -115,5 +115,5 @@ static struct coldfire_serial_platdata mcf5307_serial_plat = {
 
 U_BOOT_DEVICE(coldfire_serial) = {
 	.name = "serial_coldfire",
-	.platdata = &mcf5307_serial_plat,
+	.plat = &mcf5307_serial_plat,
 };

+ 4 - 4
board/ti/am335x/board.c

@@ -885,7 +885,7 @@ int board_late_init(void)
 }
 #endif
 
-/* CPSW platdata */
+/* CPSW plat */
 #if !CONFIG_IS_ENABLED(OF_CONTROL)
 struct cpsw_slave_data slave_data[] = {
 	{
@@ -929,7 +929,7 @@ struct eth_pdata cpsw_pdata = {
 
 U_BOOT_DEVICE(am335x_eth) = {
 	.name = "eth_cpsw",
-	.platdata = &cpsw_pdata,
+	.plat = &cpsw_pdata,
 };
 #endif
 
@@ -974,7 +974,7 @@ static const struct omap_hsmmc_plat am335x_mmc0_platdata = {
 
 U_BOOT_DEVICE(am335x_mmc0) = {
 	.name = "omap_hsmmc",
-	.platdata = &am335x_mmc0_platdata,
+	.plat = &am335x_mmc0_platdata,
 };
 
 static const struct omap_hsmmc_plat am335x_mmc1_platdata = {
@@ -988,6 +988,6 @@ static const struct omap_hsmmc_plat am335x_mmc1_platdata = {
 
 U_BOOT_DEVICE(am335x_mmc1) = {
 	.name = "omap_hsmmc",
-	.platdata = &am335x_mmc1_platdata,
+	.plat = &am335x_mmc1_platdata,
 };
 #endif

+ 1 - 1
board/toradex/apalis_imx6/apalis_imx6.c

@@ -1151,5 +1151,5 @@ static struct mxc_serial_platdata mxc_serial_plat = {
 
 U_BOOT_DEVICE(mxc_serial) = {
 	.name = "serial_mxc",
-	.platdata = &mxc_serial_plat,
+	.plat = &mxc_serial_plat,
 };

+ 1 - 1
board/toradex/colibri-imx6ull/colibri-imx6ull.c

@@ -210,5 +210,5 @@ static struct mxc_serial_platdata mxc_serial_plat = {
 
 U_BOOT_DEVICE(mxc_serial) = {
 	.name = "serial_mxc",
-	.platdata = &mxc_serial_plat,
+	.plat = &mxc_serial_plat,
 };

+ 1 - 1
board/toradex/colibri_imx6/colibri_imx6.c

@@ -1093,5 +1093,5 @@ static struct mxc_serial_platdata mxc_serial_plat = {
 
 U_BOOT_DEVICE(mxc_serial) = {
 	.name = "serial_mxc",
-	.platdata = &mxc_serial_plat,
+	.plat = &mxc_serial_plat,
 };

+ 2 - 2
board/toradex/colibri_pxa270/colibri_pxa270.c

@@ -135,7 +135,7 @@ static const struct pxa_mmc_plat mmc_platdata = {
 
 U_BOOT_DEVICE(pxa_mmcs) = {
 	.name = "pxa_mmc",
-	.platdata = &mmc_platdata,
+	.plat = &mmc_platdata,
 };
 #endif /* !CONFIG_IS_ENABLED(DM_MMC) */
 #endif
@@ -148,5 +148,5 @@ static const struct pxa_serial_platdata serial_platdata = {
 
 U_BOOT_DEVICE(pxa_serials) = {
 	.name = "serial_pxa",
-	.platdata = &serial_platdata,
+	.plat = &serial_platdata,
 };

+ 1 - 1
cmd/Kconfig

@@ -1917,7 +1917,7 @@ config CMD_REGULATOR
 
 	  The '-f' (force) option can be used for set the value which exceeds
 	  the limits, which are found in device-tree and are kept in regulator's
-	  uclass platdata structure.
+	  uclass plat structure.
 
 endmenu
 

+ 1 - 1
cmd/button.c

@@ -37,7 +37,7 @@ static int list_buttons(void)
 	for (uclass_find_first_device(UCLASS_BUTTON, &dev);
 	     dev;
 	     uclass_find_next_device(&dev)) {
-		struct button_uc_plat *plat = dev_get_uclass_platdata(dev);
+		struct button_uc_plat *plat = dev_get_uclass_plat(dev);
 
 		if (!plat->label)
 			continue;

+ 1 - 1
cmd/cpu.c

@@ -26,7 +26,7 @@ static int print_cpu_list(bool detail)
 	for (uclass_first_device(UCLASS_CPU, &dev);
 		     dev;
 		     uclass_next_device(&dev)) {
-		struct cpu_platdata *plat = dev_get_parent_platdata(dev);
+		struct cpu_platdata *plat = dev_get_parent_plat(dev);
 		struct cpu_info info;
 		bool first = true;
 		int ret, i;

+ 1 - 1
cmd/demo.c

@@ -71,7 +71,7 @@ int do_demo_list(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 	for (i = 0, ret = uclass_first_device(UCLASS_DEMO, &dev);
 	     dev;
 	     ret = uclass_next_device(&dev)) {
-		printf("entry %d - instance %08x, ops %08x, platdata %08x\n",
+		printf("entry %d - instance %08x, ops %08x, plat %08x\n",
 		       i++, (uint)map_to_sysmem(dev),
 		       (uint)map_to_sysmem(dev->driver->ops),
 		       (uint)map_to_sysmem(dev_get_platdata(dev)));

+ 2 - 2
cmd/i2c.c

@@ -390,7 +390,7 @@ static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc,
 		ret = i2c_set_chip_offset_len(dev, alen);
 	if (ret)
 		return i2c_report_err(ret, I2C_ERR_WRITE);
-	i2c_chip = dev_get_parent_platdata(dev);
+	i2c_chip = dev_get_parent_plat(dev);
 	if (!i2c_chip)
 		return i2c_report_err(ret, I2C_ERR_WRITE);
 #endif
@@ -1707,7 +1707,7 @@ static void show_bus(struct udevice *bus)
 	for (device_find_first_child(bus, &dev);
 	     dev;
 	     device_find_next_child(&dev)) {
-		struct dm_i2c_chip *chip = dev_get_parent_platdata(dev);
+		struct dm_i2c_chip *chip = dev_get_parent_plat(dev);
 
 		printf("   %02x: %s, offset len %x, flags %x\n",
 		       chip->chip_addr, dev->name, chip->offset_len,

+ 1 - 1
cmd/led.c

@@ -54,7 +54,7 @@ static int list_leds(void)
 	for (uclass_find_first_device(UCLASS_LED, &dev);
 	     dev;
 	     uclass_find_next_device(&dev)) {
-		struct led_uc_plat *plat = dev_get_uclass_platdata(dev);
+		struct led_uc_plat *plat = dev_get_uclass_plat(dev);
 
 		if (!plat->label)
 			continue;

+ 1 - 1
cmd/lsblk.c

@@ -34,7 +34,7 @@ static int do_lsblk(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv
 		uclass_foreach_dev(udev, uc) {
 			if (udev->driver != entry)
 				continue;
-			desc = dev_get_uclass_platdata(udev);
+			desc = dev_get_uclass_plat(udev);
 			printf("%c %s %u", i ? ',' : ':',
 			       blk_get_if_type_name(desc->if_type),
 			       desc->devnum);

+ 1 - 1
cmd/pci.c

@@ -341,7 +341,7 @@ static void pciinfo(struct udevice *bus, bool short_listing)
 	     device_find_next_child(&dev)) {
 		struct pci_child_platdata *pplat;
 
-		pplat = dev_get_parent_platdata(dev);
+		pplat = dev_get_parent_plat(dev);
 		if (short_listing) {
 			printf("%02x.%02x.%02x   ", bus->seq,
 			       PCI_DEV(pplat->devfn), PCI_FUNC(pplat->devfn));

+ 16 - 16
cmd/regulator.c

@@ -25,7 +25,7 @@ static int failure(int ret)
 
 static int do_dev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
-	struct dm_regulator_uclass_platdata *uc_pdata;
+	struct dm_regulator_uclass_plat *uc_pdata;
 	const char *name;
 	int ret = -ENXIO;
 
@@ -43,7 +43,7 @@ static int do_dev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 			return CMD_RET_USAGE;
 		}
 
-		uc_pdata = dev_get_uclass_platdata(currdev);
+		uc_pdata = dev_get_uclass_plat(currdev);
 		if (!uc_pdata) {
 			printf("%s: no regulator platform data!\n", currdev->name);
 			return failure(ret);
@@ -56,7 +56,7 @@ static int do_dev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 }
 
 static int curr_dev_and_platdata(struct udevice **devp,
-				 struct dm_regulator_uclass_platdata **uc_pdata,
+				 struct dm_regulator_uclass_plat **uc_pdata,
 				 bool allow_type_fixed)
 {
 	*devp = NULL;
@@ -69,7 +69,7 @@ static int curr_dev_and_platdata(struct udevice **devp,
 
 	*devp = currdev;
 
-	*uc_pdata = dev_get_uclass_platdata(*devp);
+	*uc_pdata = dev_get_uclass_plat(*devp);
 	if (!*uc_pdata) {
 		pr_err("Regulator: %s - missing platform data!\n", currdev->name);
 		return CMD_RET_FAILURE;
@@ -86,7 +86,7 @@ static int curr_dev_and_platdata(struct udevice **devp,
 static int do_list(struct cmd_tbl *cmdtp, int flag, int argc,
 		   char *const argv[])
 {
-	struct dm_regulator_uclass_platdata *uc_pdata;
+	struct dm_regulator_uclass_plat *uc_pdata;
 	struct udevice *dev;
 	int ret;
 
@@ -100,7 +100,7 @@ static int do_list(struct cmd_tbl *cmdtp, int flag, int argc,
 		if (ret)
 			continue;
 
-		uc_pdata = dev_get_uclass_platdata(dev);
+		uc_pdata = dev_get_uclass_plat(dev);
 		printf("| %-*.*s| %-*.*s| %s\n",
 		       LIMIT_DEVNAME, LIMIT_DEVNAME, dev->name,
 		       LIMIT_OFNAME, LIMIT_OFNAME, uc_pdata->name,
@@ -143,7 +143,7 @@ static int do_info(struct cmd_tbl *cmdtp, int flag, int argc,
 		   char *const argv[])
 {
 	struct udevice *dev;
-	struct dm_regulator_uclass_platdata *uc_pdata;
+	struct dm_regulator_uclass_plat *uc_pdata;
 	struct dm_regulator_mode *modes;
 	const char *parent_uc;
 	int mode_count;
@@ -183,7 +183,7 @@ static int do_info(struct cmd_tbl *cmdtp, int flag, int argc,
 }
 
 static void do_status_detail(struct udevice *dev,
-			     struct dm_regulator_uclass_platdata *uc_pdata)
+			     struct dm_regulator_uclass_plat *uc_pdata)
 {
 	int current, value, mode;
 	const char *mode_name;
@@ -207,12 +207,12 @@ static void do_status_detail(struct udevice *dev,
 
 static void do_status_line(struct udevice *dev)
 {
-	struct dm_regulator_uclass_platdata *pdata;
+	struct dm_regulator_uclass_plat *pdata;
 	int current, value, mode;
 	const char *mode_name;
 	bool enabled;
 
-	pdata = dev_get_uclass_platdata(dev);
+	pdata = dev_get_uclass_plat(dev);
 	enabled = regulator_get_enable(dev);
 	value = regulator_get_value(dev);
 	current = regulator_get_current(dev);
@@ -237,7 +237,7 @@ static void do_status_line(struct udevice *dev)
 static int do_status(struct cmd_tbl *cmdtp, int flag, int argc,
 		     char *const argv[])
 {
-	struct dm_regulator_uclass_platdata *uc_pdata;
+	struct dm_regulator_uclass_plat *uc_pdata;
 	struct udevice *dev;
 	int ret;
 
@@ -263,7 +263,7 @@ static int do_value(struct cmd_tbl *cmdtp, int flag, int argc,
 		    char *const argv[])
 {
 	struct udevice *dev;
-	struct dm_regulator_uclass_platdata *uc_pdata;
+	struct dm_regulator_uclass_plat *uc_pdata;
 	int value;
 	int force;
 	int ret;
@@ -313,7 +313,7 @@ static int do_current(struct cmd_tbl *cmdtp, int flag, int argc,
 		      char *const argv[])
 {
 	struct udevice *dev;
-	struct dm_regulator_uclass_platdata *uc_pdata;
+	struct dm_regulator_uclass_plat *uc_pdata;
 	int current;
 	int ret;
 
@@ -353,7 +353,7 @@ static int do_mode(struct cmd_tbl *cmdtp, int flag, int argc,
 		   char *const argv[])
 {
 	struct udevice *dev;
-	struct dm_regulator_uclass_platdata *uc_pdata;
+	struct dm_regulator_uclass_plat *uc_pdata;
 	int mode;
 	int ret;
 
@@ -389,7 +389,7 @@ static int do_enable(struct cmd_tbl *cmdtp, int flag, int argc,
 		     char *const argv[])
 {
 	struct udevice *dev;
-	struct dm_regulator_uclass_platdata *uc_pdata;
+	struct dm_regulator_uclass_plat *uc_pdata;
 	int ret;
 
 	ret = curr_dev_and_platdata(&dev, &uc_pdata, true);
@@ -409,7 +409,7 @@ static int do_disable(struct cmd_tbl *cmdtp, int flag, int argc,
 		      char *const argv[])
 {
 	struct udevice *dev;
-	struct dm_regulator_uclass_platdata *uc_pdata;
+	struct dm_regulator_uclass_plat *uc_pdata;
 	int ret;
 
 	ret = curr_dev_and_platdata(&dev, &uc_pdata, true);

+ 1 - 1
cmd/remoteproc.c

@@ -32,7 +32,7 @@ static int print_remoteproc_list(void)
 		struct dm_rproc_uclass_pdata *uc_pdata;
 		const struct dm_rproc_ops *ops = rproc_get_ops(dev);
 
-		uc_pdata = dev_get_uclass_platdata(dev);
+		uc_pdata = dev_get_uclass_plat(dev);
 
 		/* Do not print if rproc is not probed */
 		if (!(dev->flags & DM_FLAG_ACTIVATED))

+ 1 - 1
common/lcd_simplefb.c

@@ -31,7 +31,7 @@ static int lcd_dt_simplefb_configure_node(void *blob, int off)
 	if (ret)
 		return ret;
 	uc_priv = dev_get_uclass_priv(dev);
-	plat = dev_get_uclass_platdata(dev);
+	plat = dev_get_uclass_plat(dev);
 	xsize = uc_priv->xsize;
 	ysize = uc_priv->ysize;
 	bpix = uc_priv->bpix;

+ 1 - 1
common/usb_hub.c

@@ -959,7 +959,7 @@ UCLASS_DRIVER(usb_hub) = {
 	.post_probe	= usb_hub_post_probe,
 	.child_pre_probe	= usb_child_pre_probe,
 	.per_child_auto	= sizeof(struct usb_device),
-	.per_child_platdata_auto	= sizeof(struct usb_dev_platdata),
+	.per_child_plat_auto	= sizeof(struct usb_dev_platdata),
 	.per_device_auto	= sizeof(struct usb_hub_device),
 };
 

+ 6 - 6
common/usb_storage.c

@@ -146,7 +146,7 @@ int usb_stor_info(void)
 	for (blk_first_device(IF_TYPE_USB, &dev);
 	     dev;
 	     blk_next_device(&dev)) {
-		struct blk_desc *desc = dev_get_uclass_platdata(dev);
+		struct blk_desc *desc = dev_get_uclass_plat(dev);
 
 		printf("  Device %d: ", desc->devnum);
 		dev_print(desc);
@@ -203,7 +203,7 @@ static int usb_stor_probe_device(struct usb_device *udev)
 	debug("\n\nProbing for storage\n");
 #if CONFIG_IS_ENABLED(BLK)
 	/*
-	 * We store the us_data in the mass storage device's platdata. It
+	 * We store the us_data in the mass storage device's plat. It
 	 * is shared by all LUNs (block devices) attached to this mass storage
 	 * device.
 	 */
@@ -225,7 +225,7 @@ static int usb_stor_probe_device(struct usb_device *udev)
 			return ret;
 		}
 
-		blkdev = dev_get_uclass_platdata(dev);
+		blkdev = dev_get_uclass_plat(dev);
 		blkdev->target = 0xff;
 		blkdev->lun = lun;
 
@@ -1147,7 +1147,7 @@ static unsigned long usb_stor_read(struct blk_desc *block_dev, lbaint_t blknr,
 		return 0;
 	/* Setup  device */
 #if CONFIG_IS_ENABLED(BLK)
-	block_dev = dev_get_uclass_platdata(dev);
+	block_dev = dev_get_uclass_plat(dev);
 	udev = dev_get_parent_priv(dev_get_parent(dev));
 	debug("\nusb_read: udev %d\n", block_dev->devnum);
 #else
@@ -1231,7 +1231,7 @@ static unsigned long usb_stor_write(struct blk_desc *block_dev, lbaint_t blknr,
 
 	/* Setup  device */
 #if CONFIG_IS_ENABLED(BLK)
-	block_dev = dev_get_uclass_platdata(dev);
+	block_dev = dev_get_uclass_plat(dev);
 	udev = dev_get_parent_priv(dev_get_parent(dev));
 	debug("\nusb_read: udev %d\n", block_dev->devnum);
 #else
@@ -1529,7 +1529,7 @@ U_BOOT_DRIVER(usb_mass_storage) = {
 	.of_match = usb_mass_storage_ids,
 	.probe = usb_mass_storage_probe,
 #if CONFIG_IS_ENABLED(BLK)
-	.platdata_auto	= sizeof(struct us_data),
+	.plat_auto	= sizeof(struct us_data),
 #endif
 };
 

+ 30 - 30
doc/driver-model/design.rst

@@ -59,7 +59,7 @@ uclass:
 The demo class is pretty simple, but not trivial. The intention is that it
 can be used for testing, so it will implement all driver model features and
 provide good code coverage of them. It does have multiple drivers, it
-handles parameter data and platdata (data which tells the driver how
+handles parameter data and plat (data which tells the driver how
 to operate on a particular platform) and it uses private driver data.
 
 To try it, see the example session below::
@@ -333,7 +333,7 @@ Briefly, they are:
 
    * bind - make the driver model aware of a device (bind it to its driver)
    * unbind - make the driver model forget the device
-   * ofdata_to_platdata - convert device tree data to platdata - see later
+   * ofdata_to_platdata - convert device tree data to plat - see later
    * probe - make a device ready for use
    * remove - remove a device so it cannot be used until probed again
 
@@ -396,7 +396,7 @@ The data can be interpreted by the drivers however they like - it is
 basically a communication scheme between the board-specific code and
 the generic drivers, which are intended to work on any board.
 
-Drivers can access their data via dev->info->platdata. Here is
+Drivers can access their data via dev->info->plat. Here is
 the declaration for the platform data, which would normally appear
 in the board file.
 
@@ -410,7 +410,7 @@ in the board file.
 	static const struct driver_info info[] = {
 		{
 			.name = "demo_shape_drv",
-			.platdata = &red_square,
+			.plat = &red_square,
 		},
 	};
 
@@ -420,7 +420,7 @@ in the board file.
 Device Tree
 -----------
 
-While platdata is useful, a more flexible way of providing device data is
+While plat is useful, a more flexible way of providing device data is
 by using device tree. In U-Boot you should use this where possible. Avoid
 sending patches which make use of the U_BOOT_DEVICE() macro unless strictly
 necessary.
@@ -448,13 +448,13 @@ The easiest way to make this work it to add a few members to the driver:
 
 .. code-block:: c
 
-	.platdata_auto = sizeof(struct dm_test_pdata),
+	.plat_auto = sizeof(struct dm_test_pdata),
 	.ofdata_to_platdata = testfdt_ofdata_to_platdata,
 
-The 'auto' feature allowed space for the platdata to be allocated
+The 'auto' feature allowed space for the plat to be allocated
 and zeroed before the driver's ofdata_to_platdata() method is called. The
 ofdata_to_platdata() method, which the driver write supplies, should parse
-the device tree node for this device and place it in dev->platdata. Thus
+the device tree node for this device and place it in dev->plat. Thus
 when the probe method is called later (to set up the device ready for use)
 the platform data will be present.
 
@@ -463,8 +463,8 @@ method then it will be called first (during activation). If you provide a
 probe method it will be called next. See Driver Lifecycle below for more
 details.
 
-If you don't want to have the platdata automatically allocated then you
-can leave out platdata_auto. In this case you can use malloc
+If you don't want to have the plat automatically allocated then you
+can leave out plat_auto. In this case you can use malloc
 in your ofdata_to_platdata (or probe) method to allocate the required memory,
 and you should free it in the remove method.
 
@@ -587,9 +587,9 @@ Each of the devices is connected to a different address on the USB bus.
 The bus device wants to store this address and some other information such
 as the bus speed for each device.
 
-To achieve this, the bus device can use dev->parent_platdata in each of its
+To achieve this, the bus device can use dev->parent_plat in each of its
 three children. This can be auto-allocated if the bus driver (or bus uclass)
-has a non-zero value for per_child_platdata_auto. If not, then
+has a non-zero value for per_child_plat_auto. If not, then
 the bus device or uclass can allocate the space itself before the child
 device is probed.
 
@@ -650,26 +650,26 @@ U-Boot discovers devices using one of these two methods:
 - Scan the U_BOOT_DEVICE() definitions. U-Boot looks up the name specified
   by each, to find the appropriate U_BOOT_DRIVER() definition. In this case,
   there is no path by which driver_data may be provided, but the U_BOOT_DEVICE()
-  may provide platdata.
+  may provide plat.
 
 - Scan through the device tree definitions. U-Boot looks at top-level
   nodes in the the device tree. It looks at the compatible string in each node
   and uses the of_match table of the U_BOOT_DRIVER() structure to find the
   right driver for each node. In this case, the of_match table may provide a
-  driver_data value, but platdata cannot be provided until later.
+  driver_data value, but plat cannot be provided until later.
 
 For each device that is discovered, U-Boot then calls device_bind() to create a
 new device, initializes various core fields of the device object such as name,
 uclass & driver, initializes any optional fields of the device object that are
-applicable such as of_offset, driver_data & platdata, and finally calls the
+applicable such as of_offset, driver_data & plat, and finally calls the
 driver's bind() method if one is defined.
 
 At this point all the devices are known, and bound to their drivers. There
 is a 'struct udevice' allocated for all devices. However, nothing has been
 activated (except for the root device). Each bound device that was created
-from a U_BOOT_DEVICE() declaration will hold the platdata pointer specified
+from a U_BOOT_DEVICE() declaration will hold the plat pointer specified
 in that declaration. For a bound device created from the device tree,
-platdata will be NULL, but of_offset will be the offset of the device tree
+plat will be NULL, but of_offset will be the offset of the device tree
 node that caused the device to be created. The uclass is set correctly for
 the device.
 
@@ -691,7 +691,7 @@ base address of hardware registers and parameters relating to driver
 operation. This is called 'ofdata' (Open-Firmware data).
 
 The device's_ofdata_to_platdata() implemnents allocation and reading of
-platdata. A parent's ofdata is always read before a child.
+plat. A parent's ofdata is always read before a child.
 
 The steps are:
 
@@ -701,11 +701,11 @@ The steps are:
    it for run-time information, not platform data (which should be static
    and known before the device is probed).
 
-   2. If platdata_auto is non-zero, then the platform data space
+   2. If plat_auto is non-zero, then the platform data space
    is allocated. This is only useful for device tree operation, since
    otherwise you would have to specific the platform data in the
    U_BOOT_DEVICE() declaration. The space is allocated for the device and
-   zeroed. It will be accessible as dev->platdata.
+   zeroed. It will be accessible as dev->plat.
 
    3. If the device's uclass specifies a non-zero per_device_auto,
    then this space is allocated and zeroed also. It is allocated for and
@@ -722,11 +722,11 @@ The steps are:
    5. If the driver provides an ofdata_to_platdata() method, then this is
    called to convert the device tree data into platform data. This should
    do various calls like dev_read_u32(dev, ...) to access the node and store
-   the resulting information into dev->platdata. After this point, the device
+   the resulting information into dev->plat. After this point, the device
    works the same way whether it was bound using a device tree node or
    U_BOOT_DEVICE() structure. In either case, the platform data is now stored
-   in the platdata structure. Typically you will use the
-   platdata_auto feature to specify the size of the platform data
+   in the plat structure. Typically you will use the
+   plat_auto feature to specify the size of the platform data
    structure, and U-Boot will automatically allocate and zero it for you before
    entry to ofdata_to_platdata(). But if not, you can allocate it yourself in
    ofdata_to_platdata(). Note that it is preferable to do all the device tree
@@ -735,7 +735,7 @@ The steps are:
    that U-Boot will cache platform data for devices which are regularly
    de/activated).
 
-   5. The device is marked 'platdata valid'.
+   6. The device is marked 'plat valid'.
 
 Note that ofdata reading is always done (for a child and all its parents)
 before probing starts. Thus devices go through two distinct states when
@@ -790,14 +790,14 @@ as above and then following these steps (see device_probe()):
    hardware and setting up hardware registers to initial values. The code
    in probe() can access:
 
-      - platform data in dev->platdata (for configuration)
+      - platform data in dev->plat (for configuration)
       - private data in dev->priv (for run-time state)
       - uclass data in dev->uclass_priv (for things the uclass stores
         about this device)
 
    Note: If you don't use priv_auto then you will need to
    allocate the priv space here yourself. The same applies also to
-   platdata_auto. Remember to free them in the remove() method.
+   plat_auto. Remember to free them in the remove() method.
 
    5. The device is marked 'activated'
 
@@ -843,10 +843,10 @@ remove it. This performs the probe steps in reverse:
    be dynamically allocated, and thus needs to be deallocated during the
    remove() method, either:
 
-      - if the platdata_auto is non-zero, the deallocation
+      - if the plat_auto is non-zero, the deallocation
         happens automatically within the driver model core; or
 
-      - when platdata_auto is 0, both the allocation (in probe()
+      - when plat_auto is 0, both the allocation (in probe()
         or preferably ofdata_to_platdata()) and the deallocation in remove()
         are the responsibility of the driver author.
 
@@ -890,14 +890,14 @@ original patches, but makes at least the following changes:
   the driver operations structure in the driver, rather than passing it
   to the driver bind function.
 - Rename some structures to make them more similar to Linux (struct udevice
-  instead of struct instance, struct platdata, etc.)
+  instead of struct instance, struct plat, etc.)
 - Change the name 'core' to 'uclass', meaning U-Boot class. It seems that
   this concept relates to a class of drivers (or a subsystem). We shouldn't
   use 'class' since it is a C++ reserved word, so U-Boot class (uclass) seems
   better than 'core'.
 - Remove 'struct driver_instance' and just use a single 'struct udevice'.
   This removes a level of indirection that doesn't seem necessary.
-- Built in device tree support, to avoid the need for platdata
+- Built in device tree support, to avoid the need for plat
 - Removed the concept of driver relocation, and just make it possible for
   the new driver (created after relocation) to access the old driver data.
   I feel that relocation is a very special case and will only apply to a few

+ 3 - 3
doc/driver-model/ethernet.rst

@@ -29,7 +29,7 @@ the UCLASS_ETH .id field in the U-Boot driver struct:
 		.probe			= eth_ape_probe,
 		.ops			= &eth_ape_ops,
 		.priv_auto	= sizeof(struct eth_ape_priv),
-		.platdata_auto = sizeof(struct eth_ape_pdata),
+		.plat_auto = sizeof(struct eth_ape_pdata),
 		.flags			= DM_FLAG_ALLOC_PRIV_DMA,
 	};
 
@@ -43,7 +43,7 @@ struct eth_ape_pdata contains static platform data, like the MMIO base address,
 a hardware variant, the MAC address. ``struct eth_pdata eth_pdata``
 as the first member of this struct helps to avoid duplicated code.
 If you don't need any more platform data beside the standard member,
-just use sizeof(struct eth_pdata) for the platdata_auto.
+just use sizeof(struct eth_pdata) for the plat_auto.
 
 PCI devices add a line pointing to supported vendor/device ID pairs:
 
@@ -96,7 +96,7 @@ operations.  You often do things here such as resetting the MAC
 and/or PHY, and waiting for the link to autonegotiate.  You should also take
 the opportunity to program the device's MAC address with the enetaddr member
 of the generic struct eth_pdata (which would be the first member of your
-own platdata struct). This allows the rest of U-Boot to dynamically change
+own plat struct). This allows the rest of U-Boot to dynamically change
 the MAC address and have the new settings be respected.
 
 The **send** function does what you think -- transmit the specified packet

+ 7 - 7
doc/driver-model/of-plat.rst

@@ -157,8 +157,8 @@ and the following device declarations:
 
     U_BOOT_DEVICE(dwmmc_at_ff0c0000) = {
             .name           = "rockchip_rk3288_dw_mshc",
-            .platdata       = &dtv_dwmmc_at_ff0c0000,
-            .platdata_size  = sizeof(dtv_dwmmc_at_ff0c0000),
+            .plat       = &dtv_dwmmc_at_ff0c0000,
+            .plat_size  = sizeof(dtv_dwmmc_at_ff0c0000),
             .parent_idx     = -1,
     };
 
@@ -232,7 +232,7 @@ How to structure your driver
 Drivers should always support device tree as an option. The of-platdata
 feature is intended as a add-on to existing drivers.
 
-Your driver should convert the platdata struct in its probe() method. The
+Your driver should convert the plat struct in its probe() method. The
 existing device tree decoding logic should be kept in the
 ofdata_to_platdata() method and wrapped with #if.
 
@@ -294,7 +294,7 @@ For example:
             .ofdata_to_platdata = mmc_ofdata_to_platdata,
             .probe          = mmc_probe,
             .priv_auto = sizeof(struct mmc_priv),
-            .platdata_auto = sizeof(struct mmc_platdata),
+            .plat_auto = sizeof(struct mmc_platdata),
     };
 
     U_BOOT_DRIVER_ALIAS(mmc_drv, vendor_mmc) /* matches compatible string */
@@ -305,7 +305,7 @@ keep the use of each of-platdata struct to the smallest possible code area.
 There is just one driver C file for each struct, that can convert from the
 of-platdata struct to the standard one used by the driver.
 
-In the case where SPL_OF_PLATDATA is enabled, platdata_auto is
+In the case where SPL_OF_PLATDATA is enabled, plat_auto is
 still used to allocate space for the platform data. This is different from
 the normal behaviour and is triggered by the use of of-platdata (strictly
 speaking it is a non-zero platdata_size which triggers this).
@@ -336,8 +336,8 @@ Otherwise (such as in U-Boot proper) these structs are not available. This
 prevents them being used inadvertently. All usage must be bracketed with
 #if CONFIG_IS_ENABLED(OF_PLATDATA).
 
-The dt-platdata.c file contains the device declarations and is is built in
-spl/dt-platdata.c. It additionally contains the definition of
+The dt-plat.c file contains the device declarations and is is built in
+spl/dt-plat.c. It additionally contains the definition of
 dm_populate_phandle_data() which is responsible of filling the phandle
 information by adding references to U_BOOT_DEVICE by using DM_GET_DEVICE
 

+ 1 - 1
doc/driver-model/remoteproc-framework.rst

@@ -127,7 +127,7 @@ a simplified definition of a device is as follows:
 
 	U_BOOT_DEVICE(proc_3_demo) = {
 		.name = "sandbox_test_proc",
-		.platdata = &proc_3_test,
+		.plat = &proc_3_test,
 	};
 
 There can be additional data that may be desired depending on the

+ 5 - 5
doc/driver-model/spi-howto.rst

@@ -231,7 +231,7 @@ tree, but we need to tell it the size:
 
 	U_BOOT_DRIVER(spi_exynos) = {
 	...
-		.platdata_auto = sizeof(struct exynos_spi_platdata),
+		.plat_auto = sizeof(struct exynos_spi_platdata),
 
 
 Here is a sample function. It gets a pointer to the platform data and
@@ -241,7 +241,7 @@ fills in the fields from device tree.
 
 	static int exynos_spi_ofdata_to_platdata(struct udevice *bus)
 	{
-		struct exynos_spi_platdata *plat = bus->platdata;
+		struct exynos_spi_platdata *plat = bus->plat;
 		const void *blob = gd->fdt_blob;
 		int node = dev_of_offset(bus);
 
@@ -283,7 +283,7 @@ Specify this data in a U_BOOT_DEVICE() declaration in your board file:
 
 	U_BOOT_DEVICE(board_spi0) = {
 		.name = "exynos_spi",
-		.platdata = &platdata_spi0,
+		.plat = &platdata_spi0,
 	};
 
 You will unfortunately need to put the struct definition into a header file
@@ -437,7 +437,7 @@ Here is an example for the speed part:
 
 	static int exynos_spi_set_speed(struct udevice *bus, uint speed)
 	{
-		struct exynos_spi_platdata *plat = bus->platdata;
+		struct exynos_spi_platdata *plat = bus->plat;
 		struct exynos_spi_priv *priv = dev_get_priv(bus);
 		int ret;
 
@@ -658,7 +658,7 @@ A little note about SPI uclass features
 The SPI uclass keeps some information about each device 'dev' on the bus:
 
    struct dm_spi_slave_platdata:
-     This is device_get_parent_platdata(dev).
+     This is device_get_parent_plat(dev).
      This is where the chip select number is stored, along with
      the default bus speed and mode. It is automatically read
      from the device tree in spi_child_post_bind(). It must not

+ 2 - 2
doc/driver-model/usb-info.rst

@@ -43,7 +43,7 @@ as drivers in the USB uclass. For example:
 		.probe = tegra_ehci_usb_probe,
 		.remove = tegra_ehci_usb_remove,
 		.ops	= &ehci_usb_ops,
-		.platdata_auto = sizeof(struct usb_platdata),
+		.plat_auto = sizeof(struct usb_platdata),
 		.priv_auto = sizeof(struct fdt_usb),
 		.flags	= DM_FLAG_ALLOC_PRIV_DMA,
 	};
@@ -100,7 +100,7 @@ The following primary data structures are in use:
 
 - struct usb_dev_platdata:
 	This holds platform data for a device. You can access it for a
-	device 'dev' with dev_get_parent_platdata(dev). It holds the device
+	device 'dev' with dev_get_parent_plat(dev). It holds the device
 	address and speed - anything that can be determined before the device
 	driver is actually set up. When probing the bus this structure is
 	used to provide essential information to the device driver.

+ 16 - 16
drivers/adc/adc-uclass.c

@@ -15,7 +15,7 @@
 #include <linux/delay.h>
 #include <power/regulator.h>
 
-#define ADC_UCLASS_PLATDATA_SIZE	sizeof(struct adc_uclass_platdata)
+#define ADC_UCLASS_PLATDATA_SIZE	sizeof(struct adc_uclass_plat)
 #define CHECK_NUMBER			true
 #define CHECK_MASK			(!CHECK_NUMBER)
 
@@ -29,7 +29,7 @@ extern void sdelay(unsigned long loops);
 static int check_channel(struct udevice *dev, int value, bool number_or_mask,
 			 const char *caller_function)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	unsigned mask = number_or_mask ? (1 << value) : value;
 
 	/* For the real ADC hardware, some ADC channels can be inactive.
@@ -48,7 +48,7 @@ static int check_channel(struct udevice *dev, int value, bool number_or_mask,
 
 static int adc_supply_enable(struct udevice *dev)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	const char *supply_type;
 	int ret = 0;
 
@@ -70,7 +70,7 @@ static int adc_supply_enable(struct udevice *dev)
 
 int adc_data_mask(struct udevice *dev, unsigned int *data_mask)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 
 	if (!uc_pdata)
 		return -ENOSYS;
@@ -81,7 +81,7 @@ int adc_data_mask(struct udevice *dev, unsigned int *data_mask)
 
 int adc_channel_mask(struct udevice *dev, unsigned int *channel_mask)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 
 	if (!uc_pdata)
 		return -ENOSYS;
@@ -141,7 +141,7 @@ int adc_start_channels(struct udevice *dev, unsigned int channel_mask)
 
 int adc_channel_data(struct udevice *dev, int channel, unsigned int *data)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	const struct adc_ops *ops = dev_get_driver_ops(dev);
 	unsigned int timeout_us = uc_pdata->data_timeout_us;
 	int ret;
@@ -168,7 +168,7 @@ int adc_channel_data(struct udevice *dev, int channel, unsigned int *data)
 int adc_channels_data(struct udevice *dev, unsigned int channel_mask,
 		      struct adc_channel *channels)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	unsigned int timeout_us = uc_pdata->multidata_timeout_us;
 	const struct adc_ops *ops = dev_get_driver_ops(dev);
 	int ret;
@@ -269,7 +269,7 @@ try_manual:
 
 static int adc_vdd_platdata_update(struct udevice *dev)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	int ret;
 
 	/* Warning!
@@ -292,7 +292,7 @@ static int adc_vdd_platdata_update(struct udevice *dev)
 
 static int adc_vss_platdata_update(struct udevice *dev)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	int ret;
 
 	if (!uc_pdata->vss_supply)
@@ -309,7 +309,7 @@ static int adc_vss_platdata_update(struct udevice *dev)
 
 int adc_vdd_value(struct udevice *dev, int *uV)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	int ret, value_sign = uc_pdata->vdd_polarity_negative ? -1 : 1;
 
 	/* Update the regulator Value. */
@@ -327,7 +327,7 @@ int adc_vdd_value(struct udevice *dev, int *uV)
 
 int adc_vss_value(struct udevice *dev, int *uV)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	int ret, value_sign = uc_pdata->vss_polarity_negative ? -1 : 1;
 
 	/* Update the regulator Value. */
@@ -369,7 +369,7 @@ int adc_raw_to_uV(struct udevice *dev, unsigned int raw, int *uV)
 
 static int adc_vdd_platdata_set(struct udevice *dev)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	int ret;
 	char *prop;
 
@@ -394,7 +394,7 @@ static int adc_vdd_platdata_set(struct udevice *dev)
 
 static int adc_vss_platdata_set(struct udevice *dev)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	int ret;
 	char *prop;
 
@@ -420,12 +420,12 @@ static int adc_pre_probe(struct udevice *dev)
 {
 	int ret;
 
-	/* Set ADC VDD platdata: polarity, uV, regulator (phandle). */
+	/* Set ADC VDD plat: polarity, uV, regulator (phandle). */
 	ret = adc_vdd_platdata_set(dev);
 	if (ret)
 		pr_err("%s: Can't update Vdd. Error: %d", dev->name, ret);
 
-	/* Set ADC VSS platdata: polarity, uV, regulator (phandle). */
+	/* Set ADC VSS plat: polarity, uV, regulator (phandle). */
 	ret = adc_vss_platdata_set(dev);
 	if (ret)
 		pr_err("%s: Can't update Vss. Error: %d", dev->name, ret);
@@ -437,5 +437,5 @@ UCLASS_DRIVER(adc) = {
 	.id	= UCLASS_ADC,
 	.name	= "adc",
 	.pre_probe =  adc_pre_probe,
-	.per_device_platdata_auto	= ADC_UCLASS_PLATDATA_SIZE,
+	.per_device_plat_auto	= ADC_UCLASS_PLATDATA_SIZE,
 };

+ 1 - 1
drivers/adc/exynos-adc.c

@@ -103,7 +103,7 @@ int exynos_adc_probe(struct udevice *dev)
 
 int exynos_adc_ofdata_to_platdata(struct udevice *dev)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	struct exynos_adc_priv *priv = dev_get_priv(dev);
 
 	priv->regs = dev_read_addr_ptr(dev);

+ 1 - 1
drivers/adc/meson-saradc.c

@@ -677,7 +677,7 @@ static int meson_saradc_probe(struct udevice *dev)
 
 int meson_saradc_ofdata_to_platdata(struct udevice *dev)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	struct meson_saradc_priv *priv = dev_get_priv(dev);
 
 	priv->data = (struct meson_saradc_data *)dev_get_driver_data(dev);

+ 2 - 2
drivers/adc/rockchip-saradc.c

@@ -44,7 +44,7 @@ int rockchip_saradc_channel_data(struct udevice *dev, int channel,
 				 unsigned int *data)
 {
 	struct rockchip_saradc_priv *priv = dev_get_priv(dev);
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 
 	if (channel != priv->active_channel) {
 		pr_err("Requested channel is not active!");
@@ -119,7 +119,7 @@ int rockchip_saradc_probe(struct udevice *dev)
 
 int rockchip_saradc_ofdata_to_platdata(struct udevice *dev)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	struct rockchip_saradc_priv *priv = dev_get_priv(dev);
 	struct rockchip_saradc_data *data;
 

+ 1 - 1
drivers/adc/sandbox.c

@@ -137,7 +137,7 @@ int sandbox_adc_probe(struct udevice *dev)
 
 int sandbox_adc_ofdata_to_platdata(struct udevice *dev)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 
 	uc_pdata->data_mask = SANDBOX_ADC_DATA_MASK;
 	uc_pdata->data_format = ADC_DATA_FORMAT_BIN;

+ 3 - 3
drivers/adc/stm32-adc.c

@@ -80,7 +80,7 @@ static int stm32_adc_stop(struct udevice *dev)
 
 static int stm32_adc_start_channel(struct udevice *dev, int channel)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	struct stm32_adc_common *common = dev_get_priv(dev_get_parent(dev));
 	struct stm32_adc *adc = dev_get_priv(dev);
 	int ret;
@@ -164,7 +164,7 @@ static int stm32_adc_channel_data(struct udevice *dev, int channel,
 
 static int stm32_adc_chan_of_init(struct udevice *dev)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	struct stm32_adc *adc = dev_get_priv(dev);
 	u32 chans[STM32_ADC_CH_MAX];
 	unsigned int i, num_channels;
@@ -206,7 +206,7 @@ static int stm32_adc_chan_of_init(struct udevice *dev)
 
 static int stm32_adc_probe(struct udevice *dev)
 {
-	struct adc_uclass_platdata *uc_pdata = dev_get_uclass_platdata(dev);
+	struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
 	struct stm32_adc_common *common = dev_get_priv(dev_get_parent(dev));
 	struct stm32_adc *adc = dev_get_priv(dev);
 	int offset;

+ 3 - 3
drivers/ata/ahci.c

@@ -172,7 +172,7 @@ static int ahci_host_init(struct ahci_uc_priv *uc_priv)
 #if !defined(CONFIG_SCSI_AHCI_PLAT) && !defined(CONFIG_DM_SCSI)
 # ifdef CONFIG_DM_PCI
 	struct udevice *dev = uc_priv->dev;
-	struct pci_child_platdata *pplat = dev_get_parent_platdata(dev);
+	struct pci_child_platdata *pplat = dev_get_parent_plat(dev);
 # else
 	pci_dev_t pdev = uc_priv->dev;
 	unsigned short vendor;
@@ -474,7 +474,7 @@ static int ahci_init_one(struct ahci_uc_priv *uc_priv, pci_dev_t dev)
 		pci_write_config_byte(dev, 0x41, 0xa1);
 #endif
 #else
-	struct scsi_platdata *plat = dev_get_uclass_platdata(dev);
+	struct scsi_platdata *plat = dev_get_uclass_plat(dev);
 	uc_priv->mmio_base = (void *)plat->base;
 #endif
 
@@ -1170,7 +1170,7 @@ int ahci_probe_scsi(struct udevice *ahci_dev, ulong base)
 	device_find_first_child(ahci_dev, &dev);
 	if (!dev)
 		return -ENODEV;
-	uc_plat = dev_get_uclass_platdata(dev);
+	uc_plat = dev_get_uclass_plat(dev);
 	uc_plat->base = base;
 	uc_plat->max_lun = 1;
 	uc_plat->max_id = 2;

+ 3 - 3
drivers/ata/dwc_ahsata.c

@@ -1019,7 +1019,7 @@ int dwc_ahsata_scan(struct udevice *dev)
 		}
 	}
 
-	desc = dev_get_uclass_platdata(blk);
+	desc = dev_get_uclass_plat(blk);
 	ret = dwc_ahsata_scan_common(uc_priv, desc);
 	if (ret) {
 		debug("%s: Failed to scan bus\n", __func__);
@@ -1054,7 +1054,7 @@ int dwc_ahsata_probe(struct udevice *dev)
 static ulong dwc_ahsata_read(struct udevice *blk, lbaint_t blknr,
 			     lbaint_t blkcnt, void *buffer)
 {
-	struct blk_desc *desc = dev_get_uclass_platdata(blk);
+	struct blk_desc *desc = dev_get_uclass_plat(blk);
 	struct udevice *dev = dev_get_parent(blk);
 	struct ahci_uc_priv *uc_priv;
 
@@ -1065,7 +1065,7 @@ static ulong dwc_ahsata_read(struct udevice *blk, lbaint_t blknr,
 static ulong dwc_ahsata_write(struct udevice *blk, lbaint_t blknr,
 			      lbaint_t blkcnt, const void *buffer)
 {
-	struct blk_desc *desc = dev_get_uclass_platdata(blk);
+	struct blk_desc *desc = dev_get_uclass_plat(blk);
 	struct udevice *dev = dev_get_parent(blk);
 	struct ahci_uc_priv *uc_priv;
 

+ 2 - 2
drivers/ata/fsl_sata.c

@@ -808,7 +808,7 @@ int scan_sata(int dev)
 #else
 static int scan_sata(struct udevice *dev)
 {
-	struct blk_desc *desc = dev_get_uclass_platdata(dev);
+	struct blk_desc *desc = dev_get_uclass_plat(dev);
 	struct fsl_ata_priv *priv = dev_get_platdata(dev);
 	fsl_sata_t *sata = priv->fsl_sata;
 #endif
@@ -900,7 +900,7 @@ U_BOOT_DRIVER(sata_fsl_driver) = {
 	.name = "sata_fsl_blk",
 	.id = UCLASS_BLK,
 	.ops = &sata_fsl_blk_ops,
-	.platdata_auto	= sizeof(struct fsl_ata_priv),
+	.plat_auto	= sizeof(struct fsl_ata_priv),
 };
 
 static int fsl_ata_ofdata_to_platdata(struct udevice *dev)

+ 3 - 3
drivers/ata/sata_mv.c

@@ -727,7 +727,7 @@ static u32 mv_sata_rw_cmd(struct udevice *dev, int port, lbaint_t start,
 static u32 ata_low_level_rw(struct udevice *dev, int port, lbaint_t blknr,
 			    lbaint_t blkcnt, void *buffer, int is_write)
 {
-	struct blk_desc *desc = dev_get_uclass_platdata(dev);
+	struct blk_desc *desc = dev_get_uclass_plat(dev);
 	lbaint_t start, blks;
 	u8 *addr;
 	int max_blks;
@@ -943,7 +943,7 @@ static int sata_mv_init_sata(struct udevice *dev, int port)
 
 static int sata_mv_scan_sata(struct udevice *dev, int port)
 {
-	struct blk_desc *desc = dev_get_uclass_platdata(dev);
+	struct blk_desc *desc = dev_get_uclass_plat(dev);
 	struct mv_priv *priv = dev_get_platdata(dev);
 	unsigned char serial[ATA_ID_SERNO_LEN + 1];
 	unsigned char firmware[ATA_ID_FW_REV_LEN + 1];
@@ -1030,7 +1030,7 @@ U_BOOT_DRIVER(sata_mv_driver) = {
 	.name = "sata_mv_blk",
 	.id = UCLASS_BLK,
 	.ops = &sata_mv_blk_ops,
-	.platdata_auto	= sizeof(struct mv_priv),
+	.plat_auto	= sizeof(struct mv_priv),
 };
 
 static int sata_mv_probe(struct udevice *dev)

+ 2 - 2
drivers/ata/sata_sil.c

@@ -708,7 +708,7 @@ int scan_sata(int dev)
 #else
 static int scan_sata(struct udevice *blk_dev, int dev)
 {
-	struct blk_desc *desc = dev_get_uclass_platdata(blk_dev);
+	struct blk_desc *desc = dev_get_uclass_plat(blk_dev);
 	struct sil_sata_priv *priv = dev_get_platdata(blk_dev);
 	struct sil_sata *sata = priv->sil_sata_desc[dev];
 #endif
@@ -772,7 +772,7 @@ U_BOOT_DRIVER(sata_sil_driver) = {
 	.name = "sata_sil_blk",
 	.id = UCLASS_BLK,
 	.ops = &sata_sil_blk_ops,
-	.platdata_auto	= sizeof(struct sil_sata_priv),
+	.plat_auto	= sizeof(struct sil_sata_priv),
 };
 
 static int sil_unbind_device(struct udevice *dev)

+ 14 - 14
drivers/block/blk-uclass.c

@@ -79,7 +79,7 @@ struct blk_desc *blk_get_devnum_by_type(enum if_type if_type, int devnum)
 	ret = blk_get_device(if_type, devnum, &dev);
 	if (ret)
 		return NULL;
-	desc = dev_get_uclass_platdata(dev);
+	desc = dev_get_uclass_plat(dev);
 
 	return desc;
 }
@@ -114,7 +114,7 @@ struct blk_desc *blk_get_devnum_by_typename(const char *if_typename, int devnum)
 	if (ret)
 		return NULL;
 	uclass_foreach_dev(dev, uc) {
-		struct blk_desc *desc = dev_get_uclass_platdata(dev);
+		struct blk_desc *desc = dev_get_uclass_plat(dev);
 
 		debug("%s: if_type=%d, devnum=%d: %s, %d, %d\n", __func__,
 		      if_type, devnum, dev->name, desc->if_type, desc->devnum);
@@ -154,7 +154,7 @@ struct blk_desc *blk_get_by_device(struct udevice *dev)
 		if (device_get_uclass_id(child_dev) != UCLASS_BLK)
 			continue;
 
-		return dev_get_uclass_platdata(child_dev);
+		return dev_get_uclass_plat(child_dev);
 	}
 
 	debug("%s: No block device found\n", __func__);
@@ -184,7 +184,7 @@ static int get_desc(enum if_type if_type, int devnum, struct blk_desc **descp)
 	if (ret)
 		return ret;
 	uclass_foreach_dev(dev, uc) {
-		struct blk_desc *desc = dev_get_uclass_platdata(dev);
+		struct blk_desc *desc = dev_get_uclass_plat(dev);
 
 		debug("%s: if_type=%d, devnum=%d: %s, %d, %d\n", __func__,
 		      if_type, devnum, dev->name, desc->if_type, desc->devnum);
@@ -368,7 +368,7 @@ int blk_first_device(int if_type, struct udevice **devp)
 	if (!*devp)
 		return -ENODEV;
 	do {
-		desc = dev_get_uclass_platdata(*devp);
+		desc = dev_get_uclass_plat(*devp);
 		if (desc->if_type == if_type)
 			return 0;
 		ret = uclass_find_next_device(devp);
@@ -384,7 +384,7 @@ int blk_next_device(struct udevice **devp)
 	struct blk_desc *desc;
 	int ret, if_type;
 
-	desc = dev_get_uclass_platdata(*devp);
+	desc = dev_get_uclass_plat(*devp);
 	if_type = desc->if_type;
 	do {
 		ret = uclass_find_next_device(devp);
@@ -392,7 +392,7 @@ int blk_next_device(struct udevice **devp)
 			return ret;
 		if (!*devp)
 			return -ENODEV;
-		desc = dev_get_uclass_platdata(*devp);
+		desc = dev_get_uclass_plat(*devp);
 		if (desc->if_type == if_type)
 			return 0;
 	} while (1);
@@ -408,7 +408,7 @@ int blk_find_device(int if_type, int devnum, struct udevice **devp)
 	if (ret)
 		return ret;
 	uclass_foreach_dev(dev, uc) {
-		struct blk_desc *desc = dev_get_uclass_platdata(dev);
+		struct blk_desc *desc = dev_get_uclass_plat(dev);
 
 		debug("%s: if_type=%d, devnum=%d: %s, %d, %d\n", __func__,
 		      if_type, devnum, dev->name, desc->if_type, desc->devnum);
@@ -516,7 +516,7 @@ int blk_find_max_devnum(enum if_type if_type)
 	if (ret)
 		return ret;
 	uclass_foreach_dev(dev, uc) {
-		struct blk_desc *desc = dev_get_uclass_platdata(dev);
+		struct blk_desc *desc = dev_get_uclass_plat(dev);
 
 		if (desc->if_type == if_type && desc->devnum > max_devnum)
 			max_devnum = desc->devnum;
@@ -548,7 +548,7 @@ static int blk_claim_devnum(enum if_type if_type, int devnum)
 	if (ret)
 		return ret;
 	uclass_foreach_dev(dev, uc) {
-		struct blk_desc *desc = dev_get_uclass_platdata(dev);
+		struct blk_desc *desc = dev_get_uclass_plat(dev);
 
 		if (desc->if_type == if_type && desc->devnum == devnum) {
 			int next = blk_next_free_devnum(if_type);
@@ -583,7 +583,7 @@ int blk_create_device(struct udevice *parent, const char *drv_name,
 	ret = device_bind_driver(parent, drv_name, name, &dev);
 	if (ret)
 		return ret;
-	desc = dev_get_uclass_platdata(dev);
+	desc = dev_get_uclass_plat(dev);
 	desc->if_type = if_type;
 	desc->blksz = blksz;
 	desc->log2blksz = LOG2(desc->blksz);
@@ -629,7 +629,7 @@ int blk_unbind_all(int if_type)
 	if (ret)
 		return ret;
 	uclass_foreach_dev_safe(dev, next, uc) {
-		struct blk_desc *desc = dev_get_uclass_platdata(dev);
+		struct blk_desc *desc = dev_get_uclass_plat(dev);
 
 		if (desc->if_type == if_type) {
 			ret = device_remove(dev, DM_REMOVE_NORMAL);
@@ -648,7 +648,7 @@ static int blk_post_probe(struct udevice *dev)
 {
 	if (IS_ENABLED(CONFIG_PARTITIONS) &&
 	    IS_ENABLED(CONFIG_HAVE_BLOCK_DEVICE)) {
-		struct blk_desc *desc = dev_get_uclass_platdata(dev);
+		struct blk_desc *desc = dev_get_uclass_plat(dev);
 
 		part_init(desc);
 	}
@@ -660,5 +660,5 @@ UCLASS_DRIVER(blk) = {
 	.id		= UCLASS_BLK,
 	.name		= "blk",
 	.post_probe	= blk_post_probe,
-	.per_device_platdata_auto	= sizeof(struct blk_desc),
+	.per_device_plat_auto	= sizeof(struct blk_desc),
 };

+ 3 - 3
drivers/block/ide.c

@@ -940,7 +940,7 @@ ulong ide_read(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt,
 #endif
 {
 #ifdef CONFIG_BLK
-	struct blk_desc *block_dev = dev_get_uclass_platdata(dev);
+	struct blk_desc *block_dev = dev_get_uclass_plat(dev);
 #endif
 	int device = block_dev->devnum;
 	ulong n = 0;
@@ -1067,7 +1067,7 @@ ulong ide_write(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt,
 #endif
 {
 #ifdef CONFIG_BLK
-	struct blk_desc *block_dev = dev_get_uclass_platdata(dev);
+	struct blk_desc *block_dev = dev_get_uclass_plat(dev);
 #endif
 	int device = block_dev->devnum;
 	ulong n = 0;
@@ -1160,7 +1160,7 @@ int ide_device_present(int dev)
 #ifdef CONFIG_BLK
 static int ide_blk_probe(struct udevice *udev)
 {
-	struct blk_desc *desc = dev_get_uclass_platdata(udev);
+	struct blk_desc *desc = dev_get_uclass_plat(udev);
 
 	/* fill in device vendor/product/rev strings */
 	strncpy(desc->vendor, ide_dev_desc[desc->devnum].vendor,

+ 4 - 4
drivers/block/sandbox.c

@@ -35,7 +35,7 @@ static unsigned long host_block_read(struct udevice *dev,
 				     void *buffer)
 {
 	struct host_block_dev *host_dev = dev_get_platdata(dev);
-	struct blk_desc *block_dev = dev_get_uclass_platdata(dev);
+	struct blk_desc *block_dev = dev_get_uclass_plat(dev);
 
 #else
 static unsigned long host_block_read(struct blk_desc *block_dev,
@@ -66,7 +66,7 @@ static unsigned long host_block_write(struct udevice *dev,
 				      const void *buffer)
 {
 	struct host_block_dev *host_dev = dev_get_platdata(dev);
-	struct blk_desc *block_dev = dev_get_uclass_platdata(dev);
+	struct blk_desc *block_dev = dev_get_uclass_plat(dev);
 #else
 static unsigned long host_block_write(struct blk_desc *block_dev,
 				      unsigned long start, lbaint_t blkcnt,
@@ -202,7 +202,7 @@ int host_get_dev_err(int devnum, struct blk_desc **blk_devp)
 	ret = blk_get_device(IF_TYPE_HOST, devnum, &dev);
 	if (ret)
 		return ret;
-	*blk_devp = dev_get_uclass_platdata(dev);
+	*blk_devp = dev_get_uclass_plat(dev);
 #else
 	struct host_block_dev *host_dev = find_host_device(devnum);
 
@@ -228,7 +228,7 @@ U_BOOT_DRIVER(sandbox_host_blk) = {
 	.name		= "sandbox_host_blk",
 	.id		= UCLASS_BLK,
 	.ops		= &sandbox_host_blk_ops,
-	.platdata_auto	= sizeof(struct host_block_dev),
+	.plat_auto	= sizeof(struct host_block_dev),
 };
 #else
 U_BOOT_LEGACY_BLK(sandbox_host) = {

+ 2 - 2
drivers/button/button-gpio.c

@@ -31,7 +31,7 @@ static enum button_state_t button_gpio_get_state(struct udevice *dev)
 
 static int button_gpio_probe(struct udevice *dev)
 {
-	struct button_uc_plat *uc_plat = dev_get_uclass_platdata(dev);
+	struct button_uc_plat *uc_plat = dev_get_uclass_plat(dev);
 	struct button_gpio_priv *priv = dev_get_priv(dev);
 	int ret;
 
@@ -83,7 +83,7 @@ static int button_gpio_bind(struct udevice *parent)
 						 node, &dev);
 		if (ret)
 			return ret;
-		uc_plat = dev_get_uclass_platdata(dev);
+		uc_plat = dev_get_uclass_plat(dev);
 		uc_plat->label = label;
 	}
 

+ 2 - 2
drivers/button/button-uclass.c

@@ -16,7 +16,7 @@ int button_get_by_label(const char *label, struct udevice **devp)
 	struct uclass *uc;
 
 	uclass_id_foreach_dev(UCLASS_BUTTON, dev, uc) {
-		struct button_uc_plat *uc_plat = dev_get_uclass_platdata(dev);
+		struct button_uc_plat *uc_plat = dev_get_uclass_plat(dev);
 
 		/* Ignore the top-level button node */
 		if (uc_plat->label && !strcmp(label, uc_plat->label))
@@ -39,5 +39,5 @@ enum button_state_t button_get_state(struct udevice *dev)
 UCLASS_DRIVER(button) = {
 	.id		= UCLASS_BUTTON,
 	.name		= "button",
-	.per_device_platdata_auto	= sizeof(struct button_uc_plat),
+	.per_device_plat_auto	= sizeof(struct button_uc_plat),
 };

+ 1 - 1
drivers/cache/cache-v5l2.c

@@ -182,7 +182,7 @@ U_BOOT_DRIVER(v5l2_cache) = {
 	.of_match = v5l2_cache_ids,
 	.ofdata_to_platdata = v5l2_ofdata_to_platdata,
 	.probe	= v5l2_probe,
-	.platdata_auto	= sizeof(struct v5l2_plat),
+	.plat_auto	= sizeof(struct v5l2_plat),
 	.ops = &v5l2_cache_ops,
 	.flags  = DM_FLAG_PRE_RELOC,
 };

+ 1 - 1
drivers/clk/altera/clk-agilex.c

@@ -658,5 +658,5 @@ U_BOOT_DRIVER(socfpga_agilex_clk) = {
 	.ops		= &socfpga_clk_ops,
 	.probe		= socfpga_clk_probe,
 	.ofdata_to_platdata = socfpga_clk_ofdata_to_platdata,
-	.platdata_auto	= sizeof(struct socfpga_clk_platdata),
+	.plat_auto	= sizeof(struct socfpga_clk_platdata),
 };

+ 1 - 1
drivers/clk/altera/clk-arria10.c

@@ -359,5 +359,5 @@ U_BOOT_DRIVER(socfpga_a10_clk) = {
 	.probe		= socfpga_a10_clk_probe,
 	.ofdata_to_platdata = socfpga_a10_ofdata_to_platdata,
 
-	.platdata_auto	= sizeof(struct socfpga_a10_clk_platdata),
+	.plat_auto	= sizeof(struct socfpga_a10_clk_platdata),
 };

+ 9 - 9
drivers/clk/at91/compat.c

@@ -225,7 +225,7 @@ U_BOOT_DRIVER(at91sam9x5_main_osc_clk) = {
 	.id = UCLASS_CLK,
 	.of_match = main_osc_clk_match,
 	.probe = main_osc_clk_probe,
-	.platdata_auto	= sizeof(struct pmc_platdata),
+	.plat_auto	= sizeof(struct pmc_platdata),
 	.ops = &main_osc_clk_ops,
 };
 
@@ -266,7 +266,7 @@ U_BOOT_DRIVER(at91_plla_clk) = {
 	.id = UCLASS_CLK,
 	.of_match = plla_clk_match,
 	.probe = plla_clk_probe,
-	.platdata_auto	= sizeof(struct pmc_platdata),
+	.plat_auto	= sizeof(struct pmc_platdata),
 	.ops = &plla_clk_ops,
 };
 
@@ -340,7 +340,7 @@ U_BOOT_DRIVER(at91_plladiv_clk) = {
 	.id = UCLASS_CLK,
 	.of_match = at91_plladiv_clk_match,
 	.probe = at91_plladiv_clk_probe,
-	.platdata_auto	= sizeof(struct pmc_platdata),
+	.plat_auto	= sizeof(struct pmc_platdata),
 	.ops = &at91_plladiv_clk_ops,
 };
 
@@ -437,7 +437,7 @@ U_BOOT_DRIVER(system_clk) = {
 	.name = "system-clk",
 	.id = UCLASS_CLK,
 	.probe = at91_clk_probe,
-	.platdata_auto	= sizeof(struct pmc_platdata),
+	.plat_auto	= sizeof(struct pmc_platdata),
 	.ops = &system_clk_ops,
 };
 
@@ -536,7 +536,7 @@ static struct clk_ops periph_clk_ops = {
 U_BOOT_DRIVER(clk_periph) = {
 	.name	= "periph-clk",
 	.id	= UCLASS_CLK,
-	.platdata_auto	= sizeof(struct pmc_platdata),
+	.plat_auto	= sizeof(struct pmc_platdata),
 	.probe = at91_clk_probe,
 	.ops	= &periph_clk_ops,
 };
@@ -668,7 +668,7 @@ U_BOOT_DRIVER(at91sam9x5_utmi_clk) = {
 	.of_match = utmi_clk_match,
 	.probe = utmi_clk_probe,
 	.ofdata_to_platdata = utmi_clk_ofdata_to_platdata,
-	.platdata_auto	= sizeof(struct pmc_platdata),
+	.plat_auto	= sizeof(struct pmc_platdata),
 	.ops = &utmi_clk_ops,
 };
 
@@ -713,7 +713,7 @@ U_BOOT_DRIVER(sama5d4_h32mx_clk) = {
 	.id = UCLASS_CLK,
 	.of_match = sama5d4_h32mx_clk_match,
 	.probe = sama5d4_h32mx_clk_probe,
-	.platdata_auto	= sizeof(struct pmc_platdata),
+	.plat_auto	= sizeof(struct pmc_platdata),
 	.ops = &sama5d4_h32mx_clk_ops,
 };
 
@@ -877,7 +877,7 @@ U_BOOT_DRIVER(generic_clk) = {
 	.probe = at91_clk_probe,
 	.ofdata_to_platdata = generic_clk_ofdata_to_platdata,
 	.priv_auto	= sizeof(struct generic_clk_priv),
-	.platdata_auto	= sizeof(struct pmc_platdata),
+	.plat_auto	= sizeof(struct pmc_platdata),
 	.ops = &generic_clk_ops,
 };
 
@@ -1013,7 +1013,7 @@ U_BOOT_DRIVER(at91_usb_clk) = {
 	.probe = at91_usb_clk_probe,
 	.ofdata_to_platdata = at91_usb_clk_ofdata_to_platdata,
 	.priv_auto	= sizeof(struct at91_usb_clk_priv),
-	.platdata_auto	= sizeof(struct pmc_platdata),
+	.plat_auto	= sizeof(struct pmc_platdata),
 	.ops = &at91_usb_clk_ops,
 };
 

+ 1 - 1
drivers/clk/clk_boston.c

@@ -92,6 +92,6 @@ U_BOOT_DRIVER(clk_boston) = {
 	.id = UCLASS_CLK,
 	.of_match = clk_boston_match,
 	.ofdata_to_platdata = clk_boston_ofdata_to_platdata,
-	.platdata_auto	= sizeof(struct clk_boston),
+	.plat_auto	= sizeof(struct clk_boston),
 	.ops = &clk_boston_ops,
 };

+ 1 - 1
drivers/clk/clk_fixed_factor.c

@@ -67,6 +67,6 @@ U_BOOT_DRIVER(clk_fixed_factor) = {
 	.id = UCLASS_CLK,
 	.of_match = clk_fixed_factor_match,
 	.ofdata_to_platdata = clk_fixed_factor_ofdata_to_platdata,
-	.platdata_auto	= sizeof(struct clk_fixed_factor),
+	.plat_auto	= sizeof(struct clk_fixed_factor),
 	.ops = &clk_fixed_factor_ops,
 };

+ 1 - 1
drivers/clk/clk_fixed_rate.c

@@ -51,7 +51,7 @@ U_BOOT_DRIVER(fixed_clock) = {
 	.id = UCLASS_CLK,
 	.of_match = clk_fixed_rate_match,
 	.ofdata_to_platdata = clk_fixed_rate_ofdata_to_platdata,
-	.platdata_auto	= sizeof(struct clk_fixed_rate),
+	.plat_auto	= sizeof(struct clk_fixed_rate),
 	.ops = &clk_fixed_rate_ops,
 	.flags = DM_FLAG_PRE_RELOC,
 };

+ 1 - 1
drivers/clk/rockchip/clk_rk3188.c

@@ -617,7 +617,7 @@ U_BOOT_DRIVER(rockchip_rk3188_cru) = {
 	.id			= UCLASS_CLK,
 	.of_match		= rk3188_clk_ids,
 	.priv_auto	= sizeof(struct rk3188_clk_priv),
-	.platdata_auto	= sizeof(struct rk3188_clk_plat),
+	.plat_auto	= sizeof(struct rk3188_clk_plat),
 	.ops			= &rk3188_clk_ops,
 	.bind			= rk3188_clk_bind,
 	.ofdata_to_platdata	= rk3188_clk_ofdata_to_platdata,

+ 1 - 1
drivers/clk/rockchip/clk_rk3288.c

@@ -1041,7 +1041,7 @@ U_BOOT_DRIVER(rockchip_rk3288_cru) = {
 	.id		= UCLASS_CLK,
 	.of_match	= rk3288_clk_ids,
 	.priv_auto	= sizeof(struct rk3288_clk_priv),
-	.platdata_auto	= sizeof(struct rk3288_clk_plat),
+	.plat_auto	= sizeof(struct rk3288_clk_plat),
 	.ops		= &rk3288_clk_ops,
 	.bind		= rk3288_clk_bind,
 	.ofdata_to_platdata	= rk3288_clk_ofdata_to_platdata,

+ 1 - 1
drivers/clk/rockchip/clk_rk3368.c

@@ -645,7 +645,7 @@ U_BOOT_DRIVER(rockchip_rk3368_cru) = {
 	.of_match	= rk3368_clk_ids,
 	.priv_auto	= sizeof(struct rk3368_clk_priv),
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
-	.platdata_auto	= sizeof(struct rk3368_clk_plat),
+	.plat_auto	= sizeof(struct rk3368_clk_plat),
 #endif
 	.ofdata_to_platdata = rk3368_clk_ofdata_to_platdata,
 	.ops		= &rk3368_clk_ops,

+ 2 - 2
drivers/clk/rockchip/clk_rk3399.c

@@ -1453,7 +1453,7 @@ U_BOOT_DRIVER(clk_rk3399) = {
 	.bind		= rk3399_clk_bind,
 	.probe		= rk3399_clk_probe,
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
-	.platdata_auto	= sizeof(struct rk3399_clk_plat),
+	.plat_auto	= sizeof(struct rk3399_clk_plat),
 #endif
 };
 
@@ -1648,6 +1648,6 @@ U_BOOT_DRIVER(rockchip_rk3399_pmuclk) = {
 	.probe		= rk3399_pmuclk_probe,
 	.bind		= rk3399_pmuclk_bind,
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
-	.platdata_auto	= sizeof(struct rk3399_pmuclk_plat),
+	.plat_auto	= sizeof(struct rk3399_pmuclk_plat),
 #endif
 };

+ 6 - 6
drivers/core/device-remove.c

@@ -89,16 +89,16 @@ int device_unbind(struct udevice *dev)
 		return log_msg_ret("child unbind", ret);
 
 	if (dev->flags & DM_FLAG_ALLOC_PDATA) {
-		free(dev->platdata);
-		dev->platdata = NULL;
+		free(dev->plat);
+		dev->plat = NULL;
 	}
 	if (dev->flags & DM_FLAG_ALLOC_UCLASS_PDATA) {
-		free(dev->uclass_platdata);
-		dev->uclass_platdata = NULL;
+		free(dev->uclass_plat);
+		dev->uclass_plat = NULL;
 	}
 	if (dev->flags & DM_FLAG_ALLOC_PARENT_PDATA) {
-		free(dev->parent_platdata);
-		dev->parent_platdata = NULL;
+		free(dev->parent_plat);
+		dev->parent_plat = NULL;
 	}
 	ret = uclass_unbind_device(dev);
 	if (ret)

+ 31 - 32
drivers/core/device.c

@@ -34,7 +34,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 static int device_bind_common(struct udevice *parent, const struct driver *drv,
-			      const char *name, void *platdata,
+			      const char *name, void *plat,
 			      ulong driver_data, ofnode node,
 			      uint of_platdata_size, struct udevice **devp)
 {
@@ -63,7 +63,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
 #ifdef CONFIG_DEVRES
 	INIT_LIST_HEAD(&dev->devres_head);
 #endif
-	dev->platdata = platdata;
+	dev->plat = plat;
 	dev->driver_data = driver_data;
 	dev->name = name;
 	dev->node = node;
@@ -96,49 +96,49 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
 		}
 	}
 
-	if (drv->platdata_auto) {
-		bool alloc = !platdata;
+	if (drv->plat_auto) {
+		bool alloc = !plat;
 
 		if (CONFIG_IS_ENABLED(OF_PLATDATA)) {
 			if (of_platdata_size) {
 				dev->flags |= DM_FLAG_OF_PLATDATA;
-				if (of_platdata_size < drv->platdata_auto)
+				if (of_platdata_size < drv->plat_auto)
 					alloc = true;
 			}
 		}
 		if (alloc) {
 			dev->flags |= DM_FLAG_ALLOC_PDATA;
-			dev->platdata = calloc(1, drv->platdata_auto);
-			if (!dev->platdata) {
+			dev->plat = calloc(1, drv->plat_auto);
+			if (!dev->plat) {
 				ret = -ENOMEM;
 				goto fail_alloc1;
 			}
-			if (CONFIG_IS_ENABLED(OF_PLATDATA) && platdata) {
-				memcpy(dev->platdata, platdata,
+			if (CONFIG_IS_ENABLED(OF_PLATDATA) && plat) {
+				memcpy(dev->plat, plat,
 				       of_platdata_size);
 			}
 		}
 	}
 
-	size = uc->uc_drv->per_device_platdata_auto;
+	size = uc->uc_drv->per_device_plat_auto;
 	if (size) {
 		dev->flags |= DM_FLAG_ALLOC_UCLASS_PDATA;
-		dev->uclass_platdata = calloc(1, size);
-		if (!dev->uclass_platdata) {
+		dev->uclass_plat = calloc(1, size);
+		if (!dev->uclass_plat) {
 			ret = -ENOMEM;
 			goto fail_alloc2;
 		}
 	}
 
 	if (parent) {
-		size = parent->driver->per_child_platdata_auto;
+		size = parent->driver->per_child_plat_auto;
 		if (!size) {
-			size = parent->uclass->uc_drv->per_child_platdata_auto;
+			size = parent->uclass->uc_drv->per_child_plat_auto;
 		}
 		if (size) {
 			dev->flags |= DM_FLAG_ALLOC_PARENT_PDATA;
-			dev->parent_platdata = calloc(1, size);
-			if (!dev->parent_platdata) {
+			dev->parent_plat = calloc(1, size);
+			if (!dev->parent_plat) {
 				ret = -ENOMEM;
 				goto fail_alloc3;
 			}
@@ -198,19 +198,19 @@ fail_uclass_bind:
 	if (CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)) {
 		list_del(&dev->sibling_node);
 		if (dev->flags & DM_FLAG_ALLOC_PARENT_PDATA) {
-			free(dev->parent_platdata);
-			dev->parent_platdata = NULL;
+			free(dev->parent_plat);
+			dev->parent_plat = NULL;
 		}
 	}
 fail_alloc3:
 	if (dev->flags & DM_FLAG_ALLOC_UCLASS_PDATA) {
-		free(dev->uclass_platdata);
-		dev->uclass_platdata = NULL;
+		free(dev->uclass_plat);
+		dev->uclass_plat = NULL;
 	}
 fail_alloc2:
 	if (dev->flags & DM_FLAG_ALLOC_PDATA) {
-		free(dev->platdata);
-		dev->platdata = NULL;
+		free(dev->plat);
+		dev->plat = NULL;
 	}
 fail_alloc1:
 	devres_release_all(dev);
@@ -230,10 +230,10 @@ int device_bind_with_driver_data(struct udevice *parent,
 }
 
 int device_bind(struct udevice *parent, const struct driver *drv,
-		const char *name, void *platdata, ofnode node,
+		const char *name, void *plat, ofnode node,
 		struct udevice **devp)
 {
-	return device_bind_common(parent, drv, name, platdata, 0, node, 0,
+	return device_bind_common(parent, drv, name, plat, 0, node, 0,
 				  devp);
 }
 
@@ -253,9 +253,8 @@ int device_bind_by_name(struct udevice *parent, bool pre_reloc_only,
 #if CONFIG_IS_ENABLED(OF_PLATDATA)
 	platdata_size = info->platdata_size;
 #endif
-	ret = device_bind_common(parent, drv, info->name,
-				 (void *)info->platdata, 0, ofnode_null(),
-				 platdata_size, devp);
+	ret = device_bind_common(parent, drv, info->name, (void *)info->plat, 0,
+				 ofnode_null(), platdata_size, devp);
 	if (ret)
 		return ret;
 
@@ -526,27 +525,27 @@ void *dev_get_platdata(const struct udevice *dev)
 		return NULL;
 	}
 
-	return dev->platdata;
+	return dev->plat;
 }
 
-void *dev_get_parent_platdata(const struct udevice *dev)
+void *dev_get_parent_plat(const struct udevice *dev)
 {
 	if (!dev) {
 		dm_warn("%s: null device\n", __func__);
 		return NULL;
 	}
 
-	return dev->parent_platdata;
+	return dev->parent_plat;
 }
 
-void *dev_get_uclass_platdata(const struct udevice *dev)
+void *dev_get_uclass_plat(const struct udevice *dev)
 {
 	if (!dev) {
 		dm_warn("%s: null device\n", __func__);
 		return NULL;
 	}
 
-	return dev->uclass_platdata;
+	return dev->uclass_plat;
 }
 
 void *dev_get_priv(const struct udevice *dev)

+ 1 - 1
drivers/core/dump.c

@@ -170,6 +170,6 @@ void dm_dump_static_driver_info(void)
 	puts("---------------------------------\n");
 	for (entry = drv; entry != drv + n_ents; entry++) {
 		printf("%-25.25s @%08lx\n", entry->name,
-		       (ulong)map_to_sysmem(entry->platdata));
+		       (ulong)map_to_sysmem(entry->plat));
 	}
 }

+ 2 - 2
drivers/core/root.c

@@ -123,8 +123,8 @@ void fix_devices(void)
 	struct driver_info *entry;
 
 	for (entry = dev; entry != dev + n_ents; entry++) {
-		if (entry->platdata)
-			entry->platdata += gd->reloc_off;
+		if (entry->plat)
+			entry->plat += gd->reloc_off;
 	}
 }
 

+ 3 - 3
drivers/core/simple-bus.c

@@ -14,7 +14,7 @@ struct simple_bus_plat {
 
 fdt_addr_t simple_bus_translate(struct udevice *dev, fdt_addr_t addr)
 {
-	struct simple_bus_plat *plat = dev_get_uclass_platdata(dev);
+	struct simple_bus_plat *plat = dev_get_uclass_plat(dev);
 
 	if (addr >= plat->base && addr < plat->base + plat->size)
 		addr = (addr - plat->base) + plat->target;
@@ -32,7 +32,7 @@ static int simple_bus_post_bind(struct udevice *dev)
 
 	ret = dev_read_u32_array(dev, "ranges", cell, ARRAY_SIZE(cell));
 	if (!ret) {
-		struct simple_bus_plat *plat = dev_get_uclass_platdata(dev);
+		struct simple_bus_plat *plat = dev_get_uclass_plat(dev);
 
 		plat->base = cell[0];
 		plat->target = cell[1];
@@ -47,7 +47,7 @@ UCLASS_DRIVER(simple_bus) = {
 	.id		= UCLASS_SIMPLE_BUS,
 	.name		= "simple_bus",
 	.post_bind	= simple_bus_post_bind,
-	.per_device_platdata_auto	= sizeof(struct simple_bus_plat),
+	.per_device_plat_auto	= sizeof(struct simple_bus_plat),
 };
 
 static const struct udevice_id generic_simple_bus_ids[] = {

+ 1 - 1
drivers/cpu/at91_cpu.c

@@ -118,6 +118,6 @@ U_BOOT_DRIVER(cpu_at91_drv) = {
 	.of_match	= at91_cpu_ids,
 	.ops		= &at91_cpu_ops,
 	.probe		= at91_cpu_probe,
-	.platdata_auto	= sizeof(struct at91_cpu_platdata),
+	.plat_auto	= sizeof(struct at91_cpu_platdata),
 	.flags		= DM_FLAG_PRE_RELOC,
 };

Some files were not shown because too many files changed in this diff