From caa4daa2ae3dc0a3e516addea5772c9af76abcb0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 3 Dec 2020 16:55:18 -0700 Subject: [PATCH] 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 --- arch/arm/mach-imx/mx6/soc.c | 2 +- arch/arm/mach-imx/mx7/soc.c | 2 +- arch/arm/mach-omap2/am33xx/board.c | 2 +- arch/arm/mach-rockchip/spl-boot-order.c | 4 +- arch/arm/mach-stm32mp/bsec.c | 2 +- arch/arm/mach-stm32mp/pwr_regulator.c | 12 +-- arch/x86/cpu/apollolake/hostbridge.c | 2 +- arch/x86/cpu/apollolake/pmc.c | 2 +- arch/x86/cpu/apollolake/spl.c | 4 +- arch/x86/cpu/apollolake/uart.c | 6 +- arch/x86/cpu/broadwell/sata.c | 2 +- arch/x86/cpu/cpu_x86.c | 2 +- arch/x86/cpu/intel_common/itss.c | 2 +- arch/x86/cpu/intel_common/p2sb.c | 6 +- arch/x86/cpu/mp_init.c | 4 +- arch/x86/cpu/qfw_cpu.c | 2 +- arch/x86/cpu/slimbootloader/serial.c | 4 +- arch/x86/include/asm/intel_pinctrl.h | 2 +- arch/x86/lib/acpi_table.c | 2 +- arch/x86/lib/fsp/fsp_graphics.c | 4 +- arch/x86/lib/mpspec.c | 2 +- arch/x86/lib/sfi.c | 2 +- board/armltd/integrator/integrator.c | 2 +- board/armltd/total_compute/total_compute.c | 2 +- board/armltd/vexpress64/vexpress64.c | 2 +- board/bluewater/gurnard/gurnard.c | 2 +- board/bluewater/snapper9260/snapper9260.c | 2 +- board/cadence/xtfpga/xtfpga.c | 2 +- board/cavium/thunderx/thunderx.c | 4 +- board/compulab/cm_fx6/cm_fx6.c | 2 +- board/davinci/da8xxevm/omapl138_lcdk.c | 4 +- board/freescale/ls1012afrdm/eth.c | 4 +- board/freescale/ls1012aqds/eth.c | 4 +- board/freescale/ls1012ardb/eth.c | 4 +- board/freescale/lx2160a/lx2160a.c | 4 +- board/gateworks/gw_ventana/gw_ventana.c | 2 +- board/hisilicon/hikey/hikey.c | 2 +- board/hisilicon/hikey960/hikey960.c | 2 +- board/hisilicon/poplar/poplar.c | 2 +- board/lg/sniper/sniper.c | 2 +- board/siemens/corvus/board.c | 2 +- board/st/stv0991/stv0991.c | 2 +- board/sysam/amcore/amcore.c | 2 +- board/ti/am335x/board.c | 8 +- board/toradex/apalis_imx6/apalis_imx6.c | 2 +- .../toradex/colibri-imx6ull/colibri-imx6ull.c | 2 +- board/toradex/colibri_imx6/colibri_imx6.c | 2 +- board/toradex/colibri_pxa270/colibri_pxa270.c | 4 +- cmd/Kconfig | 2 +- cmd/button.c | 2 +- cmd/cpu.c | 2 +- cmd/demo.c | 2 +- cmd/i2c.c | 4 +- cmd/led.c | 2 +- cmd/lsblk.c | 2 +- cmd/pci.c | 2 +- cmd/regulator.c | 32 +++---- cmd/remoteproc.c | 2 +- common/lcd_simplefb.c | 2 +- common/usb_hub.c | 2 +- common/usb_storage.c | 12 +-- doc/driver-model/design.rst | 60 ++++++------ doc/driver-model/ethernet.rst | 6 +- doc/driver-model/of-plat.rst | 14 +-- doc/driver-model/remoteproc-framework.rst | 2 +- doc/driver-model/spi-howto.rst | 10 +- doc/driver-model/usb-info.rst | 4 +- drivers/adc/adc-uclass.c | 32 +++---- drivers/adc/exynos-adc.c | 2 +- drivers/adc/meson-saradc.c | 2 +- drivers/adc/rockchip-saradc.c | 4 +- drivers/adc/sandbox.c | 2 +- drivers/adc/stm32-adc.c | 6 +- drivers/ata/ahci.c | 6 +- drivers/ata/dwc_ahsata.c | 6 +- drivers/ata/fsl_sata.c | 4 +- drivers/ata/sata_mv.c | 6 +- drivers/ata/sata_sil.c | 4 +- drivers/block/blk-uclass.c | 28 +++--- drivers/block/ide.c | 6 +- drivers/block/sandbox.c | 8 +- drivers/button/button-gpio.c | 4 +- drivers/button/button-uclass.c | 4 +- drivers/cache/cache-v5l2.c | 2 +- drivers/clk/altera/clk-agilex.c | 2 +- drivers/clk/altera/clk-arria10.c | 2 +- drivers/clk/at91/compat.c | 18 ++-- drivers/clk/clk_boston.c | 2 +- drivers/clk/clk_fixed_factor.c | 2 +- drivers/clk/clk_fixed_rate.c | 2 +- drivers/clk/rockchip/clk_rk3188.c | 2 +- drivers/clk/rockchip/clk_rk3288.c | 2 +- drivers/clk/rockchip/clk_rk3368.c | 2 +- drivers/clk/rockchip/clk_rk3399.c | 4 +- drivers/core/device-remove.c | 12 +-- drivers/core/device.c | 63 +++++++------ drivers/core/dump.c | 2 +- drivers/core/root.c | 4 +- drivers/core/simple-bus.c | 6 +- drivers/cpu/at91_cpu.c | 2 +- drivers/cpu/bmips_cpu.c | 2 +- drivers/cpu/cpu-uclass.c | 2 +- drivers/cpu/cpu_sandbox.c | 2 +- drivers/cpu/imx8_cpu.c | 2 +- drivers/cpu/riscv_cpu.c | 2 +- drivers/ddr/altera/sdram_agilex.c | 2 +- drivers/ddr/altera/sdram_gen5.c | 6 +- drivers/ddr/altera/sdram_s10.c | 2 +- drivers/ddr/altera/sdram_soc64.c | 4 +- drivers/demo/demo-pdata.c | 10 +- drivers/demo/demo-shape.c | 2 +- drivers/demo/demo-simple.c | 2 +- drivers/gpio/altera_pio.c | 2 +- drivers/gpio/at91_gpio.c | 2 +- drivers/gpio/atmel_pio4.c | 2 +- drivers/gpio/bcm2835_gpio.c | 2 +- drivers/gpio/da8xx_gpio.c | 2 +- drivers/gpio/dwapb_gpio.c | 2 +- drivers/gpio/gpio-uclass.c | 2 +- drivers/gpio/hsdk-creg-gpio.c | 2 +- drivers/gpio/imx_rgpio2p.c | 10 +- drivers/gpio/intel_broadwell_gpio.c | 2 +- drivers/gpio/intel_ich6_gpio.c | 2 +- drivers/gpio/iproc_gpio.c | 2 +- drivers/gpio/mpc83xx_spisel_boot.c | 2 +- drivers/gpio/mpc8xxx_gpio.c | 2 +- drivers/gpio/mt7621_gpio.c | 2 +- drivers/gpio/mxc_gpio.c | 2 +- drivers/gpio/mxs_gpio.c | 4 +- drivers/gpio/nx_gpio.c | 2 +- drivers/gpio/omap_gpio.c | 6 +- drivers/gpio/pca953x_gpio.c | 2 +- drivers/gpio/pcf8575_gpio.c | 6 +- drivers/gpio/s5p_gpio.c | 4 +- drivers/gpio/sifive-gpio.c | 2 +- drivers/gpio/sunxi_gpio.c | 2 +- drivers/gpio/tegra186_gpio.c | 6 +- drivers/gpio/tegra_gpio.c | 4 +- drivers/gpio/vybrid_gpio.c | 2 +- drivers/gpio/xilinx_gpio.c | 92 +++++++++---------- drivers/gpio/zynq_gpio.c | 58 ++++++------ drivers/i2c/Kconfig | 2 +- drivers/i2c/acpi_i2c.c | 2 +- drivers/i2c/i2c-emul-uclass.c | 14 +-- drivers/i2c/i2c-uclass.c | 28 +++--- drivers/i2c/muxes/i2c-mux-uclass.c | 8 +- drivers/i2c/omap24xx_i2c.c | 2 +- drivers/i2c/sandbox_i2c.c | 2 +- drivers/led/led-uclass.c | 4 +- drivers/led/led_bcm6328.c | 4 +- drivers/led/led_bcm6358.c | 4 +- drivers/led/led_bcm6858.c | 4 +- drivers/led/led_cortina.c | 18 ++-- drivers/led/led_gpio.c | 4 +- drivers/misc/altera_sysid.c | 4 +- drivers/misc/cros_ec_i2c.c | 4 +- drivers/misc/fs_loader.c | 8 +- drivers/misc/i2c_eeprom_emul.c | 2 +- drivers/misc/imx8/scu.c | 2 +- drivers/misc/microchip_flexcom.c | 2 +- drivers/misc/p2sb-uclass.c | 14 +-- drivers/misc/p2sb_emul.c | 4 +- drivers/misc/rockchip-efuse.c | 2 +- drivers/misc/rockchip-otp.c | 2 +- drivers/misc/sandbox_adder.c | 2 +- drivers/misc/sifive-otp.c | 2 +- drivers/misc/swap_case.c | 2 +- drivers/mmc/am654_sdhci.c | 2 +- drivers/mmc/arm_pl180_mmci.c | 2 +- drivers/mmc/aspeed_sdhci.c | 2 +- drivers/mmc/atmel_sdhci.c | 2 +- drivers/mmc/bcm2835_sdhci.c | 2 +- drivers/mmc/bcm2835_sdhost.c | 2 +- drivers/mmc/bcmstb_sdhci.c | 2 +- drivers/mmc/ca_dw_mmc.c | 2 +- drivers/mmc/davinci_mmc.c | 2 +- drivers/mmc/exynos_dw_mmc.c | 2 +- drivers/mmc/fsl_esdhc.c | 2 +- drivers/mmc/fsl_esdhc_imx.c | 2 +- drivers/mmc/ftsdc010_mci.c | 2 +- drivers/mmc/gen_atmel_mci.c | 2 +- drivers/mmc/hi6220_dw_mmc.c | 2 +- drivers/mmc/iproc_sdhci.c | 2 +- drivers/mmc/jz_mmc.c | 2 +- drivers/mmc/meson_gx_mmc.c | 2 +- drivers/mmc/mmc-uclass.c | 6 +- drivers/mmc/mmc.c | 2 +- drivers/mmc/mmc_spi.c | 2 +- drivers/mmc/mmc_write.c | 4 +- drivers/mmc/msm_sdhci.c | 2 +- drivers/mmc/mtk-sd.c | 2 +- drivers/mmc/mv_sdhci.c | 2 +- drivers/mmc/mxsmmc.c | 4 +- drivers/mmc/nexell_dw_mmc.c | 2 +- drivers/mmc/omap_hsmmc.c | 2 +- drivers/mmc/pci_mmc.c | 2 +- drivers/mmc/pic32_sdhci.c | 2 +- drivers/mmc/renesas-sdhi.c | 2 +- drivers/mmc/rockchip_dw_mmc.c | 2 +- drivers/mmc/rockchip_sdhci.c | 2 +- drivers/mmc/s5p_sdhci.c | 2 +- drivers/mmc/sandbox_mmc.c | 2 +- drivers/mmc/sdhci-cadence.c | 2 +- drivers/mmc/sh_mmcif.c | 2 +- drivers/mmc/sh_sdhi.c | 2 +- drivers/mmc/snps_dw_mmc.c | 2 +- drivers/mmc/socfpga_dw_mmc.c | 2 +- drivers/mmc/sti_sdhci.c | 2 +- drivers/mmc/stm32_sdmmc2.c | 2 +- drivers/mmc/sunxi_mmc.c | 2 +- drivers/mmc/tangier_sdhci.c | 2 +- drivers/mmc/tegra_mmc.c | 2 +- drivers/mmc/uniphier-sd.c | 2 +- drivers/mmc/xenon_sdhci.c | 2 +- drivers/mmc/zynq_sdhci.c | 2 +- drivers/mtd/altera_qspi.c | 2 +- drivers/mtd/spi/Kconfig | 4 +- drivers/mtd/spi/sandbox.c | 4 +- drivers/net/ag7xxx.c | 2 +- drivers/net/altera_tse.c | 2 +- drivers/net/bcm6348-eth.c | 2 +- drivers/net/bcm6368-eth.c | 2 +- drivers/net/bcmgenet.c | 2 +- drivers/net/dc2114x.c | 2 +- drivers/net/designware.c | 4 +- drivers/net/dwc_eth_qos.c | 2 +- drivers/net/dwmac_s700.c | 2 +- drivers/net/dwmac_socfpga.c | 2 +- drivers/net/e1000.c | 2 +- drivers/net/eepro100.c | 2 +- drivers/net/ethoc.c | 2 +- drivers/net/fec_mxc.c | 2 +- drivers/net/fm/eth.c | 2 +- drivers/net/fm/memac_phy.c | 2 +- drivers/net/fsl_enetc.c | 6 +- drivers/net/fsl_mcdmafec.c | 2 +- drivers/net/fsl_mdio.c | 2 +- drivers/net/ftgmac100.c | 2 +- drivers/net/ftmac100.c | 2 +- drivers/net/gmac_rockchip.c | 2 +- drivers/net/higmacv300.c | 2 +- drivers/net/ks8851_mll.c | 2 +- drivers/net/ldpaa_eth/ldpaa_eth.c | 2 +- drivers/net/macb.c | 2 +- drivers/net/mcffec.c | 2 +- drivers/net/mscc_eswitch/jr2_switch.c | 2 +- drivers/net/mscc_eswitch/luton_switch.c | 2 +- drivers/net/mscc_eswitch/ocelot_switch.c | 2 +- drivers/net/mscc_eswitch/serval_switch.c | 2 +- drivers/net/mscc_eswitch/servalt_switch.c | 2 +- drivers/net/mt7628-eth.c | 2 +- drivers/net/mtk_eth.c | 2 +- drivers/net/mvgbe.c | 2 +- drivers/net/mvneta.c | 2 +- drivers/net/mvpp2.c | 2 +- drivers/net/octeontx/nicvf_main.c | 2 +- drivers/net/octeontx2/rvu_pf.c | 2 +- drivers/net/pch_gbe.c | 2 +- drivers/net/pcnet.c | 2 +- drivers/net/pfe_eth/pfe_eth.c | 2 +- drivers/net/pic32_eth.c | 2 +- drivers/net/qe/dm_qe_uec.c | 2 +- drivers/net/ravb.c | 2 +- drivers/net/rtl8139.c | 2 +- drivers/net/rtl8169.c | 4 +- drivers/net/sandbox-raw.c | 2 +- drivers/net/sandbox.c | 2 +- drivers/net/sh_eth.c | 2 +- drivers/net/smc911x.c | 2 +- drivers/net/sni_ave.c | 2 +- drivers/net/sun8i_emac.c | 2 +- drivers/net/sunxi_emac.c | 2 +- drivers/net/ti/am65-cpsw-nuss.c | 2 +- drivers/net/ti/cpsw.c | 2 +- drivers/net/ti/davinci_emac.c | 2 +- drivers/net/ti/keystone_net.c | 4 +- drivers/net/tsec.c | 2 +- drivers/net/xilinx_axi_emac.c | 2 +- drivers/net/xilinx_emaclite.c | 2 +- drivers/net/zynq_gem.c | 2 +- drivers/nvme/nvme.c | 6 +- drivers/pci/pci-emul-uclass.c | 4 +- drivers/pci/pci-rcar-gen3.c | 2 +- drivers/pci/pci-uclass.c | 24 ++--- drivers/pci/pci_mvebu.c | 2 +- drivers/pci/pci_rom.c | 6 +- drivers/pci/pci_sandbox.c | 2 +- drivers/pci/pcie_mediatek.c | 2 +- drivers/phy/allwinner/phy-sun4i-usb.c | 2 +- drivers/phy/phy-bcm-sr-pcie.c | 2 +- drivers/pinctrl/intel/pinctrl.c | 2 +- drivers/pinctrl/intel/pinctrl_apl.c | 4 +- drivers/pinctrl/pinctrl-at91-pio4.c | 2 +- drivers/pinctrl/pinctrl-qe-io.c | 6 +- drivers/pinctrl/pinctrl-single.c | 8 +- drivers/pinctrl/pinctrl-sti.c | 2 +- drivers/pinctrl/pinctrl-stmfx.c | 4 +- drivers/pinctrl/renesas/pfc-r7s72100.c | 2 +- drivers/power/acpi_pmc/pmc_emul.c | 2 +- .../power/domain/imx8-power-domain-legacy.c | 2 +- drivers/power/domain/imx8m-power-domain.c | 2 +- drivers/power/pmic/i2c_pmic_emul.c | 2 +- drivers/power/regulator/act8846.c | 4 +- drivers/power/regulator/as3722_regulator.c | 8 +- drivers/power/regulator/bd71837.c | 6 +- drivers/power/regulator/da9063.c | 8 +- drivers/power/regulator/fan53555.c | 6 +- drivers/power/regulator/fixed.c | 14 +-- drivers/power/regulator/gpio-regulator.c | 10 +- drivers/power/regulator/lp873x_regulator.c | 24 ++--- drivers/power/regulator/lp87565_regulator.c | 12 +-- drivers/power/regulator/max77686.c | 8 +- drivers/power/regulator/palmas_regulator.c | 28 +++--- drivers/power/regulator/pbias_regulator.c | 4 +- drivers/power/regulator/pfuze100.c | 14 +-- drivers/power/regulator/pwm_regulator.c | 4 +- drivers/power/regulator/regulator-uclass.c | 48 +++++----- drivers/power/regulator/rk8xx.c | 12 +-- drivers/power/regulator/s2mps11_regulator.c | 8 +- drivers/power/regulator/s5m8767.c | 8 +- drivers/power/regulator/sandbox.c | 16 ++-- drivers/power/regulator/stpmic1.c | 28 +++--- drivers/power/regulator/tps62360_regulator.c | 2 +- drivers/power/regulator/tps65090_regulator.c | 4 +- drivers/power/regulator/tps65910_regulator.c | 10 +- drivers/power/regulator/tps65941_regulator.c | 24 ++--- drivers/ram/imxrt_sdram.c | 2 +- drivers/ram/octeon/octeon_ddr.c | 2 +- drivers/ram/rockchip/dmc-rk3368.c | 2 +- drivers/ram/rockchip/sdram_rk3188.c | 2 +- drivers/ram/rockchip/sdram_rk322x.c | 2 +- drivers/ram/rockchip/sdram_rk3288.c | 2 +- drivers/ram/rockchip/sdram_rk3328.c | 2 +- drivers/ram/rockchip/sdram_rk3399.c | 2 +- drivers/ram/sifive/fu540_ddr.c | 2 +- drivers/ram/stm32_sdram.c | 2 +- drivers/remoteproc/rproc-uclass.c | 14 +-- drivers/remoteproc/sandbox_testproc.c | 18 ++-- drivers/remoteproc/ti_power_proc.c | 6 +- drivers/rng/meson-rng.c | 2 +- drivers/rng/stm32mp1_rng.c | 2 +- drivers/rtc/i2c_rtc_emul.c | 2 +- drivers/rtc/pcf2127.c | 2 +- drivers/rtc/pl031.c | 2 +- drivers/scsi/scsi-uclass.c | 2 +- drivers/scsi/scsi.c | 16 ++-- drivers/serial/altera_jtag_uart.c | 10 +- drivers/serial/altera_uart.c | 10 +- drivers/serial/atmel_usart.c | 4 +- drivers/serial/lpc32xx_hsuart.c | 4 +- drivers/serial/ns16550.c | 8 +- drivers/serial/sandbox.c | 10 +- drivers/serial/serial_arc.c | 10 +- drivers/serial/serial_bcm283x_mu.c | 2 +- drivers/serial/serial_bcm283x_pl011.c | 2 +- drivers/serial/serial_coreboot.c | 2 +- drivers/serial/serial_intel_mid.c | 2 +- drivers/serial/serial_linflexuart.c | 2 +- drivers/serial/serial_lpuart.c | 12 +-- drivers/serial/serial_mcf.c | 12 +-- drivers/serial/serial_meson.c | 14 +-- drivers/serial/serial_mvebu_a3700.c | 2 +- drivers/serial/serial_mxc.c | 14 +-- drivers/serial/serial_omap.c | 4 +- drivers/serial/serial_pl01x.c | 2 +- drivers/serial/serial_pxa.c | 10 +- drivers/serial/serial_rockchip.c | 6 +- drivers/serial/serial_s5p.c | 14 +-- drivers/serial/serial_sh.c | 2 +- drivers/serial/serial_sifive.c | 32 +++---- drivers/serial/serial_stm32.c | 2 +- drivers/serial/serial_xuartlite.c | 2 +- drivers/serial/serial_zynq.c | 32 +++---- drivers/soc/soc_ti_k3.c | 2 +- drivers/sound/ivybridge_sound.c | 2 +- drivers/spi/altera_spi.c | 4 +- drivers/spi/atcspi200_spi.c | 2 +- drivers/spi/ath79_spi.c | 2 +- drivers/spi/atmel_spi.c | 8 +- drivers/spi/bcm63xx_hsspi.c | 4 +- drivers/spi/bcm63xx_spi.c | 4 +- drivers/spi/bcmstb_spi.c | 2 +- drivers/spi/cadence_qspi.c | 14 +-- drivers/spi/cf_spi.c | 10 +- drivers/spi/davinci_spi.c | 10 +- drivers/spi/designware_spi.c | 6 +- drivers/spi/exynos_spi.c | 6 +- drivers/spi/fsl_dspi.c | 12 +-- drivers/spi/fsl_espi.c | 6 +- drivers/spi/fsl_qspi.c | 2 +- drivers/spi/ich.c | 6 +- drivers/spi/kirkwood_spi.c | 2 +- drivers/spi/mpc8xxx_spi.c | 16 ++-- drivers/spi/mscc_bb_spi.c | 2 +- drivers/spi/mvebu_a3700_spi.c | 2 +- drivers/spi/mxc_spi.c | 8 +- drivers/spi/mxs_spi.c | 4 +- drivers/spi/nxp_fspi.c | 2 +- drivers/spi/octeon_spi.c | 2 +- drivers/spi/omap3_spi.c | 6 +- drivers/spi/pic32_spi.c | 2 +- drivers/spi/pl022_spi.c | 4 +- drivers/spi/renesas_rpc_spi.c | 2 +- drivers/spi/rk_spi.c | 10 +- drivers/spi/sh_qspi.c | 2 +- drivers/spi/soft_spi.c | 6 +- drivers/spi/spi-qup.c | 2 +- drivers/spi/spi-sifive.c | 2 +- drivers/spi/spi-sunxi.c | 4 +- drivers/spi/spi-uclass.c | 12 +-- drivers/spi/stm32_qspi.c | 2 +- drivers/spi/stm32_spi.c | 2 +- drivers/spi/tegra114_spi.c | 6 +- drivers/spi/tegra20_sflash.c | 6 +- drivers/spi/tegra20_slink.c | 6 +- drivers/spi/tegra210_qspi.c | 6 +- drivers/spi/ti_qspi.c | 8 +- drivers/spi/uniphier_spi.c | 10 +- drivers/spi/xilinx_spi.c | 4 +- drivers/spi/zynq_qspi.c | 8 +- drivers/spi/zynq_spi.c | 12 +-- drivers/spi/zynqmp_gqspi.c | 8 +- drivers/sysreset/sysreset_x86.c | 2 +- drivers/tee/optee/core.c | 2 +- drivers/thermal/imx_scu_thermal.c | 2 +- drivers/thermal/imx_tmu.c | 2 +- drivers/timer/ag101p_timer.c | 6 +- drivers/timer/altera_timer.c | 6 +- drivers/timer/atcpit100_timer.c | 2 +- drivers/timer/atmel_pit_timer.c | 2 +- drivers/timer/rockchip_timer.c | 2 +- drivers/timer/timer-uclass.c | 2 +- drivers/tpm/cr50_i2c.c | 2 +- drivers/tpm/tpm_tis_st33zp24_spi.c | 2 +- drivers/ufs/ufs.c | 2 +- drivers/usb/cdns3/cdns3-ti.c | 2 +- drivers/usb/dwc3/dwc3-generic.c | 6 +- drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +- drivers/usb/dwc3/dwc3-meson-gxl.c | 2 +- drivers/usb/emul/sandbox_flash.c | 2 +- drivers/usb/emul/sandbox_hub.c | 8 +- drivers/usb/emul/sandbox_keyb.c | 2 +- drivers/usb/emul/usb-emul-uclass.c | 14 +-- drivers/usb/eth/asix.c | 2 +- drivers/usb/eth/asix88179.c | 2 +- drivers/usb/eth/lan75xx.c | 2 +- drivers/usb/eth/lan78xx.c | 2 +- drivers/usb/eth/mcs7830.c | 2 +- drivers/usb/eth/r8152.c | 2 +- drivers/usb/eth/smsc95xx.c | 2 +- drivers/usb/gadget/dwc2_udc_otg.c | 53 ++++++----- drivers/usb/gadget/ether.c | 2 +- drivers/usb/gadget/max3420_udc.c | 2 +- drivers/usb/host/dwc3-of-simple.c | 2 +- drivers/usb/host/dwc3-sti-glue.c | 2 +- drivers/usb/host/ehci-atmel.c | 2 +- drivers/usb/host/ehci-exynos.c | 2 +- drivers/usb/host/ehci-fsl.c | 2 +- drivers/usb/host/ehci-marvell.c | 2 +- drivers/usb/host/ehci-msm.c | 2 +- drivers/usb/host/ehci-mx5.c | 2 +- drivers/usb/host/ehci-mx6.c | 2 +- drivers/usb/host/ehci-omap.c | 2 +- drivers/usb/host/ehci-pci.c | 2 +- drivers/usb/host/ehci-tegra.c | 2 +- drivers/usb/host/ehci-vf.c | 2 +- drivers/usb/host/ehci-zynq.c | 2 +- drivers/usb/host/ohci-pci.c | 2 +- drivers/usb/host/usb-uclass.c | 14 +-- drivers/usb/host/xhci-brcm.c | 2 +- drivers/usb/host/xhci-dwc3.c | 2 +- drivers/usb/host/xhci-exynos5.c | 2 +- drivers/usb/host/xhci-fsl.c | 2 +- drivers/usb/host/xhci-mvebu.c | 2 +- drivers/usb/host/xhci-pci.c | 2 +- drivers/usb/host/xhci-rcar.c | 2 +- drivers/usb/musb-new/da8xx.c | 48 +++++----- drivers/usb/musb-new/mt85xx.c | 2 +- drivers/usb/musb-new/omap2430.c | 67 +++++++------- drivers/usb/musb-new/pic32.c | 2 +- drivers/usb/musb-new/sunxi.c | 2 +- drivers/usb/musb-new/ti-musb.c | 54 +++++------ drivers/video/am335x-fb.c | 6 +- drivers/video/atmel_hlcdfb.c | 4 +- drivers/video/atmel_lcdfb.c | 6 +- drivers/video/bcm2835.c | 2 +- drivers/video/bridge/anx6345.c | 8 +- drivers/video/bridge/ps862x.c | 2 +- drivers/video/broadwell_igd.c | 6 +- drivers/video/coreboot.c | 2 +- drivers/video/display-uclass.c | 6 +- drivers/video/efi.c | 2 +- drivers/video/exynos/exynos_fb.c | 4 +- drivers/video/fsl_dcu_fb.c | 4 +- drivers/video/imx/mxc_ipuv3_fb.c | 6 +- drivers/video/ivybridge_igd.c | 4 +- drivers/video/mali_dp.c | 4 +- drivers/video/meson/meson_plane.c | 2 +- drivers/video/meson/meson_vpu.c | 4 +- drivers/video/mvebu_lcd.c | 4 +- drivers/video/mxsfb.c | 6 +- drivers/video/nexell_display.c | 10 +- drivers/video/orisetech_otm8009a.c | 2 +- drivers/video/pwm_backlight.c | 4 +- drivers/video/raydium-rm68200.c | 2 +- drivers/video/rockchip/rk3288_hdmi.c | 4 +- drivers/video/rockchip/rk3288_mipi.c | 2 +- drivers/video/rockchip/rk3399_hdmi.c | 2 +- drivers/video/rockchip/rk3399_mipi.c | 2 +- drivers/video/rockchip/rk_edp.c | 2 +- drivers/video/rockchip/rk_lvds.c | 2 +- drivers/video/rockchip/rk_vop.c | 6 +- drivers/video/sandbox_sdl.c | 6 +- drivers/video/simplefb.c | 2 +- drivers/video/stm32/stm32_ltdc.c | 4 +- drivers/video/sunxi/sunxi_de2.c | 8 +- drivers/video/sunxi/sunxi_dw_hdmi.c | 2 +- drivers/video/tegra.c | 4 +- drivers/video/tegra124/display.c | 6 +- drivers/video/tegra124/dp.c | 4 +- drivers/video/vesa.c | 4 +- drivers/video/video-uclass.c | 6 +- drivers/virtio/virtio_blk.c | 4 +- drivers/virtio/virtio_net.c | 2 +- drivers/virtio/virtio_pci_legacy.c | 2 +- drivers/virtio/virtio_pci_modern.c | 2 +- drivers/w1-eeprom/ds24xxx.c | 2 +- drivers/w1-eeprom/ds2502.c | 2 +- drivers/w1-eeprom/w1-eeprom-uclass.c | 4 +- drivers/w1/mxc_w1.c | 2 +- drivers/w1/w1-gpio.c | 2 +- drivers/w1/w1-uclass.c | 6 +- drivers/watchdog/xilinx_tb_wdt.c | 38 ++++---- drivers/watchdog/xilinx_wwdt.c | 14 +-- drivers/xen/pvblock.c | 26 +++--- include/adc.h | 4 +- include/blk.h | 2 +- include/cpu.h | 2 +- include/dm/device-internal.h | 10 +- include/dm/device.h | 56 +++++------ include/dm/lists.h | 2 +- include/dm/pci.h | 2 +- include/dm/platdata.h | 6 +- include/dm/root.h | 2 +- include/dm/uclass.h | 12 +-- include/dwmmc.h | 2 +- include/i2c.h | 2 +- include/net.h | 2 +- include/pci.h | 2 +- include/power/regulator.h | 26 +++--- include/remoteproc.h | 2 +- include/sdhci.h | 2 +- include/spi.h | 10 +- include/usb.h | 4 +- include/video.h | 4 +- lib/acpi/acpi_device.c | 4 +- lib/efi_driver/efi_block_device.c | 20 ++-- lib/efi_loader/efi_device_path.c | 14 +-- lib/efi_loader/efi_disk.c | 2 +- lib/smbios.c | 2 +- net/eth-uclass.c | 10 +- net/mdio-mux-uclass.c | 6 +- test/dm/acpi.c | 2 +- test/dm/adc.c | 2 +- test/dm/blk.c | 2 +- test/dm/bus.c | 56 +++++------ test/dm/core.c | 38 ++++---- test/dm/devres.c | 2 +- test/dm/gpio.c | 2 +- test/dm/ofread.c | 2 +- test/dm/regulator.c | 18 ++-- test/dm/test-fdt.c | 14 +-- test/dm/test-uclass.c | 6 +- tools/dtoc/dtb_platdata.py | 2 +- tools/dtoc/test_dtoc.py | 66 ++++++------- 575 files changed, 1633 insertions(+), 1644 deletions(-) diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index f43a2460f9..1649f6d948 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/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 diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c index d0385b36e4..13593994f1 100644 --- a/arch/arm/mach-imx/mx7/soc.c +++ b/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 diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c index 2888390d24..4335ee84ec 100644 --- a/arch/arm/mach-omap2/am33xx/board.c +++ b/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 diff --git a/arch/arm/mach-rockchip/spl-boot-order.c b/arch/arm/mach-rockchip/spl-boot-order.c index 94673f34c9..8ccd5afb56 100644 --- a/arch/arm/mach-rockchip/spl-boot-order.c +++ b/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; diff --git a/arch/arm/mach-stm32mp/bsec.c b/arch/arm/mach-stm32mp/bsec.c index cb9208981e..a41824cc2f 100644 --- a/arch/arm/mach-stm32mp/bsec.c +++ b/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, }; diff --git a/arch/arm/mach-stm32mp/pwr_regulator.c b/arch/arm/mach-stm32mp/pwr_regulator.c index 7985049f9b..4f46871551 100644 --- a/arch/arm/mach-stm32mp/pwr_regulator.c +++ b/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; diff --git a/arch/x86/cpu/apollolake/hostbridge.c b/arch/x86/cpu/apollolake/hostbridge.c index 4b627e325e..cb5a8161a9 100644 --- a/arch/x86/cpu/apollolake/hostbridge.c +++ b/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, }; diff --git a/arch/x86/cpu/apollolake/pmc.c b/arch/x86/cpu/apollolake/pmc.c index 82e2187c50..10a4b02862 100644 --- a/arch/x86/cpu/apollolake/pmc.c +++ b/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), }; diff --git a/arch/x86/cpu/apollolake/spl.c b/arch/x86/cpu/apollolake/spl.c index 324dd6c9f1..4110619a77 100644 --- a/arch/x86/cpu/apollolake/spl.c +++ b/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; diff --git a/arch/x86/cpu/apollolake/uart.c b/arch/x86/cpu/apollolake/uart.c index 6695234dce..44eba0ccaa 100644 --- a/arch/x86/cpu/apollolake/uart.c +++ b/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, diff --git a/arch/x86/cpu/broadwell/sata.c b/arch/x86/cpu/broadwell/sata.c index a31f523422..fdb6eec085 100644 --- a/arch/x86/cpu/broadwell/sata.c +++ b/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), }; diff --git a/arch/x86/cpu/cpu_x86.c b/arch/x86/cpu/cpu_x86.c index 7e83051646..57441c1919 100644 --- a/arch/x86/cpu/cpu_x86.c +++ b/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), diff --git a/arch/x86/cpu/intel_common/itss.c b/arch/x86/cpu/intel_common/itss.c index ed0dad320e..ea6aa4352e 100644 --- a/arch/x86/cpu/intel_common/itss.c +++ b/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), }; diff --git a/arch/x86/cpu/intel_common/p2sb.c b/arch/x86/cpu/intel_common/p2sb.c index 40de1d34a3..5f7ae2dbc3 100644 --- a/arch/x86/cpu/intel_common/p2sb.c +++ b/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, diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c index d2f1ee38cf..72544361d8 100644 --- a/arch/x86/cpu/mp_init.c +++ b/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; diff --git a/arch/x86/cpu/qfw_cpu.c b/arch/x86/cpu/qfw_cpu.c index 349bab1583..a169783e2c 100644 --- a/arch/x86/cpu/qfw_cpu.c +++ b/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; diff --git a/arch/x86/cpu/slimbootloader/serial.c b/arch/x86/cpu/slimbootloader/serial.c index 5ffce9835d..34d09ee9c4 100644 --- a/arch/x86/cpu/slimbootloader/serial.c +++ b/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, diff --git a/arch/x86/include/asm/intel_pinctrl.h b/arch/x86/include/asm/intel_pinctrl.h index 00868d1725..fc59a42463 100644 --- a/arch/x86/include/asm/intel_pinctrl.h +++ b/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 diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index 4fd8dc8ad9..796d3689b3 100644 --- a/arch/x86/lib/acpi_table.c +++ b/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( diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c index 6534b6690b..e4c43fb76d 100644 --- a/arch/x86/lib/fsp/fsp_graphics.c +++ b/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; diff --git a/arch/x86/lib/mpspec.c b/arch/x86/lib/mpspec.c index 1c49c41b31..d6f0e9517f 100644 --- a/arch/x86/lib/mpspec.c +++ b/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)) diff --git a/arch/x86/lib/sfi.c b/arch/x86/lib/sfi.c index b48bd5d8f3..7de0aa0d70 100644 --- a/arch/x86/lib/sfi.c +++ b/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; diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c index 19871bee14..80a5f95e01 100644 --- a/board/armltd/integrator/integrator.c +++ b/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); diff --git a/board/armltd/total_compute/total_compute.c b/board/armltd/total_compute/total_compute.c index 0be6435fe3..35e8743e49 100644 --- a/board/armltd/total_compute/total_compute.c +++ b/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[] = { diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c index 52ada0f6bc..89710e0ffa 100644 --- a/board/armltd/vexpress64/vexpress64.c +++ b/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[] = { diff --git a/board/bluewater/gurnard/gurnard.c b/board/bluewater/gurnard/gurnard.c index dc9871d446..993ba8299f 100644 --- a/board/bluewater/gurnard/gurnard.c +++ b/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, }; diff --git a/board/bluewater/snapper9260/snapper9260.c b/board/bluewater/snapper9260/snapper9260.c index 9b0a75ac5d..12fb87441e 100644 --- a/board/bluewater/snapper9260/snapper9260.c +++ b/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, }; diff --git a/board/cadence/xtfpga/xtfpga.c b/board/cadence/xtfpga/xtfpga.c index 5811c43142..29db51b026 100644 --- a/board/cadence/xtfpga/xtfpga.c +++ b/board/cadence/xtfpga/xtfpga.c @@ -106,5 +106,5 @@ static struct ethoc_eth_pdata ethoc_pdata = { U_BOOT_DEVICE(ethoc) = { .name = "ethoc", - .platdata = ðoc_pdata, + .plat = ðoc_pdata, }; diff --git a/board/cavium/thunderx/thunderx.c b/board/cavium/thunderx/thunderx.c index f8c2913eac..b8f060b1e8 100644 --- a/board/cavium/thunderx/thunderx.c +++ b/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 diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index e2712680f9..6b3d034542 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/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) diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c index 6bab7b18d4..cdfe8051e2 100644 --- a/board/davinci/da8xxevm/omapl138_lcdk.c +++ b/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) diff --git a/board/freescale/ls1012afrdm/eth.c b/board/freescale/ls1012afrdm/eth.c index eaea1c46e4..85104ab22c 100644 --- a/board/freescale/ls1012afrdm/eth.c +++ b/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, }; diff --git a/board/freescale/ls1012aqds/eth.c b/board/freescale/ls1012aqds/eth.c index b4ef60738e..f6f43d2b13 100644 --- a/board/freescale/ls1012aqds/eth.c +++ b/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, }; diff --git a/board/freescale/ls1012ardb/eth.c b/board/freescale/ls1012ardb/eth.c index a65ff4dc9c..5e923e5252 100644 --- a/board/freescale/ls1012ardb/eth.c +++ b/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, }; diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c index 0ff987eeb4..457b466a0b 100644 --- a/board/freescale/lx2160a/lx2160a.c +++ b/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) diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index 9f043d815a..73577d7b71 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/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, }; diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c index e89ff1a43d..26340da945 100644 --- a/board/hisilicon/hikey/hikey.c +++ b/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 diff --git a/board/hisilicon/hikey960/hikey960.c b/board/hisilicon/hikey960/hikey960.c index db485db10a..75a5fdac5d 100644 --- a/board/hisilicon/hikey960/hikey960.c +++ b/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 diff --git a/board/hisilicon/poplar/poplar.c b/board/hisilicon/poplar/poplar.c index 371c3c33fc..8c8015e88b 100644 --- a/board/hisilicon/poplar/poplar.c +++ b/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 diff --git a/board/lg/sniper/sniper.c b/board/lg/sniper/sniper.c index dff159025b..372abab7e8 100644 --- a/board/lg/sniper/sniper.c +++ b/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 = { diff --git a/board/siemens/corvus/board.c b/board/siemens/corvus/board.c index eed055aedb..9efae90193 100644 --- a/board/siemens/corvus/board.c +++ b/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, }; diff --git a/board/st/stv0991/stv0991.c b/board/st/stv0991/stv0991.c index 8c827adc2e..5765e42e12 100644 --- a/board/st/stv0991/stv0991.c +++ b/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 diff --git a/board/sysam/amcore/amcore.c b/board/sysam/amcore/amcore.c index 4502005941..8390206153 100644 --- a/board/sysam/amcore/amcore.c +++ b/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, }; diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 984cc5e3ba..39be479d15 100644 --- a/board/ti/am335x/board.c +++ b/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 diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 3961c4df9e..a9588c5d60 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/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, }; diff --git a/board/toradex/colibri-imx6ull/colibri-imx6ull.c b/board/toradex/colibri-imx6ull/colibri-imx6ull.c index 45f8da3c42..9e7f34907f 100644 --- a/board/toradex/colibri-imx6ull/colibri-imx6ull.c +++ b/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, }; diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index a416b5e54b..282de18da3 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/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, }; diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c index 273a17f608..702a31d8c1 100644 --- a/board/toradex/colibri_pxa270/colibri_pxa270.c +++ b/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, }; diff --git a/cmd/Kconfig b/cmd/Kconfig index c853ce761e..da86a940ce 100644 --- a/cmd/Kconfig +++ b/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 diff --git a/cmd/button.c b/cmd/button.c index 64c5a8fa04..1b45d0a2a0 100644 --- a/cmd/button.c +++ b/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; diff --git a/cmd/cpu.c b/cmd/cpu.c index ff553c16c4..d32e2a415d 100644 --- a/cmd/cpu.c +++ b/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; diff --git a/cmd/demo.c b/cmd/demo.c index 7310aa2907..90d3cff293 100644 --- a/cmd/demo.c +++ b/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))); diff --git a/cmd/i2c.c b/cmd/i2c.c index cc01119b21..dc4b66da20 100644 --- a/cmd/i2c.c +++ b/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, diff --git a/cmd/led.c b/cmd/led.c index 9433fa886c..aa7751933e 100644 --- a/cmd/led.c +++ b/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; diff --git a/cmd/lsblk.c b/cmd/lsblk.c index 653dffce04..6a1c8f5ef4 100644 --- a/cmd/lsblk.c +++ b/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); diff --git a/cmd/pci.c b/cmd/pci.c index f91a4eb8ed..628579a0d7 100644 --- a/cmd/pci.c +++ b/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)); diff --git a/cmd/regulator.c b/cmd/regulator.c index aa06c9a9fc..3649719539 100644 --- a/cmd/regulator.c +++ b/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); diff --git a/cmd/remoteproc.c b/cmd/remoteproc.c index e8b9178e74..02d44d4f0a 100644 --- a/cmd/remoteproc.c +++ b/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)) diff --git a/common/lcd_simplefb.c b/common/lcd_simplefb.c index fca600691e..9cf1668a6a 100644 --- a/common/lcd_simplefb.c +++ b/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; diff --git a/common/usb_hub.c b/common/usb_hub.c index 36bf2abfee..80666e6496 100644 --- a/common/usb_hub.c +++ b/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), }; diff --git a/common/usb_storage.c b/common/usb_storage.c index 4c8ad1be6d..7e6db4910b 100644 --- a/common/usb_storage.c +++ b/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 }; diff --git a/doc/driver-model/design.rst b/doc/driver-model/design.rst index 92d1304807..2cdea1c161 100644 --- a/doc/driver-model/design.rst +++ b/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 diff --git a/doc/driver-model/ethernet.rst b/doc/driver-model/ethernet.rst index 781644d2e2..2444c5cbd4 100644 --- a/doc/driver-model/ethernet.rst +++ b/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 = ð_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 diff --git a/doc/driver-model/of-plat.rst b/doc/driver-model/of-plat.rst index 2df59edb7c..a05faf739f 100644 --- a/doc/driver-model/of-plat.rst +++ b/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 diff --git a/doc/driver-model/remoteproc-framework.rst b/doc/driver-model/remoteproc-framework.rst index f21de0a10f..edb09cc105 100644 --- a/doc/driver-model/remoteproc-framework.rst +++ b/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 diff --git a/doc/driver-model/spi-howto.rst b/doc/driver-model/spi-howto.rst index a12d6922e5..6a1aacef0f 100644 --- a/doc/driver-model/spi-howto.rst +++ b/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 diff --git a/doc/driver-model/usb-info.rst b/doc/driver-model/usb-info.rst index 5f7cbfce09..ec8f3170a9 100644 --- a/doc/driver-model/usb-info.rst +++ b/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. diff --git a/drivers/adc/adc-uclass.c b/drivers/adc/adc-uclass.c index 7d0c857947..99b83cab47 100644 --- a/drivers/adc/adc-uclass.c +++ b/drivers/adc/adc-uclass.c @@ -15,7 +15,7 @@ #include #include -#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, }; diff --git a/drivers/adc/exynos-adc.c b/drivers/adc/exynos-adc.c index 6bdc45a5fc..6ae46aed15 100644 --- a/drivers/adc/exynos-adc.c +++ b/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); diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c index 469ab1f178..ac75742657 100644 --- a/drivers/adc/meson-saradc.c +++ b/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); diff --git a/drivers/adc/rockchip-saradc.c b/drivers/adc/rockchip-saradc.c index 1e12720974..4af7416a41 100644 --- a/drivers/adc/rockchip-saradc.c +++ b/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; diff --git a/drivers/adc/sandbox.c b/drivers/adc/sandbox.c index 14f2c2a7ed..905ce4fc51 100644 --- a/drivers/adc/sandbox.c +++ b/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; diff --git a/drivers/adc/stm32-adc.c b/drivers/adc/stm32-adc.c index 2c6984f2aa..ad8d1a32cd 100644 --- a/drivers/adc/stm32-adc.c +++ b/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; diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 22bc0d3b10..bd8a3bcdd8 100644 --- a/drivers/ata/ahci.c +++ b/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; diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c index 562e982e32..6d42548087 100644 --- a/drivers/ata/dwc_ahsata.c +++ b/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; diff --git a/drivers/ata/fsl_sata.c b/drivers/ata/fsl_sata.c index 8e4f382fd1..99af1d4475 100644 --- a/drivers/ata/fsl_sata.c +++ b/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) diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index b49bd5c545..bb17392e5a 100644 --- a/drivers/ata/sata_mv.c +++ b/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) diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c index 4d83f756b2..2bc3d228b2 100644 --- a/drivers/ata/sata_sil.c +++ b/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) diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c index 714e5d769c..d0d91db540 100644 --- a/drivers/block/blk-uclass.c +++ b/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), }; diff --git a/drivers/block/ide.c b/drivers/block/ide.c index a766b5cf03..43a0776099 100644 --- a/drivers/block/ide.c +++ b/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, diff --git a/drivers/block/sandbox.c b/drivers/block/sandbox.c index e5ef260cf2..12d320088c 100644 --- a/drivers/block/sandbox.c +++ b/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) = { diff --git a/drivers/button/button-gpio.c b/drivers/button/button-gpio.c index 756cd6972b..dbb000622c 100644 --- a/drivers/button/button-gpio.c +++ b/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; } diff --git a/drivers/button/button-uclass.c b/drivers/button/button-uclass.c index 133f4dead1..e06d3eb7da 100644 --- a/drivers/button/button-uclass.c +++ b/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), }; diff --git a/drivers/cache/cache-v5l2.c b/drivers/cache/cache-v5l2.c index 3d33a51e2e..5f6fc1b3b7 100644 --- a/drivers/cache/cache-v5l2.c +++ b/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, }; diff --git a/drivers/clk/altera/clk-agilex.c b/drivers/clk/altera/clk-agilex.c index 8a71e2f8a1..619621fa5b 100644 --- a/drivers/clk/altera/clk-agilex.c +++ b/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), }; diff --git a/drivers/clk/altera/clk-arria10.c b/drivers/clk/altera/clk-arria10.c index 1d853cd300..bb1b367ca6 100644 --- a/drivers/clk/altera/clk-arria10.c +++ b/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), }; diff --git a/drivers/clk/at91/compat.c b/drivers/clk/at91/compat.c index 1b43711766..b56c01f3b0 100644 --- a/drivers/clk/at91/compat.c +++ b/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, }; diff --git a/drivers/clk/clk_boston.c b/drivers/clk/clk_boston.c index 99edaec4b5..75e2e43842 100644 --- a/drivers/clk/clk_boston.c +++ b/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, }; diff --git a/drivers/clk/clk_fixed_factor.c b/drivers/clk/clk_fixed_factor.c index 4519e0579b..7a9d423493 100644 --- a/drivers/clk/clk_fixed_factor.c +++ b/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, }; diff --git a/drivers/clk/clk_fixed_rate.c b/drivers/clk/clk_fixed_rate.c index 54e5e09b58..3b60434019 100644 --- a/drivers/clk/clk_fixed_rate.c +++ b/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, }; diff --git a/drivers/clk/rockchip/clk_rk3188.c b/drivers/clk/rockchip/clk_rk3188.c index 5940cb33d4..f96aab967e 100644 --- a/drivers/clk/rockchip/clk_rk3188.c +++ b/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, diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c index 7c91e00c68..0263883aa6 100644 --- a/drivers/clk/rockchip/clk_rk3288.c +++ b/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, diff --git a/drivers/clk/rockchip/clk_rk3368.c b/drivers/clk/rockchip/clk_rk3368.c index 84b55ac618..d32762ce1e 100644 --- a/drivers/clk/rockchip/clk_rk3368.c +++ b/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, diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c index 2e2613fd0d..515c855337 100644 --- a/drivers/clk/rockchip/clk_rk3399.c +++ b/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 }; diff --git a/drivers/core/device-remove.c b/drivers/core/device-remove.c index 9953118ff8..9f7615dea7 100644 --- a/drivers/core/device-remove.c +++ b/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) diff --git a/drivers/core/device.c b/drivers/core/device.c index 5df61128c6..7a02d43850 100644 --- a/drivers/core/device.c +++ b/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) diff --git a/drivers/core/dump.c b/drivers/core/dump.c index 6debaf97a1..221b4f79f2 100644 --- a/drivers/core/dump.c +++ b/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)); } } diff --git a/drivers/core/root.c b/drivers/core/root.c index 6f8168bb92..348dc9e1c1 100644 --- a/drivers/core/root.c +++ b/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; } } diff --git a/drivers/core/simple-bus.c b/drivers/core/simple-bus.c index c244b39345..c45212a0d3 100644 --- a/drivers/core/simple-bus.c +++ b/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[] = { diff --git a/drivers/cpu/at91_cpu.c b/drivers/cpu/at91_cpu.c index 07dba7d560..ff1c406bea 100644 --- a/drivers/cpu/at91_cpu.c +++ b/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, }; diff --git a/drivers/cpu/bmips_cpu.c b/drivers/cpu/bmips_cpu.c index 0946b95f58..fc2084f1c1 100644 --- a/drivers/cpu/bmips_cpu.c +++ b/drivers/cpu/bmips_cpu.c @@ -425,7 +425,7 @@ static const struct cpu_ops bmips_cpu_ops = { /* BMIPS CPU driver */ int bmips_cpu_bind(struct udevice *dev) { - struct cpu_platdata *plat = dev_get_parent_platdata(dev); + struct cpu_platdata *plat = dev_get_parent_plat(dev); plat->cpu_id = dev_read_u32_default(dev, "reg", -1); plat->device_id = read_c0_prid(); diff --git a/drivers/cpu/cpu-uclass.c b/drivers/cpu/cpu-uclass.c index 6f6f90c558..55cb172b87 100644 --- a/drivers/cpu/cpu-uclass.c +++ b/drivers/cpu/cpu-uclass.c @@ -115,7 +115,7 @@ int cpu_get_vendor(const struct udevice *dev, char *buf, int size) U_BOOT_DRIVER(cpu_bus) = { .name = "cpu_bus", .id = UCLASS_SIMPLE_BUS, - .per_child_platdata_auto = sizeof(struct cpu_platdata), + .per_child_plat_auto = sizeof(struct cpu_platdata), }; static int uclass_cpu_init(struct uclass *uc) diff --git a/drivers/cpu/cpu_sandbox.c b/drivers/cpu/cpu_sandbox.c index 4ba0d1b99e..df8a70220e 100644 --- a/drivers/cpu/cpu_sandbox.c +++ b/drivers/cpu/cpu_sandbox.c @@ -64,7 +64,7 @@ static const struct cpu_ops cpu_sandbox_ops = { static int cpu_sandbox_bind(struct udevice *dev) { int ret; - struct cpu_platdata *plat = dev_get_parent_platdata(dev); + struct cpu_platdata *plat = dev_get_parent_plat(dev); /* first examine the property in current cpu node */ ret = dev_read_u32(dev, "timebase-frequency", &plat->timebase_freq); diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c index 641322554c..1df43b88fa 100644 --- a/drivers/cpu/imx8_cpu.c +++ b/drivers/cpu/imx8_cpu.c @@ -230,6 +230,6 @@ U_BOOT_DRIVER(cpu_imx8_drv) = { .of_match = cpu_imx8_ids, .ops = &cpu_imx8_ops, .probe = imx8_cpu_probe, - .platdata_auto = sizeof(struct cpu_imx_platdata), + .plat_auto = sizeof(struct cpu_imx_platdata), .flags = DM_FLAG_PRE_RELOC, }; diff --git a/drivers/cpu/riscv_cpu.c b/drivers/cpu/riscv_cpu.c index 93ce708f65..3899d4dd23 100644 --- a/drivers/cpu/riscv_cpu.c +++ b/drivers/cpu/riscv_cpu.c @@ -91,7 +91,7 @@ static int riscv_cpu_get_count(const struct udevice *dev) static int riscv_cpu_bind(struct udevice *dev) { - struct cpu_platdata *plat = dev_get_parent_platdata(dev); + struct cpu_platdata *plat = dev_get_parent_plat(dev); struct driver *drv; int ret; diff --git a/drivers/ddr/altera/sdram_agilex.c b/drivers/ddr/altera/sdram_agilex.c index d6e7a175d0..497ff7869b 100644 --- a/drivers/ddr/altera/sdram_agilex.c +++ b/drivers/ddr/altera/sdram_agilex.c @@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR; int sdram_mmr_init_full(struct udevice *dev) { - struct altera_sdram_platdata *plat = dev->platdata; + struct altera_sdram_platdata *plat = dev->plat; struct altera_sdram_priv *priv = dev_get_priv(dev); u32 i; int ret; diff --git a/drivers/ddr/altera/sdram_gen5.c b/drivers/ddr/altera/sdram_gen5.c index 4c118f0846..e7c9b7a18a 100644 --- a/drivers/ddr/altera/sdram_gen5.c +++ b/drivers/ddr/altera/sdram_gen5.c @@ -565,7 +565,7 @@ static unsigned long sdram_calculate_size(struct socfpga_sdr_ctrl *sdr_ctrl) static int altera_gen5_sdram_ofdata_to_platdata(struct udevice *dev) { - struct altera_gen5_sdram_platdata *plat = dev->platdata; + struct altera_gen5_sdram_platdata *plat = dev->plat; plat->sdr = (struct socfpga_sdr *)devfdt_get_addr_index(dev, 0); if (!plat->sdr) @@ -578,7 +578,7 @@ static int altera_gen5_sdram_probe(struct udevice *dev) { int ret; unsigned long sdram_size; - struct altera_gen5_sdram_platdata *plat = dev->platdata; + struct altera_gen5_sdram_platdata *plat = dev->plat; struct altera_gen5_sdram_priv *priv = dev_get_priv(dev); struct socfpga_sdr_ctrl *sdr_ctrl = &plat->sdr->sdr_ctrl; struct reset_ctl_bulk resets; @@ -647,7 +647,7 @@ U_BOOT_DRIVER(altera_gen5_sdram) = { .of_match = altera_gen5_sdram_ids, .ops = &altera_gen5_sdram_ops, .ofdata_to_platdata = altera_gen5_sdram_ofdata_to_platdata, - .platdata_auto = sizeof(struct altera_gen5_sdram_platdata), + .plat_auto = sizeof(struct altera_gen5_sdram_platdata), .probe = altera_gen5_sdram_probe, .priv_auto = sizeof(struct altera_gen5_sdram_priv), }; diff --git a/drivers/ddr/altera/sdram_s10.c b/drivers/ddr/altera/sdram_s10.c index 2945f1e1df..8028d89f22 100644 --- a/drivers/ddr/altera/sdram_s10.c +++ b/drivers/ddr/altera/sdram_s10.c @@ -70,7 +70,7 @@ int match_ddr_conf(u32 ddr_conf) */ int sdram_mmr_init_full(struct udevice *dev) { - struct altera_sdram_platdata *plat = dev->platdata; + struct altera_sdram_platdata *plat = dev->plat; struct altera_sdram_priv *priv = dev_get_priv(dev); u32 update_value, io48_value, ddrioctl; u32 i; diff --git a/drivers/ddr/altera/sdram_soc64.c b/drivers/ddr/altera/sdram_soc64.c index 2c44b78bff..081087aa96 100644 --- a/drivers/ddr/altera/sdram_soc64.c +++ b/drivers/ddr/altera/sdram_soc64.c @@ -232,7 +232,7 @@ phys_size_t sdram_calculate_size(struct altera_sdram_platdata *plat) static int altera_sdram_ofdata_to_platdata(struct udevice *dev) { - struct altera_sdram_platdata *plat = dev->platdata; + struct altera_sdram_platdata *plat = dev->plat; fdt_addr_t addr; addr = dev_read_addr_index(dev, 0); @@ -304,7 +304,7 @@ U_BOOT_DRIVER(altera_sdram) = { .of_match = altera_sdram_ids, .ops = &altera_sdram_ops, .ofdata_to_platdata = altera_sdram_ofdata_to_platdata, - .platdata_auto = sizeof(struct altera_sdram_platdata), + .plat_auto = sizeof(struct altera_sdram_platdata), .probe = altera_sdram_probe, .priv_auto = sizeof(struct altera_sdram_priv), }; diff --git a/drivers/demo/demo-pdata.c b/drivers/demo/demo-pdata.c index 2f434f8db0..b504c31373 100644 --- a/drivers/demo/demo-pdata.c +++ b/drivers/demo/demo-pdata.c @@ -22,25 +22,25 @@ static const struct dm_demo_pdata yellow_hexagon = { U_BOOT_DEVICE(demo0) = { .name = "demo_shape_drv", - .platdata = &red_square, + .plat = &red_square, }; U_BOOT_DEVICE(demo1) = { .name = "demo_simple_drv", - .platdata = &red_square, + .plat = &red_square, }; U_BOOT_DEVICE(demo2) = { .name = "demo_shape_drv", - .platdata = &green_triangle, + .plat = &green_triangle, }; U_BOOT_DEVICE(demo3) = { .name = "demo_simple_drv", - .platdata = &yellow_hexagon, + .plat = &yellow_hexagon, }; U_BOOT_DEVICE(demo4) = { .name = "demo_shape_drv", - .platdata = &yellow_hexagon, + .plat = &yellow_hexagon, }; diff --git a/drivers/demo/demo-shape.c b/drivers/demo/demo-shape.c index 0f5cda23dd..cc99f3e8e6 100644 --- a/drivers/demo/demo-shape.c +++ b/drivers/demo/demo-shape.c @@ -194,5 +194,5 @@ U_BOOT_DRIVER(demo_shape_drv) = { .probe = dm_shape_probe, .remove = dm_shape_remove, .priv_auto = sizeof(struct shape_data), - .platdata_auto = sizeof(struct dm_demo_pdata), + .plat_auto = sizeof(struct dm_demo_pdata), }; diff --git a/drivers/demo/demo-simple.c b/drivers/demo/demo-simple.c index bf714660ce..950e286f7f 100644 --- a/drivers/demo/demo-simple.c +++ b/drivers/demo/demo-simple.c @@ -43,5 +43,5 @@ U_BOOT_DRIVER(demo_simple_drv) = { .id = UCLASS_DEMO, .ofdata_to_platdata = demo_shape_ofdata_to_platdata, .ops = &simple_ops, - .platdata_auto = sizeof(struct dm_demo_pdata), + .plat_auto = sizeof(struct dm_demo_pdata), }; diff --git a/drivers/gpio/altera_pio.c b/drivers/gpio/altera_pio.c index cf0785aeb6..f4e18e1f14 100644 --- a/drivers/gpio/altera_pio.c +++ b/drivers/gpio/altera_pio.c @@ -117,6 +117,6 @@ U_BOOT_DRIVER(altera_pio) = { .of_match = altera_pio_ids, .ops = &altera_pio_ops, .ofdata_to_platdata = altera_pio_ofdata_to_platdata, - .platdata_auto = sizeof(struct altera_pio_platdata), + .plat_auto = sizeof(struct altera_pio_platdata), .probe = altera_pio_probe, }; diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c index 90e692c13e..4b25af71c0 100644 --- a/drivers/gpio/at91_gpio.c +++ b/drivers/gpio/at91_gpio.c @@ -629,7 +629,7 @@ U_BOOT_DRIVER(atmel_at91rm9200_gpio) = { .id = UCLASS_GPIO, #if CONFIG_IS_ENABLED(OF_CONTROL) .of_match = at91_gpio_ids, - .platdata_auto = sizeof(struct at91_port_platdata), + .plat_auto = sizeof(struct at91_port_platdata), #endif .ops = &gpio_at91_ops, .probe = at91_gpio_probe, diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c index d92c061928..7a221b4df1 100644 --- a/drivers/gpio/atmel_pio4.c +++ b/drivers/gpio/atmel_pio4.c @@ -338,7 +338,7 @@ U_BOOT_DRIVER(gpio_atmel_pio4) = { .probe = atmel_pio4_probe, .bind = atmel_pio4_bind, .of_match = atmel_pio4_ids, - .platdata_auto = sizeof(struct atmel_pio4_platdata), + .plat_auto = sizeof(struct atmel_pio4_platdata), }; #endif diff --git a/drivers/gpio/bcm2835_gpio.c b/drivers/gpio/bcm2835_gpio.c index db349cf24b..e80830c782 100644 --- a/drivers/gpio/bcm2835_gpio.c +++ b/drivers/gpio/bcm2835_gpio.c @@ -134,7 +134,7 @@ U_BOOT_DRIVER(gpio_bcm2835) = { .name = "gpio_bcm2835", .id = UCLASS_GPIO, .ofdata_to_platdata = of_match_ptr(bcm2835_gpio_ofdata_to_platdata), - .platdata_auto = sizeof(struct bcm2835_gpio_platdata), + .plat_auto = sizeof(struct bcm2835_gpio_platdata), .ops = &gpio_bcm2835_ops, .probe = bcm2835_gpio_probe, .flags = DM_FLAG_PRE_RELOC, diff --git a/drivers/gpio/da8xx_gpio.c b/drivers/gpio/da8xx_gpio.c index 507f8b18c2..c8b12ac8a8 100644 --- a/drivers/gpio/da8xx_gpio.c +++ b/drivers/gpio/da8xx_gpio.c @@ -560,7 +560,7 @@ U_BOOT_DRIVER(ti_dm6441_gpio) = { .ofdata_to_platdata = of_match_ptr(davinci_gpio_ofdata_to_platdata), .of_match = davinci_gpio_ids, .bind = dm_scan_fdt_dev, - .platdata_auto = sizeof(struct davinci_gpio_platdata), + .plat_auto = sizeof(struct davinci_gpio_platdata), .probe = davinci_gpio_probe, .priv_auto = sizeof(struct davinci_gpio_bank), }; diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c index 3a86884443..6639e2e0b8 100644 --- a/drivers/gpio/dwapb_gpio.c +++ b/drivers/gpio/dwapb_gpio.c @@ -141,7 +141,7 @@ static int gpio_dwapb_reset(struct udevice *dev) static int gpio_dwapb_probe(struct udevice *dev) { struct gpio_dev_priv *priv = dev_get_uclass_priv(dev); - struct gpio_dwapb_platdata *plat = dev->platdata; + struct gpio_dwapb_platdata *plat = dev->plat; if (!plat) { /* Reset on parent device only */ diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c index fb9393d39d..fdb3a45aad 100644 --- a/drivers/gpio/gpio-uclass.c +++ b/drivers/gpio/gpio-uclass.c @@ -341,7 +341,7 @@ U_BOOT_DRIVER(gpio_hog) = { .ofdata_to_platdata = gpio_hog_ofdata_to_platdata, .probe = gpio_hog_probe, .priv_auto = sizeof(struct gpio_hog_priv), - .platdata_auto = sizeof(struct gpio_hog_data), + .plat_auto = sizeof(struct gpio_hog_data), }; #else int gpio_hog_lookup_name(const char *name, struct gpio_desc **desc) diff --git a/drivers/gpio/hsdk-creg-gpio.c b/drivers/gpio/hsdk-creg-gpio.c index d40365e82d..66f8441840 100644 --- a/drivers/gpio/hsdk-creg-gpio.c +++ b/drivers/gpio/hsdk-creg-gpio.c @@ -165,5 +165,5 @@ U_BOOT_DRIVER(gpio_hsdk_creg) = { .ops = &hsdk_creg_gpio_ops, .probe = hsdk_creg_gpio_probe, .of_match = hsdk_creg_gpio_ids, - .platdata_auto = sizeof(struct hsdk_creg_gpio), + .plat_auto = sizeof(struct hsdk_creg_gpio), }; diff --git a/drivers/gpio/imx_rgpio2p.c b/drivers/gpio/imx_rgpio2p.c index 2a09975b6e..80e934eb0d 100644 --- a/drivers/gpio/imx_rgpio2p.c +++ b/drivers/gpio/imx_rgpio2p.c @@ -151,12 +151,12 @@ static int imx_rgpio2p_probe(struct udevice *dev) static int imx_rgpio2p_bind(struct udevice *dev) { - struct imx_rgpio2p_plat *plat = dev->platdata; + struct imx_rgpio2p_plat *plat = dev->plat; fdt_addr_t addr; /* - * If platdata already exsits, directly return. - * Actually only when DT is not supported, platdata + * If plat already exsits, directly return. + * Actually only when DT is not supported, plat * is statically initialized in U_BOOT_DEVICES.Here * will return. */ @@ -171,7 +171,7 @@ static int imx_rgpio2p_bind(struct udevice *dev) * TODO: * When every board is converted to driver model and DT is supported, * this can be done by auto-alloc feature, but not using calloc - * to alloc memory for platdata. + * to alloc memory for plat. * * For example imx_rgpio2p_plat uses platform data rather than device * tree. @@ -184,7 +184,7 @@ static int imx_rgpio2p_bind(struct udevice *dev) plat->regs = (struct gpio_regs *)addr; plat->bank_index = dev->req_seq; - dev->platdata = plat; + dev->plat = plat; return 0; } diff --git a/drivers/gpio/intel_broadwell_gpio.c b/drivers/gpio/intel_broadwell_gpio.c index cb217403cd..b05233fe15 100644 --- a/drivers/gpio/intel_broadwell_gpio.c +++ b/drivers/gpio/intel_broadwell_gpio.c @@ -185,5 +185,5 @@ U_BOOT_DRIVER(gpio_broadwell) = { .ofdata_to_platdata = broadwell_gpio_ofdata_to_platdata, .probe = broadwell_gpio_probe, .priv_auto = sizeof(struct broadwell_bank_priv), - .platdata_auto = sizeof(struct broadwell_bank_platdata), + .plat_auto = sizeof(struct broadwell_bank_platdata), }; diff --git a/drivers/gpio/intel_ich6_gpio.c b/drivers/gpio/intel_ich6_gpio.c index bba85b3791..3fdc981842 100644 --- a/drivers/gpio/intel_ich6_gpio.c +++ b/drivers/gpio/intel_ich6_gpio.c @@ -237,5 +237,5 @@ U_BOOT_DRIVER(gpio_ich6) = { .ofdata_to_platdata = gpio_ich6_ofdata_to_platdata, .probe = ich6_gpio_probe, .priv_auto = sizeof(struct ich6_bank_priv), - .platdata_auto = sizeof(struct ich6_bank_platdata), + .plat_auto = sizeof(struct ich6_bank_platdata), }; diff --git a/drivers/gpio/iproc_gpio.c b/drivers/gpio/iproc_gpio.c index 81eb2e1ebc..73f74edc21 100644 --- a/drivers/gpio/iproc_gpio.c +++ b/drivers/gpio/iproc_gpio.c @@ -286,5 +286,5 @@ U_BOOT_DRIVER(iproc_gpio) = { .of_match = iproc_gpio_ids, .ops = &iproc_gpio_ops, .ofdata_to_platdata = iproc_gpio_ofdata_to_platdata, - .platdata_auto = sizeof(struct iproc_gpio_platdata), + .plat_auto = sizeof(struct iproc_gpio_platdata), }; diff --git a/drivers/gpio/mpc83xx_spisel_boot.c b/drivers/gpio/mpc83xx_spisel_boot.c index 3020cc9502..dae94b5ea9 100644 --- a/drivers/gpio/mpc83xx_spisel_boot.c +++ b/drivers/gpio/mpc83xx_spisel_boot.c @@ -141,7 +141,7 @@ U_BOOT_DRIVER(spisel_boot_mpc83xx) = { .ops = &mpc83xx_spisel_boot_ops, #if CONFIG_IS_ENABLED(OF_CONTROL) .ofdata_to_platdata = mpc83xx_spisel_boot_ofdata_to_platdata, - .platdata_auto = sizeof(struct mpc8xxx_gpio_plat), + .plat_auto = sizeof(struct mpc8xxx_gpio_plat), .of_match = mpc83xx_spisel_boot_ids, #endif .probe = mpc83xx_spisel_boot_probe, diff --git a/drivers/gpio/mpc8xxx_gpio.c b/drivers/gpio/mpc8xxx_gpio.c index fa08909b2b..6b64fc0d1c 100644 --- a/drivers/gpio/mpc8xxx_gpio.c +++ b/drivers/gpio/mpc8xxx_gpio.c @@ -295,7 +295,7 @@ U_BOOT_DRIVER(gpio_mpc8xxx) = { .ops = &gpio_mpc8xxx_ops, #if CONFIG_IS_ENABLED(OF_CONTROL) .ofdata_to_platdata = mpc8xxx_gpio_ofdata_to_platdata, - .platdata_auto = sizeof(struct mpc8xxx_gpio_plat), + .plat_auto = sizeof(struct mpc8xxx_gpio_plat), .of_match = mpc8xxx_gpio_ids, #endif .probe = mpc8xxx_gpio_probe, diff --git a/drivers/gpio/mt7621_gpio.c b/drivers/gpio/mt7621_gpio.c index ea51291e23..3a06d17c92 100644 --- a/drivers/gpio/mt7621_gpio.c +++ b/drivers/gpio/mt7621_gpio.c @@ -130,7 +130,7 @@ static int gpio_mediatek_probe(struct udevice *dev) */ static int gpio_mediatek_bind(struct udevice *parent) { - struct mediatek_gpio_platdata *plat = parent->platdata; + struct mediatek_gpio_platdata *plat = parent->plat; ofnode node; int bank = 0; int ret; diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c index 488103219f..55fadad81b 100644 --- a/drivers/gpio/mxc_gpio.c +++ b/drivers/gpio/mxc_gpio.c @@ -339,7 +339,7 @@ U_BOOT_DRIVER(gpio_mxc) = { .ops = &gpio_mxc_ops, .probe = mxc_gpio_probe, .ofdata_to_platdata = mxc_gpio_ofdata_to_platdata, - .platdata_auto = sizeof(struct mxc_gpio_plat), + .plat_auto = sizeof(struct mxc_gpio_plat), .priv_auto = sizeof(struct mxc_bank_info), .of_match = mxc_gpio_ids, .bind = mxc_gpio_bind, diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c index 83147b4919..581d16125f 100644 --- a/drivers/gpio/mxs_gpio.c +++ b/drivers/gpio/mxs_gpio.c @@ -264,7 +264,7 @@ static int mxs_gpio_probe(struct udevice *dev) #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) static int mxs_ofdata_to_platdata(struct udevice *dev) { - struct mxs_gpio_platdata *plat = dev->platdata; + struct mxs_gpio_platdata *plat = dev->plat; struct fdtdec_phandle_args args; int node = dev_of_offset(dev); int ret; @@ -299,7 +299,7 @@ U_BOOT_DRIVER(fsl_imx23_gpio) = { .ops = &gpio_mxs_ops, .probe = mxs_gpio_probe, .priv_auto = sizeof(struct mxs_gpio_priv), - .platdata_auto = sizeof(struct mxs_gpio_platdata), + .plat_auto = sizeof(struct mxs_gpio_platdata), #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) .of_match = mxs_gpio_ids, .ofdata_to_platdata = mxs_ofdata_to_platdata, diff --git a/drivers/gpio/nx_gpio.c b/drivers/gpio/nx_gpio.c index 1bd12f1568..f0bbb9e710 100644 --- a/drivers/gpio/nx_gpio.c +++ b/drivers/gpio/nx_gpio.c @@ -245,6 +245,6 @@ U_BOOT_DRIVER(nx_gpio) = { .of_match = nx_gpio_ids, .ops = &nx_gpio_ops, .ofdata_to_platdata = nx_gpio_ofdata_to_platdata, - .platdata_auto = sizeof(struct nx_gpio_platdata), + .plat_auto = sizeof(struct nx_gpio_platdata), .probe = nx_gpio_probe, }; diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c index 9e828058cd..7be1beb243 100644 --- a/drivers/gpio/omap_gpio.c +++ b/drivers/gpio/omap_gpio.c @@ -316,7 +316,7 @@ static int omap_gpio_bind(struct udevice *dev) * TODO: * When every board is converted to driver model and DT is * supported, this can be done by auto-alloc feature, but - * not using calloc to alloc memory for platdata. + * not using calloc to alloc memory for plat. * * For example am33xx_gpio uses platform data rather than device tree. * @@ -328,7 +328,7 @@ static int omap_gpio_bind(struct udevice *dev) plat->base = base_addr; plat->port_name = fdt_get_name(gd->fdt_blob, dev_of_offset(dev), NULL); - dev->platdata = plat; + dev->plat = plat; return 0; } @@ -363,7 +363,7 @@ U_BOOT_DRIVER(gpio_omap) = { #if !CONFIG_IS_ENABLED(OF_PLATDATA) .of_match = omap_gpio_ids, .ofdata_to_platdata = of_match_ptr(omap_gpio_ofdata_to_platdata), - .platdata_auto = sizeof(struct omap_gpio_platdata), + .plat_auto = sizeof(struct omap_gpio_platdata), #endif #else .bind = omap_gpio_bind, diff --git a/drivers/gpio/pca953x_gpio.c b/drivers/gpio/pca953x_gpio.c index 32d4a83613..239c0f7456 100644 --- a/drivers/gpio/pca953x_gpio.c +++ b/drivers/gpio/pca953x_gpio.c @@ -385,6 +385,6 @@ U_BOOT_DRIVER(pca953x) = { .id = UCLASS_GPIO, .ops = &pca953x_ops, .probe = pca953x_probe, - .platdata_auto = sizeof(struct pca953x_info), + .plat_auto = sizeof(struct pca953x_info), .of_match = pca953x_ids, }; diff --git a/drivers/gpio/pcf8575_gpio.c b/drivers/gpio/pcf8575_gpio.c index 7fcadc79c1..d0ff881765 100644 --- a/drivers/gpio/pcf8575_gpio.c +++ b/drivers/gpio/pcf8575_gpio.c @@ -55,7 +55,7 @@ struct pcf8575_chip { static int pcf8575_i2c_write_le16(struct udevice *dev, unsigned int word) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); u8 buf[2] = { word & 0xff, word >> 8, }; int ret; @@ -69,7 +69,7 @@ static int pcf8575_i2c_write_le16(struct udevice *dev, unsigned int word) static int pcf8575_i2c_read_le16(struct udevice *dev) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); u8 buf[2]; int ret; @@ -177,5 +177,5 @@ U_BOOT_DRIVER(gpio_pcf8575) = { .of_match = pcf8575_gpio_ids, .ofdata_to_platdata = pcf8575_ofdata_platdata, .probe = pcf8575_gpio_probe, - .platdata_auto = sizeof(struct pcf8575_chip), + .plat_auto = sizeof(struct pcf8575_chip), }; diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c index 3fc436759c..6202e4841f 100644 --- a/drivers/gpio/s5p_gpio.c +++ b/drivers/gpio/s5p_gpio.c @@ -287,7 +287,7 @@ static int gpio_exynos_probe(struct udevice *dev) { struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); struct exynos_bank_info *priv = dev->priv; - struct exynos_gpio_platdata *plat = dev->platdata; + struct exynos_gpio_platdata *plat = dev->plat; /* Only child devices have ports */ if (!plat) @@ -307,7 +307,7 @@ static int gpio_exynos_probe(struct udevice *dev) */ static int gpio_exynos_bind(struct udevice *parent) { - struct exynos_gpio_platdata *plat = parent->platdata; + struct exynos_gpio_platdata *plat = parent->plat; struct s5p_gpio_bank *bank, *base; const void *blob = gd->fdt_blob; int node; diff --git a/drivers/gpio/sifive-gpio.c b/drivers/gpio/sifive-gpio.c index 19239f5db9..4be8d4f69e 100644 --- a/drivers/gpio/sifive-gpio.c +++ b/drivers/gpio/sifive-gpio.c @@ -172,7 +172,7 @@ U_BOOT_DRIVER(gpio_sifive) = { .id = UCLASS_GPIO, .of_match = sifive_gpio_match, .ofdata_to_platdata = of_match_ptr(sifive_gpio_ofdata_to_platdata), - .platdata_auto = sizeof(struct sifive_gpio_platdata), + .plat_auto = sizeof(struct sifive_gpio_platdata), .ops = &sifive_gpio_ops, .probe = sifive_gpio_probe, }; diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c index dea71a7f34..62d584a810 100644 --- a/drivers/gpio/sunxi_gpio.c +++ b/drivers/gpio/sunxi_gpio.c @@ -285,7 +285,7 @@ static int gpio_sunxi_bind(struct udevice *parent) { struct sunxi_gpio_soc_data *soc_data = (struct sunxi_gpio_soc_data *)dev_get_driver_data(parent); - struct sunxi_gpio_platdata *plat = parent->platdata; + struct sunxi_gpio_platdata *plat = parent->plat; struct sunxi_gpio_reg *ctlr; int bank, ret; diff --git a/drivers/gpio/tegra186_gpio.c b/drivers/gpio/tegra186_gpio.c index ad97e13a1c..14c9d90bfd 100644 --- a/drivers/gpio/tegra186_gpio.c +++ b/drivers/gpio/tegra186_gpio.c @@ -34,7 +34,7 @@ struct tegra186_gpio_platdata { static uint32_t *tegra186_gpio_reg(struct udevice *dev, uint32_t reg, uint32_t gpio) { - struct tegra186_gpio_platdata *plat = dev->platdata; + struct tegra186_gpio_platdata *plat = dev->plat; uint32_t index = (reg + (gpio * TEGRA186_GPIO_PER_GPIO_STRIDE)) / 4; return &(plat->regs[index]); @@ -166,7 +166,7 @@ static const struct dm_gpio_ops tegra186_gpio_ops = { */ static int tegra186_gpio_bind(struct udevice *parent) { - struct tegra186_gpio_platdata *parent_plat = parent->platdata; + struct tegra186_gpio_platdata *parent_plat = parent->plat; struct tegra186_gpio_ctlr_data *ctlr_data = (struct tegra186_gpio_ctlr_data *)dev_get_driver_data(parent); uint32_t *regs; @@ -201,7 +201,7 @@ static int tegra186_gpio_bind(struct udevice *parent) static int tegra186_gpio_probe(struct udevice *dev) { - struct tegra186_gpio_platdata *plat = dev->platdata; + struct tegra186_gpio_platdata *plat = dev->plat; struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); /* Only child devices have ports */ diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c index 7583c8d6b2..862a63fbf6 100644 --- a/drivers/gpio/tegra_gpio.c +++ b/drivers/gpio/tegra_gpio.c @@ -292,7 +292,7 @@ static int gpio_tegra_probe(struct udevice *dev) { struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); struct tegra_port_info *priv = dev->priv; - struct tegra_gpio_platdata *plat = dev->platdata; + struct tegra_gpio_platdata *plat = dev->plat; /* Only child devices have ports */ if (!plat) @@ -313,7 +313,7 @@ static int gpio_tegra_probe(struct udevice *dev) */ static int gpio_tegra_bind(struct udevice *parent) { - struct tegra_gpio_platdata *plat = parent->platdata; + struct tegra_gpio_platdata *plat = parent->plat; struct gpio_ctlr *ctlr; int bank_count; int bank; diff --git a/drivers/gpio/vybrid_gpio.c b/drivers/gpio/vybrid_gpio.c index 9c4bba8e37..f55553c6f4 100644 --- a/drivers/gpio/vybrid_gpio.c +++ b/drivers/gpio/vybrid_gpio.c @@ -133,5 +133,5 @@ U_BOOT_DRIVER(gpio_vybrid) = { .ofdata_to_platdata = vybrid_gpio_odata_to_platdata, .probe = vybrid_gpio_probe, .priv_auto = sizeof(struct vybrid_gpios), - .platdata_auto = sizeof(struct vybrid_gpio_platdata), + .plat_auto = sizeof(struct vybrid_gpio_platdata), }; diff --git a/drivers/gpio/xilinx_gpio.c b/drivers/gpio/xilinx_gpio.c index 1bb70b12c9..6de08e1d08 100644 --- a/drivers/gpio/xilinx_gpio.c +++ b/drivers/gpio/xilinx_gpio.c @@ -36,13 +36,13 @@ struct xilinx_gpio_privdata { static int xilinx_gpio_get_bank_pin(unsigned offset, u32 *bank_num, u32 *bank_pin_num, struct udevice *dev) { - struct xilinx_gpio_platdata *platdata = dev_get_platdata(dev); + struct xilinx_gpio_platdata *plat = dev_get_platdata(dev); u32 bank, max_pins; /* the first gpio is 0 not 1 */ u32 pin_num = offset; for (bank = 0; bank < XILINX_GPIO_MAX_BANK; bank++) { - max_pins = platdata->bank_max[bank]; + max_pins = plat->bank_max[bank]; if (pin_num < max_pins) { debug("%s: found at bank 0x%x pin 0x%x\n", __func__, bank, pin_num); @@ -59,7 +59,7 @@ static int xilinx_gpio_get_bank_pin(unsigned offset, u32 *bank_num, static int xilinx_gpio_set_value(struct udevice *dev, unsigned offset, int value) { - struct xilinx_gpio_platdata *platdata = dev_get_platdata(dev); + struct xilinx_gpio_platdata *plat = dev_get_platdata(dev); struct xilinx_gpio_privdata *priv = dev_get_priv(dev); int val, ret; u32 bank, pin; @@ -71,14 +71,14 @@ static int xilinx_gpio_set_value(struct udevice *dev, unsigned offset, val = priv->output_val[bank]; debug("%s: regs: %lx, value: %x, gpio: %x, bank %x, pin %x, out %x\n", - __func__, (ulong)platdata->regs, value, offset, bank, pin, val); + __func__, (ulong)plat->regs, value, offset, bank, pin, val); if (value) val = val | (1 << pin); else val = val & ~(1 << pin); - writel(val, &platdata->regs->gpiodata + bank * 2); + writel(val, &plat->regs->gpiodata + bank * 2); priv->output_val[bank] = val; @@ -87,7 +87,7 @@ static int xilinx_gpio_set_value(struct udevice *dev, unsigned offset, static int xilinx_gpio_get_value(struct udevice *dev, unsigned offset) { - struct xilinx_gpio_platdata *platdata = dev_get_platdata(dev); + struct xilinx_gpio_platdata *plat = dev_get_platdata(dev); struct xilinx_gpio_privdata *priv = dev_get_priv(dev); int val, ret; u32 bank, pin; @@ -97,14 +97,14 @@ static int xilinx_gpio_get_value(struct udevice *dev, unsigned offset) return ret; debug("%s: regs: %lx, gpio: %x, bank %x, pin %x\n", __func__, - (ulong)platdata->regs, offset, bank, pin); + (ulong)plat->regs, offset, bank, pin); - if (platdata->bank_output[bank]) { + if (plat->bank_output[bank]) { debug("%s: Read saved output value\n", __func__); val = priv->output_val[bank]; } else { debug("%s: Read input value from reg\n", __func__); - val = readl(&platdata->regs->gpiodata + bank * 2); + val = readl(&plat->regs->gpiodata + bank * 2); } val = !!(val & (1 << pin)); @@ -114,7 +114,7 @@ static int xilinx_gpio_get_value(struct udevice *dev, unsigned offset) static int xilinx_gpio_get_function(struct udevice *dev, unsigned offset) { - struct xilinx_gpio_platdata *platdata = dev_get_platdata(dev); + struct xilinx_gpio_platdata *plat = dev_get_platdata(dev); int val, ret; u32 bank, pin; @@ -123,15 +123,15 @@ static int xilinx_gpio_get_function(struct udevice *dev, unsigned offset) return ret; /* Check if all pins are inputs */ - if (platdata->bank_input[bank]) + if (plat->bank_input[bank]) return GPIOF_INPUT; /* Check if all pins are outputs */ - if (platdata->bank_output[bank]) + if (plat->bank_output[bank]) return GPIOF_OUTPUT; /* FIXME test on dual */ - val = readl(&platdata->regs->gpiodir + bank * 2); + val = readl(&plat->regs->gpiodir + bank * 2); val = !(val & (1 << pin)); /* input is 1 in reg but GPIOF_INPUT is 0 */ @@ -143,7 +143,7 @@ static int xilinx_gpio_get_function(struct udevice *dev, unsigned offset) static int xilinx_gpio_direction_output(struct udevice *dev, unsigned offset, int value) { - struct xilinx_gpio_platdata *platdata = dev_get_platdata(dev); + struct xilinx_gpio_platdata *plat = dev_get_platdata(dev); int val, ret; u32 bank, pin; @@ -152,15 +152,15 @@ static int xilinx_gpio_direction_output(struct udevice *dev, unsigned offset, return ret; /* can't change it if all is input by default */ - if (platdata->bank_input[bank]) + if (plat->bank_input[bank]) return -EINVAL; xilinx_gpio_set_value(dev, offset, value); - if (!platdata->bank_output[bank]) { - val = readl(&platdata->regs->gpiodir + bank * 2); + if (!plat->bank_output[bank]) { + val = readl(&plat->regs->gpiodir + bank * 2); val = val & ~(1 << pin); - writel(val, &platdata->regs->gpiodir + bank * 2); + writel(val, &plat->regs->gpiodir + bank * 2); } return 0; @@ -168,7 +168,7 @@ static int xilinx_gpio_direction_output(struct udevice *dev, unsigned offset, static int xilinx_gpio_direction_input(struct udevice *dev, unsigned offset) { - struct xilinx_gpio_platdata *platdata = dev_get_platdata(dev); + struct xilinx_gpio_platdata *plat = dev_get_platdata(dev); int val, ret; u32 bank, pin; @@ -177,16 +177,16 @@ static int xilinx_gpio_direction_input(struct udevice *dev, unsigned offset) return ret; /* Already input */ - if (platdata->bank_input[bank]) + if (plat->bank_input[bank]) return 0; /* can't change it if all is output by default */ - if (platdata->bank_output[bank]) + if (plat->bank_output[bank]) return -EINVAL; - val = readl(&platdata->regs->gpiodir + bank * 2); + val = readl(&plat->regs->gpiodir + bank * 2); val = val | (1 << pin); - writel(val, &platdata->regs->gpiodir + bank * 2); + writel(val, &plat->regs->gpiodir + bank * 2); return 0; } @@ -194,7 +194,7 @@ static int xilinx_gpio_direction_input(struct udevice *dev, unsigned offset) static int xilinx_gpio_xlate(struct udevice *dev, struct gpio_desc *desc, struct ofnode_phandle_args *args) { - struct xilinx_gpio_platdata *platdata = dev_get_platdata(dev); + struct xilinx_gpio_platdata *plat = dev_get_platdata(dev); desc->offset = args->args[0]; @@ -209,13 +209,13 @@ static int xilinx_gpio_xlate(struct udevice *dev, struct gpio_desc *desc, * add amount of pins in second channel if present. */ if (args->args[1]) { - if (!platdata->bank_max[1]) { + if (!plat->bank_max[1]) { printf("%s: %s has no second channel\n", __func__, dev->name); return -EINVAL; } - desc->offset += platdata->bank_max[0]; + desc->offset += plat->bank_max[0]; } /* The third cell is optional */ @@ -239,7 +239,7 @@ static const struct dm_gpio_ops xilinx_gpio_ops = { static int xilinx_gpio_probe(struct udevice *dev) { - struct xilinx_gpio_platdata *platdata = dev_get_platdata(dev); + struct xilinx_gpio_platdata *plat = dev_get_platdata(dev); struct xilinx_gpio_privdata *priv = dev_get_priv(dev); struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); const void *label_ptr; @@ -253,42 +253,38 @@ static int xilinx_gpio_probe(struct udevice *dev) uc_priv->bank_name = dev->name; } - uc_priv->gpio_count = platdata->bank_max[0] + platdata->bank_max[1]; + uc_priv->gpio_count = plat->bank_max[0] + plat->bank_max[1]; - priv->output_val[0] = platdata->dout_default[0]; + priv->output_val[0] = plat->dout_default[0]; - if (platdata->bank_max[1]) - priv->output_val[1] = platdata->dout_default[1]; + if (plat->bank_max[1]) + priv->output_val[1] = plat->dout_default[1]; return 0; } static int xilinx_gpio_ofdata_to_platdata(struct udevice *dev) { - struct xilinx_gpio_platdata *platdata = dev_get_platdata(dev); + struct xilinx_gpio_platdata *plat = dev_get_platdata(dev); int is_dual; - platdata->regs = (struct gpio_regs *)dev_read_addr(dev); + plat->regs = (struct gpio_regs *)dev_read_addr(dev); - platdata->bank_max[0] = dev_read_u32_default(dev, - "xlnx,gpio-width", 0); - platdata->bank_input[0] = dev_read_u32_default(dev, - "xlnx,all-inputs", 0); - platdata->bank_output[0] = dev_read_u32_default(dev, - "xlnx,all-outputs", 0); - platdata->dout_default[0] = dev_read_u32_default(dev, - "xlnx,dout-default", - 0); + plat->bank_max[0] = dev_read_u32_default(dev, "xlnx,gpio-width", 0); + plat->bank_input[0] = dev_read_u32_default(dev, "xlnx,all-inputs", 0); + plat->bank_output[0] = dev_read_u32_default(dev, "xlnx,all-outputs", 0); + plat->dout_default[0] = dev_read_u32_default(dev, "xlnx,dout-default", + 0); is_dual = dev_read_u32_default(dev, "xlnx,is-dual", 0); if (is_dual) { - platdata->bank_max[1] = dev_read_u32_default(dev, - "xlnx,gpio2-width", 0); - platdata->bank_input[1] = dev_read_u32_default(dev, + plat->bank_max[1] = dev_read_u32_default(dev, + "xlnx,gpio2-width", 0); + plat->bank_input[1] = dev_read_u32_default(dev, "xlnx,all-inputs-2", 0); - platdata->bank_output[1] = dev_read_u32_default(dev, + plat->bank_output[1] = dev_read_u32_default(dev, "xlnx,all-outputs-2", 0); - platdata->dout_default[1] = dev_read_u32_default(dev, + plat->dout_default[1] = dev_read_u32_default(dev, "xlnx,dout-default-2", 0); } @@ -307,6 +303,6 @@ U_BOOT_DRIVER(xilinx_gpio) = { .of_match = xilinx_gpio_ids, .ofdata_to_platdata = xilinx_gpio_ofdata_to_platdata, .probe = xilinx_gpio_probe, - .platdata_auto = sizeof(struct xilinx_gpio_platdata), + .plat_auto = sizeof(struct xilinx_gpio_platdata), .priv_auto = sizeof(struct xilinx_gpio_privdata), }; diff --git a/drivers/gpio/zynq_gpio.c b/drivers/gpio/zynq_gpio.c index 4ef2985e76..cfe35674b7 100644 --- a/drivers/gpio/zynq_gpio.c +++ b/drivers/gpio/zynq_gpio.c @@ -193,20 +193,20 @@ static inline void zynq_gpio_get_bank_pin(unsigned int pin_num, unsigned int *bank_pin_num, struct udevice *dev) { - struct zynq_gpio_platdata *platdata = dev_get_platdata(dev); + struct zynq_gpio_platdata *plat = dev_get_platdata(dev); u32 bank; - for (bank = 0; bank < platdata->p_data->max_bank; bank++) { - if (pin_num >= platdata->p_data->bank_min[bank] && - pin_num <= platdata->p_data->bank_max[bank]) { + for (bank = 0; bank < plat->p_data->max_bank; bank++) { + if (pin_num >= plat->p_data->bank_min[bank] && + pin_num <= plat->p_data->bank_max[bank]) { *bank_num = bank; *bank_pin_num = pin_num - - platdata->p_data->bank_min[bank]; + plat->p_data->bank_min[bank]; return; } } - if (bank >= platdata->p_data->max_bank) { + if (bank >= plat->p_data->max_bank) { printf("Invalid bank and pin num\n"); *bank_num = 0; *bank_pin_num = 0; @@ -215,9 +215,9 @@ static inline void zynq_gpio_get_bank_pin(unsigned int pin_num, static int gpio_is_valid(unsigned gpio, struct udevice *dev) { - struct zynq_gpio_platdata *platdata = dev_get_platdata(dev); + struct zynq_gpio_platdata *plat = dev_get_platdata(dev); - return gpio < platdata->p_data->ngpio; + return gpio < plat->p_data->ngpio; } static int check_gpio(unsigned gpio, struct udevice *dev) @@ -233,14 +233,14 @@ static int zynq_gpio_get_value(struct udevice *dev, unsigned gpio) { u32 data; unsigned int bank_num, bank_pin_num; - struct zynq_gpio_platdata *platdata = dev_get_platdata(dev); + struct zynq_gpio_platdata *plat = dev_get_platdata(dev); if (check_gpio(gpio, dev) < 0) return -1; zynq_gpio_get_bank_pin(gpio, &bank_num, &bank_pin_num, dev); - data = readl(platdata->base + + data = readl(plat->base + ZYNQ_GPIO_DATA_RO_OFFSET(bank_num)); return (data >> bank_pin_num) & 1; @@ -249,7 +249,7 @@ static int zynq_gpio_get_value(struct udevice *dev, unsigned gpio) static int zynq_gpio_set_value(struct udevice *dev, unsigned gpio, int value) { unsigned int reg_offset, bank_num, bank_pin_num; - struct zynq_gpio_platdata *platdata = dev_get_platdata(dev); + struct zynq_gpio_platdata *plat = dev_get_platdata(dev); if (check_gpio(gpio, dev) < 0) return -1; @@ -272,7 +272,7 @@ static int zynq_gpio_set_value(struct udevice *dev, unsigned gpio, int value) value = ~(1 << (bank_pin_num + ZYNQ_GPIO_MID_PIN_NUM)) & ((value << bank_pin_num) | ZYNQ_GPIO_UPPER_MASK); - writel(value, platdata->base + reg_offset); + writel(value, plat->base + reg_offset); return 0; } @@ -281,7 +281,7 @@ static int zynq_gpio_direction_input(struct udevice *dev, unsigned gpio) { u32 reg; unsigned int bank_num, bank_pin_num; - struct zynq_gpio_platdata *platdata = dev_get_platdata(dev); + struct zynq_gpio_platdata *plat = dev_get_platdata(dev); if (check_gpio(gpio, dev) < 0) return -1; @@ -293,9 +293,9 @@ static int zynq_gpio_direction_input(struct udevice *dev, unsigned gpio) return -1; /* clear the bit in direction mode reg to set the pin as input */ - reg = readl(platdata->base + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); + reg = readl(plat->base + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); reg &= ~BIT(bank_pin_num); - writel(reg, platdata->base + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); + writel(reg, plat->base + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); return 0; } @@ -305,7 +305,7 @@ static int zynq_gpio_direction_output(struct udevice *dev, unsigned gpio, { u32 reg; unsigned int bank_num, bank_pin_num; - struct zynq_gpio_platdata *platdata = dev_get_platdata(dev); + struct zynq_gpio_platdata *plat = dev_get_platdata(dev); if (check_gpio(gpio, dev) < 0) return -1; @@ -313,14 +313,14 @@ static int zynq_gpio_direction_output(struct udevice *dev, unsigned gpio, zynq_gpio_get_bank_pin(gpio, &bank_num, &bank_pin_num, dev); /* set the GPIO pin as output */ - reg = readl(platdata->base + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); + reg = readl(plat->base + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); reg |= BIT(bank_pin_num); - writel(reg, platdata->base + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); + writel(reg, plat->base + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); /* configure the output enable reg for the pin */ - reg = readl(platdata->base + ZYNQ_GPIO_OUTEN_OFFSET(bank_num)); + reg = readl(plat->base + ZYNQ_GPIO_OUTEN_OFFSET(bank_num)); reg |= BIT(bank_pin_num); - writel(reg, platdata->base + ZYNQ_GPIO_OUTEN_OFFSET(bank_num)); + writel(reg, plat->base + ZYNQ_GPIO_OUTEN_OFFSET(bank_num)); /* set the state of the pin */ zynq_gpio_set_value(dev, gpio, value); @@ -331,7 +331,7 @@ static int zynq_gpio_get_function(struct udevice *dev, unsigned offset) { u32 reg; unsigned int bank_num, bank_pin_num; - struct zynq_gpio_platdata *platdata = dev_get_platdata(dev); + struct zynq_gpio_platdata *plat = dev_get_platdata(dev); if (check_gpio(offset, dev) < 0) return -1; @@ -339,7 +339,7 @@ static int zynq_gpio_get_function(struct udevice *dev, unsigned offset) zynq_gpio_get_bank_pin(offset, &bank_num, &bank_pin_num, dev); /* set the GPIO pin as output */ - reg = readl(platdata->base + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); + reg = readl(plat->base + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); reg &= BIT(bank_pin_num); if (reg) return GPIOF_OUTPUT; @@ -369,7 +369,7 @@ static const struct udevice_id zynq_gpio_ids[] = { static int zynq_gpio_probe(struct udevice *dev) { - struct zynq_gpio_platdata *platdata = dev_get_platdata(dev); + struct zynq_gpio_platdata *plat = dev_get_platdata(dev); struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); const void *label_ptr; @@ -382,19 +382,19 @@ static int zynq_gpio_probe(struct udevice *dev) uc_priv->bank_name = dev->name; } - if (platdata->p_data) - uc_priv->gpio_count = platdata->p_data->ngpio; + if (plat->p_data) + uc_priv->gpio_count = plat->p_data->ngpio; return 0; } static int zynq_gpio_ofdata_to_platdata(struct udevice *dev) { - struct zynq_gpio_platdata *platdata = dev_get_platdata(dev); + struct zynq_gpio_platdata *plat = dev_get_platdata(dev); - platdata->base = (phys_addr_t)dev_read_addr(dev); + plat->base = (phys_addr_t)dev_read_addr(dev); - platdata->p_data = + plat->p_data = (struct zynq_platform_data *)dev_get_driver_data(dev); return 0; @@ -407,5 +407,5 @@ U_BOOT_DRIVER(gpio_zynq) = { .of_match = zynq_gpio_ids, .ofdata_to_platdata = zynq_gpio_ofdata_to_platdata, .probe = zynq_gpio_probe, - .platdata_auto = sizeof(struct zynq_gpio_platdata), + .plat_auto = sizeof(struct zynq_gpio_platdata), }; diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 37958083af..403602fddf 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -11,7 +11,7 @@ config DM_I2C Enable driver model for I2C. The I2C uclass interface: probe, read, write and speed, is implemented with the bus drivers operations, which provide methods for bus setting and data transfer. Each chip - device (bus child) info is kept as parent platdata. The interface + device (bus child) info is kept as parent plat. The interface is defined in include/i2c.h. config I2C_CROS_EC_TUNNEL diff --git a/drivers/i2c/acpi_i2c.c b/drivers/i2c/acpi_i2c.c index 57d29683cb..ef12789e7f 100644 --- a/drivers/i2c/acpi_i2c.c +++ b/drivers/i2c/acpi_i2c.c @@ -210,7 +210,7 @@ int acpi_i2c_ofdata_to_platdata(struct udevice *dev) /* Use name specified in priv or build one from I2C address */ static int acpi_i2c_get_name(const struct udevice *dev, char *out_name) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); struct acpi_i2c_priv *priv = dev_get_priv(dev); snprintf(out_name, ACPI_NAME_MAX, diff --git a/drivers/i2c/i2c-emul-uclass.c b/drivers/i2c/i2c-emul-uclass.c index 956ebeefb6..83f0f90831 100644 --- a/drivers/i2c/i2c-emul-uclass.c +++ b/drivers/i2c/i2c-emul-uclass.c @@ -14,7 +14,7 @@ * i2c emulation works using an 'emul' node at the bus level. Each device in * that node is in the UCLASS_I2C_EMUL uclass, and emulates one i2c device. A * pointer to the device it emulates is in the 'dev' property of the emul device - * uclass platdata (struct i2c_emul_platdata), put there by i2c_emul_find(). + * uclass plat (struct i2c_emul_platdata), put there by i2c_emul_find(). * When sandbox wants an emulator for a device, it calls i2c_emul_find() which * searches for the emulator with the correct address. To find the device for an * emulator, call i2c_emul_get_device(). @@ -27,7 +27,7 @@ * struct i2c_emul_uc_platdata - information about the emulator for this device * * This is used by devices in UCLASS_I2C_EMUL to record information about the - * device being emulated. It is accessible with dev_get_uclass_platdata() + * device being emulated. It is accessible with dev_get_uclass_plat() * * @dev: Device being emulated */ @@ -37,7 +37,7 @@ struct i2c_emul_uc_platdata { struct udevice *i2c_emul_get_device(struct udevice *emul) { - struct i2c_emul_uc_platdata *uc_plat = dev_get_uclass_platdata(emul); + struct i2c_emul_uc_platdata *uc_plat = dev_get_uclass_plat(emul); return uc_plat->dev; } @@ -54,7 +54,7 @@ int i2c_emul_find(struct udevice *dev, struct udevice **emulp) log_err("No emulators for device '%s'\n", dev->name); return ret; } - uc_plat = dev_get_uclass_platdata(emul); + uc_plat = dev_get_uclass_plat(emul); uc_plat->dev = dev; *emulp = emul; @@ -64,14 +64,14 @@ int i2c_emul_find(struct udevice *dev, struct udevice **emulp) UCLASS_DRIVER(i2c_emul) = { .id = UCLASS_I2C_EMUL, .name = "i2c_emul", - .per_device_platdata_auto = + .per_device_plat_auto = sizeof(struct i2c_emul_uc_platdata), }; /* - * This uclass is a child of the i2c bus. Its platdata is not defined here so + * This uclass is a child of the i2c bus. Its plat is not defined here so * is defined by its parent, UCLASS_I2C, which uses struct dm_i2c_chip. See - * per_child_platdata_auto in UCLASS_DRIVER(i2c). + * per_child_plat_auto in UCLASS_DRIVER(i2c). */ UCLASS_DRIVER(i2c_emul_parent) = { .id = UCLASS_I2C_EMUL_PARENT, diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c index 2feb5882e6..e81420558d 100644 --- a/drivers/i2c/i2c-uclass.c +++ b/drivers/i2c/i2c-uclass.c @@ -79,7 +79,7 @@ static int i2c_setup_offset(struct dm_i2c_chip *chip, uint offset, static int i2c_read_bytewise(struct udevice *dev, uint offset, uint8_t *buffer, int len) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); struct udevice *bus = dev_get_parent(dev); struct dm_i2c_ops *ops = i2c_get_ops(bus); struct i2c_msg msg[2], *ptr; @@ -108,7 +108,7 @@ static int i2c_read_bytewise(struct udevice *dev, uint offset, static int i2c_write_bytewise(struct udevice *dev, uint offset, const uint8_t *buffer, int len) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); struct udevice *bus = dev_get_parent(dev); struct dm_i2c_ops *ops = i2c_get_ops(bus); struct i2c_msg msg[1]; @@ -131,7 +131,7 @@ static int i2c_write_bytewise(struct udevice *dev, uint offset, int dm_i2c_read(struct udevice *dev, uint offset, uint8_t *buffer, int len) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); struct udevice *bus = dev_get_parent(dev); struct dm_i2c_ops *ops = i2c_get_ops(bus); struct i2c_msg msg[2], *ptr; @@ -162,7 +162,7 @@ int dm_i2c_read(struct udevice *dev, uint offset, uint8_t *buffer, int len) int dm_i2c_write(struct udevice *dev, uint offset, const uint8_t *buffer, int len) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); struct udevice *bus = dev_get_parent(dev); struct dm_i2c_ops *ops = i2c_get_ops(bus); struct i2c_msg msg[1]; @@ -297,7 +297,7 @@ static int i2c_bind_driver(struct udevice *bus, uint chip_addr, uint offset_len, goto err_bind; /* Tell the device what we know about it */ - chip = dev_get_parent_platdata(dev); + chip = dev_get_parent_plat(dev); chip->chip_addr = chip_addr; chip->offset_len = offset_len; ret = device_probe(dev); @@ -328,7 +328,7 @@ int i2c_get_chip(struct udevice *bus, uint chip_addr, uint offset_len, bus->name, chip_addr); 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); int ret; if (chip->chip_addr == (chip_addr & @@ -433,7 +433,7 @@ int dm_i2c_get_bus_speed(struct udevice *bus) int i2c_set_chip_flags(struct udevice *dev, uint flags) { struct udevice *bus = dev->parent; - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); struct dm_i2c_ops *ops = i2c_get_ops(bus); int ret; @@ -449,7 +449,7 @@ int i2c_set_chip_flags(struct udevice *dev, uint flags) int i2c_get_chip_flags(struct udevice *dev, uint *flagsp) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); *flagsp = chip->flags; @@ -458,7 +458,7 @@ int i2c_get_chip_flags(struct udevice *dev, uint *flagsp) int i2c_set_chip_offset_len(struct udevice *dev, uint offset_len) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); if (offset_len > I2C_MAX_OFFSET_LEN) return log_ret(-EINVAL); @@ -469,14 +469,14 @@ int i2c_set_chip_offset_len(struct udevice *dev, uint offset_len) int i2c_get_chip_offset_len(struct udevice *dev) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); return chip->offset_len; } int i2c_set_chip_addr_offset_mask(struct udevice *dev, uint mask) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); chip->chip_addr_offset_mask = mask; @@ -485,7 +485,7 @@ int i2c_set_chip_addr_offset_mask(struct udevice *dev, uint mask) uint i2c_get_chip_addr_offset_mask(struct udevice *dev) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); return chip->chip_addr_offset_mask; } @@ -676,7 +676,7 @@ static int i2c_post_probe(struct udevice *dev) static int i2c_child_post_bind(struct udevice *dev) { #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) - struct dm_i2c_chip *plat = dev_get_parent_platdata(dev); + struct dm_i2c_chip *plat = dev_get_parent_plat(dev); if (!dev_of_valid(dev)) return 0; @@ -743,7 +743,7 @@ UCLASS_DRIVER(i2c) = { .pre_probe = i2c_pre_probe, .post_probe = i2c_post_probe, .per_device_auto = sizeof(struct dm_i2c_bus), - .per_child_platdata_auto = sizeof(struct dm_i2c_chip), + .per_child_plat_auto = sizeof(struct dm_i2c_chip), .child_post_bind = i2c_child_post_bind, }; diff --git a/drivers/i2c/muxes/i2c-mux-uclass.c b/drivers/i2c/muxes/i2c-mux-uclass.c index cefd9dbfff..d69c12001c 100644 --- a/drivers/i2c/muxes/i2c-mux-uclass.c +++ b/drivers/i2c/muxes/i2c-mux-uclass.c @@ -36,7 +36,7 @@ struct i2c_mux_bus { /* Find out the mux channel number */ static int i2c_mux_child_post_bind(struct udevice *dev) { - struct i2c_mux_bus *plat = dev_get_parent_platdata(dev); + struct i2c_mux_bus *plat = dev_get_parent_plat(dev); int channel; channel = dev_read_u32_default(dev, "reg", -1); @@ -126,7 +126,7 @@ static int i2c_mux_post_probe(struct udevice *mux) int i2c_mux_select(struct udevice *dev) { - struct i2c_mux_bus *plat = dev_get_parent_platdata(dev); + struct i2c_mux_bus *plat = dev_get_parent_plat(dev); struct udevice *mux = dev->parent; struct i2c_mux_ops *ops = i2c_mux_get_ops(mux); @@ -138,7 +138,7 @@ int i2c_mux_select(struct udevice *dev) int i2c_mux_deselect(struct udevice *dev) { - struct i2c_mux_bus *plat = dev_get_parent_platdata(dev); + struct i2c_mux_bus *plat = dev_get_parent_plat(dev); struct udevice *mux = dev->parent; struct i2c_mux_ops *ops = i2c_mux_get_ops(mux); @@ -221,6 +221,6 @@ UCLASS_DRIVER(i2c_mux) = { .post_bind = i2c_mux_post_bind, .post_probe = i2c_mux_post_probe, .per_device_auto = sizeof(struct i2c_mux), - .per_child_platdata_auto = sizeof(struct i2c_mux_bus), + .per_child_plat_auto = sizeof(struct i2c_mux_bus), .child_post_bind = i2c_mux_child_post_bind, }; diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c index bdb4f079e9..ea9e93327d 100644 --- a/drivers/i2c/omap24xx_i2c.c +++ b/drivers/i2c/omap24xx_i2c.c @@ -1094,7 +1094,7 @@ U_BOOT_DRIVER(i2c_omap) = { #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) .of_match = omap_i2c_ids, .ofdata_to_platdata = omap_i2c_ofdata_to_platdata, - .platdata_auto = sizeof(struct omap_i2c_platdata), + .plat_auto = sizeof(struct omap_i2c_platdata), #endif .probe = omap_i2c_probe, .priv_auto = sizeof(struct omap_i2c), diff --git a/drivers/i2c/sandbox_i2c.c b/drivers/i2c/sandbox_i2c.c index 3abd05324a..a61dfc096b 100644 --- a/drivers/i2c/sandbox_i2c.c +++ b/drivers/i2c/sandbox_i2c.c @@ -27,7 +27,7 @@ static int get_emul(struct udevice *dev, struct udevice **devp, *devp = NULL; *opsp = NULL; - plat = dev_get_parent_platdata(dev); + plat = dev_get_parent_plat(dev); if (!plat->emul) { ret = i2c_emul_find(dev, &plat->emul); if (ret) diff --git a/drivers/led/led-uclass.c b/drivers/led/led-uclass.c index d20e28dc61..e15a2967ff 100644 --- a/drivers/led/led-uclass.c +++ b/drivers/led/led-uclass.c @@ -22,7 +22,7 @@ int led_get_by_label(const char *label, struct udevice **devp) if (ret) return ret; uclass_foreach_dev(dev, uc) { - struct led_uc_plat *uc_plat = dev_get_uclass_platdata(dev); + struct led_uc_plat *uc_plat = dev_get_uclass_plat(dev); /* Ignore the top-level LED node */ if (uc_plat->label && !strcmp(label, uc_plat->label)) @@ -96,5 +96,5 @@ int led_default_state(void) UCLASS_DRIVER(led) = { .id = UCLASS_LED, .name = "led", - .per_device_platdata_auto = sizeof(struct led_uc_plat), + .per_device_plat_auto = sizeof(struct led_uc_plat), }; diff --git a/drivers/led/led_bcm6328.c b/drivers/led/led_bcm6328.c index dbe9ab15a5..bf8207d638 100644 --- a/drivers/led/led_bcm6328.c +++ b/drivers/led/led_bcm6328.c @@ -147,7 +147,7 @@ static const struct led_ops bcm6328_led_ops = { static int bcm6328_led_probe(struct udevice *dev) { - struct led_uc_plat *uc_plat = dev_get_uclass_platdata(dev); + struct led_uc_plat *uc_plat = dev_get_uclass_plat(dev); /* Top-level LED node */ if (!uc_plat->label) { @@ -222,7 +222,7 @@ static int bcm6328_led_bind(struct udevice *parent) if (ret) return ret; - uc_plat = dev_get_uclass_platdata(dev); + uc_plat = dev_get_uclass_plat(dev); uc_plat->label = label; } diff --git a/drivers/led/led_bcm6358.c b/drivers/led/led_bcm6358.c index 4bf4a09a0a..3e57cdfd17 100644 --- a/drivers/led/led_bcm6358.c +++ b/drivers/led/led_bcm6358.c @@ -113,7 +113,7 @@ static const struct led_ops bcm6358_led_ops = { static int bcm6358_led_probe(struct udevice *dev) { - struct led_uc_plat *uc_plat = dev_get_uclass_platdata(dev); + struct led_uc_plat *uc_plat = dev_get_uclass_plat(dev); /* Top-level LED node */ if (!uc_plat->label) { @@ -192,7 +192,7 @@ static int bcm6358_led_bind(struct udevice *parent) if (ret) return ret; - uc_plat = dev_get_uclass_platdata(dev); + uc_plat = dev_get_uclass_plat(dev); uc_plat->label = label; } diff --git a/drivers/led/led_bcm6858.c b/drivers/led/led_bcm6858.c index 0b1379dfd8..fbf46a114c 100644 --- a/drivers/led/led_bcm6858.c +++ b/drivers/led/led_bcm6858.c @@ -154,7 +154,7 @@ static const struct led_ops bcm6858_led_ops = { static int bcm6858_led_probe(struct udevice *dev) { - struct led_uc_plat *uc_plat = dev_get_uclass_platdata(dev); + struct led_uc_plat *uc_plat = dev_get_uclass_plat(dev); /* Top-level LED node */ if (!uc_plat->label) { @@ -229,7 +229,7 @@ static int bcm6858_led_bind(struct udevice *parent) if (ret) return ret; - uc_plat = dev_get_uclass_platdata(dev); + uc_plat = dev_get_uclass_plat(dev); uc_plat->label = label; } diff --git a/drivers/led/led_cortina.c b/drivers/led/led_cortina.c index b8760bef39..f9e497f915 100644 --- a/drivers/led/led_cortina.c +++ b/drivers/led/led_cortina.c @@ -132,7 +132,7 @@ static const struct led_ops cortina_led_ops = { static int ca_led_ofdata_to_platdata(struct udevice *dev) { - struct led_uc_plat *uc_plat = dev_get_uclass_platdata(dev); + struct led_uc_plat *uc_plat = dev_get_uclass_plat(dev); /* Top-level LED node */ if (!uc_plat->label) { @@ -165,22 +165,22 @@ static int ca_led_ofdata_to_platdata(struct udevice *dev) static int cortina_led_probe(struct udevice *dev) { - struct led_uc_plat *uc_plat = dev_get_uclass_platdata(dev); + struct led_uc_plat *uc_plat = dev_get_uclass_plat(dev); /* Top-level LED node */ if (!uc_plat->label) { - struct cortina_led_platdata *platdata = dev_get_platdata(dev); + struct cortina_led_platdata *plat = dev_get_platdata(dev); u32 reg_value, val; u16 rate1, rate2; - if (!platdata->ctrl_regs) + if (!plat->ctrl_regs) return -EINVAL; reg_value = 0; reg_value |= LED_CLK_POLARITY; - rate1 = platdata->rate1; - rate2 = platdata->rate2; + rate1 = plat->rate1; + rate2 = plat->rate2; val = rate1 / 16 - 1; rate1 = val > LED_MAX_HW_BLINK ? @@ -194,7 +194,7 @@ static int cortina_led_probe(struct udevice *dev) reg_value |= (rate2 & LED_BLINK_RATE2_MASK) << LED_BLINK_RATE2_SHIFT; - cortina_led_write(platdata->ctrl_regs, reg_value); + cortina_led_write(plat->ctrl_regs, reg_value); } else { struct cortina_led_cfg *priv = dev_get_priv(dev); @@ -273,7 +273,7 @@ static int cortina_led_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; } @@ -292,7 +292,7 @@ U_BOOT_DRIVER(cortina_led) = { .ofdata_to_platdata = ca_led_ofdata_to_platdata, .bind = cortina_led_bind, .probe = cortina_led_probe, - .platdata_auto = sizeof(struct cortina_led_platdata), + .plat_auto = sizeof(struct cortina_led_platdata), .priv_auto = sizeof(struct cortina_led_cfg), .ops = &cortina_led_ops, }; diff --git a/drivers/led/led_gpio.c b/drivers/led/led_gpio.c index fe18ae3eed..67ece3cbcd 100644 --- a/drivers/led/led_gpio.c +++ b/drivers/led/led_gpio.c @@ -57,7 +57,7 @@ static enum led_state_t gpio_led_get_state(struct udevice *dev) static int led_gpio_probe(struct udevice *dev) { - struct led_uc_plat *uc_plat = dev_get_uclass_platdata(dev); + struct led_uc_plat *uc_plat = dev_get_uclass_plat(dev); struct led_gpio_priv *priv = dev_get_priv(dev); int ret; @@ -106,7 +106,7 @@ static int led_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; } diff --git a/drivers/misc/altera_sysid.c b/drivers/misc/altera_sysid.c index 509fd7eb55..2bb520f066 100644 --- a/drivers/misc/altera_sysid.c +++ b/drivers/misc/altera_sysid.c @@ -59,7 +59,7 @@ U_BOOT_CMD( static int altera_sysid_read(struct udevice *dev, int offset, void *buf, int size) { - struct altera_sysid_platdata *plat = dev->platdata; + struct altera_sysid_platdata *plat = dev->plat; struct altera_sysid_regs *const regs = plat->regs; u32 *sysid = buf; @@ -94,6 +94,6 @@ U_BOOT_DRIVER(altera_sysid) = { .id = UCLASS_MISC, .of_match = altera_sysid_ids, .ofdata_to_platdata = altera_sysid_ofdata_to_platdata, - .platdata_auto = sizeof(struct altera_sysid_platdata), + .plat_auto = sizeof(struct altera_sysid_platdata), .ops = &altera_sysid_ops, }; diff --git a/drivers/misc/cros_ec_i2c.c b/drivers/misc/cros_ec_i2c.c index 664bd2b938..a1b78a3045 100644 --- a/drivers/misc/cros_ec_i2c.c +++ b/drivers/misc/cros_ec_i2c.c @@ -52,7 +52,7 @@ struct ec_host_response_i2c { static int cros_ec_i2c_packet(struct udevice *udev, int out_bytes, int in_bytes) { struct cros_ec_dev *dev = dev_get_uclass_priv(udev); - struct dm_i2c_chip *chip = dev_get_parent_platdata(udev); + struct dm_i2c_chip *chip = dev_get_parent_plat(udev); struct ec_host_request_i2c *ec_request_i2c = (struct ec_host_request_i2c *)dev->dout; struct ec_host_response_i2c *ec_response_i2c = @@ -112,7 +112,7 @@ static int cros_ec_i2c_command(struct udevice *udev, uint8_t cmd, int dout_len, uint8_t **dinp, int din_len) { struct cros_ec_dev *dev = dev_get_uclass_priv(udev); - struct dm_i2c_chip *chip = dev_get_parent_platdata(udev); + struct dm_i2c_chip *chip = dev_get_parent_plat(udev); struct i2c_msg i2c_msg[2]; /* version8, cmd8, arglen8, out8[dout_len], csum8 */ int out_bytes = dout_len + 4; diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c index 71e20a4927..b149a27b08 100644 --- a/drivers/misc/fs_loader.c +++ b/drivers/misc/fs_loader.c @@ -161,7 +161,7 @@ static int fw_get_filesystem_firmware(struct udevice *dev) else ret = -ENODEV; } else { - ret = select_fs_dev(dev->platdata); + ret = select_fs_dev(dev->plat); } if (ret) @@ -228,7 +228,7 @@ static int fs_loader_ofdata_to_platdata(struct udevice *dev) if (ofnode_valid(fs_loader_node)) { struct device_platdata *plat; - plat = dev->platdata; + plat = dev->plat; if (!ofnode_read_u32_array(fs_loader_node, "phandlepart", phandlepart, 2)) { @@ -250,7 +250,7 @@ static int fs_loader_probe(struct udevice *dev) { #if CONFIG_IS_ENABLED(DM) && CONFIG_IS_ENABLED(BLK) int ret; - struct device_platdata *plat = dev->platdata; + struct device_platdata *plat = dev->plat; if (plat->phandlepart.phandle) { ofnode node = ofnode_get_by_phandle(plat->phandlepart.phandle); @@ -285,7 +285,7 @@ U_BOOT_DRIVER(fs_loader) = { .of_match = fs_loader_ids, .probe = fs_loader_probe, .ofdata_to_platdata = fs_loader_ofdata_to_platdata, - .platdata_auto = sizeof(struct device_platdata), + .plat_auto = sizeof(struct device_platdata), .priv_auto = sizeof(struct firmware), }; diff --git a/drivers/misc/i2c_eeprom_emul.c b/drivers/misc/i2c_eeprom_emul.c index 2089df1e00..65db9c808f 100644 --- a/drivers/misc/i2c_eeprom_emul.c +++ b/drivers/misc/i2c_eeprom_emul.c @@ -201,6 +201,6 @@ U_BOOT_DRIVER(sandbox_i2c_emul) = { .probe = sandbox_i2c_eeprom_probe, .remove = sandbox_i2c_eeprom_remove, .priv_auto = sizeof(struct sandbox_i2c_flash), - .platdata_auto = sizeof(struct sandbox_i2c_flash_plat_data), + .plat_auto = sizeof(struct sandbox_i2c_flash_plat_data), .ops = &sandbox_i2c_emul_ops, }; diff --git a/drivers/misc/imx8/scu.c b/drivers/misc/imx8/scu.c index 5a2a0e6c52..65e34d5320 100644 --- a/drivers/misc/imx8/scu.c +++ b/drivers/misc/imx8/scu.c @@ -245,6 +245,6 @@ U_BOOT_DRIVER(imx8_scu) = { .bind = imx8_scu_bind, .remove = imx8_scu_remove, .ops = &imx8_scu_ops, - .platdata_auto = sizeof(struct imx8_scu), + .plat_auto = sizeof(struct imx8_scu), .flags = DM_FLAG_PRE_RELOC, }; diff --git a/drivers/misc/microchip_flexcom.c b/drivers/misc/microchip_flexcom.c index 43a539e942..1d9ca82b95 100644 --- a/drivers/misc/microchip_flexcom.c +++ b/drivers/misc/microchip_flexcom.c @@ -62,5 +62,5 @@ U_BOOT_DRIVER(microchip_flexcom) = { .id = UCLASS_MISC, .of_match = microchip_flexcom_ids, .ofdata_to_platdata = microchip_flexcom_ofdata_to_platdata, - .platdata_auto = sizeof(struct microchip_flexcom_platdata), + .plat_auto = sizeof(struct microchip_flexcom_platdata), }; diff --git a/drivers/misc/p2sb-uclass.c b/drivers/misc/p2sb-uclass.c index e41c2cd481..ce5630fd3e 100644 --- a/drivers/misc/p2sb-uclass.c +++ b/drivers/misc/p2sb-uclass.c @@ -30,7 +30,7 @@ int p2sb_set_hide(struct udevice *dev, bool hide) void *pcr_reg_address(struct udevice *dev, uint offset) { - struct p2sb_child_platdata *pplat = dev_get_parent_platdata(dev); + struct p2sb_child_platdata *pplat = dev_get_parent_plat(dev); struct udevice *p2sb = dev_get_parent(dev); struct p2sb_uc_priv *upriv = dev_get_uclass_priv(p2sb); uintptr_t reg_addr; @@ -161,7 +161,7 @@ void pcr_clrsetbits8(struct udevice *dev, uint offset, uint clr, uint set) int p2sb_get_port_id(struct udevice *dev) { - struct p2sb_child_platdata *pplat = dev_get_parent_platdata(dev); + struct p2sb_child_platdata *pplat = dev_get_parent_plat(dev); return pplat->pid; } @@ -184,11 +184,11 @@ int p2sb_set_port_id(struct udevice *dev, int portid) * We must allocate this, since when the device was bound it did * not have a parent. */ - dev->parent_platdata = malloc(sizeof(*pplat)); - if (!dev->parent_platdata) + dev->parent_plat = malloc(sizeof(*pplat)); + if (!dev->parent_plat) return -ENOMEM; } - pplat = dev_get_parent_platdata(dev); + pplat = dev_get_parent_plat(dev); pplat->pid = portid; return 0; @@ -197,7 +197,7 @@ int p2sb_set_port_id(struct udevice *dev, int portid) 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; @@ -224,6 +224,6 @@ UCLASS_DRIVER(p2sb) = { .per_device_auto = sizeof(struct p2sb_uc_priv), .post_bind = p2sb_post_bind, .child_post_bind = p2sb_child_post_bind, - .per_child_platdata_auto = + .per_child_plat_auto = sizeof(struct p2sb_child_platdata), }; diff --git a/drivers/misc/p2sb_emul.c b/drivers/misc/p2sb_emul.c index acdc2c099b..642e94f1ec 100644 --- a/drivers/misc/p2sb_emul.c +++ b/drivers/misc/p2sb_emul.c @@ -198,7 +198,7 @@ static int find_p2sb_channel(struct udevice *emul, uint offset, device_foreach_child(dev, p2sb) { struct p2sb_child_platdata *pplat = - dev_get_parent_platdata(dev); + dev_get_parent_plat(dev); log_debug(" - child %s, pid %d, want %d\n", dev->name, pplat->pid, pid); @@ -263,7 +263,7 @@ U_BOOT_DRIVER(sandbox_p2sb_emul_emul) = { .of_match = sandbox_p2sb_emul_ids, .ops = &sandbox_p2sb_emul_emul_ops, .priv_auto = sizeof(struct p2sb_emul_priv), - .platdata_auto = sizeof(struct p2sb_emul_platdata), + .plat_auto = sizeof(struct p2sb_emul_platdata), }; static struct pci_device_id sandbox_p2sb_emul_supported[] = { diff --git a/drivers/misc/rockchip-efuse.c b/drivers/misc/rockchip-efuse.c index 447b180231..d3aa5b9d6f 100644 --- a/drivers/misc/rockchip-efuse.c +++ b/drivers/misc/rockchip-efuse.c @@ -155,6 +155,6 @@ U_BOOT_DRIVER(rockchip_efuse) = { .id = UCLASS_MISC, .of_match = rockchip_efuse_ids, .ofdata_to_platdata = rockchip_efuse_ofdata_to_platdata, - .platdata_auto = sizeof(struct rockchip_efuse_platdata), + .plat_auto = sizeof(struct rockchip_efuse_platdata), .ops = &rockchip_efuse_ops, }; diff --git a/drivers/misc/rockchip-otp.c b/drivers/misc/rockchip-otp.c index 139855adc4..be666bc623 100644 --- a/drivers/misc/rockchip-otp.c +++ b/drivers/misc/rockchip-otp.c @@ -172,5 +172,5 @@ U_BOOT_DRIVER(rockchip_otp) = { .of_match = rockchip_otp_ids, .ops = &rockchip_otp_ops, .ofdata_to_platdata = rockchip_otp_ofdata_to_platdata, - .platdata_auto = sizeof(struct rockchip_otp_platdata), + .plat_auto = sizeof(struct rockchip_otp_platdata), }; diff --git a/drivers/misc/sandbox_adder.c b/drivers/misc/sandbox_adder.c index fed7ecfb92..94eaf234ae 100644 --- a/drivers/misc/sandbox_adder.c +++ b/drivers/misc/sandbox_adder.c @@ -21,7 +21,7 @@ struct sandbox_adder_priv { int sandbox_adder_read(struct udevice *dev, ulong address, void *data, enum axi_size_t size) { - struct p2sb_child_platdata *pplat = dev_get_parent_platdata(dev); + struct p2sb_child_platdata *pplat = dev_get_parent_plat(dev); u32 *val = data; *val = pplat->pid << 24 | address; diff --git a/drivers/misc/sifive-otp.c b/drivers/misc/sifive-otp.c index 3dab126f3a..33c0d68461 100644 --- a/drivers/misc/sifive-otp.c +++ b/drivers/misc/sifive-otp.c @@ -270,6 +270,6 @@ U_BOOT_DRIVER(sifive_otp) = { .id = UCLASS_MISC, .of_match = sifive_otp_ids, .ofdata_to_platdata = sifive_otp_ofdata_to_platdata, - .platdata_auto = sizeof(struct sifive_otp_platdata), + .plat_auto = sizeof(struct sifive_otp_platdata), .ops = &sifive_otp_ops, }; diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c index d75df8e963..5de78410e6 100644 --- a/drivers/misc/swap_case.c +++ b/drivers/misc/swap_case.c @@ -392,7 +392,7 @@ U_BOOT_DRIVER(sandbox_swap_case_emul) = { .of_match = sandbox_swap_case_ids, .ops = &sandbox_swap_case_emul_ops, .priv_auto = sizeof(struct swap_case_priv), - .platdata_auto = sizeof(struct swap_case_platdata), + .plat_auto = sizeof(struct swap_case_platdata), }; static struct pci_device_id sandbox_swap_case_supported[] = { diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c index 926fba6863..2015e31b72 100644 --- a/drivers/mmc/am654_sdhci.c +++ b/drivers/mmc/am654_sdhci.c @@ -495,5 +495,5 @@ U_BOOT_DRIVER(am654_sdhci_drv) = { .bind = am654_sdhci_bind, .probe = am654_sdhci_probe, .priv_auto = sizeof(struct sdhci_host), - .platdata_auto = sizeof(struct am654_sdhci_plat), + .plat_auto = sizeof(struct am654_sdhci_plat), }; diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c index 6c118b4819..6d983d0b02 100644 --- a/drivers/mmc/arm_pl180_mmci.c +++ b/drivers/mmc/arm_pl180_mmci.c @@ -552,6 +552,6 @@ U_BOOT_DRIVER(arm_pl180_mmc) = { .ofdata_to_platdata = arm_pl180_mmc_ofdata_to_platdata, .bind = arm_pl180_mmc_bind, .priv_auto = sizeof(struct pl180_mmc_host), - .platdata_auto = sizeof(struct arm_pl180_mmc_plat), + .plat_auto = sizeof(struct arm_pl180_mmc_plat), }; #endif diff --git a/drivers/mmc/aspeed_sdhci.c b/drivers/mmc/aspeed_sdhci.c index 4bf02c3bb4..1e340f82a1 100644 --- a/drivers/mmc/aspeed_sdhci.c +++ b/drivers/mmc/aspeed_sdhci.c @@ -87,5 +87,5 @@ U_BOOT_DRIVER(aspeed_sdhci_drv) = { .bind = aspeed_sdhci_bind, .probe = aspeed_sdhci_probe, .priv_auto = sizeof(struct sdhci_host), - .platdata_auto = sizeof(struct aspeed_sdhci_plat), + .plat_auto = sizeof(struct aspeed_sdhci_plat), }; diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c index 6f3b21b98d..ee5d0dc4d7 100644 --- a/drivers/mmc/atmel_sdhci.c +++ b/drivers/mmc/atmel_sdhci.c @@ -131,6 +131,6 @@ U_BOOT_DRIVER(atmel_sdhci_drv) = { .bind = atmel_sdhci_bind, .probe = atmel_sdhci_probe, .priv_auto = sizeof(struct sdhci_host), - .platdata_auto = sizeof(struct atmel_sdhci_plat), + .plat_auto = sizeof(struct atmel_sdhci_plat), }; #endif diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c index 7beb3b562c..958129ca2a 100644 --- a/drivers/mmc/bcm2835_sdhci.c +++ b/drivers/mmc/bcm2835_sdhci.c @@ -251,6 +251,6 @@ U_BOOT_DRIVER(sdhci_cdns) = { .bind = bcm2835_sdhci_bind, .probe = bcm2835_sdhci_probe, .priv_auto = sizeof(struct bcm2835_sdhci_host), - .platdata_auto = sizeof(struct bcm2835_sdhci_plat), + .plat_auto = sizeof(struct bcm2835_sdhci_plat), .ops = &sdhci_ops, }; diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c index 06bebc27d3..8531f54c52 100644 --- a/drivers/mmc/bcm2835_sdhost.c +++ b/drivers/mmc/bcm2835_sdhost.c @@ -807,6 +807,6 @@ U_BOOT_DRIVER(bcm2835_sdhost) = { .bind = bcm2835_bind, .probe = bcm2835_probe, .priv_auto = sizeof(struct bcm2835_host), - .platdata_auto = sizeof(struct bcm2835_plat), + .plat_auto = sizeof(struct bcm2835_plat), .ops = &bcm2835_ops, }; diff --git a/drivers/mmc/bcmstb_sdhci.c b/drivers/mmc/bcmstb_sdhci.c index a92467f800..e8041eb30f 100644 --- a/drivers/mmc/bcmstb_sdhci.c +++ b/drivers/mmc/bcmstb_sdhci.c @@ -101,5 +101,5 @@ U_BOOT_DRIVER(sdhci_bcmstb) = { .bind = sdhci_bcmstb_bind, .probe = sdhci_bcmstb_probe, .priv_auto = sizeof(struct sdhci_host), - .platdata_auto = sizeof(struct sdhci_bcmstb_plat), + .plat_auto = sizeof(struct sdhci_bcmstb_plat), }; diff --git a/drivers/mmc/ca_dw_mmc.c b/drivers/mmc/ca_dw_mmc.c index 98d7f6b0b5..f295c54134 100644 --- a/drivers/mmc/ca_dw_mmc.c +++ b/drivers/mmc/ca_dw_mmc.c @@ -167,5 +167,5 @@ U_BOOT_DRIVER(ca_dwmmc_drv) = { .ops = &ca_dwmci_dm_ops, .probe = ca_dwmmc_probe, .priv_auto = sizeof(struct ca_dwmmc_priv_data), - .platdata_auto = sizeof(struct ca_mmc_plat), + .plat_auto = sizeof(struct ca_mmc_plat), }; diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c index 0b9669abbc..d3562c39a9 100644 --- a/drivers/mmc/davinci_mmc.c +++ b/drivers/mmc/davinci_mmc.c @@ -527,7 +527,7 @@ U_BOOT_DRIVER(ti_da830_mmc) = { .id = UCLASS_MMC, #if CONFIG_IS_ENABLED(OF_CONTROL) .of_match = davinci_mmc_ids, - .platdata_auto = sizeof(struct davinci_mmc_plat), + .plat_auto = sizeof(struct davinci_mmc_plat), .ofdata_to_platdata = davinci_mmc_ofdata_to_platdata, #endif #if CONFIG_BLK diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c index 63d00a3141..5cc28c53c2 100644 --- a/drivers/mmc/exynos_dw_mmc.c +++ b/drivers/mmc/exynos_dw_mmc.c @@ -307,6 +307,6 @@ U_BOOT_DRIVER(exynos_dwmmc_drv) = { .ops = &dm_dwmci_ops, .probe = exynos_dwmmc_probe, .priv_auto = sizeof(struct dwmci_exynos_priv_data), - .platdata_auto = sizeof(struct exynos_mmc_plat), + .plat_auto = sizeof(struct exynos_mmc_plat), }; #endif diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index 0a644853f1..ad0dada5a4 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -1136,7 +1136,7 @@ U_BOOT_DRIVER(fsl_esdhc) = { .ops = &fsl_esdhc_ops, .bind = fsl_esdhc_bind, .probe = fsl_esdhc_probe, - .platdata_auto = sizeof(struct fsl_esdhc_plat), + .plat_auto = sizeof(struct fsl_esdhc_plat), .priv_auto = sizeof(struct fsl_esdhc_priv), }; #endif diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index 25129fd690..54a42e0274 100644 --- a/drivers/mmc/fsl_esdhc_imx.c +++ b/drivers/mmc/fsl_esdhc_imx.c @@ -1707,7 +1707,7 @@ U_BOOT_DRIVER(fsl_esdhc) = { .bind = fsl_esdhc_bind, #endif .probe = fsl_esdhc_probe, - .platdata_auto = sizeof(struct fsl_esdhc_plat), + .plat_auto = sizeof(struct fsl_esdhc_plat), .priv_auto = sizeof(struct fsl_esdhc_priv), }; diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c index 5d312df2b4..196c52776e 100644 --- a/drivers/mmc/ftsdc010_mci.c +++ b/drivers/mmc/ftsdc010_mci.c @@ -478,5 +478,5 @@ U_BOOT_DRIVER(ftsdc010_mmc) = { .bind = ftsdc010_mmc_bind, .probe = ftsdc010_mmc_probe, .priv_auto = sizeof(struct ftsdc_priv), - .platdata_auto = sizeof(struct ftsdc010_plat), + .plat_auto = sizeof(struct ftsdc010_plat), }; diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c index c135ee9b7c..6f056aecb6 100644 --- a/drivers/mmc/gen_atmel_mci.c +++ b/drivers/mmc/gen_atmel_mci.c @@ -624,7 +624,7 @@ U_BOOT_DRIVER(atmel_mci) = { .of_match = atmel_mci_ids, .bind = atmel_mci_bind, .probe = atmel_mci_probe, - .platdata_auto = sizeof(struct atmel_mci_plat), + .plat_auto = sizeof(struct atmel_mci_plat), .priv_auto = sizeof(struct atmel_mci_priv), .ops = &atmel_mci_mmc_ops, }; diff --git a/drivers/mmc/hi6220_dw_mmc.c b/drivers/mmc/hi6220_dw_mmc.c index cdc9a44e3e..ae9f5a0310 100644 --- a/drivers/mmc/hi6220_dw_mmc.c +++ b/drivers/mmc/hi6220_dw_mmc.c @@ -113,5 +113,5 @@ U_BOOT_DRIVER(hi6220_dwmmc_drv) = { .bind = hi6220_dwmmc_bind, .probe = hi6220_dwmmc_probe, .priv_auto = sizeof(struct hi6220_dwmmc_priv_data), - .platdata_auto = sizeof(struct hi6220_dwmmc_plat), + .plat_auto = sizeof(struct hi6220_dwmmc_plat), }; diff --git a/drivers/mmc/iproc_sdhci.c b/drivers/mmc/iproc_sdhci.c index e5c453e215..a85697cfa8 100644 --- a/drivers/mmc/iproc_sdhci.c +++ b/drivers/mmc/iproc_sdhci.c @@ -248,5 +248,5 @@ U_BOOT_DRIVER(iproc_sdhci_drv) = { .bind = iproc_sdhci_bind, .probe = iproc_sdhci_probe, .priv_auto = sizeof(struct sdhci_host), - .platdata_auto = sizeof(struct iproc_sdhci_plat), + .plat_auto = sizeof(struct iproc_sdhci_plat), }; diff --git a/drivers/mmc/jz_mmc.c b/drivers/mmc/jz_mmc.c index e3a2823446..99f2c2f40d 100644 --- a/drivers/mmc/jz_mmc.c +++ b/drivers/mmc/jz_mmc.c @@ -502,7 +502,7 @@ U_BOOT_DRIVER(jz_mmc_drv) = { .bind = jz_mmc_bind, .probe = jz_mmc_probe, .priv_auto = sizeof(struct jz_mmc_priv), - .platdata_auto = sizeof(struct jz_mmc_plat), + .plat_auto = sizeof(struct jz_mmc_plat), .ops = &jz_msc_ops, }; #endif /* CONFIG_DM_MMC */ diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c index a03a37783d..6a9662f69a 100644 --- a/drivers/mmc/meson_gx_mmc.c +++ b/drivers/mmc/meson_gx_mmc.c @@ -340,7 +340,7 @@ U_BOOT_DRIVER(meson_mmc) = { .probe = meson_mmc_probe, .bind = meson_mmc_bind, .ofdata_to_platdata = meson_mmc_ofdata_to_platdata, - .platdata_auto = sizeof(struct meson_mmc_platdata), + .plat_auto = sizeof(struct meson_mmc_platdata), }; #ifdef CONFIG_PWRSEQ diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index 269f31afee..53eabc9e61 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -321,7 +321,7 @@ struct blk_desc *mmc_get_blk_desc(struct mmc *mmc) device_find_first_child(mmc->dev, &dev); if (!dev) return NULL; - desc = dev_get_uclass_platdata(dev); + desc = dev_get_uclass_plat(dev); return desc; } @@ -399,7 +399,7 @@ int mmc_bind(struct udevice *dev, struct mmc *mmc, const struct mmc_config *cfg) debug("Cannot create block device\n"); return ret; } - bdesc = dev_get_uclass_platdata(bdev); + bdesc = dev_get_uclass_plat(bdev); mmc->cfg = cfg; mmc->priv = dev; @@ -435,7 +435,7 @@ static int mmc_select_hwpart(struct udevice *bdev, int hwpart) { struct udevice *mmc_dev = dev_get_parent(bdev); struct mmc *mmc = mmc_get_mmc_dev(mmc_dev); - struct blk_desc *desc = dev_get_uclass_platdata(bdev); + struct blk_desc *desc = dev_get_uclass_plat(bdev); int ret; if (desc->hwpart == hwpart) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index a6394bcf30..36aab50f64 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -454,7 +454,7 @@ ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, #endif { #if CONFIG_IS_ENABLED(BLK) - struct blk_desc *block_dev = dev_get_uclass_platdata(dev); + struct blk_desc *block_dev = dev_get_uclass_plat(dev); #endif int dev_num = block_dev->devnum; int err; diff --git a/drivers/mmc/mmc_spi.c b/drivers/mmc/mmc_spi.c index 31c8f06ca6..d0c439729f 100644 --- a/drivers/mmc/mmc_spi.c +++ b/drivers/mmc/mmc_spi.c @@ -468,6 +468,6 @@ U_BOOT_DRIVER(mmc_spi) = { .ops = &mmc_spi_ops, .probe = mmc_spi_probe, .bind = mmc_spi_bind, - .platdata_auto = sizeof(struct mmc_spi_plat), + .plat_auto = sizeof(struct mmc_spi_plat), .priv_auto = sizeof(struct mmc_spi_priv), }; diff --git a/drivers/mmc/mmc_write.c b/drivers/mmc/mmc_write.c index 6a4453ca02..d23b7d9729 100644 --- a/drivers/mmc/mmc_write.c +++ b/drivers/mmc/mmc_write.c @@ -73,7 +73,7 @@ ulong mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt) #endif { #if CONFIG_IS_ENABLED(BLK) - struct blk_desc *block_dev = dev_get_uclass_platdata(dev); + struct blk_desc *block_dev = dev_get_uclass_plat(dev); #endif int dev_num = block_dev->devnum; int err = 0; @@ -193,7 +193,7 @@ ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, #endif { #if CONFIG_IS_ENABLED(BLK) - struct blk_desc *block_dev = dev_get_uclass_platdata(dev); + struct blk_desc *block_dev = dev_get_uclass_plat(dev); #endif int dev_num = block_dev->devnum; lbaint_t cur, blocks_todo = blkcnt; diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c index 049dd33ce4..45bf269a53 100644 --- a/drivers/mmc/msm_sdhci.c +++ b/drivers/mmc/msm_sdhci.c @@ -209,5 +209,5 @@ U_BOOT_DRIVER(msm_sdc_drv) = { .probe = msm_sdc_probe, .remove = msm_sdc_remove, .priv_auto = sizeof(struct msm_sdhc), - .platdata_auto = sizeof(struct msm_sdhc_plat), + .plat_auto = sizeof(struct msm_sdhc_plat), }; diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c index d701a4cd00..59217e59b0 100644 --- a/drivers/mmc/mtk-sd.c +++ b/drivers/mmc/mtk-sd.c @@ -1692,6 +1692,6 @@ U_BOOT_DRIVER(mtk_sd_drv) = { .bind = msdc_drv_bind, .probe = msdc_drv_probe, .ops = &msdc_ops, - .platdata_auto = sizeof(struct msdc_plat), + .plat_auto = sizeof(struct msdc_plat), .priv_auto = sizeof(struct msdc_host), }; diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c index fb803e3be7..4cc16131c2 100644 --- a/drivers/mmc/mv_sdhci.c +++ b/drivers/mmc/mv_sdhci.c @@ -152,6 +152,6 @@ U_BOOT_DRIVER(mv_sdhci_drv) = { .probe = mv_sdhci_probe, .ops = &sdhci_ops, .priv_auto = sizeof(struct sdhci_host), - .platdata_auto = sizeof(struct mv_sdhci_plat), + .plat_auto = sizeof(struct mv_sdhci_plat), }; #endif /* CONFIG_DM_MMC */ diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c index fd43f27ade..a313791586 100644 --- a/drivers/mmc/mxsmmc.c +++ b/drivers/mmc/mxsmmc.c @@ -668,7 +668,7 @@ static const struct dm_mmc_ops mxsmmc_ops = { #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) static int mxsmmc_ofdata_to_platdata(struct udevice *bus) { - struct mxsmmc_platdata *plat = bus->platdata; + struct mxsmmc_platdata *plat = bus->plat; u32 prop[2]; int ret; @@ -719,7 +719,7 @@ U_BOOT_DRIVER(fsl_imx23_mmc) = { #endif .probe = mxsmmc_probe, .priv_auto = sizeof(struct mxsmmc_priv), - .platdata_auto = sizeof(struct mxsmmc_platdata), + .plat_auto = sizeof(struct mxsmmc_platdata), }; U_BOOT_DRIVER_ALIAS(fsl_imx23_mmc, fsl_imx28_mmc) diff --git a/drivers/mmc/nexell_dw_mmc.c b/drivers/mmc/nexell_dw_mmc.c index 680459bae7..d03d589ac6 100644 --- a/drivers/mmc/nexell_dw_mmc.c +++ b/drivers/mmc/nexell_dw_mmc.c @@ -233,5 +233,5 @@ U_BOOT_DRIVER(nexell_dwmmc_drv) = { .bind = nexell_dwmmc_bind, .probe = nexell_dwmmc_probe, .priv_auto = sizeof(struct nexell_dwmmc_priv), - .platdata_auto = sizeof(struct nexell_mmc_plat), + .plat_auto = sizeof(struct nexell_mmc_plat), }; diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index 31003b3cb7..658fd92830 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -2029,7 +2029,7 @@ U_BOOT_DRIVER(omap_hsmmc) = { #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) .of_match = omap_hsmmc_ids, .ofdata_to_platdata = omap_hsmmc_ofdata_to_platdata, - .platdata_auto = sizeof(struct omap_hsmmc_plat), + .plat_auto = sizeof(struct omap_hsmmc_plat), #endif #ifdef CONFIG_BLK .bind = omap_hsmmc_bind, diff --git a/drivers/mmc/pci_mmc.c b/drivers/mmc/pci_mmc.c index 004b3cb7ea..d2cc58fa30 100644 --- a/drivers/mmc/pci_mmc.c +++ b/drivers/mmc/pci_mmc.c @@ -133,7 +133,7 @@ U_BOOT_DRIVER(pci_mmc) = { .probe = pci_mmc_probe, .ops = &sdhci_ops, .priv_auto = sizeof(struct pci_mmc_priv), - .platdata_auto = sizeof(struct pci_mmc_plat), + .plat_auto = sizeof(struct pci_mmc_plat), ACPI_OPS_PTR(&pci_mmc_acpi_ops) }; diff --git a/drivers/mmc/pic32_sdhci.c b/drivers/mmc/pic32_sdhci.c index dd10624dbf..04eece5925 100644 --- a/drivers/mmc/pic32_sdhci.c +++ b/drivers/mmc/pic32_sdhci.c @@ -89,5 +89,5 @@ U_BOOT_DRIVER(pic32_sdhci_drv) = { .bind = pic32_sdhci_bind, .probe = pic32_sdhci_probe, .priv_auto = sizeof(struct sdhci_host), - .platdata_auto = sizeof(struct pic32_sdhci_plat) + .plat_auto = sizeof(struct pic32_sdhci_plat) }; diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c index 211e690463..37c80ef1af 100644 --- a/drivers/mmc/renesas-sdhi.c +++ b/drivers/mmc/renesas-sdhi.c @@ -1015,6 +1015,6 @@ U_BOOT_DRIVER(renesas_sdhi) = { .bind = tmio_sd_bind, .probe = renesas_sdhi_probe, .priv_auto = sizeof(struct tmio_sd_priv), - .platdata_auto = sizeof(struct tmio_sd_plat), + .plat_auto = sizeof(struct tmio_sd_plat), .ops = &renesas_sdhi_ops, }; diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c index e4c5288876..67eb89b2a3 100644 --- a/drivers/mmc/rockchip_dw_mmc.c +++ b/drivers/mmc/rockchip_dw_mmc.c @@ -177,7 +177,7 @@ U_BOOT_DRIVER(rockchip_rk3288_dw_mshc) = { .bind = rockchip_dwmmc_bind, .probe = rockchip_dwmmc_probe, .priv_auto = sizeof(struct rockchip_dwmmc_priv), - .platdata_auto = sizeof(struct rockchip_mmc_plat), + .plat_auto = sizeof(struct rockchip_mmc_plat), }; U_BOOT_DRIVER_ALIAS(rockchip_rk3288_dw_mshc, rockchip_rk3328_dw_mshc) diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c index 131c976eaf..427d41ec62 100644 --- a/drivers/mmc/rockchip_sdhci.c +++ b/drivers/mmc/rockchip_sdhci.c @@ -115,5 +115,5 @@ U_BOOT_DRIVER(arasan_sdhci_drv) = { .bind = rockchip_sdhci_bind, .probe = arasan_sdhci_probe, .priv_auto = sizeof(struct rockchip_sdhc), - .platdata_auto = sizeof(struct rockchip_sdhc_plat), + .plat_auto = sizeof(struct rockchip_sdhc_plat), }; diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c index 6841be6a14..82aff9caaf 100644 --- a/drivers/mmc/s5p_sdhci.c +++ b/drivers/mmc/s5p_sdhci.c @@ -247,6 +247,6 @@ U_BOOT_DRIVER(s5p_sdhci_drv) = { .ops = &sdhci_ops, .probe = s5p_sdhci_probe, .priv_auto = sizeof(struct sdhci_host), - .platdata_auto = sizeof(struct s5p_sdhci_plat), + .plat_auto = sizeof(struct s5p_sdhci_plat), }; #endif /* CONFIG_DM_MMC */ diff --git a/drivers/mmc/sandbox_mmc.c b/drivers/mmc/sandbox_mmc.c index ece0e2d31c..17c6cea1dc 100644 --- a/drivers/mmc/sandbox_mmc.c +++ b/drivers/mmc/sandbox_mmc.c @@ -148,5 +148,5 @@ U_BOOT_DRIVER(mmc_sandbox) = { .bind = sandbox_mmc_bind, .unbind = sandbox_mmc_unbind, .probe = sandbox_mmc_probe, - .platdata_auto = sizeof(struct sandbox_mmc_plat), + .plat_auto = sizeof(struct sandbox_mmc_plat), }; diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c index efc09b9199..ffbac448cd 100644 --- a/drivers/mmc/sdhci-cadence.c +++ b/drivers/mmc/sdhci-cadence.c @@ -310,6 +310,6 @@ U_BOOT_DRIVER(sdhci_cdns) = { .bind = sdhci_cdns_bind, .probe = sdhci_cdns_probe, .priv_auto = sizeof(struct sdhci_host), - .platdata_auto = sizeof(struct sdhci_cdns_plat), + .plat_auto = sizeof(struct sdhci_cdns_plat), .ops = &sdhci_cdns_mmc_ops, }; diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c index f3d10ac8be..723e3e3862 100644 --- a/drivers/mmc/sh_mmcif.c +++ b/drivers/mmc/sh_mmcif.c @@ -744,7 +744,7 @@ U_BOOT_DRIVER(sh_mmcif_mmc) = { .bind = sh_mmcif_dm_bind, .probe = sh_mmcif_dm_probe, .priv_auto = sizeof(struct sh_mmcif_host), - .platdata_auto = sizeof(struct sh_mmcif_plat), + .plat_auto = sizeof(struct sh_mmcif_plat), .ops = &sh_mmcif_dm_ops, }; #endif diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c index 04ce521a51..9fcd0e0e9c 100644 --- a/drivers/mmc/sh_sdhi.c +++ b/drivers/mmc/sh_sdhi.c @@ -903,7 +903,7 @@ U_BOOT_DRIVER(sh_sdhi_mmc) = { .bind = sh_sdhi_dm_bind, .probe = sh_sdhi_dm_probe, .priv_auto = sizeof(struct sh_sdhi_host), - .platdata_auto = sizeof(struct sh_sdhi_plat), + .plat_auto = sizeof(struct sh_sdhi_plat), .ops = &sh_sdhi_dm_ops, }; #endif diff --git a/drivers/mmc/snps_dw_mmc.c b/drivers/mmc/snps_dw_mmc.c index 009933de5e..0533bc2ff6 100644 --- a/drivers/mmc/snps_dw_mmc.c +++ b/drivers/mmc/snps_dw_mmc.c @@ -196,5 +196,5 @@ U_BOOT_DRIVER(snps_dwmmc_drv) = { .bind = snps_dwmmc_bind, .probe = snps_dwmmc_probe, .priv_auto = sizeof(struct snps_dwmci_priv_data), - .platdata_auto = sizeof(struct snps_dwmci_plat), + .plat_auto = sizeof(struct snps_dwmci_plat), }; diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c index 80c4d6ed4d..2d5efb912b 100644 --- a/drivers/mmc/socfpga_dw_mmc.c +++ b/drivers/mmc/socfpga_dw_mmc.c @@ -190,5 +190,5 @@ U_BOOT_DRIVER(socfpga_dwmmc_drv) = { .bind = socfpga_dwmmc_bind, .probe = socfpga_dwmmc_probe, .priv_auto = sizeof(struct dwmci_socfpga_priv_data), - .platdata_auto = sizeof(struct socfpga_dwmci_plat), + .plat_auto = sizeof(struct socfpga_dwmci_plat), }; diff --git a/drivers/mmc/sti_sdhci.c b/drivers/mmc/sti_sdhci.c index 49ddabcbe5..1da569c75d 100644 --- a/drivers/mmc/sti_sdhci.c +++ b/drivers/mmc/sti_sdhci.c @@ -145,5 +145,5 @@ U_BOOT_DRIVER(sti_mmc) = { .ofdata_to_platdata = sti_sdhci_ofdata_to_platdata, .probe = sti_sdhci_probe, .priv_auto = sizeof(struct sdhci_host), - .platdata_auto = sizeof(struct sti_sdhci_plat), + .plat_auto = sizeof(struct sti_sdhci_plat), }; diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c index 80eecb60e8..df5bb781c8 100644 --- a/drivers/mmc/stm32_sdmmc2.c +++ b/drivers/mmc/stm32_sdmmc2.c @@ -718,5 +718,5 @@ U_BOOT_DRIVER(stm32_sdmmc2) = { .probe = stm32_sdmmc2_probe, .bind = stm32_sdmmc_bind, .priv_auto = sizeof(struct stm32_sdmmc2_priv), - .platdata_auto = sizeof(struct stm32_sdmmc2_plat), + .plat_auto = sizeof(struct stm32_sdmmc2_plat), }; diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c index 12e8c99076..7490e86960 100644 --- a/drivers/mmc/sunxi_mmc.c +++ b/drivers/mmc/sunxi_mmc.c @@ -746,7 +746,7 @@ U_BOOT_DRIVER(sunxi_mmc_drv) = { .bind = sunxi_mmc_bind, .probe = sunxi_mmc_probe, .ops = &sunxi_mmc_ops, - .platdata_auto = sizeof(struct sunxi_mmc_plat), + .plat_auto = sizeof(struct sunxi_mmc_plat), .priv_auto = sizeof(struct sunxi_mmc_priv), }; #endif diff --git a/drivers/mmc/tangier_sdhci.c b/drivers/mmc/tangier_sdhci.c index 46e185e317..1a2a0ffd43 100644 --- a/drivers/mmc/tangier_sdhci.c +++ b/drivers/mmc/tangier_sdhci.c @@ -77,5 +77,5 @@ U_BOOT_DRIVER(sdhci_tangier) = { .probe = sdhci_tangier_probe, .ops = &sdhci_ops, .priv_auto = sizeof(struct sdhci_host), - .platdata_auto = sizeof(struct sdhci_tangier_plat), + .plat_auto = sizeof(struct sdhci_tangier_plat), }; diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c index f915c78f5d..8a32156b80 100644 --- a/drivers/mmc/tegra_mmc.c +++ b/drivers/mmc/tegra_mmc.c @@ -771,6 +771,6 @@ U_BOOT_DRIVER(tegra_mmc_drv) = { .bind = tegra_mmc_bind, .probe = tegra_mmc_probe, .ops = &tegra_mmc_ops, - .platdata_auto = sizeof(struct tegra_mmc_plat), + .plat_auto = sizeof(struct tegra_mmc_plat), .priv_auto = sizeof(struct tegra_mmc_priv), }; diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c index ca674272fc..75003a0113 100644 --- a/drivers/mmc/uniphier-sd.c +++ b/drivers/mmc/uniphier-sd.c @@ -85,6 +85,6 @@ U_BOOT_DRIVER(uniphier_mmc) = { .bind = tmio_sd_bind, .probe = uniphier_sd_probe, .priv_auto = sizeof(struct tmio_sd_priv), - .platdata_auto = sizeof(struct tmio_sd_plat), + .plat_auto = sizeof(struct tmio_sd_plat), .ops = &uniphier_sd_ops, }; diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c index c089725819..9925513c01 100644 --- a/drivers/mmc/xenon_sdhci.c +++ b/drivers/mmc/xenon_sdhci.c @@ -565,5 +565,5 @@ U_BOOT_DRIVER(xenon_sdhci_drv) = { .bind = xenon_sdhci_bind, .probe = xenon_sdhci_probe, .priv_auto = sizeof(struct xenon_sdhci_priv), - .platdata_auto = sizeof(struct xenon_sdhci_plat), + .plat_auto = sizeof(struct xenon_sdhci_plat), }; diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c index 2ef63976e9..919e5d77ba 100644 --- a/drivers/mmc/zynq_sdhci.c +++ b/drivers/mmc/zynq_sdhci.c @@ -660,5 +660,5 @@ U_BOOT_DRIVER(arasan_sdhci_drv) = { .bind = arasan_sdhci_bind, .probe = arasan_sdhci_probe, .priv_auto = sizeof(struct arasan_sdhci_priv), - .platdata_auto = sizeof(struct arasan_sdhci_plat), + .plat_auto = sizeof(struct arasan_sdhci_plat), }; diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c index b50d306174..82d4117029 100644 --- a/drivers/mtd/altera_qspi.c +++ b/drivers/mtd/altera_qspi.c @@ -401,6 +401,6 @@ U_BOOT_DRIVER(altera_qspi) = { .id = UCLASS_MTD, .of_match = altera_qspi_ids, .ofdata_to_platdata = altera_qspi_ofdata_to_platdata, - .platdata_auto = sizeof(struct altera_qspi_platdata), + .plat_auto = sizeof(struct altera_qspi_platdata), .probe = altera_qspi_probe, }; diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig index 018e8c597e..ea444436ad 100644 --- a/drivers/mtd/spi/Kconfig +++ b/drivers/mtd/spi/Kconfig @@ -63,7 +63,7 @@ config SF_DEFAULT_MODE to handle the common case when only a single serial flash is present on the system. Not used for boot with device tree; the SPI driver reads - speed and mode from platdata values computed from + speed and mode from plat values computed from available node. config SF_DEFAULT_SPEED @@ -75,7 +75,7 @@ config SF_DEFAULT_SPEED to handle the common case when only a single serial flash is present on the system. Not used for boot with device tree; the SPI driver reads - speed and mode from platdata values computed from + speed and mode from plat values computed from available node. if SPI_FLASH diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c index f52295ad87..26d0dbc96d 100644 --- a/drivers/mtd/spi/sandbox.c +++ b/drivers/mtd/spi/sandbox.c @@ -138,7 +138,7 @@ static int sandbox_sf_probe(struct udevice *dev) dev->name); return ret; } - slave_plat = dev_get_parent_platdata(dev); + slave_plat = dev_get_parent_plat(dev); cs = slave_plat->cs; debug("found at cs %d\n", cs); @@ -601,6 +601,6 @@ U_BOOT_DRIVER(sandbox_sf_emul) = { .probe = sandbox_sf_probe, .remove = sandbox_sf_remove, .priv_auto = sizeof(struct sandbox_spi_flash), - .platdata_auto = sizeof(struct sandbox_spi_flash_plat_data), + .plat_auto = sizeof(struct sandbox_spi_flash_plat_data), .ops = &sandbox_sf_emul_ops, }; diff --git a/drivers/net/ag7xxx.c b/drivers/net/ag7xxx.c index 02565aae7b..adcc20723f 100644 --- a/drivers/net/ag7xxx.c +++ b/drivers/net/ag7xxx.c @@ -1292,6 +1292,6 @@ U_BOOT_DRIVER(eth_ag7xxx) = { .remove = ag7xxx_eth_remove, .ops = &ag7xxx_eth_ops, .priv_auto = sizeof(struct ar7xxx_eth_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c index 7d0c58cd53..becc6a69e1 100644 --- a/drivers/net/altera_tse.c +++ b/drivers/net/altera_tse.c @@ -711,7 +711,7 @@ U_BOOT_DRIVER(altera_tse) = { .of_match = altera_tse_ids, .ops = &altera_tse_ops, .ofdata_to_platdata = altera_tse_ofdata_to_platdata, - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .priv_auto = sizeof(struct altera_tse_priv), .probe = altera_tse_probe, }; diff --git a/drivers/net/bcm6348-eth.c b/drivers/net/bcm6348-eth.c index 6d62246678..7c79e9ad15 100644 --- a/drivers/net/bcm6348-eth.c +++ b/drivers/net/bcm6348-eth.c @@ -533,7 +533,7 @@ U_BOOT_DRIVER(bcm6348_eth) = { .id = UCLASS_ETH, .of_match = bcm6348_eth_ids, .ops = &bcm6348_eth_ops, - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .priv_auto = sizeof(struct bcm6348_eth_priv), .probe = bcm6348_eth_probe, }; diff --git a/drivers/net/bcm6368-eth.c b/drivers/net/bcm6368-eth.c index b0bf0a939d..6e6548add6 100644 --- a/drivers/net/bcm6368-eth.c +++ b/drivers/net/bcm6368-eth.c @@ -637,7 +637,7 @@ U_BOOT_DRIVER(bcm6368_eth) = { .id = UCLASS_ETH, .of_match = bcm6368_eth_ids, .ops = &bcm6368_eth_ops, - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .priv_auto = sizeof(struct bcm6368_eth_priv), .probe = bcm6368_eth_probe, }; diff --git a/drivers/net/bcmgenet.c b/drivers/net/bcmgenet.c index b6ebac220e..9fcb28a344 100644 --- a/drivers/net/bcmgenet.c +++ b/drivers/net/bcmgenet.c @@ -733,6 +733,6 @@ U_BOOT_DRIVER(eth_bcmgenet) = { .probe = bcmgenet_eth_probe, .ops = &bcmgenet_gmac_eth_ops, .priv_auto = sizeof(struct bcmgenet_eth_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c index 26d2ec0970..66d1618773 100644 --- a/drivers/net/dc2114x.c +++ b/drivers/net/dc2114x.c @@ -752,7 +752,7 @@ U_BOOT_DRIVER(eth_dc2114x) = { .probe = dc2114x_probe, .ops = &dc2114x_ops, .priv_auto = sizeof(struct dc2114x_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; U_BOOT_PCI_DEVICE(eth_dc2114x, supported); diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 32b3fc8230..83b31fa6bf 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -740,7 +740,7 @@ int designware_eth_probe(struct udevice *dev) #ifdef CONFIG_DM_PCI /* * If we are on PCI bus, either directly attached to a PCI root port, - * or via a PCI bridge, fill in platdata before we probe the hardware. + * or via a PCI bridge, fill in plat before we probe the hardware. */ if (device_is_on_pci_bus(dev)) { dm_pci_read_config32(dev, PCI_BASE_ADDRESS_0, &iobase); @@ -874,7 +874,7 @@ U_BOOT_DRIVER(eth_designware) = { .remove = designware_eth_remove, .ops = &designware_eth_ops, .priv_auto = sizeof(struct dw_eth_dev), - .platdata_auto = sizeof(struct dw_eth_pdata), + .plat_auto = sizeof(struct dw_eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index de3ece81bc..018cbfd5cb 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -2194,5 +2194,5 @@ U_BOOT_DRIVER(eth_eqos) = { .remove = eqos_remove, .ops = &eqos_ops, .priv_auto = sizeof(struct eqos_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/dwmac_s700.c b/drivers/net/dwmac_s700.c index 2edd7a74df..adb865d02b 100644 --- a/drivers/net/dwmac_s700.c +++ b/drivers/net/dwmac_s700.c @@ -62,6 +62,6 @@ U_BOOT_DRIVER(dwmac_s700) = { .probe = dwmac_s700_probe, .ops = &designware_eth_ops, .priv_auto = sizeof(struct dw_eth_dev), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/net/dwmac_socfpga.c b/drivers/net/dwmac_socfpga.c index 9ab2eeb2bc..ebbbcacfa3 100644 --- a/drivers/net/dwmac_socfpga.c +++ b/drivers/net/dwmac_socfpga.c @@ -119,6 +119,6 @@ U_BOOT_DRIVER(dwmac_socfpga) = { .probe = dwmac_socfpga_probe, .ops = &designware_eth_ops, .priv_auto = sizeof(struct dw_eth_dev), - .platdata_auto = sizeof(struct dwmac_socfpga_platdata), + .plat_auto = sizeof(struct dwmac_socfpga_platdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index 87acfa5daa..49e6be31d1 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -5941,7 +5941,7 @@ U_BOOT_DRIVER(eth_e1000) = { .probe = e1000_eth_probe, .ops = &e1000_eth_ops, .priv_auto = sizeof(struct e1000_hw), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; U_BOOT_PCI_DEVICE(eth_e1000, e1000_supported); diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c index 59582b9121..f47caf1f31 100644 --- a/drivers/net/eepro100.c +++ b/drivers/net/eepro100.c @@ -1010,7 +1010,7 @@ U_BOOT_DRIVER(eth_eepro100) = { .probe = eepro100_probe, .ops = &eepro100_ops, .priv_auto = sizeof(struct eepro100_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; U_BOOT_PCI_DEVICE(eth_eepro100, supported); diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c index cb232f68bc..640db112e5 100644 --- a/drivers/net/ethoc.c +++ b/drivers/net/ethoc.c @@ -751,7 +751,7 @@ U_BOOT_DRIVER(ethoc) = { .remove = ethoc_remove, .ops = ðoc_ops, .priv_auto = sizeof(struct ethoc), - .platdata_auto = sizeof(struct ethoc_eth_pdata), + .plat_auto = sizeof(struct ethoc_eth_pdata), }; #else diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 9740bace99..e3d6c8e786 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1598,6 +1598,6 @@ U_BOOT_DRIVER(fecmxc_gem) = { .remove = fecmxc_remove, .ops = &fecmxc_ops, .priv_auto = sizeof(struct fec_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; #endif diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c index 3a827a97a8..f5fb513a15 100644 --- a/drivers/net/fm/eth.c +++ b/drivers/net/fm/eth.c @@ -1131,7 +1131,7 @@ U_BOOT_DRIVER(eth_fman) = { .remove = fm_eth_remove, .ops = &fm_eth_ops, .priv_auto = sizeof(struct fm_eth), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; #endif /* CONFIG_DM_ETH */ diff --git a/drivers/net/fm/memac_phy.c b/drivers/net/fm/memac_phy.c index 2e97f51c4c..8bd32b0ab7 100644 --- a/drivers/net/fm/memac_phy.c +++ b/drivers/net/fm/memac_phy.c @@ -298,7 +298,7 @@ U_BOOT_DRIVER(fman_mdio) = { .remove = fm_mdio_remove, .ops = &fm_mdio_ops, .priv_auto = sizeof(struct fm_mdio_priv), - .platdata_auto = sizeof(struct mdio_perdev_priv), + .plat_auto = sizeof(struct mdio_perdev_priv), }; #endif /* CONFIG_PHYLIB && CONFIG_DM_MDIO */ #endif /* CONFIG_DM_ETH */ diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c index 07ad44de47..e988fb0205 100644 --- a/drivers/net/fsl_enetc.c +++ b/drivers/net/fsl_enetc.c @@ -69,7 +69,7 @@ void fdt_fixup_enetc_mac(void *blob) continue; pdata = dev_get_platdata(dev); - ppdata = dev_get_parent_platdata(dev); + ppdata = dev_get_parent_plat(dev); devfn = PCI_FUNC(ppdata->devfn); enetc_set_ierb_primary_mac(dev, devfn, pdata->enetaddr); @@ -365,7 +365,7 @@ static int enetc_remove(struct udevice *dev) static int enetc_ls1028a_write_hwaddr(struct udevice *dev) { - struct pci_child_platdata *ppdata = dev_get_parent_platdata(dev); + struct pci_child_platdata *ppdata = dev_get_parent_plat(dev); const int devfn_to_pf[] = {0, 1, 2, -1, -1, -1, 3}; struct eth_pdata *plat = dev_get_platdata(dev); int devfn = PCI_FUNC(ppdata->devfn); @@ -678,7 +678,7 @@ U_BOOT_DRIVER(eth_enetc) = { .remove = enetc_remove, .ops = &enetc_ops, .priv_auto = sizeof(struct enetc_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; static struct pci_device_id enetc_ids[] = { diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c index 1023e1b1d9..6ab27e2d31 100644 --- a/drivers/net/fsl_mcdmafec.c +++ b/drivers/net/fsl_mcdmafec.c @@ -595,5 +595,5 @@ U_BOOT_DRIVER(mcffec) = { .remove = mcdmafec_remove, .ops = &mcdmafec_ops, .priv_auto = sizeof(struct fec_info_dma), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/fsl_mdio.c b/drivers/net/fsl_mdio.c index faeb292e55..5fd11db05f 100644 --- a/drivers/net/fsl_mdio.c +++ b/drivers/net/fsl_mdio.c @@ -249,7 +249,7 @@ U_BOOT_DRIVER(tsec_mdio) = { .remove = tsec_mdio_remove, .ops = &tsec_mdio_ops, .priv_auto = sizeof(struct tsec_mdio_priv), - .platdata_auto = sizeof(struct mdio_perdev_priv), + .plat_auto = sizeof(struct mdio_perdev_priv), }; #endif /* CONFIG_PHYLIB */ #endif /* CONFIG_DM_MDIO */ diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c index aec9ca06b7..dd696f3f22 100644 --- a/drivers/net/ftgmac100.c +++ b/drivers/net/ftgmac100.c @@ -614,6 +614,6 @@ U_BOOT_DRIVER(ftgmac100) = { .remove = ftgmac100_remove, .ops = &ftgmac100_ops, .priv_auto = sizeof(struct ftgmac100_data), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c index 20b8e35516..de7ec4d1fc 100644 --- a/drivers/net/ftmac100.c +++ b/drivers/net/ftmac100.c @@ -441,7 +441,7 @@ U_BOOT_DRIVER(ftmac100) = { .probe = ftmac100_probe, .ops = &ftmac100_ops, .priv_auto = sizeof(struct ftmac100_data), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; #endif diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c index 1b1e7a8f69..0bd1da58e4 100644 --- a/drivers/net/gmac_rockchip.c +++ b/drivers/net/gmac_rockchip.c @@ -760,6 +760,6 @@ U_BOOT_DRIVER(eth_gmac_rockchip) = { .probe = gmac_rockchip_probe, .ops = &gmac_rockchip_eth_ops, .priv_auto = sizeof(struct dw_eth_dev), - .platdata_auto = sizeof(struct gmac_rockchip_platdata), + .plat_auto = sizeof(struct gmac_rockchip_platdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/net/higmacv300.c b/drivers/net/higmacv300.c index 93c2523ac2..208b1678ce 100644 --- a/drivers/net/higmacv300.c +++ b/drivers/net/higmacv300.c @@ -599,5 +599,5 @@ U_BOOT_DRIVER(eth_higmac) = { .remove = higmac_remove, .ops = &higmac_ops, .priv_auto = sizeof(struct higmac_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c index 6340d6317d..b0e6685175 100644 --- a/drivers/net/ks8851_mll.c +++ b/drivers/net/ks8851_mll.c @@ -699,7 +699,7 @@ U_BOOT_DRIVER(ks8851) = { .probe = ks8851_probe, .ops = &ks8851_ops, .priv_auto = sizeof(struct ks_net), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; #endif diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c index 5932b45774..02935f642b 100644 --- a/drivers/net/ldpaa_eth/ldpaa_eth.c +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c @@ -1192,7 +1192,7 @@ U_BOOT_DRIVER(ldpaa_eth) = { .probe = ldpaa_eth_probe, .ops = &ldpaa_eth_ops, .priv_auto = sizeof(struct ldpaa_eth_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; #else diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 2ec3039cf8..4ad37fdc28 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -1336,7 +1336,7 @@ U_BOOT_DRIVER(eth_macb) = { .remove = macb_eth_remove, .ops = &macb_eth_ops, .priv_auto = sizeof(struct macb_device), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; #endif diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c index 7f7a865b82..d0c589352e 100644 --- a/drivers/net/mcffec.c +++ b/drivers/net/mcffec.c @@ -615,5 +615,5 @@ U_BOOT_DRIVER(mcffec) = { .remove = mcffec_remove, .ops = &mcffec_ops, .priv_auto = sizeof(struct fec_info_s), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/mscc_eswitch/jr2_switch.c b/drivers/net/mscc_eswitch/jr2_switch.c index 779377b0db..f0ea6ea4d8 100644 --- a/drivers/net/mscc_eswitch/jr2_switch.c +++ b/drivers/net/mscc_eswitch/jr2_switch.c @@ -965,5 +965,5 @@ U_BOOT_DRIVER(jr2) = { .remove = jr2_remove, .ops = &jr2_ops, .priv_auto = sizeof(struct jr2_private), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/mscc_eswitch/luton_switch.c b/drivers/net/mscc_eswitch/luton_switch.c index 8095f4fabd..1dfd86aa49 100644 --- a/drivers/net/mscc_eswitch/luton_switch.c +++ b/drivers/net/mscc_eswitch/luton_switch.c @@ -738,5 +738,5 @@ U_BOOT_DRIVER(luton) = { .remove = luton_remove, .ops = &luton_ops, .priv_auto = sizeof(struct luton_private), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/mscc_eswitch/ocelot_switch.c b/drivers/net/mscc_eswitch/ocelot_switch.c index 5179b82a63..18e11ec2a9 100644 --- a/drivers/net/mscc_eswitch/ocelot_switch.c +++ b/drivers/net/mscc_eswitch/ocelot_switch.c @@ -652,5 +652,5 @@ U_BOOT_DRIVER(ocelot) = { .remove = ocelot_remove, .ops = &ocelot_ops, .priv_auto = sizeof(struct ocelot_private), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/mscc_eswitch/serval_switch.c b/drivers/net/mscc_eswitch/serval_switch.c index e70f44cc10..e274ee5a06 100644 --- a/drivers/net/mscc_eswitch/serval_switch.c +++ b/drivers/net/mscc_eswitch/serval_switch.c @@ -605,5 +605,5 @@ U_BOOT_DRIVER(serval) = { .remove = serval_remove, .ops = &serval_ops, .priv_auto = sizeof(struct serval_private), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/mscc_eswitch/servalt_switch.c b/drivers/net/mscc_eswitch/servalt_switch.c index 8855640938..59c0d85c4e 100644 --- a/drivers/net/mscc_eswitch/servalt_switch.c +++ b/drivers/net/mscc_eswitch/servalt_switch.c @@ -524,5 +524,5 @@ U_BOOT_DRIVER(servalt) = { .remove = servalt_remove, .ops = &servalt_ops, .priv_auto = sizeof(struct servalt_private), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/mt7628-eth.c b/drivers/net/mt7628-eth.c index 60532111ab..c94d3dd4dc 100644 --- a/drivers/net/mt7628-eth.c +++ b/drivers/net/mt7628-eth.c @@ -652,5 +652,5 @@ U_BOOT_DRIVER(mt7628_eth) = { .probe = mt7628_eth_probe, .ops = &mt7628_eth_ops, .priv_auto = sizeof(struct mt7628_eth_dev), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c index 05fdb44380..31e8547d16 100644 --- a/drivers/net/mtk_eth.c +++ b/drivers/net/mtk_eth.c @@ -1559,7 +1559,7 @@ U_BOOT_DRIVER(mtk_eth) = { .id = UCLASS_ETH, .of_match = mtk_eth_ids, .ofdata_to_platdata = mtk_eth_ofdata_to_platdata, - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .probe = mtk_eth_probe, .remove = mtk_eth_remove, .ops = &mtk_eth_ops, diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c index 0be67152ca..0e4e88e42a 100644 --- a/drivers/net/mvgbe.c +++ b/drivers/net/mvgbe.c @@ -1042,6 +1042,6 @@ U_BOOT_DRIVER(mvgbe) = { .probe = mvgbe_probe, .ops = &mvgbe_ops, .priv_auto = sizeof(struct mvgbe_device), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; #endif /* CONFIG_DM_ETH */ diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index a90a631757..4c478b9b95 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -1831,5 +1831,5 @@ U_BOOT_DRIVER(mvneta) = { .probe = mvneta_probe, .ops = &mvneta_ops, .priv_auto = sizeof(struct mvneta_port), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c index c353aa677d..326f91caad 100644 --- a/drivers/net/mvpp2.c +++ b/drivers/net/mvpp2.c @@ -5425,7 +5425,7 @@ static struct driver mvpp2_driver = { .remove = mvpp2_remove, .ops = &mvpp2_ops, .priv_auto = sizeof(struct mvpp2_port), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ACTIVE_DMA, }; diff --git a/drivers/net/octeontx/nicvf_main.c b/drivers/net/octeontx/nicvf_main.c index 8db46f84a6..3b5ba26c71 100644 --- a/drivers/net/octeontx/nicvf_main.c +++ b/drivers/net/octeontx/nicvf_main.c @@ -569,7 +569,7 @@ U_BOOT_DRIVER(octeontx_vnic) = { .probe = octeontx_vnic_probe, .ops = &octeontx_vnic_ops, .priv_auto = sizeof(struct nicvf), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; static struct pci_device_id octeontx_vnic_supported[] = { diff --git a/drivers/net/octeontx2/rvu_pf.c b/drivers/net/octeontx2/rvu_pf.c index b000b91374..246fca26a4 100644 --- a/drivers/net/octeontx2/rvu_pf.c +++ b/drivers/net/octeontx2/rvu_pf.c @@ -105,7 +105,7 @@ U_BOOT_DRIVER(rvu_pf) = { .remove = rvu_pf_remove, .ops = &nix_eth_ops, .priv_auto = sizeof(struct rvu_pf), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; static struct pci_device_id rvu_pf_supported[] = { diff --git a/drivers/net/pch_gbe.c b/drivers/net/pch_gbe.c index b413a4f249..3829ccc444 100644 --- a/drivers/net/pch_gbe.c +++ b/drivers/net/pch_gbe.c @@ -500,7 +500,7 @@ U_BOOT_DRIVER(eth_pch_gbe) = { .remove = pch_gbe_remove, .ops = &pch_gbe_ops, .priv_auto = sizeof(struct pch_gbe_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c index 9b27033e79..ff9506f391 100644 --- a/drivers/net/pcnet.c +++ b/drivers/net/pcnet.c @@ -690,7 +690,7 @@ U_BOOT_DRIVER(eth_pcnet) = { .probe = pcnet_probe, .ops = &pcnet_ops, .priv_auto = sizeof(struct pcnet_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_UC_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/net/pfe_eth/pfe_eth.c b/drivers/net/pfe_eth/pfe_eth.c index c571324850..53a08dfcd2 100644 --- a/drivers/net/pfe_eth/pfe_eth.c +++ b/drivers/net/pfe_eth/pfe_eth.c @@ -291,5 +291,5 @@ U_BOOT_DRIVER(pfe_eth) = { .remove = pfe_eth_remove, .ops = &pfe_eth_ops, .priv_auto = sizeof(struct pfe_eth_dev), - .platdata_auto = sizeof(struct pfe_eth_pdata) + .plat_auto = sizeof(struct pfe_eth_pdata) }; diff --git a/drivers/net/pic32_eth.c b/drivers/net/pic32_eth.c index ec491256ba..94c296e8f4 100644 --- a/drivers/net/pic32_eth.c +++ b/drivers/net/pic32_eth.c @@ -607,5 +607,5 @@ U_BOOT_DRIVER(pic32_ethernet) = { .remove = pic32_eth_remove, .ops = &pic32_eth_ops, .priv_auto = sizeof(struct pic32eth_dev), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/qe/dm_qe_uec.c b/drivers/net/qe/dm_qe_uec.c index 00e01a41ab..b4052c78d7 100644 --- a/drivers/net/qe/dm_qe_uec.c +++ b/drivers/net/qe/dm_qe_uec.c @@ -1163,5 +1163,5 @@ U_BOOT_DRIVER(eth_qe_uec) = { .remove = qe_uec_remove, .ops = &qe_uec_eth_ops, .priv_auto = sizeof(struct qe_uec_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c index d1a45ceedc..48530c4499 100644 --- a/drivers/net/ravb.c +++ b/drivers/net/ravb.c @@ -690,6 +690,6 @@ U_BOOT_DRIVER(eth_ravb) = { .remove = ravb_remove, .ops = &ravb_ops, .priv_auto = sizeof(struct ravb_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c index 934e0c25d4..c171e54e8c 100644 --- a/drivers/net/rtl8139.c +++ b/drivers/net/rtl8139.c @@ -772,7 +772,7 @@ U_BOOT_DRIVER(eth_rtl8139) = { .probe = rtl8139_probe, .ops = &rtl8139_ops, .priv_auto = sizeof(struct rtl8139_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; U_BOOT_PCI_DEVICE(eth_rtl8139, supported); diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c index 7512f640c2..dc3405e4c4 100644 --- a/drivers/net/rtl8169.c +++ b/drivers/net/rtl8169.c @@ -1187,7 +1187,7 @@ int rtl8169_initialize(struct bd_info *bis) #ifdef CONFIG_DM_ETH static int rtl8169_eth_probe(struct udevice *dev) { - struct pci_child_platdata *pplat = dev_get_parent_platdata(dev); + struct pci_child_platdata *pplat = dev_get_parent_plat(dev); struct rtl8169_private *priv = dev_get_priv(dev); struct eth_pdata *plat = dev_get_platdata(dev); u32 iobase; @@ -1249,7 +1249,7 @@ U_BOOT_DRIVER(eth_rtl8169) = { .probe = rtl8169_eth_probe, .ops = &rtl8169_eth_ops, .priv_auto = sizeof(struct rtl8169_private), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; U_BOOT_PCI_DEVICE(eth_rtl8169, supported); diff --git a/drivers/net/sandbox-raw.c b/drivers/net/sandbox-raw.c index 32f63416b9..76a424ec94 100644 --- a/drivers/net/sandbox-raw.c +++ b/drivers/net/sandbox-raw.c @@ -194,5 +194,5 @@ U_BOOT_DRIVER(eth_sandbox_raw) = { .ofdata_to_platdata = sb_eth_raw_ofdata_to_platdata, .ops = &sb_eth_raw_ops, .priv_auto = sizeof(struct eth_sandbox_raw_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/sandbox.c b/drivers/net/sandbox.c index 4d007ae022..846b802cfa 100644 --- a/drivers/net/sandbox.c +++ b/drivers/net/sandbox.c @@ -447,5 +447,5 @@ U_BOOT_DRIVER(eth_sandbox) = { .remove = sb_eth_remove, .ops = &sb_eth_ops, .priv_auto = sizeof(struct eth_sandbox_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index a5bd4596fd..b1b8731f16 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -958,7 +958,7 @@ U_BOOT_DRIVER(eth_sh_ether) = { .remove = sh_ether_remove, .ops = &sh_ether_ops, .priv_auto = sizeof(struct sh_ether_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; #endif diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index e0083ce8a3..648932d8bc 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -640,7 +640,7 @@ U_BOOT_DRIVER(smc911x) = { .probe = smc911x_probe, .ops = &smc911x_ops, .priv_auto = sizeof(struct smc911x_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; #endif diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c index 301462009b..60153c0141 100644 --- a/drivers/net/sni_ave.c +++ b/drivers/net/sni_ave.c @@ -999,5 +999,5 @@ U_BOOT_DRIVER(ave) = { .ofdata_to_platdata = ave_ofdata_to_platdata, .ops = &ave_ops, .priv_auto = sizeof(struct ave_private), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c index 0fa8ba97b0..3430b229a8 100644 --- a/drivers/net/sun8i_emac.c +++ b/drivers/net/sun8i_emac.c @@ -1005,6 +1005,6 @@ U_BOOT_DRIVER(eth_sun8i_emac) = { .probe = sun8i_emac_eth_probe, .ops = &sun8i_emac_eth_ops, .priv_auto = sizeof(struct emac_eth_dev), - .platdata_auto = sizeof(struct sun8i_eth_pdata), + .plat_auto = sizeof(struct sun8i_eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/net/sunxi_emac.c b/drivers/net/sunxi_emac.c index dfdf3c1f7d..0770a6bfc7 100644 --- a/drivers/net/sunxi_emac.c +++ b/drivers/net/sunxi_emac.c @@ -613,5 +613,5 @@ U_BOOT_DRIVER(eth_sunxi_emac) = { .probe = sunxi_emac_eth_probe, .ops = &sunxi_emac_eth_ops, .priv_auto = sizeof(struct emac_eth_dev), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/ti/am65-cpsw-nuss.c b/drivers/net/ti/am65-cpsw-nuss.c index c8dcefe5e3..ce891fc58e 100644 --- a/drivers/net/ti/am65-cpsw-nuss.c +++ b/drivers/net/ti/am65-cpsw-nuss.c @@ -792,6 +792,6 @@ U_BOOT_DRIVER(am65_cpsw_nuss_slave) = { .probe = am65_cpsw_probe_cpsw, .ops = &am65_cpsw_ops, .priv_auto = sizeof(struct am65_cpsw_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c index 94c10a8234..62348919b6 100644 --- a/drivers/net/ti/cpsw.c +++ b/drivers/net/ti/cpsw.c @@ -1378,7 +1378,7 @@ U_BOOT_DRIVER(eth_cpsw) = { #if CONFIG_IS_ENABLED(OF_CONTROL) .of_match = cpsw_eth_ids, .ofdata_to_platdata = cpsw_eth_ofdata_to_platdata, - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), #endif .probe = cpsw_eth_probe, .ops = &cpsw_eth_ops, diff --git a/drivers/net/ti/davinci_emac.c b/drivers/net/ti/davinci_emac.c index 2f025018aa..9cf7e6cc64 100644 --- a/drivers/net/ti/davinci_emac.c +++ b/drivers/net/ti/davinci_emac.c @@ -865,5 +865,5 @@ U_BOOT_DRIVER(davinci_emac) = { .of_match = davinci_emac_ids, .probe = davinci_emac_probe, .ops = &davinci_emac_ops, - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/ti/keystone_net.c b/drivers/net/ti/keystone_net.c index 62658bc212..b67981e74f 100644 --- a/drivers/net/ti/keystone_net.c +++ b/drivers/net/ti/keystone_net.c @@ -805,7 +805,7 @@ U_BOOT_DRIVER(eth_ks2_slave) = { .remove = ks2_eth_remove, .ops = &ks2_eth_ops, .priv_auto = sizeof(struct ks2_eth_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; @@ -818,6 +818,6 @@ U_BOOT_DRIVER(eth_ks2) = { .remove = ks2_eth_remove, .ops = &ks2_eth_ops, .priv_auto = sizeof(struct ks2_eth_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index 228820484a..8c53059ae2 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -905,7 +905,7 @@ U_BOOT_DRIVER(eth_tsec) = { .remove = tsec_remove, .ops = &tsec_ops, .priv_auto = sizeof(struct tsec_private), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; #endif /* CONFIG_DM_ETH */ diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c index 194985b157..5604a337e0 100644 --- a/drivers/net/xilinx_axi_emac.c +++ b/drivers/net/xilinx_axi_emac.c @@ -792,5 +792,5 @@ U_BOOT_DRIVER(axi_emac) = { .remove = axi_emac_remove, .ops = &axi_emac_ops, .priv_auto = sizeof(struct axidma_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index 03cd4cc9d9..acbf0fa3d2 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -636,5 +636,5 @@ U_BOOT_DRIVER(emaclite) = { .remove = emaclite_remove, .ops = &emaclite_ops, .priv_auto = sizeof(struct xemaclite), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 2df4bc2fc5..ea57be2a40 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -812,5 +812,5 @@ U_BOOT_DRIVER(zynq_gem) = { .remove = zynq_gem_remove, .ops = &zynq_gem_ops, .priv_auto = sizeof(struct zynq_gem_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c index b785549997..cee3f57c87 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -673,7 +673,7 @@ int nvme_scan_namespace(void) static int nvme_blk_probe(struct udevice *udev) { struct nvme_dev *ndev = dev_get_priv(udev->parent); - struct blk_desc *desc = dev_get_uclass_platdata(udev); + struct blk_desc *desc = dev_get_uclass_plat(udev); struct nvme_ns *ns = dev_get_priv(udev); u8 flbas; struct pci_child_platdata *pplat; @@ -704,7 +704,7 @@ static int nvme_blk_probe(struct udevice *udev) desc->log2blksz = ns->lba_shift; desc->blksz = 1 << ns->lba_shift; desc->bdev = udev; - pplat = dev_get_parent_platdata(udev->parent); + pplat = dev_get_parent_plat(udev->parent); sprintf(desc->vendor, "0x%.4x", pplat->vendor); memcpy(desc->product, ndev->serial, sizeof(ndev->serial)); memcpy(desc->revision, ndev->firmware_rev, sizeof(ndev->firmware_rev)); @@ -719,7 +719,7 @@ static ulong nvme_blk_rw(struct udevice *udev, lbaint_t blknr, struct nvme_ns *ns = dev_get_priv(udev); struct nvme_dev *dev = ns->dev; struct nvme_command c; - struct blk_desc *desc = dev_get_uclass_platdata(udev); + struct blk_desc *desc = dev_get_uclass_plat(udev); int status; u64 prp2; u64 total_len = blkcnt << desc->log2blksz; diff --git a/drivers/pci/pci-emul-uclass.c b/drivers/pci/pci-emul-uclass.c index 3ca9a1567c..f71ba42c38 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 f01fcf6106..3a0a4b5ada 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 6093072814..7625d43bc4 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 207ae33624..7deb15fc52 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 fa29d69e85..9c98496d7a 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 d318b33d2b..6de9af9937 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 2ebe4a47de..41c38ed731 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) { diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index aadb290126..f5ed96914b 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -646,6 +646,6 @@ U_BOOT_DRIVER(sun4i_usb_phy) = { .of_match = sun4i_usb_phy_ids, .ops = &sun4i_usb_phy_ops, .probe = sun4i_usb_phy_probe, - .platdata_auto = sizeof(struct sun4i_usb_phy_plat[MAX_PHYS]), + .plat_auto = sizeof(struct sun4i_usb_phy_plat[MAX_PHYS]), .priv_auto = sizeof(struct sun4i_usb_phy_data), }; diff --git a/drivers/phy/phy-bcm-sr-pcie.c b/drivers/phy/phy-bcm-sr-pcie.c index 9f7c983ce4..f0e795333b 100644 --- a/drivers/phy/phy-bcm-sr-pcie.c +++ b/drivers/phy/phy-bcm-sr-pcie.c @@ -172,6 +172,6 @@ U_BOOT_DRIVER(sr_pcie_phy) = { .probe = sr_pcie_phy_probe, .of_match = sr_pcie_phy_match_table, .ops = &sr_pcie_phy_ops, - .platdata_auto = sizeof(struct sr_pcie_phy_core), + .plat_auto = sizeof(struct sr_pcie_phy_core), .priv_auto = sizeof(struct sr_pcie_phy_core), }; diff --git a/drivers/pinctrl/intel/pinctrl.c b/drivers/pinctrl/intel/pinctrl.c index e3d2464634..576e1b4728 100644 --- a/drivers/pinctrl/intel/pinctrl.c +++ b/drivers/pinctrl/intel/pinctrl.c @@ -617,7 +617,7 @@ int intel_pinctrl_ofdata_to_platdata(struct udevice *dev, const struct pad_community *comm, int num_cfgs) { - struct p2sb_child_platdata *pplat = dev_get_parent_platdata(dev); + struct p2sb_child_platdata *pplat = dev_get_parent_plat(dev); struct intel_pinctrl_priv *priv = dev_get_priv(dev); if (!comm) { diff --git a/drivers/pinctrl/intel/pinctrl_apl.c b/drivers/pinctrl/intel/pinctrl_apl.c index 149d511912..a4f46e626d 100644 --- a/drivers/pinctrl/intel/pinctrl_apl.c +++ b/drivers/pinctrl/intel/pinctrl_apl.c @@ -160,7 +160,7 @@ static int apl_pinctrl_ofdata_to_platdata(struct udevice *dev) return log_msg_ret("Could not set port id", ret); #endif /* Attach this device to its community structure */ - pplat = dev_get_parent_platdata(dev); + pplat = dev_get_parent_plat(dev); for (i = 0; i < ARRAY_SIZE(apl_gpio_communities); i++) { if (apl_gpio_communities[i].port == pplat->pid) comm = &apl_gpio_communities[i]; @@ -185,5 +185,5 @@ U_BOOT_DRIVER(intel_apl_pinctrl) = { #endif .ofdata_to_platdata = apl_pinctrl_ofdata_to_platdata, .priv_auto = sizeof(struct intel_pinctrl_priv), - .platdata_auto = sizeof(struct apl_gpio_platdata), + .plat_auto = sizeof(struct apl_gpio_platdata), }; diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c index afd440729e..3bc16bb254 100644 --- a/drivers/pinctrl/pinctrl-at91-pio4.c +++ b/drivers/pinctrl/pinctrl-at91-pio4.c @@ -178,6 +178,6 @@ U_BOOT_DRIVER(atmel_pinctrl) = { .id = UCLASS_PINCTRL, .of_match = atmel_pinctrl_match, .probe = atmel_pinctrl_probe, - .platdata_auto = sizeof(struct atmel_pio4_platdata), + .plat_auto = sizeof(struct atmel_pio4_platdata), .ops = &atmel_pinctrl_ops, }; diff --git a/drivers/pinctrl/pinctrl-qe-io.c b/drivers/pinctrl/pinctrl-qe-io.c index e598797b72..4f7cfaa078 100644 --- a/drivers/pinctrl/pinctrl-qe-io.c +++ b/drivers/pinctrl/pinctrl-qe-io.c @@ -122,7 +122,7 @@ void qe_config_iopin(u8 port, u8 pin, int dir, int open_drain, int assign) #else static int qe_io_ofdata_to_platdata(struct udevice *dev) { - struct qe_io_platdata *plat = dev->platdata; + struct qe_io_platdata *plat = dev->plat; fdt_addr_t addr; addr = dev_read_addr(dev); @@ -143,7 +143,7 @@ static int qe_io_ofdata_to_platdata(struct udevice *dev) */ static int par_io_of_config_node(struct udevice *dev, ofnode pio) { - struct qe_io_platdata *plat = dev->platdata; + struct qe_io_platdata *plat = dev->plat; qepio83xx_t *par_io = plat->base; const unsigned int *pio_map; int pio_map_len; @@ -246,7 +246,7 @@ U_BOOT_DRIVER(par_io_pinctrl) = { .of_match = of_match_ptr(par_io_pinctrl_match), .probe = par_io_pinctrl_probe, .ofdata_to_platdata = qe_io_ofdata_to_platdata, - .platdata_auto = sizeof(struct qe_io_platdata), + .plat_auto = sizeof(struct qe_io_platdata), .ops = &par_io_pinctrl_ops, #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) .flags = DM_FLAG_PRE_RELOC, diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 934be93166..0a3319cce8 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -47,7 +47,7 @@ static int single_configure_pins(struct udevice *dev, const struct single_fdt_pin_cfg *pins, int size) { - struct single_pdata *pdata = dev->platdata; + struct single_pdata *pdata = dev->plat; int count = size / sizeof(struct single_fdt_pin_cfg); phys_addr_t n, reg; u32 val; @@ -81,7 +81,7 @@ static int single_configure_bits(struct udevice *dev, const struct single_fdt_bits_cfg *pins, int size) { - struct single_pdata *pdata = dev->platdata; + struct single_pdata *pdata = dev->plat; int count = size / sizeof(struct single_fdt_bits_cfg); phys_addr_t n, reg; u32 val, mask; @@ -153,7 +153,7 @@ static int single_ofdata_to_platdata(struct udevice *dev) fdt_addr_t addr; u32 of_reg[2]; int res; - struct single_pdata *pdata = dev->platdata; + struct single_pdata *pdata = dev->plat; pdata->width = dev_read_u32_default(dev, "pinctrl-single,register-width", 0); @@ -191,6 +191,6 @@ U_BOOT_DRIVER(single_pinctrl) = { .id = UCLASS_PINCTRL, .of_match = single_pinctrl_match, .ops = &single_pinctrl_ops, - .platdata_auto = sizeof(struct single_pdata), + .plat_auto = sizeof(struct single_pdata), .ofdata_to_platdata = single_ofdata_to_platdata, }; diff --git a/drivers/pinctrl/pinctrl-sti.c b/drivers/pinctrl/pinctrl-sti.c index c147863547..de208d4d7d 100644 --- a/drivers/pinctrl/pinctrl-sti.c +++ b/drivers/pinctrl/pinctrl-sti.c @@ -316,6 +316,6 @@ U_BOOT_DRIVER(pinctrl_sti) = { .of_match = sti_pinctrl_ids, .ops = &sti_pinctrl_ops, .probe = sti_pinctrl_probe, - .platdata_auto = sizeof(struct sti_pinctrl_platdata), + .plat_auto = sizeof(struct sti_pinctrl_platdata), .ops = &sti_pinctrl_ops, }; diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c index e3df0bef01..21c7dc4b76 100644 --- a/drivers/pinctrl/pinctrl-stmfx.c +++ b/drivers/pinctrl/pinctrl-stmfx.c @@ -446,7 +446,7 @@ U_BOOT_DRIVER(stmfx_pinctrl) = { .bind = stmfx_pinctrl_bind, .probe = stmfx_pinctrl_probe, .ops = &stmfx_pinctrl_ops, - .platdata_auto = sizeof(struct stmfx_pinctrl), + .plat_auto = sizeof(struct stmfx_pinctrl), }; static int stmfx_chip_init(struct udevice *dev) @@ -454,7 +454,7 @@ static int stmfx_chip_init(struct udevice *dev) u8 id; u8 version[2]; int ret; - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); ret = dm_i2c_reg_read(dev, STMFX_REG_CHIP_ID); if (ret < 0) { diff --git a/drivers/pinctrl/renesas/pfc-r7s72100.c b/drivers/pinctrl/renesas/pfc-r7s72100.c index c3e6a24de3..ec55caa251 100644 --- a/drivers/pinctrl/renesas/pfc-r7s72100.c +++ b/drivers/pinctrl/renesas/pfc-r7s72100.c @@ -142,6 +142,6 @@ U_BOOT_DRIVER(r7s72100_pfc) = { .id = UCLASS_PINCTRL, .of_match = r7s72100_pfc_match, .probe = r7s72100_pfc_probe, - .platdata_auto = sizeof(struct r7s72100_pfc_platdata), + .plat_auto = sizeof(struct r7s72100_pfc_platdata), .ops = &r7s72100_pfc_ops, }; diff --git a/drivers/power/acpi_pmc/pmc_emul.c b/drivers/power/acpi_pmc/pmc_emul.c index 6872430872..9ce8c16304 100644 --- a/drivers/power/acpi_pmc/pmc_emul.c +++ b/drivers/power/acpi_pmc/pmc_emul.c @@ -236,7 +236,7 @@ U_BOOT_DRIVER(sandbox_pmc_emul_emul) = { .ops = &sandbox_pmc_emul_emul_ops, .probe = sandbox_pmc_probe, .priv_auto = sizeof(struct pmc_emul_priv), - .platdata_auto = sizeof(struct pmc_emul_platdata), + .plat_auto = sizeof(struct pmc_emul_platdata), }; static struct pci_device_id sandbox_pmc_emul_supported[] = { diff --git a/drivers/power/domain/imx8-power-domain-legacy.c b/drivers/power/domain/imx8-power-domain-legacy.c index 33dd4cc2f9..ed88fd7efa 100644 --- a/drivers/power/domain/imx8-power-domain-legacy.c +++ b/drivers/power/domain/imx8-power-domain-legacy.c @@ -377,7 +377,7 @@ U_BOOT_DRIVER(imx8_power_domain) = { .bind = imx8_power_domain_bind, .probe = imx8_power_domain_probe, .ofdata_to_platdata = imx8_power_domain_ofdata_to_platdata, - .platdata_auto = sizeof(struct imx8_power_domain_platdata), + .plat_auto = sizeof(struct imx8_power_domain_platdata), .priv_auto = sizeof(struct imx8_power_domain_priv), .ops = &imx8_power_domain_ops, .flags = DM_FLAG_DEFAULT_PD_CTRL_OFF, diff --git a/drivers/power/domain/imx8m-power-domain.c b/drivers/power/domain/imx8m-power-domain.c index 3736019c22..7e2d232f70 100644 --- a/drivers/power/domain/imx8m-power-domain.c +++ b/drivers/power/domain/imx8m-power-domain.c @@ -137,6 +137,6 @@ U_BOOT_DRIVER(imx8m_power_domain) = { .bind = imx8m_power_domain_bind, .probe = imx8m_power_domain_probe, .ofdata_to_platdata = imx8m_power_domain_ofdata_to_platdata, - .platdata_auto = sizeof(struct imx8m_power_domain_platdata), + .plat_auto = sizeof(struct imx8m_power_domain_platdata), .ops = &imx8m_power_domain_ops, }; diff --git a/drivers/power/pmic/i2c_pmic_emul.c b/drivers/power/pmic/i2c_pmic_emul.c index 633ad15b64..168b8a5ed7 100644 --- a/drivers/power/pmic/i2c_pmic_emul.c +++ b/drivers/power/pmic/i2c_pmic_emul.c @@ -161,6 +161,6 @@ U_BOOT_DRIVER(sandbox_i2c_pmic_emul) = { .of_match = sandbox_i2c_pmic_ids, .ofdata_to_platdata = sandbox_i2c_pmic_ofdata_to_platdata, .probe = sandbox_i2c_pmic_probe, - .platdata_auto = sizeof(struct sandbox_i2c_pmic_plat_data), + .plat_auto = sizeof(struct sandbox_i2c_pmic_plat_data), .ops = &sandbox_i2c_pmic_emul_ops, }; diff --git a/drivers/power/regulator/act8846.c b/drivers/power/regulator/act8846.c index 1783813a15..bdce97365d 100644 --- a/drivers/power/regulator/act8846.c +++ b/drivers/power/regulator/act8846.c @@ -128,10 +128,10 @@ static int reg_get_enable(struct udevice *dev) static int act8846_reg_probe(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; int reg = dev->driver_data; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); uc_pdata->type = reg <= 4 ? REGULATOR_TYPE_BUCK : REGULATOR_TYPE_LDO; uc_pdata->mode_count = 0; diff --git a/drivers/power/regulator/as3722_regulator.c b/drivers/power/regulator/as3722_regulator.c index 0fee9bf00b..ec0776b440 100644 --- a/drivers/power/regulator/as3722_regulator.c +++ b/drivers/power/regulator/as3722_regulator.c @@ -114,9 +114,9 @@ static int ldo_get_enable(struct udevice *dev) static int as3722_stepdown_probe(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); uc_pdata->type = REGULATOR_TYPE_BUCK; @@ -125,9 +125,9 @@ static int as3722_stepdown_probe(struct udevice *dev) static int as3722_ldo_probe(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); uc_pdata->type = REGULATOR_TYPE_LDO; diff --git a/drivers/power/regulator/bd71837.c b/drivers/power/regulator/bd71837.c index ba32f59190..c9d966fdeb 100644 --- a/drivers/power/regulator/bd71837.c +++ b/drivers/power/regulator/bd71837.c @@ -401,7 +401,7 @@ static int bd71837_regulator_probe(struct udevice *dev) { struct bd71837_platdata *plat = dev_get_platdata(dev); int i, ret; - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; int type; struct bd71837_platdata *init_data; int data_amnt; @@ -433,7 +433,7 @@ static int bd71837_regulator_probe(struct udevice *dev) * the initial state matches dt flags and then * write the SEL bit */ - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ret = bd71837_set_enable(dev, !!(uc_pdata->boot_on || uc_pdata->always_on)); @@ -466,5 +466,5 @@ U_BOOT_DRIVER(bd71837_regulator) = { .id = UCLASS_REGULATOR, .ops = &bd71837_regulator_ops, .probe = bd71837_regulator_probe, - .platdata_auto = sizeof(struct bd71837_platdata), + .plat_auto = sizeof(struct bd71837_platdata), }; diff --git a/drivers/power/regulator/da9063.c b/drivers/power/regulator/da9063.c index 4ff7f39677..32be59e49e 100644 --- a/drivers/power/regulator/da9063.c +++ b/drivers/power/regulator/da9063.c @@ -309,7 +309,7 @@ static int buck_set_current_limit(struct udevice *dev, int uA) static int da9063_ldo_probe(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; struct da9063_priv *priv = dev->priv; /* LDOs are named numerically in DT so can directly index */ @@ -318,7 +318,7 @@ static int da9063_ldo_probe(struct udevice *dev) return -EINVAL; priv->reg_info = &da9063_ldo_info[dev->driver_data - 1]; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); uc_pdata->type = REGULATOR_TYPE_LDO; uc_pdata->mode = da9063_ldo_modes; uc_pdata->mode_count = ARRAY_SIZE(da9063_ldo_modes); @@ -328,7 +328,7 @@ static int da9063_ldo_probe(struct udevice *dev) static int da9063_buck_probe(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; struct da9063_priv *priv = dev->priv; int i; @@ -344,7 +344,7 @@ static int da9063_buck_probe(struct udevice *dev) if (!priv->reg_info) return -ENODEV; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); uc_pdata->type = REGULATOR_TYPE_BUCK; uc_pdata->mode = da9063_buck_modes; uc_pdata->mode_count = ARRAY_SIZE(da9063_buck_modes); diff --git a/drivers/power/regulator/fan53555.c b/drivers/power/regulator/fan53555.c index 70aeef710b..709cc63249 100644 --- a/drivers/power/regulator/fan53555.c +++ b/drivers/power/regulator/fan53555.c @@ -103,8 +103,8 @@ struct fan53555_priv { static int fan53555_regulator_ofdata_to_platdata(struct udevice *dev) { struct fan53555_platdata *dev_pdata = dev_get_platdata(dev); - struct dm_regulator_uclass_platdata *uc_pdata = - dev_get_uclass_platdata(dev); + struct dm_regulator_uclass_plat *uc_pdata = + dev_get_uclass_plat(dev); u32 sleep_vsel; /* This is a buck regulator */ @@ -239,7 +239,7 @@ U_BOOT_DRIVER(fan53555_regulator) = { .id = UCLASS_REGULATOR, .ops = &fan53555_regulator_ops, .ofdata_to_platdata = fan53555_regulator_ofdata_to_platdata, - .platdata_auto = sizeof(struct fan53555_platdata), + .plat_auto = sizeof(struct fan53555_platdata), .priv_auto = sizeof(struct fan53555_priv), .probe = fan53555_probe, }; diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c index d887c87ed8..ed27ffc005 100644 --- a/drivers/power/regulator/fixed.c +++ b/drivers/power/regulator/fixed.c @@ -16,11 +16,11 @@ static int fixed_regulator_ofdata_to_platdata(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; struct regulator_common_platdata *dev_pdata; dev_pdata = dev_get_platdata(dev); - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); if (!uc_pdata) return -ENXIO; @@ -31,9 +31,9 @@ static int fixed_regulator_ofdata_to_platdata(struct udevice *dev) static int fixed_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; @@ -47,9 +47,9 @@ static int fixed_regulator_get_value(struct udevice *dev) static int fixed_regulator_get_current(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; @@ -89,5 +89,5 @@ U_BOOT_DRIVER(regulator_fixed) = { .ops = &fixed_regulator_ops, .of_match = fixed_regulator_ids, .ofdata_to_platdata = fixed_regulator_ofdata_to_platdata, - .platdata_auto = sizeof(struct regulator_common_platdata), + .plat_auto = sizeof(struct regulator_common_platdata), }; diff --git a/drivers/power/regulator/gpio-regulator.c b/drivers/power/regulator/gpio-regulator.c index d5998f1d2a..39b0f081e8 100644 --- a/drivers/power/regulator/gpio-regulator.c +++ b/drivers/power/regulator/gpio-regulator.c @@ -27,14 +27,14 @@ struct gpio_regulator_platdata { static int gpio_regulator_ofdata_to_platdata(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; struct gpio_regulator_platdata *dev_pdata; struct gpio_desc *gpio; int ret, count, i, j; u32 states_array[GPIO_REGULATOR_MAX_STATES * 2]; dev_pdata = dev_get_platdata(dev); - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); if (!uc_pdata) return -ENXIO; @@ -79,14 +79,14 @@ static int gpio_regulator_ofdata_to_platdata(struct udevice *dev) static int gpio_regulator_get_value(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; struct gpio_regulator_platdata *dev_pdata = dev_get_platdata(dev); int enable; if (!dev_pdata->gpio.dev) return -ENOSYS; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); if (uc_pdata->min_uV > uc_pdata->max_uV) { debug("Invalid constraints for: %s\n", uc_pdata->name); return -EINVAL; @@ -155,5 +155,5 @@ U_BOOT_DRIVER(gpio_regulator) = { .ops = &gpio_regulator_ops, .of_match = gpio_regulator_ids, .ofdata_to_platdata = gpio_regulator_ofdata_to_platdata, - .platdata_auto = sizeof(struct gpio_regulator_platdata), + .plat_auto = sizeof(struct gpio_regulator_platdata), }; diff --git a/drivers/power/regulator/lp873x_regulator.c b/drivers/power/regulator/lp873x_regulator.c index 5b73f54172..ec1037d7a5 100644 --- a/drivers/power/regulator/lp873x_regulator.c +++ b/drivers/power/regulator/lp873x_regulator.c @@ -24,9 +24,9 @@ static int lp873x_buck_enable(struct udevice *dev, int op, bool *enable) { int ret; unsigned int adr; - 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); adr = uc_pdata->ctrl_reg; ret = pmic_reg_read(dev->parent, adr); @@ -87,9 +87,9 @@ static int lp873x_buck_val(struct udevice *dev, int op, int *uV) { unsigned int hex, adr; int ret; - 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 (op == PMIC_OP_GET) *uV = 0; @@ -126,9 +126,9 @@ static int lp873x_ldo_enable(struct udevice *dev, int op, bool *enable) { int ret; unsigned int adr; - 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); adr = uc_pdata->ctrl_reg; ret = pmic_reg_read(dev->parent, adr); @@ -182,12 +182,12 @@ static int lp873x_ldo_val(struct udevice *dev, int op, int *uV) unsigned int hex, adr; int ret; - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; if (op == PMIC_OP_GET) *uV = 0; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); adr = uc_pdata->volt_reg; @@ -219,9 +219,9 @@ static int lp873x_ldo_val(struct udevice *dev, int op, int *uV) static int lp873x_ldo_probe(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); uc_pdata->type = REGULATOR_TYPE_LDO; int idx = dev->driver_data; @@ -272,10 +272,10 @@ static int ldo_set_enable(struct udevice *dev, bool enable) static int lp873x_buck_probe(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; int idx; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); uc_pdata->type = REGULATOR_TYPE_BUCK; idx = dev->driver_data; diff --git a/drivers/power/regulator/lp87565_regulator.c b/drivers/power/regulator/lp87565_regulator.c index 4ea6c346d7..7214dc1b82 100644 --- a/drivers/power/regulator/lp87565_regulator.c +++ b/drivers/power/regulator/lp87565_regulator.c @@ -23,9 +23,9 @@ static int lp87565_buck_enable(struct udevice *dev, int op, bool *enable) { int ret; unsigned int adr; - 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); adr = uc_pdata->ctrl_reg; ret = pmic_reg_read(dev->parent, adr); @@ -86,9 +86,9 @@ static int lp87565_buck_val(struct udevice *dev, int op, int *uV) { unsigned int hex, adr; int ret; - 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 (op == PMIC_OP_GET) *uV = 0; @@ -123,10 +123,10 @@ static int lp87565_buck_val(struct udevice *dev, int op, int *uV) static int lp87565_buck_probe(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; int idx; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); uc_pdata->type = REGULATOR_TYPE_BUCK; idx = dev->driver_data; diff --git a/drivers/power/regulator/max77686.c b/drivers/power/regulator/max77686.c index 752dc88c40..f05d791b7c 100644 --- a/drivers/power/regulator/max77686.c +++ b/drivers/power/regulator/max77686.c @@ -657,9 +657,9 @@ static int max77686_buck_enable(struct udevice *dev, int op, bool *enable) static int max77686_ldo_probe(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); uc_pdata->type = REGULATOR_TYPE_LDO; uc_pdata->mode_count = max77686_ldo_modes(dev->driver_data, @@ -721,9 +721,9 @@ static int ldo_set_mode(struct udevice *dev, int mode) static int max77686_buck_probe(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); uc_pdata->type = REGULATOR_TYPE_BUCK; uc_pdata->mode_count = max77686_buck_modes(dev->driver_data, diff --git a/drivers/power/regulator/palmas_regulator.c b/drivers/power/regulator/palmas_regulator.c index 78909f7018..aaa5f3cfc6 100644 --- a/drivers/power/regulator/palmas_regulator.c +++ b/drivers/power/regulator/palmas_regulator.c @@ -51,9 +51,9 @@ static int palmas_smps_enable(struct udevice *dev, int op, bool *enable) { int ret; unsigned int adr; - 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); adr = uc_pdata->ctrl_reg; ret = pmic_reg_read(dev->parent, adr); @@ -120,9 +120,9 @@ static int palmas_smps_val(struct udevice *dev, int op, int *uV) unsigned int hex, adr; int ret; bool range; - 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 (op == PMIC_OP_GET) *uV = 0; @@ -163,7 +163,7 @@ static int palmas_smps_val(struct udevice *dev, int op, int *uV) static int palmas_ldo_bypass_enable(struct udevice *dev, bool enabled) { int type = dev_get_driver_data(dev_get_parent(dev)); - struct dm_regulator_uclass_platdata *p; + struct dm_regulator_uclass_plat *p; unsigned int adr; int reg; @@ -177,7 +177,7 @@ static int palmas_ldo_bypass_enable(struct udevice *dev, bool enabled) return -ENOTSUPP; } - p = dev_get_uclass_platdata(dev); + p = dev_get_uclass_plat(dev); adr = p->ctrl_reg; reg = pmic_reg_read(dev->parent, adr); @@ -196,9 +196,9 @@ static int palmas_ldo_enable(struct udevice *dev, int op, bool *enable) { int ret; unsigned int adr; - 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); adr = uc_pdata->ctrl_reg; ret = pmic_reg_read(dev->parent, adr); @@ -256,12 +256,12 @@ static int palmas_ldo_val(struct udevice *dev, int op, int *uV) unsigned int hex, adr; int ret; - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; if (op == PMIC_OP_GET) *uV = 0; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); adr = uc_pdata->volt_reg; @@ -292,10 +292,10 @@ static int palmas_ldo_val(struct udevice *dev, int op, int *uV) static int palmas_ldo_probe(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; struct udevice *parent; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); parent = dev_get_parent(dev); int type = dev_get_driver_data(parent); @@ -356,11 +356,11 @@ static int ldo_set_enable(struct udevice *dev, bool enable) static int palmas_smps_probe(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; struct udevice *parent; int idx; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); parent = dev_get_parent(dev); int type = dev_get_driver_data(parent); diff --git a/drivers/power/regulator/pbias_regulator.c b/drivers/power/regulator/pbias_regulator.c index dc944c9c1d..c01c19efbe 100644 --- a/drivers/power/regulator/pbias_regulator.c +++ b/drivers/power/regulator/pbias_regulator.c @@ -179,9 +179,9 @@ static const struct pbias_reg_info *pbias_reg_infos[] = { static int pbias_regulator_probe(struct udevice *dev) { const struct pbias_reg_info **p = pbias_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; diff --git a/drivers/power/regulator/pfuze100.c b/drivers/power/regulator/pfuze100.c index 8dc517fe41..ebf355c275 100644 --- a/drivers/power/regulator/pfuze100.c +++ b/drivers/power/regulator/pfuze100.c @@ -260,7 +260,7 @@ static struct pfuze100_regulator_desc *se_desc(struct pfuze100_regulator_desc *d static int pfuze100_regulator_probe(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; struct pfuze100_regulator_platdata *plat = dev_get_platdata(dev); struct pfuze100_regulator_desc *desc; @@ -290,7 +290,7 @@ static int pfuze100_regulator_probe(struct udevice *dev) } plat->desc = desc; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); uc_pdata->type = desc->type; if (uc_pdata->type == REGULATOR_TYPE_BUCK) { @@ -386,8 +386,8 @@ static int pfuze100_regulator_enable(struct udevice *dev, int op, bool *enable) { int val; int ret, on_off; - struct dm_regulator_uclass_platdata *uc_pdata = - dev_get_uclass_platdata(dev); + struct dm_regulator_uclass_plat *uc_pdata = + dev_get_uclass_plat(dev); if (op == PMIC_OP_GET) { if (!strcmp(dev->name, "vrefddr")) { @@ -451,8 +451,8 @@ static int pfuze100_regulator_val(struct udevice *dev, int op, int *uV) int val; struct pfuze100_regulator_platdata *plat = dev_get_platdata(dev); struct pfuze100_regulator_desc *desc = plat->desc; - struct dm_regulator_uclass_platdata *uc_pdata = - dev_get_uclass_platdata(dev); + struct dm_regulator_uclass_plat *uc_pdata = + dev_get_uclass_plat(dev); if (op == PMIC_OP_GET) { *uV = 0; @@ -572,5 +572,5 @@ U_BOOT_DRIVER(pfuze100_regulator) = { .id = UCLASS_REGULATOR, .ops = &pfuze100_regulator_ops, .probe = pfuze100_regulator_probe, - .platdata_auto = sizeof(struct pfuze100_regulator_platdata), + .plat_auto = sizeof(struct pfuze100_regulator_platdata), }; diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c index ebd09e778c..9435cc3162 100644 --- a/drivers/power/regulator/pwm_regulator.c +++ b/drivers/power/regulator/pwm_regulator.c @@ -122,9 +122,9 @@ static int pwm_regulator_ofdata_to_platdata(struct udevice *dev) static int pwm_regulator_probe(struct udevice *dev) { struct pwm_regulator_info *priv = dev_get_priv(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); uc_pdata->type = REGULATOR_TYPE_BUCK; uc_pdata->mode_count = 0; diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c index 6192406f6a..7267a89b30 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -15,11 +15,11 @@ int regulator_mode(struct udevice *dev, struct dm_regulator_mode **modep) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; *modep = NULL; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); if (!uc_pdata) return -ENXIO; @@ -51,10 +51,10 @@ static void regulator_set_value_ramp_delay(struct udevice *dev, int old_uV, int regulator_set_value(struct udevice *dev, int uV) { const struct dm_regulator_ops *ops = dev_get_driver_ops(dev); - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; int ret, old_uV = uV, is_enabled = 0; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); if (uc_pdata->min_uV != -ENODATA && uV < uc_pdata->min_uV) return -EINVAL; if (uc_pdata->max_uV != -ENODATA && uV > uc_pdata->max_uV) @@ -82,9 +82,9 @@ int regulator_set_value(struct udevice *dev, int uV) int regulator_set_suspend_value(struct udevice *dev, int uV) { const struct dm_regulator_ops *ops = dev_get_driver_ops(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->min_uV != -ENODATA && uV < uc_pdata->min_uV) return -EINVAL; if (uc_pdata->max_uV != -ENODATA && uV > uc_pdata->max_uV) @@ -133,9 +133,9 @@ int regulator_get_current(struct udevice *dev) int regulator_set_current(struct udevice *dev, int uA) { const struct dm_regulator_ops *ops = dev_get_driver_ops(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->min_uA != -ENODATA && uA < uc_pdata->min_uA) return -EINVAL; if (uc_pdata->max_uA != -ENODATA && uA > uc_pdata->max_uA) @@ -160,13 +160,13 @@ int regulator_get_enable(struct udevice *dev) int regulator_set_enable(struct udevice *dev, bool enable) { const struct dm_regulator_ops *ops = dev_get_driver_ops(dev); - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; int ret, old_enable = 0; if (!ops || !ops->set_enable) return -ENOSYS; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); if (!enable && uc_pdata->always_on) return -EACCES; @@ -241,7 +241,7 @@ int regulator_set_mode(struct udevice *dev, int mode) int regulator_get_by_platname(const char *plat_name, struct udevice **devp) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; struct udevice *dev; int ret; @@ -254,7 +254,7 @@ int regulator_get_by_platname(const char *plat_name, struct udevice **devp) continue; } - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); if (!uc_pdata || strcmp(plat_name, uc_pdata->name)) continue; @@ -280,10 +280,10 @@ int device_get_supply_regulator(struct udevice *dev, const char *supply_name, int regulator_autoset(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; int ret = 0; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ret = regulator_set_suspend_enable(dev, uc_pdata->suspend_on); if (!ret && uc_pdata->suspend_on) { @@ -313,9 +313,9 @@ int regulator_autoset(struct udevice *dev) static void regulator_show(struct udevice *dev, int ret) { - 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); printf("%s@%s: ", dev->name, uc_pdata->name); if (uc_pdata->flags & REGULATOR_FLAG_AUTOSET_UV) @@ -370,7 +370,7 @@ int regulator_list_autoset(const char *list_platname[], static bool regulator_name_is_unique(struct udevice *check_dev, const char *check_name) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; struct udevice *dev; int check_len = strlen(check_name); int ret; @@ -381,7 +381,7 @@ static bool regulator_name_is_unique(struct udevice *check_dev, if (ret || dev == check_dev) continue; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); len = strlen(uc_pdata->name); if (len != check_len) continue; @@ -395,10 +395,10 @@ static bool regulator_name_is_unique(struct udevice *check_dev, static int regulator_post_bind(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; const char *property = "regulator-name"; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); /* Regulator's mandatory constraint */ uc_pdata->name = dev_read_string(dev, property); @@ -421,10 +421,10 @@ static int regulator_post_bind(struct udevice *dev) static int regulator_pre_probe(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; ofnode node; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); if (!uc_pdata) return -ENXIO; @@ -500,6 +500,6 @@ UCLASS_DRIVER(regulator) = { .name = "regulator", .post_bind = regulator_post_bind, .pre_probe = regulator_pre_probe, - .per_device_platdata_auto = - sizeof(struct dm_regulator_uclass_platdata), + .per_device_plat_auto = + sizeof(struct dm_regulator_uclass_plat), }; diff --git a/drivers/power/regulator/rk8xx.c b/drivers/power/regulator/rk8xx.c index a08e2151f9..0ee07ad299 100644 --- a/drivers/power/regulator/rk8xx.c +++ b/drivers/power/regulator/rk8xx.c @@ -1034,9 +1034,9 @@ static int switch_set_value(struct udevice *dev, int uvolt) static int rk8xx_buck_probe(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); uc_pdata->type = REGULATOR_TYPE_BUCK; uc_pdata->mode_count = 0; @@ -1046,9 +1046,9 @@ static int rk8xx_buck_probe(struct udevice *dev) static int rk8xx_ldo_probe(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); uc_pdata->type = REGULATOR_TYPE_LDO; uc_pdata->mode_count = 0; @@ -1058,9 +1058,9 @@ static int rk8xx_ldo_probe(struct udevice *dev) static int rk8xx_switch_probe(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); uc_pdata->type = REGULATOR_TYPE_FIXED; uc_pdata->mode_count = 0; diff --git a/drivers/power/regulator/s2mps11_regulator.c b/drivers/power/regulator/s2mps11_regulator.c index a6b4f158ef..1c6d8358d5 100644 --- a/drivers/power/regulator/s2mps11_regulator.c +++ b/drivers/power/regulator/s2mps11_regulator.c @@ -305,9 +305,9 @@ static int buck_set_mode(struct udevice *dev, int mode) static int s2mps11_buck_probe(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); uc_pdata->type = REGULATOR_TYPE_BUCK; uc_pdata->mode = s2mps11_buck_modes; @@ -581,9 +581,9 @@ static int ldo_set_mode(struct udevice *dev, int mode) static int s2mps11_ldo_probe(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); uc_pdata->type = REGULATOR_TYPE_LDO; uc_pdata->mode = s2mps11_ldo_modes; uc_pdata->mode_count = ARRAY_SIZE(s2mps11_ldo_modes); diff --git a/drivers/power/regulator/s5m8767.c b/drivers/power/regulator/s5m8767.c index b46a2a486e..ad0b98621c 100644 --- a/drivers/power/regulator/s5m8767.c +++ b/drivers/power/regulator/s5m8767.c @@ -130,9 +130,9 @@ static int reg_set_value(struct udevice *dev, const struct s5m8767_para *param, static int s5m8767_ldo_probe(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); uc_pdata->type = REGULATOR_TYPE_LDO; uc_pdata->mode_count = 0; @@ -199,9 +199,9 @@ static int ldo_set_enable(struct udevice *dev, bool enable) static int s5m8767_buck_probe(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); uc_pdata->type = REGULATOR_TYPE_BUCK; uc_pdata->mode_count = 0; diff --git a/drivers/power/regulator/sandbox.c b/drivers/power/regulator/sandbox.c index 9893a6b5f3..c52fe3d108 100644 --- a/drivers/power/regulator/sandbox.c +++ b/drivers/power/regulator/sandbox.c @@ -140,13 +140,13 @@ static int out_set_value(struct udevice *dev, int output_count, int reg_type, static int out_get_mode(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; uint8_t reg_val; uint reg; int ret; int i; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); reg = (dev->driver_data - 1) * OUT_REG_COUNT + OUT_REG_OM; ret = pmic_read(dev->parent, reg, ®_val, 1); @@ -166,13 +166,13 @@ static int out_get_mode(struct udevice *dev) static int out_set_mode(struct udevice *dev, int mode) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; int reg_val = -1; uint reg; int ret; int i; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); if (mode >= uc_pdata->mode_count) return -EINVAL; @@ -246,9 +246,9 @@ static int buck_set_enable(struct udevice *dev, bool enable) static int sandbox_buck_probe(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); uc_pdata->type = REGULATOR_TYPE_BUCK; uc_pdata->mode = sandbox_buck_modes; @@ -322,9 +322,9 @@ static int ldo_set_enable(struct udevice *dev, bool enable) static int sandbox_ldo_probe(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); uc_pdata->type = REGULATOR_TYPE_LDO; uc_pdata->mode = sandbox_ldo_modes; diff --git a/drivers/power/regulator/stpmic1.c b/drivers/power/regulator/stpmic1.c index 3e342f4808..4839d83431 100644 --- a/drivers/power/regulator/stpmic1.c +++ b/drivers/power/regulator/stpmic1.c @@ -184,7 +184,7 @@ static int stpmic1_buck_get_enable(struct udevice *dev) static int stpmic1_buck_set_enable(struct udevice *dev, bool enable) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; int delay = enable ? STPMIC1_DEFAULT_START_UP_DELAY_MS : STPMIC1_DEFAULT_STOP_DELAY_MS; int ret, uv; @@ -194,7 +194,7 @@ static int stpmic1_buck_set_enable(struct udevice *dev, bool enable) return 0; if (enable) { - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); uv = stpmic1_buck_get_value(dev); if (uv < uc_pdata->min_uV || uv > uc_pdata->max_uV) stpmic1_buck_set_value(dev, uc_pdata->min_uV); @@ -231,12 +231,12 @@ static int stpmic1_buck_set_mode(struct udevice *dev, int mode) static int stpmic1_buck_probe(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; if (!dev->driver_data || dev->driver_data > STPMIC1_MAX_BUCK) return -EINVAL; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); uc_pdata->type = REGULATOR_TYPE_BUCK; uc_pdata->mode = (struct dm_regulator_mode *)buck_modes; @@ -363,7 +363,7 @@ static int stpmic1_ldo_get_enable(struct udevice *dev) static int stpmic1_ldo_set_enable(struct udevice *dev, bool enable) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; int delay = enable ? STPMIC1_DEFAULT_START_UP_DELAY_MS : STPMIC1_DEFAULT_STOP_DELAY_MS; int ret, uv; @@ -373,7 +373,7 @@ static int stpmic1_ldo_set_enable(struct udevice *dev, bool enable) return 0; if (enable) { - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); uv = stpmic1_ldo_get_value(dev); if (uv < uc_pdata->min_uV || uv > uc_pdata->max_uV) stpmic1_ldo_set_value(dev, uc_pdata->min_uV); @@ -437,12 +437,12 @@ static int stpmic1_ldo_set_mode(struct udevice *dev, int mode) static int stpmic1_ldo_probe(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; if (!dev->driver_data || dev->driver_data > STPMIC1_MAX_LDO) return -EINVAL; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); uc_pdata->type = REGULATOR_TYPE_LDO; if (dev->driver_data - 1 == STPMIC1_LDO3) { @@ -511,9 +511,9 @@ static int stpmic1_vref_ddr_set_enable(struct udevice *dev, bool enable) static int stpmic1_vref_ddr_probe(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); uc_pdata->type = REGULATOR_TYPE_FIXED; uc_pdata->mode_count = 0; @@ -575,9 +575,9 @@ static int stpmic1_boost_set_enable(struct udevice *dev, bool enable) static int stpmic1_boost_probe(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); uc_pdata->type = REGULATOR_TYPE_FIXED; uc_pdata->mode_count = 0; @@ -648,12 +648,12 @@ static int stpmic1_pwr_sw_set_enable(struct udevice *dev, bool enable) static int stpmic1_pwr_sw_probe(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; if (!dev->driver_data || dev->driver_data > STPMIC1_MAX_PWR_SW) return -EINVAL; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); uc_pdata->type = REGULATOR_TYPE_FIXED; uc_pdata->mode_count = 0; diff --git a/drivers/power/regulator/tps62360_regulator.c b/drivers/power/regulator/tps62360_regulator.c index 57556662f3..e44c6bb17f 100644 --- a/drivers/power/regulator/tps62360_regulator.c +++ b/drivers/power/regulator/tps62360_regulator.c @@ -119,6 +119,6 @@ U_BOOT_DRIVER(tps62360_regulator) = { .id = UCLASS_REGULATOR, .ops = &tps62360_regulator_ops, .of_match = tps62360_regulator_ids, - .platdata_auto = sizeof(struct tps62360_regulator_pdata), + .plat_auto = sizeof(struct tps62360_regulator_pdata), .probe = tps62360_regulator_probe, }; diff --git a/drivers/power/regulator/tps65090_regulator.c b/drivers/power/regulator/tps65090_regulator.c index 9e45627a74..174ee58d03 100644 --- a/drivers/power/regulator/tps65090_regulator.c +++ b/drivers/power/regulator/tps65090_regulator.c @@ -14,9 +14,9 @@ static int tps65090_fet_probe(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); uc_pdata->type = REGULATOR_TYPE_OTHER; uc_pdata->mode_count = 0; diff --git a/drivers/power/regulator/tps65910_regulator.c b/drivers/power/regulator/tps65910_regulator.c index 467ff3f135..3c211a1b3a 100644 --- a/drivers/power/regulator/tps65910_regulator.c +++ b/drivers/power/regulator/tps65910_regulator.c @@ -323,7 +323,7 @@ static int buck_set_vdd1_vdd2_value(struct udevice *dev, int uV) { int ret, reg_vdd, gain; int val; - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; struct tps65910_regulator_pdata *pdata = dev_get_platdata(dev); switch (pdata->unit) { @@ -336,7 +336,7 @@ static int buck_set_vdd1_vdd2_value(struct udevice *dev, int uV) default: return -EINVAL; } - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); /* check setpoint is within limits */ if (uV < uc_pdata->min_uV) { @@ -424,7 +424,7 @@ U_BOOT_DRIVER(tps65910_boost) = { .name = TPS65910_BOOST_DRIVER, .id = UCLASS_REGULATOR, .ops = &tps65910_boost_ops, - .platdata_auto = sizeof(struct tps65910_regulator_pdata), + .plat_auto = sizeof(struct tps65910_regulator_pdata), .ofdata_to_platdata = tps65910_regulator_ofdata_to_platdata, }; @@ -439,7 +439,7 @@ U_BOOT_DRIVER(tps65910_buck) = { .name = TPS65910_BUCK_DRIVER, .id = UCLASS_REGULATOR, .ops = &tps65910_buck_ops, - .platdata_auto = sizeof(struct tps65910_regulator_pdata), + .plat_auto = sizeof(struct tps65910_regulator_pdata), .ofdata_to_platdata = tps65910_regulator_ofdata_to_platdata, }; @@ -454,6 +454,6 @@ U_BOOT_DRIVER(tps65910_ldo) = { .name = TPS65910_LDO_DRIVER, .id = UCLASS_REGULATOR, .ops = &tps65910_ldo_ops, - .platdata_auto = sizeof(struct tps65910_regulator_pdata), + .plat_auto = sizeof(struct tps65910_regulator_pdata), .ofdata_to_platdata = tps65910_regulator_ofdata_to_platdata, }; diff --git a/drivers/power/regulator/tps65941_regulator.c b/drivers/power/regulator/tps65941_regulator.c index 150c72d7ec..d73f832483 100644 --- a/drivers/power/regulator/tps65941_regulator.c +++ b/drivers/power/regulator/tps65941_regulator.c @@ -30,9 +30,9 @@ static int tps65941_buck_enable(struct udevice *dev, int op, bool *enable) { int ret; unsigned int adr; - 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); adr = uc_pdata->ctrl_reg; ret = pmic_reg_read(dev->parent, adr); @@ -121,9 +121,9 @@ static int tps65941_buck_val(struct udevice *dev, int op, int *uV) { unsigned int hex, adr; int ret, delta, uwait, slew; - 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 (op == PMIC_OP_GET) *uV = 0; @@ -182,9 +182,9 @@ static int tps65941_ldo_enable(struct udevice *dev, int op, bool *enable) { int ret; unsigned int adr; - 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); adr = uc_pdata->ctrl_reg; ret = pmic_reg_read(dev->parent, adr); @@ -227,9 +227,9 @@ static int tps65941_ldo_val(struct udevice *dev, int op, int *uV) { unsigned int hex, adr; int ret; - 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 (op == PMIC_OP_GET) *uV = 0; @@ -264,10 +264,10 @@ static int tps65941_ldo_val(struct udevice *dev, int op, int *uV) static int tps65941_ldo_probe(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; int idx; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); uc_pdata->type = REGULATOR_TYPE_LDO; idx = dev->driver_data; @@ -286,10 +286,10 @@ static int tps65941_ldo_probe(struct udevice *dev) static int tps65941_buck_probe(struct udevice *dev) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; int idx; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); uc_pdata->type = REGULATOR_TYPE_BUCK; idx = dev->driver_data; diff --git a/drivers/ram/imxrt_sdram.c b/drivers/ram/imxrt_sdram.c index da5eb8255b..03d0d88fc9 100644 --- a/drivers/ram/imxrt_sdram.c +++ b/drivers/ram/imxrt_sdram.c @@ -441,5 +441,5 @@ U_BOOT_DRIVER(imxrt_semc) = { .ops = &imxrt_semc_ops, .ofdata_to_platdata = imxrt_semc_ofdata_to_platdata, .probe = imxrt_semc_probe, - .platdata_auto = sizeof(struct imxrt_sdram_params), + .plat_auto = sizeof(struct imxrt_sdram_params), }; diff --git a/drivers/ram/octeon/octeon_ddr.c b/drivers/ram/octeon/octeon_ddr.c index 98803c110f..6bec68d1da 100644 --- a/drivers/ram/octeon/octeon_ddr.c +++ b/drivers/ram/octeon/octeon_ddr.c @@ -2724,5 +2724,5 @@ U_BOOT_DRIVER(octeon_ddr) = { .of_match = octeon_ids, .ops = &octeon_ops, .probe = octeon_ddr_probe, - .platdata_auto = sizeof(struct ddr_priv), + .plat_auto = sizeof(struct ddr_priv), }; diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c index bc9b5dfbe3..4e586309bd 100644 --- a/drivers/ram/rockchip/dmc-rk3368.c +++ b/drivers/ram/rockchip/dmc-rk3368.c @@ -1002,5 +1002,5 @@ U_BOOT_DRIVER(rockchip_rk3368_dmc) = { .ofdata_to_platdata = rk3368_dmc_ofdata_to_platdata, .probe = rk3368_dmc_probe, .priv_auto = sizeof(struct dram_info), - .platdata_auto = sizeof(struct rk3368_sdram_params), + .plat_auto = sizeof(struct rk3368_sdram_params), }; diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c index 38db1119ee..9b9ef9c9e0 100644 --- a/drivers/ram/rockchip/sdram_rk3188.c +++ b/drivers/ram/rockchip/sdram_rk3188.c @@ -956,6 +956,6 @@ U_BOOT_DRIVER(rockchip_rk3188_dmc) = { .probe = rk3188_dmc_probe, .priv_auto = sizeof(struct dram_info), #ifdef CONFIG_SPL_BUILD - .platdata_auto = sizeof(struct rk3188_sdram_params), + .plat_auto = sizeof(struct rk3188_sdram_params), #endif }; diff --git a/drivers/ram/rockchip/sdram_rk322x.c b/drivers/ram/rockchip/sdram_rk322x.c index 9b39332a32..459d3a4cb5 100644 --- a/drivers/ram/rockchip/sdram_rk322x.c +++ b/drivers/ram/rockchip/sdram_rk322x.c @@ -849,7 +849,7 @@ U_BOOT_DRIVER(dmc_rk322x) = { .probe = rk322x_dmc_probe, .priv_auto = sizeof(struct dram_info), #ifdef CONFIG_TPL_BUILD - .platdata_auto = sizeof(struct rk322x_sdram_params), + .plat_auto = sizeof(struct rk322x_sdram_params), #endif }; diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c index a909502207..e034054ee3 100644 --- a/drivers/ram/rockchip/sdram_rk3288.c +++ b/drivers/ram/rockchip/sdram_rk3288.c @@ -1126,6 +1126,6 @@ U_BOOT_DRIVER(rockchip_rk3288_dmc) = { .priv_auto = sizeof(struct dram_info), #if defined(CONFIG_TPL_BUILD) || \ (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) - .platdata_auto = sizeof(struct rk3288_sdram_params), + .plat_auto = sizeof(struct rk3288_sdram_params), #endif }; diff --git a/drivers/ram/rockchip/sdram_rk3328.c b/drivers/ram/rockchip/sdram_rk3328.c index 961c95856a..634fd419f3 100644 --- a/drivers/ram/rockchip/sdram_rk3328.c +++ b/drivers/ram/rockchip/sdram_rk3328.c @@ -617,6 +617,6 @@ U_BOOT_DRIVER(rockchip_rk3328_dmc) = { .probe = rk3328_dmc_probe, .priv_auto = sizeof(struct dram_info), #ifdef CONFIG_TPL_BUILD - .platdata_auto = sizeof(struct rockchip_dmc_plat), + .plat_auto = sizeof(struct rockchip_dmc_plat), #endif }; diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index b36c98250e..b1d1f92253 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -3181,6 +3181,6 @@ U_BOOT_DRIVER(dmc_rk3399) = { .priv_auto = sizeof(struct dram_info), #if defined(CONFIG_TPL_BUILD) || \ (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) - .platdata_auto = sizeof(struct rockchip_dmc_plat), + .plat_auto = sizeof(struct rockchip_dmc_plat), #endif }; diff --git a/drivers/ram/sifive/fu540_ddr.c b/drivers/ram/sifive/fu540_ddr.c index f981093611..97e32f383b 100644 --- a/drivers/ram/sifive/fu540_ddr.c +++ b/drivers/ram/sifive/fu540_ddr.c @@ -404,6 +404,6 @@ U_BOOT_DRIVER(fu540_ddr) = { .probe = fu540_ddr_probe, .priv_auto = sizeof(struct fu540_ddr_info), #if defined(CONFIG_SPL_BUILD) - .platdata_auto = sizeof(struct sifive_dmc_plat), + .plat_auto = sizeof(struct sifive_dmc_plat), #endif }; diff --git a/drivers/ram/stm32_sdram.c b/drivers/ram/stm32_sdram.c index 82c7e95522..ce3ea033a0 100644 --- a/drivers/ram/stm32_sdram.c +++ b/drivers/ram/stm32_sdram.c @@ -409,5 +409,5 @@ U_BOOT_DRIVER(stm32_fmc) = { .ops = &stm32_fmc_ops, .ofdata_to_platdata = stm32_fmc_ofdata_to_platdata, .probe = stm32_fmc_probe, - .platdata_auto = sizeof(struct stm32_sdram_params), + .plat_auto = sizeof(struct stm32_sdram_params), }; diff --git a/drivers/remoteproc/rproc-uclass.c b/drivers/remoteproc/rproc-uclass.c index 41ac001d96..cc640b311b 100644 --- a/drivers/remoteproc/rproc-uclass.c +++ b/drivers/remoteproc/rproc-uclass.c @@ -42,7 +42,7 @@ static int for_each_remoteproc_device(int (*fn) (struct udevice *dev, ret = uclass_find_next_device(&dev)) { if (ret || dev == skip_dev) continue; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ret = fn(dev, uc_pdata, data); if (ret) return ret; @@ -111,11 +111,11 @@ static int rproc_pre_probe(struct udevice *dev) struct dm_rproc_uclass_pdata *uc_pdata; const struct dm_rproc_ops *ops; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); /* See if we need to populate via fdt */ - if (!dev->platdata) { + if (!dev->plat) { #if CONFIG_IS_ENABLED(OF_CONTROL) int node = dev_of_offset(dev); const void *blob = gd->fdt_blob; @@ -140,7 +140,7 @@ static int rproc_pre_probe(struct udevice *dev) #endif } else { - struct dm_rproc_uclass_pdata *pdata = dev->platdata; + struct dm_rproc_uclass_pdata *pdata = dev->plat; debug("'%s': using legacy data\n", dev->name); if (pdata->name) @@ -210,7 +210,7 @@ UCLASS_DRIVER(rproc) = { .flags = DM_UC_FLAG_SEQ_ALIAS, .pre_probe = rproc_pre_probe, .post_probe = rproc_post_probe, - .per_device_platdata_auto = + .per_device_plat_auto = sizeof(struct dm_rproc_uclass_pdata), }; @@ -306,7 +306,7 @@ int rproc_load(int id, ulong addr, ulong size) return ret; } - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ops = rproc_get_ops(dev); if (!ops) { @@ -366,7 +366,7 @@ static int _rproc_ops_wrapper(int id, enum rproc_ops op) return ret; } - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ops = rproc_get_ops(dev); if (!ops) { diff --git a/drivers/remoteproc/sandbox_testproc.c b/drivers/remoteproc/sandbox_testproc.c index 7126888698..ee2ee73071 100644 --- a/drivers/remoteproc/sandbox_testproc.c +++ b/drivers/remoteproc/sandbox_testproc.c @@ -128,7 +128,7 @@ static int sandbox_testproc_probe(struct udevice *dev) struct sandbox_test_devdata *ddata; int ret; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ddata = dev_get_priv(dev); if (!ddata) { debug("%s: platform private data missing\n", uc_pdata->name); @@ -151,7 +151,7 @@ static int sandbox_testproc_init(struct udevice *dev) struct dm_rproc_uclass_pdata *uc_pdata; int ret; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ret = sandbox_dev_move_to_state(dev, sb_init); @@ -173,7 +173,7 @@ static int sandbox_testproc_reset(struct udevice *dev) struct dm_rproc_uclass_pdata *uc_pdata; int ret; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ret = sandbox_dev_move_to_state(dev, sb_reset); @@ -197,7 +197,7 @@ static int sandbox_testproc_load(struct udevice *dev, ulong addr, ulong size) struct dm_rproc_uclass_pdata *uc_pdata; int ret; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ret = sandbox_dev_move_to_state(dev, sb_loaded); @@ -220,7 +220,7 @@ static int sandbox_testproc_start(struct udevice *dev) struct dm_rproc_uclass_pdata *uc_pdata; int ret; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ret = sandbox_dev_move_to_state(dev, sb_running); @@ -242,7 +242,7 @@ static int sandbox_testproc_stop(struct udevice *dev) struct dm_rproc_uclass_pdata *uc_pdata; int ret; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ret = sandbox_dev_move_to_state(dev, sb_init); @@ -265,7 +265,7 @@ static int sandbox_testproc_is_running(struct udevice *dev) struct sandbox_test_devdata *ddata; int ret = 1; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ddata = dev_get_priv(dev); if (ddata->current_state == sb_running) @@ -287,7 +287,7 @@ static int sandbox_testproc_ping(struct udevice *dev) struct sandbox_test_devdata *ddata; int ret; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ddata = dev_get_priv(dev); if (ddata->current_state == sb_running) @@ -354,5 +354,5 @@ static struct dm_rproc_uclass_pdata proc_3_test = { U_BOOT_DEVICE(proc_3_demo) = { .name = "sandbox_test_proc", - .platdata = &proc_3_test, + .plat = &proc_3_test, }; diff --git a/drivers/remoteproc/ti_power_proc.c b/drivers/remoteproc/ti_power_proc.c index 14bb2d95ba..9dbbb44e95 100644 --- a/drivers/remoteproc/ti_power_proc.c +++ b/drivers/remoteproc/ti_power_proc.c @@ -71,7 +71,7 @@ static int ti_powerproc_probe(struct udevice *dev) struct ti_powerproc_privdata *priv; int ret; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); priv = dev_get_priv(dev); ret = ti_of_to_priv(dev, priv); @@ -96,7 +96,7 @@ static int ti_powerproc_load(struct udevice *dev, ulong addr, ulong size) struct ti_powerproc_privdata *priv; int ret; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); if (!uc_pdata) { debug("%s: no uc pdata!\n", dev->name); return -EINVAL; @@ -131,7 +131,7 @@ static int ti_powerproc_start(struct udevice *dev) struct ti_powerproc_privdata *priv; int ret; - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); if (!uc_pdata) { debug("%s: no uc pdata!\n", dev->name); return -EINVAL; diff --git a/drivers/rng/meson-rng.c b/drivers/rng/meson-rng.c index fedde65395..e7febc42cd 100644 --- a/drivers/rng/meson-rng.c +++ b/drivers/rng/meson-rng.c @@ -116,6 +116,6 @@ U_BOOT_DRIVER(meson_rng) = { .ops = &meson_rng_ops, .probe = meson_rng_probe, .remove = meson_rng_remove, - .platdata_auto = sizeof(struct meson_rng_platdata), + .plat_auto = sizeof(struct meson_rng_platdata), .ofdata_to_platdata = meson_rng_ofdata_to_platdata, }; diff --git a/drivers/rng/stm32mp1_rng.c b/drivers/rng/stm32mp1_rng.c index 4eed1de8ad..abfcbab663 100644 --- a/drivers/rng/stm32mp1_rng.c +++ b/drivers/rng/stm32mp1_rng.c @@ -160,6 +160,6 @@ U_BOOT_DRIVER(stm32_rng) = { .ops = &stm32_rng_ops, .probe = stm32_rng_probe, .remove = stm32_rng_remove, - .platdata_auto = sizeof(struct stm32_rng_platdata), + .plat_auto = sizeof(struct stm32_rng_platdata), .ofdata_to_platdata = stm32_rng_ofdata_to_platdata, }; diff --git a/drivers/rtc/i2c_rtc_emul.c b/drivers/rtc/i2c_rtc_emul.c index 762769d54c..59043a7230 100644 --- a/drivers/rtc/i2c_rtc_emul.c +++ b/drivers/rtc/i2c_rtc_emul.c @@ -231,6 +231,6 @@ U_BOOT_DRIVER(sandbox_i2c_rtc_emul) = { .of_match = sandbox_i2c_rtc_ids, .bind = sandbox_i2c_rtc_bind, .priv_auto = sizeof(struct sandbox_i2c_rtc), - .platdata_auto = sizeof(struct sandbox_i2c_rtc_plat_data), + .plat_auto = sizeof(struct sandbox_i2c_rtc_plat_data), .ops = &sandbox_i2c_rtc_emul_ops, }; diff --git a/drivers/rtc/pcf2127.c b/drivers/rtc/pcf2127.c index 88ff8c52c3..57f86401d3 100644 --- a/drivers/rtc/pcf2127.c +++ b/drivers/rtc/pcf2127.c @@ -25,7 +25,7 @@ static int pcf2127_rtc_read(struct udevice *dev, uint offset, u8 *buffer, uint len) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); struct i2c_msg msg; int ret; diff --git a/drivers/rtc/pl031.c b/drivers/rtc/pl031.c index 7a6d86d3bf..93d5a6a385 100644 --- a/drivers/rtc/pl031.c +++ b/drivers/rtc/pl031.c @@ -137,6 +137,6 @@ U_BOOT_DRIVER(rtc_pl031) = { .of_match = pl031_ids, .probe = pl031_probe, .ofdata_to_platdata = pl031_ofdata_to_platdata, - .platdata_auto = sizeof(struct pl031_platdata), + .plat_auto = sizeof(struct pl031_platdata), .ops = &pl031_ops, }; diff --git a/drivers/scsi/scsi-uclass.c b/drivers/scsi/scsi-uclass.c index 2b34d0516e..e9970a7e33 100644 --- a/drivers/scsi/scsi-uclass.c +++ b/drivers/scsi/scsi-uclass.c @@ -35,5 +35,5 @@ int scsi_bus_reset(struct udevice *dev) UCLASS_DRIVER(scsi) = { .id = UCLASS_SCSI, .name = "scsi", - .per_device_platdata_auto = sizeof(struct scsi_platdata), + .per_device_plat_auto = sizeof(struct scsi_platdata), }; diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 0ab1d441f4..6e291e4799 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -149,9 +149,9 @@ static void scsi_setup_write_ext(struct scsi_cmd *pccb, lbaint_t start, static ulong scsi_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, void *buffer) { - struct blk_desc *block_dev = dev_get_uclass_platdata(dev); + struct blk_desc *block_dev = dev_get_uclass_plat(dev); struct udevice *bdev = dev->parent; - struct scsi_platdata *uc_plat = dev_get_uclass_platdata(bdev); + struct scsi_platdata *uc_plat = dev_get_uclass_plat(bdev); lbaint_t start, blks, max_blks; uintptr_t buf_addr; unsigned short smallblks = 0; @@ -219,9 +219,9 @@ static ulong scsi_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, static ulong scsi_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, const void *buffer) { - struct blk_desc *block_dev = dev_get_uclass_platdata(dev); + struct blk_desc *block_dev = dev_get_uclass_plat(dev); struct udevice *bdev = dev->parent; - struct scsi_platdata *uc_plat = dev_get_uclass_platdata(bdev); + struct scsi_platdata *uc_plat = dev_get_uclass_plat(bdev); lbaint_t start, blks, max_blks; uintptr_t buf_addr; unsigned short smallblks; @@ -586,7 +586,7 @@ static int do_scsi_scan_one(struct udevice *dev, int id, int lun, bool verbose) return ret; } - bdesc = dev_get_uclass_platdata(bdev); + bdesc = dev_get_uclass_plat(bdev); bdesc->target = id; bdesc->lun = lun; bdesc->removable = bd.removable; @@ -604,7 +604,7 @@ static int do_scsi_scan_one(struct udevice *dev, int id, int lun, bool verbose) int scsi_scan_dev(struct udevice *dev, bool verbose) { - struct scsi_platdata *uc_plat; /* scsi controller platdata */ + struct scsi_platdata *uc_plat; /* scsi controller plat */ int ret; int i; int lun; @@ -614,8 +614,8 @@ int scsi_scan_dev(struct udevice *dev, bool verbose) if (ret) return ret; - /* Get controller platdata */ - uc_plat = dev_get_uclass_platdata(dev); + /* Get controller plat */ + uc_plat = dev_get_uclass_plat(dev); for (i = 0; i < uc_plat->max_id; i++) for (lun = 0; lun < uc_plat->max_lun; lun++) diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c index 173ac240ea..01dc41ebc0 100644 --- a/drivers/serial/altera_jtag_uart.c +++ b/drivers/serial/altera_jtag_uart.c @@ -37,7 +37,7 @@ static int altera_jtaguart_setbrg(struct udevice *dev, int baudrate) static int altera_jtaguart_putc(struct udevice *dev, const char ch) { - struct altera_jtaguart_platdata *plat = dev->platdata; + struct altera_jtaguart_platdata *plat = dev->plat; struct altera_jtaguart_regs *const regs = plat->regs; u32 st = readl(®s->control); @@ -56,7 +56,7 @@ static int altera_jtaguart_putc(struct udevice *dev, const char ch) static int altera_jtaguart_pending(struct udevice *dev, bool input) { - struct altera_jtaguart_platdata *plat = dev->platdata; + struct altera_jtaguart_platdata *plat = dev->plat; struct altera_jtaguart_regs *const regs = plat->regs; u32 st = readl(®s->control); @@ -68,7 +68,7 @@ static int altera_jtaguart_pending(struct udevice *dev, bool input) static int altera_jtaguart_getc(struct udevice *dev) { - struct altera_jtaguart_platdata *plat = dev->platdata; + struct altera_jtaguart_platdata *plat = dev->plat; struct altera_jtaguart_regs *const regs = plat->regs; u32 val; @@ -83,7 +83,7 @@ static int altera_jtaguart_getc(struct udevice *dev) static int altera_jtaguart_probe(struct udevice *dev) { #ifdef CONFIG_ALTERA_JTAG_UART_BYPASS - struct altera_jtaguart_platdata *plat = dev->platdata; + struct altera_jtaguart_platdata *plat = dev->plat; struct altera_jtaguart_regs *const regs = plat->regs; writel(ALTERA_JTAG_AC, ®s->control); /* clear AC flag */ @@ -119,7 +119,7 @@ U_BOOT_DRIVER(altera_jtaguart) = { .id = UCLASS_SERIAL, .of_match = altera_jtaguart_ids, .ofdata_to_platdata = altera_jtaguart_ofdata_to_platdata, - .platdata_auto = sizeof(struct altera_jtaguart_platdata), + .plat_auto = sizeof(struct altera_jtaguart_platdata), .probe = altera_jtaguart_probe, .ops = &altera_jtaguart_ops, }; diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c index eec70f6000..68169d51a3 100644 --- a/drivers/serial/altera_uart.c +++ b/drivers/serial/altera_uart.c @@ -32,7 +32,7 @@ struct altera_uart_platdata { static int altera_uart_setbrg(struct udevice *dev, int baudrate) { - struct altera_uart_platdata *plat = dev->platdata; + struct altera_uart_platdata *plat = dev->plat; struct altera_uart_regs *const regs = plat->regs; u32 div; @@ -44,7 +44,7 @@ static int altera_uart_setbrg(struct udevice *dev, int baudrate) static int altera_uart_putc(struct udevice *dev, const char ch) { - struct altera_uart_platdata *plat = dev->platdata; + struct altera_uart_platdata *plat = dev->plat; struct altera_uart_regs *const regs = plat->regs; if (!(readl(®s->status) & ALTERA_UART_TRDY)) @@ -57,7 +57,7 @@ static int altera_uart_putc(struct udevice *dev, const char ch) static int altera_uart_pending(struct udevice *dev, bool input) { - struct altera_uart_platdata *plat = dev->platdata; + struct altera_uart_platdata *plat = dev->plat; struct altera_uart_regs *const regs = plat->regs; u32 st = readl(®s->status); @@ -69,7 +69,7 @@ static int altera_uart_pending(struct udevice *dev, bool input) static int altera_uart_getc(struct udevice *dev) { - struct altera_uart_platdata *plat = dev->platdata; + struct altera_uart_platdata *plat = dev->plat; struct altera_uart_regs *const regs = plat->regs; if (!(readl(®s->status) & ALTERA_UART_RRDY)) @@ -112,7 +112,7 @@ U_BOOT_DRIVER(altera_uart) = { .id = UCLASS_SERIAL, .of_match = altera_uart_ids, .ofdata_to_platdata = altera_uart_ofdata_to_platdata, - .platdata_auto = sizeof(struct altera_uart_platdata), + .plat_auto = sizeof(struct altera_uart_platdata), .probe = altera_uart_probe, .ops = &altera_uart_ops, }; diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c index 45e6554f59..463bedef23 100644 --- a/drivers/serial/atmel_usart.c +++ b/drivers/serial/atmel_usart.c @@ -262,7 +262,7 @@ static int atmel_serial_enable_clk(struct udevice *dev) static int atmel_serial_probe(struct udevice *dev) { - struct atmel_serial_platdata *plat = dev->platdata; + struct atmel_serial_platdata *plat = dev->plat; struct atmel_serial_priv *priv = dev_get_priv(dev); int ret; #if CONFIG_IS_ENABLED(OF_CONTROL) @@ -304,7 +304,7 @@ U_BOOT_DRIVER(serial_atmel) = { .id = UCLASS_SERIAL, #if CONFIG_IS_ENABLED(OF_CONTROL) .of_match = atmel_serial_ids, - .platdata_auto = sizeof(struct atmel_serial_platdata), + .plat_auto = sizeof(struct atmel_serial_platdata), #endif .probe = atmel_serial_probe, .ops = &atmel_serial_ops, diff --git a/drivers/serial/lpc32xx_hsuart.c b/drivers/serial/lpc32xx_hsuart.c index 80b63807d6..6b7bf3f1c5 100644 --- a/drivers/serial/lpc32xx_hsuart.c +++ b/drivers/serial/lpc32xx_hsuart.c @@ -85,10 +85,10 @@ static int lpc32xx_serial_init(struct hsuart_regs *hsuart) static int lpc32xx_hsuart_probe(struct udevice *dev) { - struct lpc32xx_hsuart_platdata *platdata = dev_get_platdata(dev); + struct lpc32xx_hsuart_platdata *plat = dev_get_platdata(dev); struct lpc32xx_hsuart_priv *priv = dev_get_priv(dev); - priv->hsuart = (struct hsuart_regs *)platdata->base; + priv->hsuart = (struct hsuart_regs *)plat->base; lpc32xx_serial_init(priv->hsuart); diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 9b83f88187..88a486aab8 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -498,7 +498,7 @@ static int ns16550_serial_assign_base(struct ns16550_platdata *plat, ulong base) int ns16550_serial_probe(struct udevice *dev) { - struct ns16550_platdata *plat = dev->platdata; + struct ns16550_platdata *plat = dev->plat; struct NS16550 *const com_port = dev_get_priv(dev); struct reset_ctl_bulk reset_bulk; fdt_addr_t addr; @@ -506,7 +506,7 @@ int ns16550_serial_probe(struct udevice *dev) /* * If we are on PCI bus, either directly attached to a PCI root port, - * or via a PCI bridge, assign platdata->base before probing hardware. + * or via a PCI bridge, assign plat->base before probing hardware. */ if (device_is_on_pci_bus(dev)) { addr = devfdt_get_addr_pci(dev); @@ -535,7 +535,7 @@ enum { #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) int ns16550_serial_ofdata_to_platdata(struct udevice *dev) { - struct ns16550_platdata *plat = dev->platdata; + struct ns16550_platdata *plat = dev->plat; const u32 port_type = dev_get_driver_data(dev); fdt_addr_t addr; struct clk clk; @@ -611,7 +611,7 @@ U_BOOT_DRIVER(ns16550_serial) = { #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) .of_match = ns16550_serial_ids, .ofdata_to_platdata = ns16550_serial_ofdata_to_platdata, - .platdata_auto = sizeof(struct ns16550_platdata), + .plat_auto = sizeof(struct ns16550_platdata), #endif .priv_auto = sizeof(struct NS16550), .probe = ns16550_serial_probe, diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c index 03d16c73a3..85745610a3 100644 --- a/drivers/serial/sandbox.c +++ b/drivers/serial/sandbox.c @@ -72,7 +72,7 @@ static int sandbox_serial_probe(struct udevice *dev) static int sandbox_serial_remove(struct udevice *dev) { - struct sandbox_serial_platdata *plat = dev->platdata; + struct sandbox_serial_platdata *plat = dev->plat; if (plat->colour != -1) output_ansi_reset(); @@ -83,7 +83,7 @@ static int sandbox_serial_remove(struct udevice *dev) static int sandbox_serial_putc(struct udevice *dev, const char ch) { struct sandbox_serial_priv *priv = dev_get_priv(dev); - struct sandbox_serial_platdata *plat = dev->platdata; + struct sandbox_serial_platdata *plat = dev->plat; /* With of-platdata we don't real the colour correctly, so disable it */ if (!CONFIG_IS_ENABLED(OF_PLATDATA) && priv->start_of_line && @@ -203,7 +203,7 @@ static const char * const ansi_colour[] = { static int sandbox_serial_ofdata_to_platdata(struct udevice *dev) { - struct sandbox_serial_platdata *plat = dev->platdata; + struct sandbox_serial_platdata *plat = dev->plat; const char *colour; int i; @@ -242,7 +242,7 @@ U_BOOT_DRIVER(sandbox_serial) = { .id = UCLASS_SERIAL, .of_match = sandbox_serial_ids, .ofdata_to_platdata = sandbox_serial_ofdata_to_platdata, - .platdata_auto = sizeof(struct sandbox_serial_platdata), + .plat_auto = sizeof(struct sandbox_serial_platdata), .priv_auto = sizeof(struct sandbox_serial_priv), .probe = sandbox_serial_probe, .remove = sandbox_serial_remove, @@ -257,6 +257,6 @@ static const struct sandbox_serial_platdata platdata_non_fdt = { U_BOOT_DEVICE(serial_sandbox_non_fdt) = { .name = "sandbox_serial", - .platdata = &platdata_non_fdt, + .plat = &platdata_non_fdt, }; #endif diff --git a/drivers/serial/serial_arc.c b/drivers/serial/serial_arc.c index 52dce3505e..0c7418f5bc 100644 --- a/drivers/serial/serial_arc.c +++ b/drivers/serial/serial_arc.c @@ -37,7 +37,7 @@ struct arc_serial_platdata { static int arc_serial_setbrg(struct udevice *dev, int baudrate) { - struct arc_serial_platdata *plat = dev->platdata; + struct arc_serial_platdata *plat = dev->plat; struct arc_serial_regs *const regs = plat->reg; int arc_console_baud = gd->cpu_clk / (baudrate * 4) - 1; @@ -49,7 +49,7 @@ static int arc_serial_setbrg(struct udevice *dev, int baudrate) static int arc_serial_putc(struct udevice *dev, const char c) { - struct arc_serial_platdata *plat = dev->platdata; + struct arc_serial_platdata *plat = dev->plat; struct arc_serial_regs *const regs = plat->reg; while (!(readb(®s->status) & UART_TXEMPTY)) @@ -67,7 +67,7 @@ static int arc_serial_tstc(struct arc_serial_regs *const regs) static int arc_serial_pending(struct udevice *dev, bool input) { - struct arc_serial_platdata *plat = dev->platdata; + struct arc_serial_platdata *plat = dev->plat; struct arc_serial_regs *const regs = plat->reg; uint32_t status = readb(®s->status); @@ -79,7 +79,7 @@ static int arc_serial_pending(struct udevice *dev, bool input) static int arc_serial_getc(struct udevice *dev) { - struct arc_serial_platdata *plat = dev->platdata; + struct arc_serial_platdata *plat = dev->plat; struct arc_serial_regs *const regs = plat->reg; while (!arc_serial_tstc(regs)) @@ -126,7 +126,7 @@ U_BOOT_DRIVER(serial_arc) = { .id = UCLASS_SERIAL, .of_match = arc_serial_ids, .ofdata_to_platdata = arc_serial_ofdata_to_platdata, - .platdata_auto = sizeof(struct arc_serial_platdata), + .plat_auto = sizeof(struct arc_serial_platdata), .probe = arc_serial_probe, .ops = &arc_serial_ops, }; diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c index 8cd533f808..d11bdd4ebb 100644 --- a/drivers/serial/serial_bcm283x_mu.c +++ b/drivers/serial/serial_bcm283x_mu.c @@ -194,7 +194,7 @@ U_BOOT_DRIVER(serial_bcm283x_mu) = { .name = "serial_bcm283x_mu", .id = UCLASS_SERIAL, .of_match = of_match_ptr(bcm283x_mu_serial_id), - .platdata_auto = sizeof(struct bcm283x_mu_serial_platdata), + .plat_auto = sizeof(struct bcm283x_mu_serial_platdata), .probe = bcm283x_mu_serial_probe, .ops = &bcm283x_mu_serial_ops, #if !CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_BOARD) diff --git a/drivers/serial/serial_bcm283x_pl011.c b/drivers/serial/serial_bcm283x_pl011.c index 484a281811..8d2f249b33 100644 --- a/drivers/serial/serial_bcm283x_pl011.c +++ b/drivers/serial/serial_bcm283x_pl011.c @@ -92,7 +92,7 @@ U_BOOT_DRIVER(bcm283x_pl011_uart) = { .id = UCLASS_SERIAL, .of_match = of_match_ptr(bcm283x_pl011_serial_id), .probe = bcm283x_pl011_serial_probe, - .platdata_auto = sizeof(struct pl01x_serial_platdata), + .plat_auto = sizeof(struct pl01x_serial_platdata), .ops = &bcm283x_pl011_serial_ops, #if !CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_BOARD) .flags = DM_FLAG_PRE_RELOC, diff --git a/drivers/serial/serial_coreboot.c b/drivers/serial/serial_coreboot.c index 08363c4920..17072e42b2 100644 --- a/drivers/serial/serial_coreboot.c +++ b/drivers/serial/serial_coreboot.c @@ -38,7 +38,7 @@ U_BOOT_DRIVER(coreboot_uart) = { .id = UCLASS_SERIAL, .of_match = coreboot_serial_ids, .priv_auto = sizeof(struct NS16550), - .platdata_auto = sizeof(struct ns16550_platdata), + .plat_auto = sizeof(struct ns16550_platdata), .ofdata_to_platdata = coreboot_ofdata_to_platdata, .probe = ns16550_serial_probe, .ops = &ns16550_serial_ops, diff --git a/drivers/serial/serial_intel_mid.c b/drivers/serial/serial_intel_mid.c index f9281590cd..26c6867180 100644 --- a/drivers/serial/serial_intel_mid.c +++ b/drivers/serial/serial_intel_mid.c @@ -60,7 +60,7 @@ U_BOOT_DRIVER(serial_intel_mid) = { .id = UCLASS_SERIAL, .of_match = mid_serial_ids, .ofdata_to_platdata = ns16550_serial_ofdata_to_platdata, - .platdata_auto = sizeof(struct ns16550_platdata), + .plat_auto = sizeof(struct ns16550_platdata), .priv_auto = sizeof(struct NS16550), .probe = mid_serial_probe, .ops = &ns16550_serial_ops, diff --git a/drivers/serial/serial_linflexuart.c b/drivers/serial/serial_linflexuart.c index af7b842927..4f8867ab7b 100644 --- a/drivers/serial/serial_linflexuart.c +++ b/drivers/serial/serial_linflexuart.c @@ -168,7 +168,7 @@ static void linflex_serial_init_internal(struct linflex_fsl *lfuart) static int linflex_serial_probe(struct udevice *dev) { - struct linflex_serial_platdata *plat = dev->platdata; + struct linflex_serial_platdata *plat = dev->plat; struct linflex_serial_priv *priv = dev_get_priv(dev); priv->lfuart = (struct linflex_fsl *)plat->base_addr; diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c index b26f401cb7..e6e1b1def6 100644 --- a/drivers/serial/serial_lpuart.c +++ b/drivers/serial/serial_lpuart.c @@ -138,7 +138,7 @@ static inline int get_lpuart_clk_rate(struct udevice *dev, u32 *clk) static bool is_lpuart32(struct udevice *dev) { - struct lpuart_serial_platdata *plat = dev->platdata; + struct lpuart_serial_platdata *plat = dev->plat; return plat->flags & LPUART_FLAG_REGMAP_32BIT_REG; } @@ -445,7 +445,7 @@ static int lpuart_serial_setbrg(struct udevice *dev, int baudrate) static int lpuart_serial_getc(struct udevice *dev) { - struct lpuart_serial_platdata *plat = dev->platdata; + struct lpuart_serial_platdata *plat = dev->plat; if (is_lpuart32(dev)) return _lpuart32_serial_getc(plat); @@ -455,7 +455,7 @@ static int lpuart_serial_getc(struct udevice *dev) static int lpuart_serial_putc(struct udevice *dev, const char c) { - struct lpuart_serial_platdata *plat = dev->platdata; + struct lpuart_serial_platdata *plat = dev->plat; if (is_lpuart32(dev)) _lpuart32_serial_putc(plat, c); @@ -467,7 +467,7 @@ static int lpuart_serial_putc(struct udevice *dev, const char c) static int lpuart_serial_pending(struct udevice *dev, bool input) { - struct lpuart_serial_platdata *plat = dev->platdata; + struct lpuart_serial_platdata *plat = dev->plat; struct lpuart_fsl *reg = plat->reg; struct lpuart_fsl_reg32 *reg32 = plat->reg; u32 stat; @@ -513,7 +513,7 @@ static int lpuart_serial_probe(struct udevice *dev) static int lpuart_serial_ofdata_to_platdata(struct udevice *dev) { - struct lpuart_serial_platdata *plat = dev->platdata; + struct lpuart_serial_platdata *plat = dev->plat; const void *blob = gd->fdt_blob; int node = dev_of_offset(dev); fdt_addr_t addr; @@ -567,7 +567,7 @@ U_BOOT_DRIVER(serial_lpuart) = { .id = UCLASS_SERIAL, .of_match = lpuart_serial_ids, .ofdata_to_platdata = lpuart_serial_ofdata_to_platdata, - .platdata_auto = sizeof(struct lpuart_serial_platdata), + .plat_auto = sizeof(struct lpuart_serial_platdata), .probe = lpuart_serial_probe, .ops = &lpuart_serial_ops, }; diff --git a/drivers/serial/serial_mcf.c b/drivers/serial/serial_mcf.c index 513013ca5a..40f0b01c21 100644 --- a/drivers/serial/serial_mcf.c +++ b/drivers/serial/serial_mcf.c @@ -83,7 +83,7 @@ static void mcf_serial_setbrg_common(uart_t *uart, int baudrate) static int coldfire_serial_probe(struct udevice *dev) { - struct coldfire_serial_platdata *plat = dev->platdata; + struct coldfire_serial_platdata *plat = dev->plat; plat->port = dev->seq; @@ -93,7 +93,7 @@ static int coldfire_serial_probe(struct udevice *dev) static int coldfire_serial_putc(struct udevice *dev, const char ch) { - struct coldfire_serial_platdata *plat = dev->platdata; + struct coldfire_serial_platdata *plat = dev->plat; uart_t *uart = (uart_t *)plat->base; /* Wait for last character to go. */ @@ -107,7 +107,7 @@ static int coldfire_serial_putc(struct udevice *dev, const char ch) static int coldfire_serial_getc(struct udevice *dev) { - struct coldfire_serial_platdata *plat = dev->platdata; + struct coldfire_serial_platdata *plat = dev->plat; uart_t *uart = (uart_t *)(plat->base); /* Wait for a character to arrive. */ @@ -119,7 +119,7 @@ static int coldfire_serial_getc(struct udevice *dev) int coldfire_serial_setbrg(struct udevice *dev, int baudrate) { - struct coldfire_serial_platdata *plat = dev->platdata; + struct coldfire_serial_platdata *plat = dev->plat; uart_t *uart = (uart_t *)(plat->base); mcf_serial_setbrg_common(uart, baudrate); @@ -129,7 +129,7 @@ int coldfire_serial_setbrg(struct udevice *dev, int baudrate) static int coldfire_serial_pending(struct udevice *dev, bool input) { - struct coldfire_serial_platdata *plat = dev->platdata; + struct coldfire_serial_platdata *plat = dev->plat; uart_t *uart = (uart_t *)(plat->base); if (input) @@ -172,7 +172,7 @@ U_BOOT_DRIVER(serial_coldfire) = { .id = UCLASS_SERIAL, .of_match = coldfire_serial_ids, .ofdata_to_platdata = coldfire_ofdata_to_platdata, - .platdata_auto = sizeof(struct coldfire_serial_platdata), + .plat_auto = sizeof(struct coldfire_serial_platdata), .probe = coldfire_serial_probe, .ops = &coldfire_serial_ops, .flags = DM_FLAG_PRE_RELOC, diff --git a/drivers/serial/serial_meson.c b/drivers/serial/serial_meson.c index 73a10f89c0..997426d56d 100644 --- a/drivers/serial/serial_meson.c +++ b/drivers/serial/serial_meson.c @@ -57,7 +57,7 @@ static void meson_serial_init(struct meson_uart *uart) static int meson_serial_probe(struct udevice *dev) { - struct meson_serial_platdata *plat = dev->platdata; + struct meson_serial_platdata *plat = dev->plat; struct meson_uart *const uart = plat->reg; meson_serial_init(uart); @@ -67,7 +67,7 @@ static int meson_serial_probe(struct udevice *dev) static void meson_serial_rx_error(struct udevice *dev) { - struct meson_serial_platdata *plat = dev->platdata; + struct meson_serial_platdata *plat = dev->plat; struct meson_uart *const uart = plat->reg; u32 val = readl(&uart->control); @@ -83,7 +83,7 @@ static void meson_serial_rx_error(struct udevice *dev) static int meson_serial_getc(struct udevice *dev) { - struct meson_serial_platdata *plat = dev->platdata; + struct meson_serial_platdata *plat = dev->plat; struct meson_uart *const uart = plat->reg; uint32_t status = readl(&uart->status); @@ -100,7 +100,7 @@ static int meson_serial_getc(struct udevice *dev) static int meson_serial_putc(struct udevice *dev, const char ch) { - struct meson_serial_platdata *plat = dev->platdata; + struct meson_serial_platdata *plat = dev->plat; struct meson_uart *const uart = plat->reg; if (readl(&uart->status) & AML_UART_TX_FULL) @@ -113,7 +113,7 @@ static int meson_serial_putc(struct udevice *dev, const char ch) static int meson_serial_pending(struct udevice *dev, bool input) { - struct meson_serial_platdata *plat = dev->platdata; + struct meson_serial_platdata *plat = dev->plat; struct meson_uart *const uart = plat->reg; uint32_t status = readl(&uart->status); @@ -138,7 +138,7 @@ static int meson_serial_pending(struct udevice *dev, bool input) static int meson_serial_ofdata_to_platdata(struct udevice *dev) { - struct meson_serial_platdata *plat = dev->platdata; + struct meson_serial_platdata *plat = dev->plat; fdt_addr_t addr; addr = dev_read_addr(dev); @@ -169,7 +169,7 @@ U_BOOT_DRIVER(serial_meson) = { .probe = meson_serial_probe, .ops = &meson_serial_ops, .ofdata_to_platdata = meson_serial_ofdata_to_platdata, - .platdata_auto = sizeof(struct meson_serial_platdata), + .plat_auto = sizeof(struct meson_serial_platdata), }; #ifdef CONFIG_DEBUG_UART_MESON diff --git a/drivers/serial/serial_mvebu_a3700.c b/drivers/serial/serial_mvebu_a3700.c index 7756b0d929..690b7c69c8 100644 --- a/drivers/serial/serial_mvebu_a3700.c +++ b/drivers/serial/serial_mvebu_a3700.c @@ -126,7 +126,7 @@ U_BOOT_DRIVER(serial_mvebu) = { .id = UCLASS_SERIAL, .of_match = mvebu_serial_ids, .ofdata_to_platdata = mvebu_serial_ofdata_to_platdata, - .platdata_auto = sizeof(struct mvebu_platdata), + .plat_auto = sizeof(struct mvebu_platdata), .probe = mvebu_serial_probe, .ops = &mvebu_serial_ops, }; diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c index 83f2316a64..a228bc4c9e 100644 --- a/drivers/serial/serial_mxc.c +++ b/drivers/serial/serial_mxc.c @@ -264,7 +264,7 @@ __weak struct serial_device *default_serial_console(void) int mxc_serial_setbrg(struct udevice *dev, int baudrate) { - struct mxc_serial_platdata *plat = dev->platdata; + struct mxc_serial_platdata *plat = dev->plat; u32 clk = imx_get_uartclk(); _mxc_serial_setbrg(plat->reg, clk, baudrate, plat->use_dte); @@ -274,7 +274,7 @@ int mxc_serial_setbrg(struct udevice *dev, int baudrate) static int mxc_serial_probe(struct udevice *dev) { - struct mxc_serial_platdata *plat = dev->platdata; + struct mxc_serial_platdata *plat = dev->plat; _mxc_serial_init(plat->reg, plat->use_dte); @@ -283,7 +283,7 @@ static int mxc_serial_probe(struct udevice *dev) static int mxc_serial_getc(struct udevice *dev) { - struct mxc_serial_platdata *plat = dev->platdata; + struct mxc_serial_platdata *plat = dev->plat; struct mxc_uart *const uart = plat->reg; if (readl(&uart->ts) & UTS_RXEMPTY) @@ -294,7 +294,7 @@ static int mxc_serial_getc(struct udevice *dev) static int mxc_serial_putc(struct udevice *dev, const char ch) { - struct mxc_serial_platdata *plat = dev->platdata; + struct mxc_serial_platdata *plat = dev->plat; struct mxc_uart *const uart = plat->reg; if (!(readl(&uart->ts) & UTS_TXEMPTY)) @@ -307,7 +307,7 @@ static int mxc_serial_putc(struct udevice *dev, const char ch) static int mxc_serial_pending(struct udevice *dev, bool input) { - struct mxc_serial_platdata *plat = dev->platdata; + struct mxc_serial_platdata *plat = dev->plat; struct mxc_uart *const uart = plat->reg; uint32_t sr2 = readl(&uart->sr2); @@ -327,7 +327,7 @@ static const struct dm_serial_ops mxc_serial_ops = { #if CONFIG_IS_ENABLED(OF_CONTROL) static int mxc_serial_ofdata_to_platdata(struct udevice *dev) { - struct mxc_serial_platdata *plat = dev->platdata; + struct mxc_serial_platdata *plat = dev->plat; fdt_addr_t addr; addr = dev_read_addr(dev); @@ -358,7 +358,7 @@ U_BOOT_DRIVER(serial_mxc) = { #if CONFIG_IS_ENABLED(OF_CONTROL) .of_match = mxc_serial_ids, .ofdata_to_platdata = mxc_serial_ofdata_to_platdata, - .platdata_auto = sizeof(struct mxc_serial_platdata), + .plat_auto = sizeof(struct mxc_serial_platdata), #endif .probe = mxc_serial_probe, .ops = &mxc_serial_ops, diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c index 296c5fd45c..26e03b8620 100644 --- a/drivers/serial/serial_omap.c +++ b/drivers/serial/serial_omap.c @@ -101,7 +101,7 @@ DEBUG_UART_FUNCS #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) static int omap_serial_ofdata_to_platdata(struct udevice *dev) { - struct ns16550_platdata *plat = dev->platdata; + struct ns16550_platdata *plat = dev->plat; fdt_addr_t addr; struct clk clk; int err; @@ -158,7 +158,7 @@ U_BOOT_DRIVER(omap_serial) = { #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) .of_match = omap_serial_ids, .ofdata_to_platdata = omap_serial_ofdata_to_platdata, - .platdata_auto = sizeof(struct ns16550_platdata), + .plat_auto = sizeof(struct ns16550_platdata), #endif .priv_auto = sizeof(struct NS16550), .probe = ns16550_serial_probe, diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c index 4e201287bf..3a876fe2f2 100644 --- a/drivers/serial/serial_pl01x.c +++ b/drivers/serial/serial_pl01x.c @@ -388,7 +388,7 @@ U_BOOT_DRIVER(serial_pl01x) = { .id = UCLASS_SERIAL, .of_match = of_match_ptr(pl01x_serial_id), .ofdata_to_platdata = of_match_ptr(pl01x_serial_ofdata_to_platdata), - .platdata_auto = sizeof(struct pl01x_serial_platdata), + .plat_auto = sizeof(struct pl01x_serial_platdata), .probe = pl01x_serial_probe, .ops = &pl01x_serial_ops, .flags = DM_FLAG_PRE_RELOC, diff --git a/drivers/serial/serial_pxa.c b/drivers/serial/serial_pxa.c index 6f8f7e1198..232218dcdc 100644 --- a/drivers/serial/serial_pxa.c +++ b/drivers/serial/serial_pxa.c @@ -268,7 +268,7 @@ void pxa_serial_initialize(void) #ifdef CONFIG_DM_SERIAL static int pxa_serial_probe(struct udevice *dev) { - struct pxa_serial_platdata *plat = dev->platdata; + struct pxa_serial_platdata *plat = dev->plat; pxa_setbrg_common((struct pxa_uart_regs *)plat->base, plat->port, plat->baudrate); @@ -277,7 +277,7 @@ static int pxa_serial_probe(struct udevice *dev) static int pxa_serial_putc(struct udevice *dev, const char ch) { - struct pxa_serial_platdata *plat = dev->platdata; + struct pxa_serial_platdata *plat = dev->plat; struct pxa_uart_regs *uart_regs = (struct pxa_uart_regs *)plat->base; /* Wait for last character to go. */ @@ -291,7 +291,7 @@ static int pxa_serial_putc(struct udevice *dev, const char ch) static int pxa_serial_getc(struct udevice *dev) { - struct pxa_serial_platdata *plat = dev->platdata; + struct pxa_serial_platdata *plat = dev->plat; struct pxa_uart_regs *uart_regs = (struct pxa_uart_regs *)plat->base; /* Wait for a character to arrive. */ @@ -303,7 +303,7 @@ static int pxa_serial_getc(struct udevice *dev) int pxa_serial_setbrg(struct udevice *dev, int baudrate) { - struct pxa_serial_platdata *plat = dev->platdata; + struct pxa_serial_platdata *plat = dev->plat; struct pxa_uart_regs *uart_regs = (struct pxa_uart_regs *)plat->base; int port = plat->port; @@ -314,7 +314,7 @@ int pxa_serial_setbrg(struct udevice *dev, int baudrate) static int pxa_serial_pending(struct udevice *dev, bool input) { - struct pxa_serial_platdata *plat = dev->platdata; + struct pxa_serial_platdata *plat = dev->plat; struct pxa_uart_regs *uart_regs = (struct pxa_uart_regs *)plat->base; if (input) diff --git a/drivers/serial/serial_rockchip.c b/drivers/serial/serial_rockchip.c index 74245f8d5d..e00df4b21a 100644 --- a/drivers/serial/serial_rockchip.c +++ b/drivers/serial/serial_rockchip.c @@ -34,7 +34,7 @@ static int rockchip_serial_probe(struct udevice *dev) plat->plat.reg_shift = plat->dtplat.reg_shift; plat->plat.clock = plat->dtplat.clock_frequency; plat->plat.fcr = UART_FCR_DEFVAL; - dev->platdata = &plat->plat; + dev->plat = &plat->plat; return ns16550_serial_probe(dev); } @@ -43,7 +43,7 @@ U_BOOT_DRIVER(rockchip_rk3188_uart) = { .name = "rockchip_rk3188_uart", .id = UCLASS_SERIAL, .priv_auto = sizeof(struct NS16550), - .platdata_auto = sizeof(struct rockchip_uart_platdata), + .plat_auto = sizeof(struct rockchip_uart_platdata), .probe = rockchip_serial_probe, .ops = &ns16550_serial_ops, .flags = DM_FLAG_PRE_RELOC, @@ -53,7 +53,7 @@ U_BOOT_DRIVER(rockchip_rk3288_uart) = { .name = "rockchip_rk3288_uart", .id = UCLASS_SERIAL, .priv_auto = sizeof(struct NS16550), - .platdata_auto = sizeof(struct rockchip_uart_platdata), + .plat_auto = sizeof(struct rockchip_uart_platdata), .probe = rockchip_serial_probe, .ops = &ns16550_serial_ops, .flags = DM_FLAG_PRE_RELOC, diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c index df50210dbd..03a85c078a 100644 --- a/drivers/serial/serial_s5p.c +++ b/drivers/serial/serial_s5p.c @@ -88,7 +88,7 @@ static void __maybe_unused s5p_serial_baud(struct s5p_uart *uart, uint uclk, #ifndef CONFIG_SPL_BUILD int s5p_serial_setbrg(struct udevice *dev, int baudrate) { - struct s5p_serial_platdata *plat = dev->platdata; + struct s5p_serial_platdata *plat = dev->plat; struct s5p_uart *const uart = plat->reg; u32 uclk; @@ -111,7 +111,7 @@ int s5p_serial_setbrg(struct udevice *dev, int baudrate) static int s5p_serial_probe(struct udevice *dev) { - struct s5p_serial_platdata *plat = dev->platdata; + struct s5p_serial_platdata *plat = dev->plat; struct s5p_uart *const uart = plat->reg; s5p_serial_init(uart); @@ -140,7 +140,7 @@ static int serial_err_check(const struct s5p_uart *const uart, int op) static int s5p_serial_getc(struct udevice *dev) { - struct s5p_serial_platdata *plat = dev->platdata; + struct s5p_serial_platdata *plat = dev->plat; struct s5p_uart *const uart = plat->reg; if (!(readl(&uart->ufstat) & RX_FIFO_COUNT_MASK)) @@ -152,7 +152,7 @@ static int s5p_serial_getc(struct udevice *dev) static int s5p_serial_putc(struct udevice *dev, const char ch) { - struct s5p_serial_platdata *plat = dev->platdata; + struct s5p_serial_platdata *plat = dev->plat; struct s5p_uart *const uart = plat->reg; if (readl(&uart->ufstat) & TX_FIFO_FULL) @@ -166,7 +166,7 @@ static int s5p_serial_putc(struct udevice *dev, const char ch) static int s5p_serial_pending(struct udevice *dev, bool input) { - struct s5p_serial_platdata *plat = dev->platdata; + struct s5p_serial_platdata *plat = dev->plat; struct s5p_uart *const uart = plat->reg; uint32_t ufstat = readl(&uart->ufstat); @@ -178,7 +178,7 @@ static int s5p_serial_pending(struct udevice *dev, bool input) static int s5p_serial_ofdata_to_platdata(struct udevice *dev) { - struct s5p_serial_platdata *plat = dev->platdata; + struct s5p_serial_platdata *plat = dev->plat; fdt_addr_t addr; addr = dev_read_addr(dev); @@ -208,7 +208,7 @@ U_BOOT_DRIVER(serial_s5p) = { .id = UCLASS_SERIAL, .of_match = s5p_serial_ids, .ofdata_to_platdata = s5p_serial_ofdata_to_platdata, - .platdata_auto = sizeof(struct s5p_serial_platdata), + .plat_auto = sizeof(struct s5p_serial_platdata), .probe = s5p_serial_probe, .ops = &s5p_serial_ops, }; diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c index 4e37ab0c31..0cac2b9740 100644 --- a/drivers/serial/serial_sh.c +++ b/drivers/serial/serial_sh.c @@ -240,7 +240,7 @@ U_BOOT_DRIVER(serial_sh) = { .id = UCLASS_SERIAL, .of_match = of_match_ptr(sh_serial_id), .ofdata_to_platdata = of_match_ptr(sh_serial_ofdata_to_platdata), - .platdata_auto = sizeof(struct sh_serial_platdata), + .plat_auto = sizeof(struct sh_serial_platdata), .probe = sh_serial_probe, .ops = &sh_serial_ops, #if !CONFIG_IS_ENABLED(OF_CONTROL) diff --git a/drivers/serial/serial_sifive.c b/drivers/serial/serial_sifive.c index 710bb72363..276f0902db 100644 --- a/drivers/serial/serial_sifive.c +++ b/drivers/serial/serial_sifive.c @@ -105,7 +105,7 @@ static int sifive_serial_setbrg(struct udevice *dev, int baudrate) { int ret; struct clk clk; - struct sifive_uart_platdata *platdata = dev_get_platdata(dev); + struct sifive_uart_platdata *plat = dev_get_platdata(dev); u32 clock = 0; ret = clk_get_by_index(dev, 0, &clk); @@ -123,21 +123,21 @@ static int sifive_serial_setbrg(struct udevice *dev, int baudrate) return 0; } } - platdata->clock = clock; - _sifive_serial_setbrg(platdata->regs, platdata->clock, baudrate); + plat->clock = clock; + _sifive_serial_setbrg(plat->regs, plat->clock, baudrate); return 0; } static int sifive_serial_probe(struct udevice *dev) { - struct sifive_uart_platdata *platdata = dev_get_platdata(dev); + struct sifive_uart_platdata *plat = dev_get_platdata(dev); /* No need to reinitialize the UART after relocation */ if (gd->flags & GD_FLG_RELOC) return 0; - _sifive_serial_init(platdata->regs); + _sifive_serial_init(plat->regs); return 0; } @@ -145,8 +145,8 @@ static int sifive_serial_probe(struct udevice *dev) static int sifive_serial_getc(struct udevice *dev) { int c; - struct sifive_uart_platdata *platdata = dev_get_platdata(dev); - struct uart_sifive *regs = platdata->regs; + struct sifive_uart_platdata *plat = dev_get_platdata(dev); + struct uart_sifive *regs = plat->regs; while ((c = _sifive_serial_getc(regs)) == -EAGAIN) ; @@ -156,17 +156,17 @@ static int sifive_serial_getc(struct udevice *dev) static int sifive_serial_putc(struct udevice *dev, const char ch) { int rc; - struct sifive_uart_platdata *platdata = dev_get_platdata(dev); + struct sifive_uart_platdata *plat = dev_get_platdata(dev); - while ((rc = _sifive_serial_putc(platdata->regs, ch)) == -EAGAIN) ; + while ((rc = _sifive_serial_putc(plat->regs, ch)) == -EAGAIN) ; return rc; } static int sifive_serial_pending(struct udevice *dev, bool input) { - struct sifive_uart_platdata *platdata = dev_get_platdata(dev); - struct uart_sifive *regs = platdata->regs; + struct sifive_uart_platdata *plat = dev_get_platdata(dev); + struct uart_sifive *regs = plat->regs; if (input) return (readl(®s->ip) & UART_IP_RXWM); @@ -176,11 +176,11 @@ static int sifive_serial_pending(struct udevice *dev, bool input) static int sifive_serial_ofdata_to_platdata(struct udevice *dev) { - struct sifive_uart_platdata *platdata = dev_get_platdata(dev); + struct sifive_uart_platdata *plat = dev_get_platdata(dev); - platdata->regs = (struct uart_sifive *)dev_read_addr(dev); - if (IS_ERR(platdata->regs)) - return PTR_ERR(platdata->regs); + plat->regs = (struct uart_sifive *)dev_read_addr(dev); + if (IS_ERR(plat->regs)) + return PTR_ERR(plat->regs); return 0; } @@ -202,7 +202,7 @@ U_BOOT_DRIVER(serial_sifive) = { .id = UCLASS_SERIAL, .of_match = sifive_serial_ids, .ofdata_to_platdata = sifive_serial_ofdata_to_platdata, - .platdata_auto = sizeof(struct sifive_uart_platdata), + .plat_auto = sizeof(struct sifive_uart_platdata), .probe = sifive_serial_probe, .ops = &sifive_serial_ops, }; diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c index a8e0320750..210b5b5139 100644 --- a/drivers/serial/serial_stm32.c +++ b/drivers/serial/serial_stm32.c @@ -241,7 +241,7 @@ U_BOOT_DRIVER(serial_stm32) = { .id = UCLASS_SERIAL, .of_match = of_match_ptr(stm32_serial_id), .ofdata_to_platdata = of_match_ptr(stm32_serial_ofdata_to_platdata), - .platdata_auto = sizeof(struct stm32x7_serial_platdata), + .plat_auto = sizeof(struct stm32x7_serial_platdata), .ops = &stm32_serial_ops, .probe = stm32_serial_probe, #if !CONFIG_IS_ENABLED(OF_CONTROL) diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c index bc039492ef..eb76c7800e 100644 --- a/drivers/serial/serial_xuartlite.c +++ b/drivers/serial/serial_xuartlite.c @@ -132,7 +132,7 @@ U_BOOT_DRIVER(serial_uartlite) = { .id = UCLASS_SERIAL, .of_match = uartlite_serial_ids, .ofdata_to_platdata = uartlite_serial_ofdata_to_platdata, - .platdata_auto = sizeof(struct uartlite_platdata), + .plat_auto = sizeof(struct uartlite_platdata), .probe = uartlite_serial_probe, .ops = &uartlite_serial_ops, }; diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c index d04c399019..7984b61ce1 100644 --- a/drivers/serial/serial_zynq.c +++ b/drivers/serial/serial_zynq.c @@ -107,7 +107,7 @@ static int _uart_zynq_serial_putc(struct uart_zynq *regs, const char c) static int zynq_serial_setbrg(struct udevice *dev, int baudrate) { - struct zynq_uart_platdata *platdata = dev_get_platdata(dev); + struct zynq_uart_platdata *plat = dev_get_platdata(dev); unsigned long clock; int ret; @@ -132,15 +132,15 @@ static int zynq_serial_setbrg(struct udevice *dev, int baudrate) return ret; } - _uart_zynq_serial_setbrg(platdata->regs, clock, baudrate); + _uart_zynq_serial_setbrg(plat->regs, clock, baudrate); return 0; } static int zynq_serial_probe(struct udevice *dev) { - struct zynq_uart_platdata *platdata = dev_get_platdata(dev); - struct uart_zynq *regs = platdata->regs; + struct zynq_uart_platdata *plat = dev_get_platdata(dev); + struct uart_zynq *regs = plat->regs; u32 val; /* No need to reinitialize the UART if TX already enabled */ @@ -148,15 +148,15 @@ static int zynq_serial_probe(struct udevice *dev) if (val & ZYNQ_UART_CR_TX_EN) return 0; - _uart_zynq_serial_init(platdata->regs); + _uart_zynq_serial_init(plat->regs); return 0; } static int zynq_serial_getc(struct udevice *dev) { - struct zynq_uart_platdata *platdata = dev_get_platdata(dev); - struct uart_zynq *regs = platdata->regs; + struct zynq_uart_platdata *plat = dev_get_platdata(dev); + struct uart_zynq *regs = plat->regs; if (readl(®s->channel_sts) & ZYNQ_UART_SR_RXEMPTY) return -EAGAIN; @@ -166,15 +166,15 @@ static int zynq_serial_getc(struct udevice *dev) static int zynq_serial_putc(struct udevice *dev, const char ch) { - struct zynq_uart_platdata *platdata = dev_get_platdata(dev); + struct zynq_uart_platdata *plat = dev_get_platdata(dev); - return _uart_zynq_serial_putc(platdata->regs, ch); + return _uart_zynq_serial_putc(plat->regs, ch); } static int zynq_serial_pending(struct udevice *dev, bool input) { - struct zynq_uart_platdata *platdata = dev_get_platdata(dev); - struct uart_zynq *regs = platdata->regs; + struct zynq_uart_platdata *plat = dev_get_platdata(dev); + struct uart_zynq *regs = plat->regs; if (input) return !(readl(®s->channel_sts) & ZYNQ_UART_SR_RXEMPTY); @@ -184,11 +184,11 @@ static int zynq_serial_pending(struct udevice *dev, bool input) static int zynq_serial_ofdata_to_platdata(struct udevice *dev) { - struct zynq_uart_platdata *platdata = dev_get_platdata(dev); + struct zynq_uart_platdata *plat = dev_get_platdata(dev); - platdata->regs = (struct uart_zynq *)dev_read_addr(dev); - if (IS_ERR(platdata->regs)) - return PTR_ERR(platdata->regs); + plat->regs = (struct uart_zynq *)dev_read_addr(dev); + if (IS_ERR(plat->regs)) + return PTR_ERR(plat->regs); return 0; } @@ -212,7 +212,7 @@ U_BOOT_DRIVER(serial_zynq) = { .id = UCLASS_SERIAL, .of_match = zynq_serial_ids, .ofdata_to_platdata = zynq_serial_ofdata_to_platdata, - .platdata_auto = sizeof(struct zynq_uart_platdata), + .plat_auto = sizeof(struct zynq_uart_platdata), .probe = zynq_serial_probe, .ops = &zynq_serial_ops, }; diff --git a/drivers/soc/soc_ti_k3.c b/drivers/soc/soc_ti_k3.c index e1cbd6eef8..2ea9162977 100644 --- a/drivers/soc/soc_ti_k3.c +++ b/drivers/soc/soc_ti_k3.c @@ -124,5 +124,5 @@ U_BOOT_DRIVER(soc_ti_k3) = { .ops = &soc_ti_k3_ops, .of_match = soc_ti_k3_ids, .probe = soc_ti_k3_probe, - .platdata_auto = sizeof(struct soc_ti_k3_platdata), + .plat_auto = sizeof(struct soc_ti_k3_platdata), }; diff --git a/drivers/sound/ivybridge_sound.c b/drivers/sound/ivybridge_sound.c index 62207b957c..d8d128a920 100644 --- a/drivers/sound/ivybridge_sound.c +++ b/drivers/sound/ivybridge_sound.c @@ -71,7 +71,7 @@ static int bd82x6x_azalia_probe(struct udevice *dev) dm_pci_clrset_config32(dev, 0xd0, 1U << 31, 0); /* Additional step on Panther Point */ - plat = dev_get_parent_platdata(dev); + plat = dev_get_parent_plat(dev); if (plat->device == PCI_DEVICE_ID_INTEL_PANTHERPOINT_HDA) dm_pci_clrset_config32(dev, 0xc4, 0, 1 << 17); diff --git a/drivers/spi/altera_spi.c b/drivers/spi/altera_spi.c index bca2cfb090..b7da09f459 100644 --- a/drivers/spi/altera_spi.c +++ b/drivers/spi/altera_spi.c @@ -89,7 +89,7 @@ static int altera_spi_xfer(struct udevice *dev, unsigned int bitlen, struct udevice *bus = dev->parent; struct altera_spi_priv *priv = dev_get_priv(bus); struct altera_spi_regs *const regs = priv->regs; - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); /* assume spi core configured to do 8 bit transfers */ unsigned int bytes = bitlen / 8; @@ -203,7 +203,7 @@ U_BOOT_DRIVER(altera_spi) = { .of_match = altera_spi_ids, .ops = &altera_spi_ops, .ofdata_to_platdata = altera_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct altera_spi_platdata), + .plat_auto = sizeof(struct altera_spi_platdata), .priv_auto = sizeof(struct altera_spi_priv), .probe = altera_spi_probe, }; diff --git a/drivers/spi/atcspi200_spi.c b/drivers/spi/atcspi200_spi.c index 82534d9c69..f62387cf9b 100644 --- a/drivers/spi/atcspi200_spi.c +++ b/drivers/spi/atcspi200_spi.c @@ -310,7 +310,7 @@ static int atcspi200_spi_set_mode(struct udevice *bus, uint mode) static int atcspi200_spi_claim_bus(struct udevice *dev) { struct dm_spi_slave_platdata *slave_plat = - dev_get_parent_platdata(dev); + dev_get_parent_plat(dev); struct udevice *bus = dev->parent; struct nds_spi_slave *ns = dev_get_priv(bus); diff --git a/drivers/spi/ath79_spi.c b/drivers/spi/ath79_spi.c index e5d54faf7d..ad2c7ff69c 100644 --- a/drivers/spi/ath79_spi.c +++ b/drivers/spi/ath79_spi.c @@ -59,7 +59,7 @@ static int ath79_spi_xfer(struct udevice *dev, unsigned int bitlen, { struct udevice *bus = dev_get_parent(dev); struct ath79_spi_priv *priv = dev_get_priv(bus); - struct dm_spi_slave_platdata *slave = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave = dev_get_parent_plat(dev); u8 *rx = din; const u8 *tx = dout; u8 curbyte, curbitlen, restbits; diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index 873f854cc9..a192f93587 100644 --- a/drivers/spi/atmel_spi.c +++ b/drivers/spi/atmel_spi.c @@ -123,7 +123,7 @@ static int atmel_spi_claim_bus(struct udevice *dev) struct udevice *bus = dev_get_parent(dev); struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus); struct atmel_spi_priv *priv = dev_get_priv(bus); - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); struct at91_spi *reg_base = bus_plat->regs; u32 cs = slave_plat->cs; u32 freq = priv->freq; @@ -173,7 +173,7 @@ static void atmel_spi_cs_activate(struct udevice *dev) #if CONFIG_IS_ENABLED(DM_GPIO) struct udevice *bus = dev_get_parent(dev); struct atmel_spi_priv *priv = dev_get_priv(bus); - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); u32 cs = slave_plat->cs; if (!dm_gpio_is_valid(&priv->cs_gpios[cs])) @@ -188,7 +188,7 @@ static void atmel_spi_cs_deactivate(struct udevice *dev) #if CONFIG_IS_ENABLED(DM_GPIO) struct udevice *bus = dev_get_parent(dev); struct atmel_spi_priv *priv = dev_get_priv(bus); - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); u32 cs = slave_plat->cs; if (!dm_gpio_is_valid(&priv->cs_gpios[cs])) @@ -388,7 +388,7 @@ U_BOOT_DRIVER(atmel_spi) = { .id = UCLASS_SPI, .of_match = atmel_spi_ids, .ops = &atmel_spi_ops, - .platdata_auto = sizeof(struct atmel_spi_platdata), + .plat_auto = sizeof(struct atmel_spi_platdata), .priv_auto = sizeof(struct atmel_spi_priv), .probe = atmel_spi_probe, }; diff --git a/drivers/spi/bcm63xx_hsspi.c b/drivers/spi/bcm63xx_hsspi.c index c4a04ba6fd..6d7d169659 100644 --- a/drivers/spi/bcm63xx_hsspi.c +++ b/drivers/spi/bcm63xx_hsspi.c @@ -217,7 +217,7 @@ static int bcm63xx_hsspi_xfer(struct udevice *dev, unsigned int bitlen, const void *dout, void *din, unsigned long flags) { struct bcm63xx_hsspi_priv *priv = dev_get_priv(dev->parent); - struct dm_spi_slave_platdata *plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *plat = dev_get_parent_plat(dev); size_t data_bytes = bitlen / 8; size_t step_size = HSSPI_FIFO_SIZE; uint16_t opcode = 0; @@ -316,7 +316,7 @@ static const struct udevice_id bcm63xx_hsspi_ids[] = { static int bcm63xx_hsspi_child_pre_probe(struct udevice *dev) { struct bcm63xx_hsspi_priv *priv = dev_get_priv(dev->parent); - struct dm_spi_slave_platdata *plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *plat = dev_get_parent_plat(dev); /* check cs */ if (plat->cs >= priv->num_cs) { diff --git a/drivers/spi/bcm63xx_spi.c b/drivers/spi/bcm63xx_spi.c index 97b72d263a..fe5fe5b716 100644 --- a/drivers/spi/bcm63xx_spi.c +++ b/drivers/spi/bcm63xx_spi.c @@ -237,7 +237,7 @@ static int bcm63xx_spi_xfer(struct udevice *dev, unsigned int bitlen, if (flags & SPI_XFER_END) { struct dm_spi_slave_platdata *plat = - dev_get_parent_platdata(dev); + dev_get_parent_plat(dev); uint16_t val, cmd; int ret; @@ -351,7 +351,7 @@ static int bcm63xx_spi_child_pre_probe(struct udevice *dev) struct bcm63xx_spi_priv *priv = dev_get_priv(dev->parent); const unsigned long *regs = priv->regs; struct spi_slave *slave = dev_get_parent_priv(dev); - struct dm_spi_slave_platdata *plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *plat = dev_get_parent_plat(dev); /* check cs */ if (plat->cs >= priv->num_cs) { diff --git a/drivers/spi/bcmstb_spi.c b/drivers/spi/bcmstb_spi.c index d5ec2bccfb..da874760b7 100644 --- a/drivers/spi/bcmstb_spi.c +++ b/drivers/spi/bcmstb_spi.c @@ -434,6 +434,6 @@ U_BOOT_DRIVER(bcmstb_spi) = { .ops = &bcmstb_spi_ops, .ofdata_to_platdata = bcmstb_spi_ofdata_to_platdata, .probe = bcmstb_spi_probe, - .platdata_auto = sizeof(struct bcmstb_spi_platdata), + .plat_auto = sizeof(struct bcmstb_spi_platdata), .priv_auto = sizeof(struct bcmstb_spi_priv), }; diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c index dcee7b7703..f097fc17a5 100644 --- a/drivers/spi/cadence_qspi.c +++ b/drivers/spi/cadence_qspi.c @@ -27,7 +27,7 @@ static int cadence_spi_write_speed(struct udevice *bus, uint hz) { - struct cadence_spi_platdata *plat = bus->platdata; + struct cadence_spi_platdata *plat = bus->plat; struct cadence_spi_priv *priv = dev_get_priv(bus); cadence_qspi_apb_config_baudrate_div(priv->regbase, @@ -130,7 +130,7 @@ static int spi_calibration(struct udevice *bus, uint hz) static int cadence_spi_set_speed(struct udevice *bus, uint hz) { - struct cadence_spi_platdata *plat = bus->platdata; + struct cadence_spi_platdata *plat = bus->plat; struct cadence_spi_priv *priv = dev_get_priv(bus); int err; @@ -165,7 +165,7 @@ static int cadence_spi_set_speed(struct udevice *bus, uint hz) static int cadence_spi_probe(struct udevice *bus) { - struct cadence_spi_platdata *plat = bus->platdata; + struct cadence_spi_platdata *plat = bus->plat; struct cadence_spi_priv *priv = dev_get_priv(bus); struct clk clk; int ret; @@ -212,7 +212,7 @@ static int cadence_spi_remove(struct udevice *dev) static int cadence_spi_set_mode(struct udevice *bus, uint mode) { - struct cadence_spi_platdata *plat = bus->platdata; + struct cadence_spi_platdata *plat = bus->plat; struct cadence_spi_priv *priv = dev_get_priv(bus); /* Disable QSPI */ @@ -235,7 +235,7 @@ static int cadence_spi_mem_exec_op(struct spi_slave *spi, const struct spi_mem_op *op) { struct udevice *bus = spi->dev->parent; - struct cadence_spi_platdata *plat = bus->platdata; + struct cadence_spi_platdata *plat = bus->plat; struct cadence_spi_priv *priv = dev_get_priv(bus); void *base = priv->regbase; int err = 0; @@ -284,7 +284,7 @@ static int cadence_spi_mem_exec_op(struct spi_slave *spi, static int cadence_spi_ofdata_to_platdata(struct udevice *bus) { - struct cadence_spi_platdata *plat = bus->platdata; + struct cadence_spi_platdata *plat = bus->plat; ofnode subnode; plat->regbase = (void *)devfdt_get_addr_index(bus, 0); @@ -354,7 +354,7 @@ U_BOOT_DRIVER(cadence_spi) = { .of_match = cadence_spi_ids, .ops = &cadence_spi_ops, .ofdata_to_platdata = cadence_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct cadence_spi_platdata), + .plat_auto = sizeof(struct cadence_spi_platdata), .priv_auto = sizeof(struct cadence_spi_priv), .probe = cadence_spi_probe, .remove = cadence_spi_remove, diff --git a/drivers/spi/cf_spi.c b/drivers/spi/cf_spi.c index ec3bf6b6a4..8c1a62ee28 100644 --- a/drivers/spi/cf_spi.c +++ b/drivers/spi/cf_spi.c @@ -115,7 +115,7 @@ static int coldfire_spi_claim_bus(struct udevice *dev) struct coldfire_spi_priv *cfspi = dev_get_priv(bus); struct dspi *dspi = cfspi->regs; struct dm_spi_slave_platdata *slave_plat = - dev_get_parent_platdata(dev); + dev_get_parent_plat(dev); if ((in_be32(&dspi->sr) & DSPI_SR_TXRXS) != DSPI_SR_TXRXS) return -1; @@ -134,7 +134,7 @@ static int coldfire_spi_release_bus(struct udevice *dev) struct coldfire_spi_priv *cfspi = dev_get_priv(bus); struct dspi *dspi = cfspi->regs; struct dm_spi_slave_platdata *slave_plat = - dev_get_parent_platdata(dev); + dev_get_parent_plat(dev); /* Clear FIFO */ clrbits_be32(&dspi->mcr, DSPI_MCR_CTXF | DSPI_MCR_CRXF); @@ -150,7 +150,7 @@ static int coldfire_spi_xfer(struct udevice *dev, unsigned int bitlen, { struct udevice *bus = dev_get_parent(dev); struct coldfire_spi_priv *cfspi = dev_get_priv(bus); - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); u16 *spi_rd16 = NULL, *spi_wr16 = NULL; u8 *spi_rd = NULL, *spi_wr = NULL; static u32 ctrl; @@ -387,7 +387,7 @@ static int coldfire_spi_probe(struct udevice *bus) static int coldfire_dspi_ofdata_to_platdata(struct udevice *bus) { fdt_addr_t addr; - struct coldfire_spi_platdata *plat = bus->platdata; + struct coldfire_spi_platdata *plat = bus->plat; const void *blob = gd->fdt_blob; int node = dev_of_offset(bus); int *ctar, len; @@ -452,7 +452,7 @@ U_BOOT_DRIVER(coldfire_spi) = { #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) .of_match = coldfire_spi_ids, .ofdata_to_platdata = coldfire_dspi_ofdata_to_platdata, - .platdata_auto = sizeof(struct coldfire_spi_platdata), + .plat_auto = sizeof(struct coldfire_spi_platdata), #endif .probe = coldfire_spi_probe, .ops = &coldfire_spi_ops, diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c index b69224e983..c60f2fedf3 100644 --- a/drivers/spi/davinci_spi.c +++ b/drivers/spi/davinci_spi.c @@ -334,7 +334,7 @@ static int davinci_spi_set_mode(struct udevice *bus, uint mode) static int davinci_spi_claim_bus(struct udevice *dev) { struct dm_spi_slave_platdata *slave_plat = - dev_get_parent_platdata(dev); + dev_get_parent_plat(dev); struct udevice *bus = dev->parent; struct davinci_spi_slave *ds = dev_get_priv(bus); @@ -359,7 +359,7 @@ static int davinci_spi_xfer(struct udevice *dev, unsigned int bitlen, unsigned long flags) { struct dm_spi_slave_platdata *slave = - dev_get_parent_platdata(dev); + dev_get_parent_plat(dev); struct udevice *bus = dev->parent; struct davinci_spi_slave *ds = dev_get_priv(bus); @@ -383,7 +383,7 @@ static const struct dm_spi_ops davinci_spi_ops = { static int davinci_spi_probe(struct udevice *bus) { struct davinci_spi_slave *ds = dev_get_priv(bus); - struct davinci_spi_platdata *plat = bus->platdata; + struct davinci_spi_platdata *plat = bus->plat; ds->regs = plat->regs; ds->num_cs = plat->num_cs; @@ -393,7 +393,7 @@ static int davinci_spi_probe(struct udevice *bus) #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) static int davinci_ofdata_to_platadata(struct udevice *bus) { - struct davinci_spi_platdata *plat = bus->platdata; + struct davinci_spi_platdata *plat = bus->plat; fdt_addr_t addr; addr = dev_read_addr(bus); @@ -420,7 +420,7 @@ U_BOOT_DRIVER(davinci_spi) = { #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) .of_match = davinci_spi_ids, .ofdata_to_platdata = davinci_ofdata_to_platadata, - .platdata_auto = sizeof(struct davinci_spi_platdata), + .plat_auto = sizeof(struct davinci_spi_platdata), #endif .probe = davinci_spi_probe, .ops = &davinci_spi_ops, diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c index 8d48e04ed1..390fbcf4b6 100644 --- a/drivers/spi/designware_spi.c +++ b/drivers/spi/designware_spi.c @@ -155,7 +155,7 @@ static int request_gpio_cs(struct udevice *bus) static int dw_spi_ofdata_to_platdata(struct udevice *bus) { - struct dw_spi_platdata *plat = bus->platdata; + struct dw_spi_platdata *plat = bus->plat; plat->regs = dev_read_addr_ptr(bus); @@ -478,7 +478,7 @@ static int dw_spi_xfer(struct udevice *dev, unsigned int bitlen, static int dw_spi_set_speed(struct udevice *bus, uint speed) { - struct dw_spi_platdata *plat = bus->platdata; + struct dw_spi_platdata *plat = bus->plat; struct dw_spi_priv *priv = dev_get_priv(bus); u16 clk_div; @@ -560,7 +560,7 @@ U_BOOT_DRIVER(dw_spi) = { .of_match = dw_spi_ids, .ops = &dw_spi_ops, .ofdata_to_platdata = dw_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct dw_spi_platdata), + .plat_auto = sizeof(struct dw_spi_platdata), .priv_auto = sizeof(struct dw_spi_priv), .probe = dw_spi_probe, .remove = dw_spi_remove, diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c index 8a82e60f00..2d1602c9cb 100644 --- a/drivers/spi/exynos_spi.c +++ b/drivers/spi/exynos_spi.c @@ -253,7 +253,7 @@ static void spi_cs_deactivate(struct udevice *dev) 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); @@ -368,7 +368,7 @@ static int exynos_spi_xfer(struct udevice *dev, unsigned int bitlen, 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; @@ -427,7 +427,7 @@ U_BOOT_DRIVER(exynos_spi) = { .of_match = exynos_spi_ids, .ops = &exynos_spi_ops, .ofdata_to_platdata = exynos_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct exynos_spi_platdata), + .plat_auto = sizeof(struct exynos_spi_platdata), .priv_auto = sizeof(struct exynos_spi_priv), .probe = exynos_spi_probe, }; diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c index 49577afe38..dfea569b28 100644 --- a/drivers/spi/fsl_dspi.c +++ b/drivers/spi/fsl_dspi.c @@ -448,7 +448,7 @@ static int fsl_dspi_cfg_speed(struct fsl_dspi_priv *priv, uint speed) static int fsl_dspi_child_pre_probe(struct udevice *dev) { - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); struct fsl_dspi_priv *priv = dev_get_priv(dev->parent); u32 cs_sck_delay = 0, sck_cs_delay = 0; unsigned char pcssck = 0, cssck = 0; @@ -522,7 +522,7 @@ static int fsl_dspi_claim_bus(struct udevice *dev) struct fsl_dspi_priv *priv; struct udevice *bus = dev->parent; struct dm_spi_slave_platdata *slave_plat = - dev_get_parent_platdata(dev); + dev_get_parent_plat(dev); priv = dev_get_priv(bus); @@ -553,7 +553,7 @@ static int fsl_dspi_release_bus(struct udevice *dev) struct udevice *bus = dev->parent; struct fsl_dspi_priv *priv = dev_get_priv(bus); struct dm_spi_slave_platdata *slave_plat = - dev_get_parent_platdata(dev); + dev_get_parent_plat(dev); /* halt module */ dspi_halt(priv, 1); @@ -576,7 +576,7 @@ static int fsl_dspi_bind(struct udevice *bus) static int fsl_dspi_ofdata_to_platdata(struct udevice *bus) { fdt_addr_t addr; - struct fsl_dspi_platdata *plat = bus->platdata; + struct fsl_dspi_platdata *plat = bus->plat; const void *blob = gd->fdt_blob; int node = dev_of_offset(bus); @@ -608,7 +608,7 @@ static int fsl_dspi_xfer(struct udevice *dev, unsigned int bitlen, const void *dout, void *din, unsigned long flags) { struct fsl_dspi_priv *priv; - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); struct udevice *bus; bus = dev->parent; @@ -660,7 +660,7 @@ U_BOOT_DRIVER(fsl_dspi) = { .of_match = fsl_dspi_ids, .ops = &fsl_dspi_ops, .ofdata_to_platdata = fsl_dspi_ofdata_to_platdata, - .platdata_auto = sizeof(struct fsl_dspi_platdata), + .plat_auto = sizeof(struct fsl_dspi_platdata), .priv_auto = sizeof(struct fsl_dspi_priv), .probe = fsl_dspi_probe, .child_pre_probe = fsl_dspi_child_pre_probe, diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c index 0553999379..05e564ba6f 100644 --- a/drivers/spi/fsl_espi.c +++ b/drivers/spi/fsl_espi.c @@ -508,7 +508,7 @@ static int fsl_espi_set_mode(struct udevice *bus, uint mode) static int fsl_espi_child_pre_probe(struct udevice *dev) { - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); struct udevice *bus = dev->parent; struct fsl_spi_slave *fsl = dev_get_priv(bus); @@ -544,7 +544,7 @@ static const struct dm_spi_ops fsl_espi_ops = { static int fsl_espi_ofdata_to_platdata(struct udevice *bus) { fdt_addr_t addr; - struct fsl_espi_platdata *plat = bus->platdata; + struct fsl_espi_platdata *plat = bus->plat; const void *blob = gd->fdt_blob; int node = dev_of_offset(bus); @@ -576,7 +576,7 @@ U_BOOT_DRIVER(fsl_espi) = { .ofdata_to_platdata = fsl_espi_ofdata_to_platdata, #endif .ops = &fsl_espi_ops, - .platdata_auto = sizeof(struct fsl_espi_platdata), + .plat_auto = sizeof(struct fsl_espi_platdata), .priv_auto = sizeof(struct fsl_spi_slave), .probe = fsl_espi_probe, .child_pre_probe = fsl_espi_child_pre_probe, diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c index 412d031704..089c2d802d 100644 --- a/drivers/spi/fsl_qspi.c +++ b/drivers/spi/fsl_qspi.c @@ -516,7 +516,7 @@ static void fsl_qspi_invalidate(struct fsl_qspi *q) static void fsl_qspi_select_mem(struct fsl_qspi *q, struct spi_slave *slave) { struct dm_spi_slave_platdata *plat = - dev_get_parent_platdata(slave->dev); + dev_get_parent_plat(slave->dev); if (q->selected == plat->cs) return; diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index d2fc9e24fa..0ee691de2b 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -667,7 +667,7 @@ static int ich_spi_get_basics(struct udevice *bus, bool can_probe, * 1. Using of-platdata, in which case we have the BDF and can access the * registers by reading the BAR * 2. Not using of-platdata, but still with a SPI controller that is on its own - * PCI PDF. In this case we read the BDF from the parent platdata and again get + * PCI PDF. In this case we read the BDF from the parent plat and again get * the registers by reading the BAR * 3. Using a SPI controller that is a child of the PCH, in which case we try * to find the registers by asking the PCH. This only works if the PCH has @@ -687,7 +687,7 @@ static int ich_get_mmap_bus(struct udevice *bus, ulong *map_basep, if (device_is_on_pci_bus(bus)) { struct pci_child_platdata *pplat; - pplat = dev_get_parent_platdata(bus); + pplat = dev_get_parent_plat(bus); spi_bdf = pplat->devfn; } else { enum ich_version ich_version; @@ -1005,7 +1005,7 @@ U_BOOT_DRIVER(intel_fast_spi) = { .of_match = ich_spi_ids, .ops = &ich_spi_ops, .ofdata_to_platdata = ich_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct ich_spi_platdata), + .plat_auto = sizeof(struct ich_spi_platdata), .priv_auto = sizeof(struct ich_spi_priv), .child_pre_probe = ich_spi_child_pre_probe, .probe = ich_spi_probe, diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c index 22f0540998..e8617f4a9c 100644 --- a/drivers/spi/kirkwood_spi.c +++ b/drivers/spi/kirkwood_spi.c @@ -296,7 +296,7 @@ U_BOOT_DRIVER(mvebu_spi) = { .of_match = mvebu_spi_ids, .ops = &mvebu_spi_ops, .ofdata_to_platdata = mvebu_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct mvebu_spi_platdata), + .plat_auto = sizeof(struct mvebu_spi_platdata), .priv_auto = sizeof(struct mvebu_spi_priv), .probe = mvebu_spi_probe, }; diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c index 378037f993..74ff56d816 100644 --- a/drivers/spi/mpc8xxx_spi.c +++ b/drivers/spi/mpc8xxx_spi.c @@ -107,17 +107,17 @@ static int mpc8xxx_spi_probe(struct udevice *dev) static void mpc8xxx_spi_cs_activate(struct udevice *dev) { struct mpc8xxx_priv *priv = dev_get_priv(dev->parent); - struct dm_spi_slave_platdata *platdata = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *plat = dev_get_parent_plat(dev); - dm_gpio_set_value(&priv->gpios[platdata->cs], 1); + dm_gpio_set_value(&priv->gpios[plat->cs], 1); } static void mpc8xxx_spi_cs_deactivate(struct udevice *dev) { struct mpc8xxx_priv *priv = dev_get_priv(dev->parent); - struct dm_spi_slave_platdata *platdata = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *plat = dev_get_parent_plat(dev); - dm_gpio_set_value(&priv->gpios[platdata->cs], 0); + dm_gpio_set_value(&priv->gpios[plat->cs], 0); } static int mpc8xxx_spi_xfer(struct udevice *dev, uint bitlen, @@ -126,16 +126,16 @@ static int mpc8xxx_spi_xfer(struct udevice *dev, uint bitlen, struct udevice *bus = dev->parent; struct mpc8xxx_priv *priv = dev_get_priv(bus); spi8xxx_t *spi = priv->spi; - struct dm_spi_slave_platdata *platdata = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *plat = dev_get_parent_plat(dev); u32 tmpdin = 0, tmpdout = 0, n; const u8 *cout = dout; u8 *cin = din; debug("%s: slave %s:%u dout %08X din %08X bitlen %u\n", __func__, - bus->name, platdata->cs, (uint)dout, (uint)din, bitlen); - if (platdata->cs >= priv->cs_count) { + bus->name, plat->cs, (uint)dout, (uint)din, bitlen); + if (plat->cs >= priv->cs_count) { dev_err(dev, "chip select index %d too large (cs_count=%d)\n", - platdata->cs, priv->cs_count); + plat->cs, priv->cs_count); return -EINVAL; } if (bitlen % 8) { diff --git a/drivers/spi/mscc_bb_spi.c b/drivers/spi/mscc_bb_spi.c index a1b617246d..e5de49a013 100644 --- a/drivers/spi/mscc_bb_spi.c +++ b/drivers/spi/mscc_bb_spi.c @@ -117,7 +117,7 @@ int mscc_bb_spi_xfer(struct udevice *dev, unsigned int bitlen, const void *dout, void *din, unsigned long flags) { struct udevice *bus = dev_get_parent(dev); - struct dm_spi_slave_platdata *plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *plat = dev_get_parent_plat(dev); struct mscc_bb_priv *priv = dev_get_priv(bus); u32 i, count; const u8 *txd = dout; diff --git a/drivers/spi/mvebu_a3700_spi.c b/drivers/spi/mvebu_a3700_spi.c index b9e058acaa..eddb011480 100644 --- a/drivers/spi/mvebu_a3700_spi.c +++ b/drivers/spi/mvebu_a3700_spi.c @@ -325,7 +325,7 @@ U_BOOT_DRIVER(mvebu_spi) = { .of_match = mvebu_spi_ids, .ops = &mvebu_spi_ops, .ofdata_to_platdata = mvebu_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct mvebu_spi_platdata), + .plat_auto = sizeof(struct mvebu_spi_platdata), .probe = mvebu_spi_probe, .remove = mvebu_spi_remove, }; diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c index f571392e76..fcac5a570e 100644 --- a/drivers/spi/mxc_spi.c +++ b/drivers/spi/mxc_spi.c @@ -69,7 +69,7 @@ static void mxc_spi_cs_activate(struct mxc_spi_slave *mxcs) { #if CONFIG_IS_ENABLED(DM_SPI) struct udevice *dev = mxcs->dev; - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); u32 cs = slave_plat->cs; @@ -87,7 +87,7 @@ static void mxc_spi_cs_deactivate(struct mxc_spi_slave *mxcs) { #if CONFIG_IS_ENABLED(DM_SPI) struct udevice *dev = mxcs->dev; - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); u32 cs = slave_plat->cs; @@ -559,7 +559,7 @@ static int mxc_spi_xfer(struct udevice *dev, unsigned int bitlen, static int mxc_spi_claim_bus(struct udevice *dev) { struct mxc_spi_slave *mxcs = dev_get_platdata(dev->parent); - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); mxcs->dev = dev; @@ -605,7 +605,7 @@ U_BOOT_DRIVER(mxc_spi) = { .id = UCLASS_SPI, .of_match = mxc_spi_ids, .ops = &mxc_spi_ops, - .platdata_auto = sizeof(struct mxc_spi_slave), + .plat_auto = sizeof(struct mxc_spi_slave), .probe = mxc_spi_probe, }; #endif diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c index 57e7a2eae6..06ab107289 100644 --- a/drivers/spi/mxs_spi.c +++ b/drivers/spi/mxs_spi.c @@ -443,7 +443,7 @@ static const struct dm_spi_ops mxs_spi_ops = { #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) static int mxs_ofdata_to_platdata(struct udevice *bus) { - struct mxs_spi_platdata *plat = bus->platdata; + struct mxs_spi_platdata *plat = bus->plat; u32 prop[2]; int ret; @@ -487,7 +487,7 @@ U_BOOT_DRIVER(fsl_imx23_spi) = { .of_match = mxs_spi_ids, .ofdata_to_platdata = mxs_ofdata_to_platdata, #endif - .platdata_auto = sizeof(struct mxs_spi_platdata), + .plat_auto = sizeof(struct mxs_spi_platdata), .ops = &mxs_spi_ops, .priv_auto = sizeof(struct mxs_spi_priv), .probe = mxs_spi_probe, diff --git a/drivers/spi/nxp_fspi.c b/drivers/spi/nxp_fspi.c index 96f981a119..f41134172c 100644 --- a/drivers/spi/nxp_fspi.c +++ b/drivers/spi/nxp_fspi.c @@ -887,7 +887,7 @@ static int nxp_fspi_claim_bus(struct udevice *dev) { struct nxp_fspi *f; struct udevice *bus; - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); bus = dev->parent; f = dev_get_priv(bus); diff --git a/drivers/spi/octeon_spi.c b/drivers/spi/octeon_spi.c index c0c248d190..6466329326 100644 --- a/drivers/spi/octeon_spi.c +++ b/drivers/spi/octeon_spi.c @@ -81,7 +81,7 @@ struct octeon_spi { static u64 octeon_spi_set_mpicfg(struct udevice *dev) { - struct dm_spi_slave_platdata *slave = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave = dev_get_parent_plat(dev); struct udevice *bus = dev_get_parent(dev); struct octeon_spi *priv = dev_get_priv(bus); u64 mpi_cfg; diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c index 1beaea7788..dc277aae01 100644 --- a/drivers/spi/omap3_spi.c +++ b/drivers/spi/omap3_spi.c @@ -378,7 +378,7 @@ static int omap3_spi_claim_bus(struct udevice *dev) { struct udevice *bus = dev->parent; struct omap3_spi_priv *priv = dev_get_priv(bus); - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); priv->cs = slave_plat->cs; priv->freq = slave_plat->max_hz; @@ -402,7 +402,7 @@ static int omap3_spi_set_wordlen(struct udevice *dev, unsigned int wordlen) { struct udevice *bus = dev->parent; struct omap3_spi_priv *priv = dev_get_priv(bus); - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); priv->cs = slave_plat->cs; priv->wordlen = wordlen; @@ -507,7 +507,7 @@ U_BOOT_DRIVER(omap3_spi) = { #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) .of_match = omap3_spi_ids, .ofdata_to_platdata = omap3_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct omap3_spi_plat), + .plat_auto = sizeof(struct omap3_spi_plat), #endif .probe = omap3_spi_probe, .ops = &omap3_spi_ops, diff --git a/drivers/spi/pic32_spi.c b/drivers/spi/pic32_spi.c index b208000caa..463c13c5bd 100644 --- a/drivers/spi/pic32_spi.c +++ b/drivers/spi/pic32_spi.c @@ -244,7 +244,7 @@ static int pic32_spi_xfer(struct udevice *slave, unsigned int bitlen, ulong tbase; priv = dev_get_priv(bus); - slave_plat = dev_get_parent_platdata(slave); + slave_plat = dev_get_parent_plat(slave); debug("spi_xfer: bus:%i cs:%i flags:%lx\n", bus->seq, slave_plat->cs, flags); diff --git a/drivers/spi/pl022_spi.c b/drivers/spi/pl022_spi.c index e9fd618562..712385bcc9 100644 --- a/drivers/spi/pl022_spi.c +++ b/drivers/spi/pl022_spi.c @@ -288,7 +288,7 @@ static const struct dm_spi_ops pl022_spi_ops = { #if !CONFIG_IS_ENABLED(OF_PLATDATA) static int pl022_spi_ofdata_to_platdata(struct udevice *bus) { - struct pl022_spi_pdata *plat = bus->platdata; + struct pl022_spi_pdata *plat = bus->plat; const void *fdt = gd->fdt_blob; int node = dev_of_offset(bus); struct clk clkdev; @@ -319,7 +319,7 @@ U_BOOT_DRIVER(pl022_spi) = { .ofdata_to_platdata = pl022_spi_ofdata_to_platdata, #endif .ops = &pl022_spi_ops, - .platdata_auto = sizeof(struct pl022_spi_pdata), + .plat_auto = sizeof(struct pl022_spi_pdata), .priv_auto = sizeof(struct pl022_spi_slave), .probe = pl022_spi_probe, }; diff --git a/drivers/spi/renesas_rpc_spi.c b/drivers/spi/renesas_rpc_spi.c index 7018814f9c..275fa43103 100644 --- a/drivers/spi/renesas_rpc_spi.c +++ b/drivers/spi/renesas_rpc_spi.c @@ -464,7 +464,7 @@ U_BOOT_DRIVER(rpc_spi) = { .of_match = rpc_spi_ids, .ops = &rpc_spi_ops, .ofdata_to_platdata = rpc_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct rpc_spi_platdata), + .plat_auto = sizeof(struct rpc_spi_platdata), .priv_auto = sizeof(struct rpc_spi_priv), .bind = rpc_spi_bind, .probe = rpc_spi_probe, diff --git a/drivers/spi/rk_spi.c b/drivers/spi/rk_spi.c index cf9084c357..93d125e59b 100644 --- a/drivers/spi/rk_spi.c +++ b/drivers/spi/rk_spi.c @@ -135,7 +135,7 @@ static int rkspi_wait_till_not_busy(struct rockchip_spi *regs) static void spi_cs_activate(struct udevice *dev, uint cs) { struct udevice *bus = dev->parent; - struct rockchip_spi_platdata *plat = bus->platdata; + struct rockchip_spi_platdata *plat = bus->plat; struct rockchip_spi_priv *priv = dev_get_priv(bus); struct rockchip_spi *regs = priv->regs; @@ -161,7 +161,7 @@ static void spi_cs_activate(struct udevice *dev, uint cs) static void spi_cs_deactivate(struct udevice *dev, uint cs) { struct udevice *bus = dev->parent; - struct rockchip_spi_platdata *plat = bus->platdata; + struct rockchip_spi_platdata *plat = bus->plat; struct rockchip_spi_priv *priv = dev_get_priv(bus); struct rockchip_spi *regs = priv->regs; @@ -176,7 +176,7 @@ static void spi_cs_deactivate(struct udevice *dev, uint cs) #if CONFIG_IS_ENABLED(OF_PLATDATA) static int conv_of_platdata(struct udevice *dev) { - struct rockchip_spi_platdata *plat = dev->platdata; + struct rockchip_spi_platdata *plat = dev->plat; struct dtd_rockchip_rk3288_spi *dtplat = &plat->of_plat; struct rockchip_spi_priv *priv = dev_get_priv(dev); int ret; @@ -432,7 +432,7 @@ static int rockchip_spi_xfer(struct udevice *dev, unsigned int bitlen, struct udevice *bus = dev->parent; struct rockchip_spi_priv *priv = dev_get_priv(bus); struct rockchip_spi *regs = priv->regs; - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); int len = bitlen >> 3; const u8 *out = dout; u8 *in = din; @@ -561,7 +561,7 @@ U_BOOT_DRIVER(rockchip_rk3288_spi) = { .of_match = rockchip_spi_ids, .ops = &rockchip_spi_ops, .ofdata_to_platdata = rockchip_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct rockchip_spi_platdata), + .plat_auto = sizeof(struct rockchip_spi_platdata), .priv_auto = sizeof(struct rockchip_spi_priv), .probe = rockchip_spi_probe, }; diff --git a/drivers/spi/sh_qspi.c b/drivers/spi/sh_qspi.c index 35381c16b3..5908e287e5 100644 --- a/drivers/spi/sh_qspi.c +++ b/drivers/spi/sh_qspi.c @@ -354,7 +354,7 @@ U_BOOT_DRIVER(sh_qspi) = { .of_match = sh_qspi_ids, .ops = &sh_qspi_ops, .ofdata_to_platdata = sh_qspi_ofdata_to_platdata, - .platdata_auto = sizeof(struct sh_qspi_slave), + .plat_auto = sizeof(struct sh_qspi_slave), .probe = sh_qspi_probe, }; #endif diff --git a/drivers/spi/soft_spi.c b/drivers/spi/soft_spi.c index c71357795d..c7ed23aa5d 100644 --- a/drivers/spi/soft_spi.c +++ b/drivers/spi/soft_spi.c @@ -228,7 +228,7 @@ static const struct dm_spi_ops soft_spi_ops = { static int soft_spi_ofdata_to_platdata(struct udevice *dev) { - struct soft_spi_platdata *plat = dev->platdata; + struct soft_spi_platdata *plat = dev->plat; const void *blob = gd->fdt_blob; int node = dev_of_offset(dev); @@ -240,7 +240,7 @@ static int soft_spi_ofdata_to_platdata(struct udevice *dev) static int soft_spi_probe(struct udevice *dev) { struct spi_slave *slave = dev_get_parent_priv(dev); - struct soft_spi_platdata *plat = dev->platdata; + struct soft_spi_platdata *plat = dev->plat; int cs_flags, clk_flags; int ret; @@ -281,7 +281,7 @@ U_BOOT_DRIVER(soft_spi) = { .of_match = soft_spi_ids, .ops = &soft_spi_ops, .ofdata_to_platdata = soft_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct soft_spi_platdata), + .plat_auto = sizeof(struct soft_spi_platdata), .priv_auto = sizeof(struct soft_spi_priv), .probe = soft_spi_probe, }; diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c index 721d65426b..a549b66639 100644 --- a/drivers/spi/spi-qup.c +++ b/drivers/spi/spi-qup.c @@ -701,7 +701,7 @@ static int qup_spi_xfer(struct udevice *dev, unsigned int bitlen, const void *dout, void *din, unsigned long flags) { struct udevice *bus = dev_get_parent(dev); - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); unsigned int len; const u8 *txp = dout; u8 *rxp = din; diff --git a/drivers/spi/spi-sifive.c b/drivers/spi/spi-sifive.c index fdbcdb8f43..81cdfc0e10 100644 --- a/drivers/spi/spi-sifive.c +++ b/drivers/spi/spi-sifive.c @@ -212,7 +212,7 @@ static int sifive_spi_xfer(struct udevice *dev, unsigned int bitlen, { struct udevice *bus = dev->parent; struct sifive_spi *spi = dev_get_priv(bus); - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); const u8 *tx_ptr = dout; u8 *rx_ptr = din; u32 remaining_len; diff --git a/drivers/spi/spi-sunxi.c b/drivers/spi/spi-sunxi.c index 84c1ece409..5b6c7202ba 100644 --- a/drivers/spi/spi-sunxi.c +++ b/drivers/spi/spi-sunxi.c @@ -339,7 +339,7 @@ static int sun4i_spi_xfer(struct udevice *dev, unsigned int bitlen, { struct udevice *bus = dev->parent; struct sun4i_spi_priv *priv = dev_get_priv(bus); - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); u32 len = bitlen / 8; u32 rx_fifocnt; @@ -631,7 +631,7 @@ U_BOOT_DRIVER(sun4i_spi) = { .of_match = sun4i_spi_ids, .ops = &sun4i_spi_ops, .ofdata_to_platdata = sun4i_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct sun4i_spi_platdata), + .plat_auto = sizeof(struct sun4i_spi_platdata), .priv_auto = sizeof(struct sun4i_spi_priv), .probe = sun4i_spi_probe, }; diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c index b48d2415ff..26a847773e 100644 --- a/drivers/spi/spi-uclass.c +++ b/drivers/spi/spi-uclass.c @@ -153,7 +153,7 @@ int spi_write_then_read(struct spi_slave *slave, const u8 *opcode, #if !CONFIG_IS_ENABLED(OF_PLATDATA) static int spi_child_post_bind(struct udevice *dev) { - struct dm_spi_slave_platdata *plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *plat = dev_get_parent_plat(dev); if (!dev_of_valid(dev)) return 0; @@ -197,7 +197,7 @@ static int spi_post_probe(struct udevice *bus) static int spi_child_pre_probe(struct udevice *dev) { - struct dm_spi_slave_platdata *plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *plat = dev_get_parent_plat(dev); struct spi_slave *slave = dev_get_parent_priv(dev); /* @@ -218,7 +218,7 @@ static int spi_child_pre_probe(struct udevice *dev) int spi_chip_select(struct udevice *dev) { - struct dm_spi_slave_platdata *plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *plat = dev_get_parent_plat(dev); return plat ? plat->cs : -ENOENT; } @@ -256,7 +256,7 @@ int spi_find_chip_select(struct udevice *bus, int cs, struct udevice **devp) device_find_next_child(&dev)) { struct dm_spi_slave_platdata *plat; - plat = dev_get_parent_platdata(dev); + plat = dev_get_parent_plat(dev); debug("%s: plat=%p, cs=%d\n", __func__, plat, plat->cs); if (plat->cs == cs) { *devp = dev; @@ -353,7 +353,7 @@ int spi_get_bus_and_cs(int busnum, int cs, int speed, int mode, ret); return ret; } - plat = dev_get_parent_platdata(dev); + plat = dev_get_parent_plat(dev); plat->cs = cs; if (speed) { plat->max_hz = speed; @@ -504,7 +504,7 @@ UCLASS_DRIVER(spi) = { .child_pre_probe = spi_child_pre_probe, .per_device_auto = sizeof(struct dm_spi_bus), .per_child_auto = sizeof(struct spi_slave), - .per_child_platdata_auto = + .per_child_plat_auto = sizeof(struct dm_spi_slave_platdata), #if !CONFIG_IS_ENABLED(OF_PLATDATA) .child_post_bind = spi_child_post_bind, diff --git a/drivers/spi/stm32_qspi.c b/drivers/spi/stm32_qspi.c index 44317780eb..4d67e9ba46 100644 --- a/drivers/spi/stm32_qspi.c +++ b/drivers/spi/stm32_qspi.c @@ -400,7 +400,7 @@ static int stm32_qspi_probe(struct udevice *bus) static int stm32_qspi_claim_bus(struct udevice *dev) { struct stm32_qspi_priv *priv = dev_get_priv(dev->parent); - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); int slave_cs = slave_plat->cs; if (slave_cs >= STM32_QSPI_MAX_CHIP) diff --git a/drivers/spi/stm32_spi.c b/drivers/spi/stm32_spi.c index 4c7fee6fbb..d2c2262dc7 100644 --- a/drivers/spi/stm32_spi.c +++ b/drivers/spi/stm32_spi.c @@ -407,7 +407,7 @@ static int stm32_spi_xfer(struct udevice *slave, unsigned int bitlen, debug("%s: priv->tx_len=%d priv->rx_len=%d\n", __func__, priv->tx_len, priv->rx_len); - slave_plat = dev_get_parent_platdata(slave); + slave_plat = dev_get_parent_plat(slave); if (flags & SPI_XFER_BEGIN) stm32_spi_set_cs(bus, slave_plat->cs, false); diff --git a/drivers/spi/tegra114_spi.c b/drivers/spi/tegra114_spi.c index 3848f9f31b..dee95f4047 100644 --- a/drivers/spi/tegra114_spi.c +++ b/drivers/spi/tegra114_spi.c @@ -99,7 +99,7 @@ struct tegra114_spi_priv { static int tegra114_spi_ofdata_to_platdata(struct udevice *bus) { - struct tegra_spi_platdata *plat = bus->platdata; + struct tegra_spi_platdata *plat = bus->plat; plat->base = dev_read_addr(bus); plat->periph_id = clock_decode_periph_id(bus); @@ -352,7 +352,7 @@ static int tegra114_spi_xfer(struct udevice *dev, unsigned int bitlen, static int tegra114_spi_set_speed(struct udevice *bus, uint speed) { - struct tegra_spi_platdata *plat = bus->platdata; + struct tegra_spi_platdata *plat = bus->plat; struct tegra114_spi_priv *priv = dev_get_priv(bus); if (speed > plat->frequency) @@ -394,7 +394,7 @@ U_BOOT_DRIVER(tegra114_spi) = { .of_match = tegra114_spi_ids, .ops = &tegra114_spi_ops, .ofdata_to_platdata = tegra114_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct tegra_spi_platdata), + .plat_auto = sizeof(struct tegra_spi_platdata), .priv_auto = sizeof(struct tegra114_spi_priv), .probe = tegra114_spi_probe, }; diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c index bc39e8b9aa..f2d2701d3a 100644 --- a/drivers/spi/tegra20_sflash.c +++ b/drivers/spi/tegra20_sflash.c @@ -89,7 +89,7 @@ int tegra20_sflash_cs_info(struct udevice *bus, unsigned int cs, static int tegra20_sflash_ofdata_to_platdata(struct udevice *bus) { - struct tegra_spi_platdata *plat = bus->platdata; + struct tegra_spi_platdata *plat = bus->plat; const void *blob = gd->fdt_blob; int node = dev_of_offset(bus); @@ -314,7 +314,7 @@ static int tegra20_sflash_xfer(struct udevice *dev, unsigned int bitlen, static int tegra20_sflash_set_speed(struct udevice *bus, uint speed) { - struct tegra_spi_platdata *plat = bus->platdata; + struct tegra_spi_platdata *plat = bus->plat; struct tegra20_sflash_priv *priv = dev_get_priv(bus); if (speed > plat->frequency) @@ -354,7 +354,7 @@ U_BOOT_DRIVER(tegra20_sflash) = { .of_match = tegra20_sflash_ids, .ops = &tegra20_sflash_ops, .ofdata_to_platdata = tegra20_sflash_ofdata_to_platdata, - .platdata_auto = sizeof(struct tegra_spi_platdata), + .plat_auto = sizeof(struct tegra_spi_platdata), .priv_auto = sizeof(struct tegra20_sflash_priv), .probe = tegra20_sflash_probe, }; diff --git a/drivers/spi/tegra20_slink.c b/drivers/spi/tegra20_slink.c index 9bec7413e7..58c4e3fb8b 100644 --- a/drivers/spi/tegra20_slink.c +++ b/drivers/spi/tegra20_slink.c @@ -95,7 +95,7 @@ struct tegra_spi_slave { static int tegra30_spi_ofdata_to_platdata(struct udevice *bus) { - struct tegra_spi_platdata *plat = bus->platdata; + struct tegra_spi_platdata *plat = bus->plat; const void *blob = gd->fdt_blob; int node = dev_of_offset(bus); @@ -314,7 +314,7 @@ static int tegra30_spi_xfer(struct udevice *dev, unsigned int bitlen, static int tegra30_spi_set_speed(struct udevice *bus, uint speed) { - struct tegra_spi_platdata *plat = bus->platdata; + struct tegra_spi_platdata *plat = bus->plat; struct tegra30_spi_priv *priv = dev_get_priv(bus); if (speed > plat->frequency) @@ -373,7 +373,7 @@ U_BOOT_DRIVER(tegra30_spi) = { .of_match = tegra30_spi_ids, .ops = &tegra30_spi_ops, .ofdata_to_platdata = tegra30_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct tegra_spi_platdata), + .plat_auto = sizeof(struct tegra_spi_platdata), .priv_auto = sizeof(struct tegra30_spi_priv), .probe = tegra30_spi_probe, }; diff --git a/drivers/spi/tegra210_qspi.c b/drivers/spi/tegra210_qspi.c index c851a7a68d..2e812e7fce 100644 --- a/drivers/spi/tegra210_qspi.c +++ b/drivers/spi/tegra210_qspi.c @@ -99,7 +99,7 @@ struct tegra210_qspi_priv { static int tegra210_qspi_ofdata_to_platdata(struct udevice *bus) { - struct tegra_spi_platdata *plat = bus->platdata; + struct tegra_spi_platdata *plat = bus->plat; plat->base = dev_read_addr(bus); plat->periph_id = clock_decode_periph_id(bus); @@ -380,7 +380,7 @@ static int tegra210_qspi_xfer(struct udevice *dev, unsigned int bitlen, static int tegra210_qspi_set_speed(struct udevice *bus, uint speed) { - struct tegra_spi_platdata *plat = bus->platdata; + struct tegra_spi_platdata *plat = bus->plat; struct tegra210_qspi_priv *priv = dev_get_priv(bus); if (speed > plat->frequency) @@ -423,7 +423,7 @@ U_BOOT_DRIVER(tegra210_qspi) = { .of_match = tegra210_qspi_ids, .ops = &tegra210_qspi_ops, .ofdata_to_platdata = tegra210_qspi_ofdata_to_platdata, - .platdata_auto = sizeof(struct tegra_spi_platdata), + .plat_auto = sizeof(struct tegra_spi_platdata), .priv_auto = sizeof(struct tegra210_qspi_priv), .per_child_auto = sizeof(struct spi_slave), .probe = tegra210_qspi_probe, diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c index 77353ba375..20fe581934 100644 --- a/drivers/spi/ti_qspi.c +++ b/drivers/spi/ti_qspi.c @@ -154,7 +154,7 @@ static void ti_qspi_ctrl_mode_mmap(void *ctrl_mod_mmap, int cs, bool enable) static int ti_qspi_xfer(struct udevice *dev, unsigned int bitlen, const void *dout, void *din, unsigned long flags) { - struct dm_spi_slave_platdata *slave = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave = dev_get_parent_plat(dev); struct ti_qspi_priv *priv; struct udevice *bus; uint words = bitlen >> 3; /* fixed 8-bit word length */ @@ -331,7 +331,7 @@ static int ti_qspi_exec_mem_op(struct spi_slave *slave, bus = slave->dev->parent; priv = dev_get_priv(bus); - slave_plat = dev_get_parent_platdata(slave->dev); + slave_plat = dev_get_parent_plat(slave->dev); /* Only optimize read path. */ if (!op->data.nbytes || op->data.dir != SPI_MEM_DATA_IN || @@ -355,7 +355,7 @@ static int ti_qspi_exec_mem_op(struct spi_slave *slave, static int ti_qspi_claim_bus(struct udevice *dev) { - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); struct ti_qspi_priv *priv; struct udevice *bus; @@ -384,7 +384,7 @@ static int ti_qspi_claim_bus(struct udevice *dev) static int ti_qspi_release_bus(struct udevice *dev) { - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); struct ti_qspi_priv *priv; struct udevice *bus; diff --git a/drivers/spi/uniphier_spi.c b/drivers/spi/uniphier_spi.c index 048d74f1f8..02bcc0a7da 100644 --- a/drivers/spi/uniphier_spi.c +++ b/drivers/spi/uniphier_spi.c @@ -113,7 +113,7 @@ static void uniphier_spi_regdump(struct uniphier_spi_priv *priv) static void spi_cs_activate(struct udevice *dev) { struct udevice *bus = dev->parent; - struct uniphier_spi_platdata *plat = bus->platdata; + struct uniphier_spi_platdata *plat = bus->plat; struct uniphier_spi_priv *priv = dev_get_priv(bus); ulong delay_us; /* The delay completed so far */ u32 val; @@ -139,7 +139,7 @@ static void spi_cs_activate(struct udevice *dev) static void spi_cs_deactivate(struct udevice *dev) { struct udevice *bus = dev->parent; - struct uniphier_spi_platdata *plat = bus->platdata; + struct uniphier_spi_platdata *plat = bus->plat; struct uniphier_spi_priv *priv = dev_get_priv(bus); u32 val; @@ -279,7 +279,7 @@ static int uniphier_spi_xfer(struct udevice *dev, unsigned int bitlen, static int uniphier_spi_set_speed(struct udevice *bus, uint speed) { - struct uniphier_spi_platdata *plat = bus->platdata; + struct uniphier_spi_platdata *plat = bus->plat; struct uniphier_spi_priv *priv = dev_get_priv(bus); u32 val, ckdiv; @@ -364,7 +364,7 @@ static int uniphier_spi_set_mode(struct udevice *bus, uint mode) static int uniphier_spi_ofdata_to_platdata(struct udevice *bus) { - struct uniphier_spi_platdata *plat = bus->platdata; + struct uniphier_spi_platdata *plat = bus->plat; const void *blob = gd->fdt_blob; int node = dev_of_offset(bus); @@ -412,7 +412,7 @@ U_BOOT_DRIVER(uniphier_spi) = { .of_match = uniphier_spi_ids, .ops = &uniphier_spi_ops, .ofdata_to_platdata = uniphier_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct uniphier_spi_platdata), + .plat_auto = sizeof(struct uniphier_spi_platdata), .priv_auto = sizeof(struct uniphier_spi_priv), .probe = uniphier_spi_probe, }; diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c index af7a7b2655..7e0939c4a0 100644 --- a/drivers/spi/xilinx_spi.c +++ b/drivers/spi/xilinx_spi.c @@ -211,7 +211,7 @@ static void xilinx_spi_startup_block(struct udevice *dev, unsigned int bytes, struct udevice *bus = dev_get_parent(dev); struct xilinx_spi_priv *priv = dev_get_priv(bus); struct xilinx_spi_regs *regs = priv->regs; - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); const unsigned char *txp = dout; unsigned char *rxp = din; u32 reg; @@ -244,7 +244,7 @@ static int xilinx_spi_xfer(struct udevice *dev, unsigned int bitlen, struct udevice *bus = dev_get_parent(dev); struct xilinx_spi_priv *priv = dev_get_priv(bus); struct xilinx_spi_regs *regs = priv->regs; - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); /* assume spi core configured to do 8 bit transfers */ unsigned int bytes = bitlen / XILSPI_MAX_XFER_BITS; const unsigned char *txp = dout; diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c index d11b0d6a4f..7ff1672bcd 100644 --- a/drivers/spi/zynq_qspi.c +++ b/drivers/spi/zynq_qspi.c @@ -100,7 +100,7 @@ struct zynq_qspi_priv { static int zynq_qspi_ofdata_to_platdata(struct udevice *bus) { - struct zynq_qspi_platdata *plat = bus->platdata; + struct zynq_qspi_platdata *plat = bus->plat; const void *blob = gd->fdt_blob; int node = dev_of_offset(bus); @@ -560,7 +560,7 @@ static int zynq_qspi_xfer(struct udevice *dev, unsigned int bitlen, { struct udevice *bus = dev->parent; struct zynq_qspi_priv *priv = dev_get_priv(bus); - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); priv->cs = slave_plat->cs; priv->tx_buf = dout; @@ -592,7 +592,7 @@ static int zynq_qspi_xfer(struct udevice *dev, unsigned int bitlen, static int zynq_qspi_set_speed(struct udevice *bus, uint speed) { - struct zynq_qspi_platdata *plat = bus->platdata; + struct zynq_qspi_platdata *plat = bus->plat; struct zynq_qspi_priv *priv = dev_get_priv(bus); struct zynq_qspi_regs *regs = priv->regs; uint32_t confr; @@ -667,7 +667,7 @@ U_BOOT_DRIVER(zynq_qspi) = { .of_match = zynq_qspi_ids, .ops = &zynq_qspi_ops, .ofdata_to_platdata = zynq_qspi_ofdata_to_platdata, - .platdata_auto = sizeof(struct zynq_qspi_platdata), + .plat_auto = sizeof(struct zynq_qspi_platdata), .priv_auto = sizeof(struct zynq_qspi_priv), .probe = zynq_qspi_probe, }; diff --git a/drivers/spi/zynq_spi.c b/drivers/spi/zynq_spi.c index d26c2f6ef6..f18b9e1b5c 100644 --- a/drivers/spi/zynq_spi.c +++ b/drivers/spi/zynq_spi.c @@ -75,7 +75,7 @@ struct zynq_spi_priv { static int zynq_spi_ofdata_to_platdata(struct udevice *bus) { - struct zynq_spi_platdata *plat = bus->platdata; + struct zynq_spi_platdata *plat = bus->plat; const void *blob = gd->fdt_blob; int node = dev_of_offset(bus); @@ -162,7 +162,7 @@ static int zynq_spi_probe(struct udevice *bus) static void spi_cs_activate(struct udevice *dev) { struct udevice *bus = dev->parent; - struct zynq_spi_platdata *plat = bus->platdata; + struct zynq_spi_platdata *plat = bus->plat; struct zynq_spi_priv *priv = dev_get_priv(bus); struct zynq_spi_regs *regs = priv->regs; u32 cr; @@ -193,7 +193,7 @@ static void spi_cs_activate(struct udevice *dev) static void spi_cs_deactivate(struct udevice *dev) { struct udevice *bus = dev->parent; - struct zynq_spi_platdata *plat = bus->platdata; + struct zynq_spi_platdata *plat = bus->plat; struct zynq_spi_priv *priv = dev_get_priv(bus); struct zynq_spi_regs *regs = priv->regs; @@ -234,7 +234,7 @@ static int zynq_spi_xfer(struct udevice *dev, unsigned int bitlen, struct udevice *bus = dev->parent; struct zynq_spi_priv *priv = dev_get_priv(bus); struct zynq_spi_regs *regs = priv->regs; - struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev); + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_plat(dev); u32 len = bitlen / 8; u32 tx_len = len, rx_len = len, tx_tvl; const u8 *tx_buf = dout; @@ -296,7 +296,7 @@ static int zynq_spi_xfer(struct udevice *dev, unsigned int bitlen, static int zynq_spi_set_speed(struct udevice *bus, uint speed) { - struct zynq_spi_platdata *plat = bus->platdata; + struct zynq_spi_platdata *plat = bus->plat; struct zynq_spi_priv *priv = dev_get_priv(bus); struct zynq_spi_regs *regs = priv->regs; uint32_t confr; @@ -372,7 +372,7 @@ U_BOOT_DRIVER(zynq_spi) = { .of_match = zynq_spi_ids, .ops = &zynq_spi_ops, .ofdata_to_platdata = zynq_spi_ofdata_to_platdata, - .platdata_auto = sizeof(struct zynq_spi_platdata), + .plat_auto = sizeof(struct zynq_spi_platdata), .priv_auto = sizeof(struct zynq_spi_priv), .probe = zynq_spi_probe, }; diff --git a/drivers/spi/zynqmp_gqspi.c b/drivers/spi/zynqmp_gqspi.c index 4585222507..e4ab5d622c 100644 --- a/drivers/spi/zynqmp_gqspi.c +++ b/drivers/spi/zynqmp_gqspi.c @@ -177,7 +177,7 @@ struct zynqmp_qspi_priv { static int zynqmp_qspi_ofdata_to_platdata(struct udevice *bus) { - struct zynqmp_qspi_platdata *plat = bus->platdata; + struct zynqmp_qspi_platdata *plat = bus->plat; debug("%s\n", __func__); @@ -255,7 +255,7 @@ static void zynqmp_qspi_chipselect(struct zynqmp_qspi_priv *priv, int is_on) void zynqmp_qspi_set_tapdelay(struct udevice *bus, u32 baudrateval) { - struct zynqmp_qspi_platdata *plat = bus->platdata; + struct zynqmp_qspi_platdata *plat = bus->plat; struct zynqmp_qspi_priv *priv = dev_get_priv(bus); struct zynqmp_qspi_regs *regs = priv->regs; u32 tapdlybypass = 0, lpbkdlyadj = 0, datadlyadj = 0, clk_rate; @@ -295,7 +295,7 @@ void zynqmp_qspi_set_tapdelay(struct udevice *bus, u32 baudrateval) static int zynqmp_qspi_set_speed(struct udevice *bus, uint speed) { - struct zynqmp_qspi_platdata *plat = bus->platdata; + struct zynqmp_qspi_platdata *plat = bus->plat; struct zynqmp_qspi_priv *priv = dev_get_priv(bus); struct zynqmp_qspi_regs *regs = priv->regs; u32 confr; @@ -728,7 +728,7 @@ U_BOOT_DRIVER(zynqmp_qspi) = { .of_match = zynqmp_qspi_ids, .ops = &zynqmp_qspi_ops, .ofdata_to_platdata = zynqmp_qspi_ofdata_to_platdata, - .platdata_auto = sizeof(struct zynqmp_qspi_platdata), + .plat_auto = sizeof(struct zynqmp_qspi_platdata), .priv_auto = sizeof(struct zynqmp_qspi_priv), .probe = zynqmp_qspi_probe, }; diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c index 5c3dd35cfb..768a0d1a0f 100644 --- a/drivers/sysreset/sysreset_x86.c +++ b/drivers/sysreset/sysreset_x86.c @@ -154,5 +154,5 @@ U_BOOT_DRIVER(x86_reset) = { .of_match = x86_sysreset_ids, .ops = &x86_sysreset_ops, .probe = x86_sysreset_probe, - .platdata_auto = sizeof(struct x86_sysreset_platdata), + .plat_auto = sizeof(struct x86_sysreset_platdata), }; diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index 142bf17668..378df936d2 100644 --- a/drivers/tee/optee/core.c +++ b/drivers/tee/optee/core.c @@ -661,6 +661,6 @@ U_BOOT_DRIVER(optee) = { .ofdata_to_platdata = optee_ofdata_to_platdata, .probe = optee_probe, .ops = &optee_ops, - .platdata_auto = sizeof(struct optee_pdata), + .plat_auto = sizeof(struct optee_pdata), .priv_auto = sizeof(struct optee_private), }; diff --git a/drivers/thermal/imx_scu_thermal.c b/drivers/thermal/imx_scu_thermal.c index d76a3e01ec..0c2a8ea244 100644 --- a/drivers/thermal/imx_scu_thermal.c +++ b/drivers/thermal/imx_scu_thermal.c @@ -211,6 +211,6 @@ U_BOOT_DRIVER(imx_sc_thermal) = { .bind = imx_sc_thermal_bind, .probe = imx_sc_thermal_probe, .ofdata_to_platdata = imx_sc_thermal_ofdata_to_platdata, - .platdata_auto = sizeof(struct imx_sc_thermal_plat), + .plat_auto = sizeof(struct imx_sc_thermal_plat), .flags = DM_FLAG_PRE_RELOC, }; diff --git a/drivers/thermal/imx_tmu.c b/drivers/thermal/imx_tmu.c index 4c8371771c..77e3b3c201 100644 --- a/drivers/thermal/imx_tmu.c +++ b/drivers/thermal/imx_tmu.c @@ -463,6 +463,6 @@ U_BOOT_DRIVER(imx_tmu) = { .of_match = imx_tmu_ids, .bind = imx_tmu_bind, .probe = imx_tmu_probe, - .platdata_auto = sizeof(struct imx_tmu_plat), + .plat_auto = sizeof(struct imx_tmu_plat), .flags = DM_FLAG_PRE_RELOC, }; diff --git a/drivers/timer/ag101p_timer.c b/drivers/timer/ag101p_timer.c index f014ed6579..a73a8c09b5 100644 --- a/drivers/timer/ag101p_timer.c +++ b/drivers/timer/ag101p_timer.c @@ -64,7 +64,7 @@ struct atftmr_timer_platdata { static u64 atftmr_timer_get_count(struct udevice *dev) { - struct atftmr_timer_platdata *plat = dev->platdata; + struct atftmr_timer_platdata *plat = dev->plat; struct atftmr_timer_regs *const regs = plat->regs; u32 val; val = readl(®s->t3_counter); @@ -73,7 +73,7 @@ static u64 atftmr_timer_get_count(struct udevice *dev) static int atftmr_timer_probe(struct udevice *dev) { - struct atftmr_timer_platdata *plat = dev->platdata; + struct atftmr_timer_platdata *plat = dev->plat; struct atftmr_timer_regs *const regs = plat->regs; u32 cr; writel(0, ®s->t3_load); @@ -111,7 +111,7 @@ U_BOOT_DRIVER(altera_timer) = { .id = UCLASS_TIMER, .of_match = ag101p_timer_ids, .ofdata_to_platdata = atftme_timer_ofdata_to_platdata, - .platdata_auto = sizeof(struct atftmr_timer_platdata), + .plat_auto = sizeof(struct atftmr_timer_platdata), .probe = atftmr_timer_probe, .ops = &ag101p_timer_ops, }; diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c index ad50380f04..4579717ee5 100644 --- a/drivers/timer/altera_timer.c +++ b/drivers/timer/altera_timer.c @@ -34,7 +34,7 @@ struct altera_timer_platdata { static u64 altera_timer_get_count(struct udevice *dev) { - struct altera_timer_platdata *plat = dev->platdata; + struct altera_timer_platdata *plat = dev->plat; struct altera_timer_regs *const regs = plat->regs; u32 val; @@ -49,7 +49,7 @@ static u64 altera_timer_get_count(struct udevice *dev) static int altera_timer_probe(struct udevice *dev) { - struct altera_timer_platdata *plat = dev->platdata; + struct altera_timer_platdata *plat = dev->plat; struct altera_timer_regs *const regs = plat->regs; writel(0, ®s->status); @@ -88,7 +88,7 @@ U_BOOT_DRIVER(altera_timer) = { .id = UCLASS_TIMER, .of_match = altera_timer_ids, .ofdata_to_platdata = altera_timer_ofdata_to_platdata, - .platdata_auto = sizeof(struct altera_timer_platdata), + .plat_auto = sizeof(struct altera_timer_platdata), .probe = altera_timer_probe, .ops = &altera_timer_ops, }; diff --git a/drivers/timer/atcpit100_timer.c b/drivers/timer/atcpit100_timer.c index e574eabebc..61a04fc9fc 100644 --- a/drivers/timer/atcpit100_timer.c +++ b/drivers/timer/atcpit100_timer.c @@ -106,7 +106,7 @@ U_BOOT_DRIVER(atcpit100_timer) = { .id = UCLASS_TIMER, .of_match = atcpit_timer_ids, .ofdata_to_platdata = atcpit_timer_ofdata_to_platdata, - .platdata_auto = sizeof(struct atcpit_timer_platdata), + .plat_auto = sizeof(struct atcpit_timer_platdata), .probe = atcpit_timer_probe, .ops = &atcpit_timer_ops, }; diff --git a/drivers/timer/atmel_pit_timer.c b/drivers/timer/atmel_pit_timer.c index a0daf49dad..226c680a79 100644 --- a/drivers/timer/atmel_pit_timer.c +++ b/drivers/timer/atmel_pit_timer.c @@ -81,7 +81,7 @@ U_BOOT_DRIVER(atmel_pit) = { .id = UCLASS_TIMER, .of_match = atmel_pit_ids, .ofdata_to_platdata = atmel_pit_ofdata_to_platdata, - .platdata_auto = sizeof(struct atmel_pit_platdata), + .plat_auto = sizeof(struct atmel_pit_platdata), .probe = atmel_pit_probe, .ops = &atmel_pit_ops, }; diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c index dab6b12782..51ce52f72b 100644 --- a/drivers/timer/rockchip_timer.c +++ b/drivers/timer/rockchip_timer.c @@ -167,7 +167,7 @@ U_BOOT_DRIVER(rockchip_rk3368_timer) = { .ops = &rockchip_timer_ops, .priv_auto = sizeof(struct rockchip_timer_priv), #if CONFIG_IS_ENABLED(OF_PLATDATA) - .platdata_auto = sizeof(struct rockchip_timer_plat), + .plat_auto = sizeof(struct rockchip_timer_plat), #endif .ofdata_to_platdata = rockchip_clk_ofdata_to_platdata, }; diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c index f25f5613d4..a15198c1fe 100644 --- a/drivers/timer/timer-uclass.c +++ b/drivers/timer/timer-uclass.c @@ -103,7 +103,7 @@ int timer_timebase_fallback(struct udevice *dev) if (!cpu) return -ENODEV; - cpu_plat = dev_get_parent_platdata(cpu); + cpu_plat = dev_get_parent_plat(cpu); if (!cpu_plat) return -ENODEV; diff --git a/drivers/tpm/cr50_i2c.c b/drivers/tpm/cr50_i2c.c index 1dfc5c54f3..71edfbfaef 100644 --- a/drivers/tpm/cr50_i2c.c +++ b/drivers/tpm/cr50_i2c.c @@ -547,7 +547,7 @@ static int claim_locality(struct udevice *dev, int loc) static int cr50_i2c_get_desc(struct udevice *dev, char *buf, int size) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); struct cr50_priv *priv = dev_get_priv(dev); return snprintf(buf, size, "cr50 TPM 2.0 (i2c %02x id %x) irq=%d", diff --git a/drivers/tpm/tpm_tis_st33zp24_spi.c b/drivers/tpm/tpm_tis_st33zp24_spi.c index 683d49689a..b9dbe82521 100644 --- a/drivers/tpm/tpm_tis_st33zp24_spi.c +++ b/drivers/tpm/tpm_tis_st33zp24_spi.c @@ -671,5 +671,5 @@ U_BOOT_DRIVER(st33zp24_spi_spi) = { .remove = st33zp24_spi_remove, .ops = &st33zp24_spi_tpm_ops, .priv_auto = sizeof(struct tpm_chip), - .platdata_auto = sizeof(struct st33zp24_spi_phy), + .plat_auto = sizeof(struct st33zp24_spi_phy), }; diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c index 92b7e9fd7c..fe43f1b7f3 100644 --- a/drivers/ufs/ufs.c +++ b/drivers/ufs/ufs.c @@ -1873,7 +1873,7 @@ int ufshcd_probe(struct udevice *ufs_dev, struct ufs_hba_ops *hba_ops) if (!scsi_dev) return -ENODEV; - scsi_plat = dev_get_uclass_platdata(scsi_dev); + scsi_plat = dev_get_uclass_plat(scsi_dev); scsi_plat->max_id = UFSHCD_MAX_ID; scsi_plat->max_lun = UFS_MAX_LUNS; scsi_plat->max_bytes_per_req = UFS_MAX_BYTES; diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c index d156164761..75f40e1249 100644 --- a/drivers/usb/cdns3/cdns3-ti.c +++ b/drivers/usb/cdns3/cdns3-ti.c @@ -190,6 +190,6 @@ U_BOOT_DRIVER(cdns_ti) = { .bind = cdns3_bind, .probe = cdns_ti_probe, .remove = cdns_ti_remove, - .platdata_auto = sizeof(struct cdns_ti), + .plat_auto = sizeof(struct cdns_ti), .flags = DM_FLAG_OS_PREPARE, }; diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c index fb09b3ab1e..1755289473 100644 --- a/drivers/usb/dwc3/dwc3-generic.c +++ b/drivers/usb/dwc3/dwc3-generic.c @@ -159,7 +159,7 @@ U_BOOT_DRIVER(dwc3_generic_peripheral) = { .probe = dwc3_generic_peripheral_probe, .remove = dwc3_generic_peripheral_remove, .priv_auto = sizeof(struct dwc3_generic_priv), - .platdata_auto = sizeof(struct dwc3_generic_plat), + .plat_auto = sizeof(struct dwc3_generic_plat), }; #endif @@ -201,7 +201,7 @@ U_BOOT_DRIVER(dwc3_generic_host) = { .probe = dwc3_generic_host_probe, .remove = dwc3_generic_host_remove, .priv_auto = sizeof(struct dwc3_generic_host_priv), - .platdata_auto = sizeof(struct dwc3_generic_plat), + .plat_auto = sizeof(struct dwc3_generic_plat), .ops = &xhci_usb_ops, .flags = DM_FLAG_ALLOC_PRIV_DMA, }; @@ -459,6 +459,6 @@ U_BOOT_DRIVER(dwc3_generic_wrapper) = { .bind = dwc3_glue_bind, .probe = dwc3_glue_probe, .remove = dwc3_glue_remove, - .platdata_auto = sizeof(struct dwc3_glue_data), + .plat_auto = sizeof(struct dwc3_glue_data), }; diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index 58d57ee7d1..5be8bc8f6c 100644 --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -469,6 +469,6 @@ U_BOOT_DRIVER(dwc3_generic_wrapper) = { .of_match = dwc3_meson_g12a_ids, .probe = dwc3_meson_g12a_probe, .remove = dwc3_meson_g12a_remove, - .platdata_auto = sizeof(struct dwc3_meson_g12a), + .plat_auto = sizeof(struct dwc3_meson_g12a), }; diff --git a/drivers/usb/dwc3/dwc3-meson-gxl.c b/drivers/usb/dwc3/dwc3-meson-gxl.c index 6e8c93a0fe..1c7bfe83ab 100644 --- a/drivers/usb/dwc3/dwc3-meson-gxl.c +++ b/drivers/usb/dwc3/dwc3-meson-gxl.c @@ -420,6 +420,6 @@ U_BOOT_DRIVER(dwc3_generic_wrapper) = { .of_match = dwc3_meson_gxl_ids, .probe = dwc3_meson_gxl_probe, .remove = dwc3_meson_gxl_remove, - .platdata_auto = sizeof(struct dwc3_meson_gxl), + .plat_auto = sizeof(struct dwc3_meson_gxl), }; diff --git a/drivers/usb/emul/sandbox_flash.c b/drivers/usb/emul/sandbox_flash.c index d63dee41fc..62c8166cae 100644 --- a/drivers/usb/emul/sandbox_flash.c +++ b/drivers/usb/emul/sandbox_flash.c @@ -422,5 +422,5 @@ U_BOOT_DRIVER(usb_sandbox_flash) = { .ofdata_to_platdata = sandbox_flash_ofdata_to_platdata, .ops = &sandbox_usb_flash_ops, .priv_auto = sizeof(struct sandbox_flash_priv), - .platdata_auto = sizeof(struct sandbox_flash_plat), + .plat_auto = sizeof(struct sandbox_flash_plat), }; diff --git a/drivers/usb/emul/sandbox_hub.c b/drivers/usb/emul/sandbox_hub.c index 3e66ca4698..91158e5c6d 100644 --- a/drivers/usb/emul/sandbox_hub.c +++ b/drivers/usb/emul/sandbox_hub.c @@ -131,7 +131,7 @@ static struct udevice *hub_find_device(struct udevice *hub, int port, device_find_next_child(&dev)) { struct sandbox_hub_platdata *plat; - plat = dev_get_parent_platdata(dev); + plat = dev_get_parent_plat(dev); if (plat->port == port) { gen_desc = plat->plat.desc_list; gen_desc = usb_emul_find_descriptor(gen_desc, @@ -304,8 +304,8 @@ static int sandbox_hub_bind(struct udevice *dev) static int sandbox_child_post_bind(struct udevice *dev) { - struct sandbox_hub_platdata *plat = dev_get_parent_platdata(dev); - struct usb_emul_platdata *emul = dev_get_uclass_platdata(dev); + struct sandbox_hub_platdata *plat = dev_get_parent_plat(dev); + struct usb_emul_platdata *emul = dev_get_uclass_plat(dev); plat->port = dev_read_u32_default(dev, "reg", -1); emul->port1 = plat->port + 1; @@ -329,7 +329,7 @@ U_BOOT_DRIVER(usb_sandbox_hub) = { .bind = sandbox_hub_bind, .ops = &sandbox_usb_hub_ops, .priv_auto = sizeof(struct sandbox_hub_priv), - .per_child_platdata_auto = + .per_child_plat_auto = sizeof(struct sandbox_hub_platdata), .child_post_bind = sandbox_child_post_bind, }; diff --git a/drivers/usb/emul/sandbox_keyb.c b/drivers/usb/emul/sandbox_keyb.c index c64ce1feeb..16c59457f7 100644 --- a/drivers/usb/emul/sandbox_keyb.c +++ b/drivers/usb/emul/sandbox_keyb.c @@ -242,5 +242,5 @@ U_BOOT_DRIVER(usb_sandbox_keyb) = { .probe = sandbox_keyb_probe, .ops = &sandbox_usb_keyb_ops, .priv_auto = sizeof(struct sandbox_keyb_priv), - .platdata_auto = sizeof(struct sandbox_keyb_plat), + .plat_auto = sizeof(struct sandbox_keyb_plat), }; diff --git a/drivers/usb/emul/usb-emul-uclass.c b/drivers/usb/emul/usb-emul-uclass.c index b306939042..1b7e1ea7c1 100644 --- a/drivers/usb/emul/usb-emul-uclass.c +++ b/drivers/usb/emul/usb-emul-uclass.c @@ -115,7 +115,7 @@ static int usb_emul_find_devnum(int devnum, int port1, struct udevice **emulp) if (ret) return ret; uclass_foreach_dev(dev, uc) { - struct usb_dev_platdata *udev = dev_get_parent_platdata(dev); + struct usb_dev_platdata *udev = dev_get_parent_plat(dev); /* * devnum is initialzied to zero at the beginning of the @@ -140,7 +140,7 @@ static int usb_emul_find_devnum(int devnum, int port1, struct udevice **emulp) return 0; } - plat = dev_get_uclass_platdata(dev); + plat = dev_get_uclass_plat(dev); if (plat->port1 == port1) { debug("%s: Found emulator '%s', port %d\n", __func__, dev->name, port1); @@ -169,7 +169,7 @@ int usb_emul_find(struct udevice *bus, ulong pipe, int port1, int usb_emul_find_for_dev(struct udevice *dev, struct udevice **emulp) { - struct usb_dev_platdata *udev = dev_get_parent_platdata(dev); + struct usb_dev_platdata *udev = dev_get_parent_plat(dev); return usb_emul_find_devnum(udev->devnum, 0, emulp); } @@ -183,7 +183,7 @@ int usb_emul_control(struct udevice *emul, struct usb_device *udev, int ret; /* We permit getting the descriptor before we are probed */ - plat = dev_get_parent_platdata(emul); + plat = dev_get_parent_plat(emul); if (!ops->control) return -ENOSYS; debug("%s: dev=%s\n", __func__, emul->name); @@ -262,7 +262,7 @@ int usb_emul_int(struct udevice *emul, struct usb_device *udev, int usb_emul_setup_device(struct udevice *dev, struct usb_string *strings, void **desc_list) { - struct usb_dev_platdata *plat = dev_get_parent_platdata(dev); + struct usb_dev_platdata *plat = dev_get_parent_plat(dev); struct usb_generic_descriptor **ptr; struct usb_config_descriptor *cdesc; int upto; @@ -298,7 +298,7 @@ UCLASS_DRIVER(usb_emul) = { .id = UCLASS_USB_EMUL, .name = "usb_emul", .post_bind = dm_scan_fdt_dev, - .per_device_platdata_auto = sizeof(struct usb_emul_platdata), + .per_device_plat_auto = sizeof(struct usb_emul_platdata), .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), }; diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c index 7115dcb56f..be69952184 100644 --- a/drivers/usb/eth/asix.c +++ b/drivers/usb/eth/asix.c @@ -877,7 +877,7 @@ U_BOOT_DRIVER(asix_eth) = { .probe = asix_eth_probe, .ops = &asix_eth_ops, .priv_auto = sizeof(struct asix_private), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; static const struct usb_device_id asix_eth_id_table[] = { diff --git a/drivers/usb/eth/asix88179.c b/drivers/usb/eth/asix88179.c index ffc90c00ab..8abcf13881 100644 --- a/drivers/usb/eth/asix88179.c +++ b/drivers/usb/eth/asix88179.c @@ -903,7 +903,7 @@ U_BOOT_DRIVER(ax88179_eth) = { .probe = ax88179_eth_probe, .ops = &ax88179_eth_ops, .priv_auto = sizeof(struct asix_private), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; static const struct usb_device_id ax88179_eth_id_table[] = { diff --git a/drivers/usb/eth/lan75xx.c b/drivers/usb/eth/lan75xx.c index 1fa7e53404..d5e4c6a9e8 100644 --- a/drivers/usb/eth/lan75xx.c +++ b/drivers/usb/eth/lan75xx.c @@ -305,7 +305,7 @@ U_BOOT_DRIVER(lan75xx_eth) = { .remove = lan7x_eth_remove, .ops = &lan75xx_eth_ops, .priv_auto = sizeof(struct lan7x_private), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; static const struct usb_device_id lan75xx_eth_id_table[] = { diff --git a/drivers/usb/eth/lan78xx.c b/drivers/usb/eth/lan78xx.c index 3f7e03f51c..cc02e4d523 100644 --- a/drivers/usb/eth/lan78xx.c +++ b/drivers/usb/eth/lan78xx.c @@ -467,7 +467,7 @@ U_BOOT_DRIVER(lan78xx_eth) = { .remove = lan7x_eth_remove, .ops = &lan78xx_eth_ops, .priv_auto = sizeof(struct lan7x_private), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; static const struct usb_device_id lan78xx_eth_id_table[] = { diff --git a/drivers/usb/eth/mcs7830.c b/drivers/usb/eth/mcs7830.c index 1746819192..d83517029d 100644 --- a/drivers/usb/eth/mcs7830.c +++ b/drivers/usb/eth/mcs7830.c @@ -929,7 +929,7 @@ U_BOOT_DRIVER(mcs7830_eth) = { .probe = mcs7830_eth_probe, .ops = &mcs7830_eth_ops, .priv_auto = sizeof(struct mcs7830_private), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/eth/r8152.c b/drivers/usb/eth/r8152.c index 804c331ee1..600e9f5dad 100644 --- a/drivers/usb/eth/r8152.c +++ b/drivers/usb/eth/r8152.c @@ -1843,7 +1843,7 @@ U_BOOT_DRIVER(r8152_eth) = { .probe = r8152_eth_probe, .ops = &r8152_eth_ops, .priv_auto = sizeof(struct r8152), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; static const struct usb_device_id r8152_eth_id_table[] = { diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c index d6863ad89e..836b534bbc 100644 --- a/drivers/usb/eth/smsc95xx.c +++ b/drivers/usb/eth/smsc95xx.c @@ -1063,7 +1063,7 @@ U_BOOT_DRIVER(smsc95xx_eth) = { .probe = smsc95xx_eth_probe, .ops = &smsc95xx_eth_ops, .priv_auto = sizeof(struct smsc95xx_private), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), }; static const struct usb_device_id smsc95xx_eth_id_table[] = { diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c index a662d500d3..93b1c60830 100644 --- a/drivers/usb/gadget/dwc2_udc_otg.c +++ b/drivers/usb/gadget/dwc2_udc_otg.c @@ -982,7 +982,7 @@ static void dwc2_phy_shutdown(struct udevice *dev, struct phy_bulk *phys) static int dwc2_udc_otg_ofdata_to_platdata(struct udevice *dev) { - struct dwc2_plat_otg_data *platdata = dev_get_platdata(dev); + struct dwc2_plat_otg_data *plat = dev_get_platdata(dev); ulong drvdata; void (*set_params)(struct dwc2_plat_otg_data *data); int ret; @@ -993,35 +993,34 @@ static int dwc2_udc_otg_ofdata_to_platdata(struct udevice *dev) return -ENODEV; } - platdata->regs_otg = dev_read_addr(dev); + plat->regs_otg = dev_read_addr(dev); - platdata->rx_fifo_sz = dev_read_u32_default(dev, "g-rx-fifo-size", 0); - platdata->np_tx_fifo_sz = dev_read_u32_default(dev, - "g-np-tx-fifo-size", 0); + plat->rx_fifo_sz = dev_read_u32_default(dev, "g-rx-fifo-size", 0); + plat->np_tx_fifo_sz = dev_read_u32_default(dev, "g-np-tx-fifo-size", 0); - platdata->tx_fifo_sz_nb = + plat->tx_fifo_sz_nb = dev_read_size(dev, "g-tx-fifo-size") / sizeof(u32); - if (platdata->tx_fifo_sz_nb > DWC2_MAX_HW_ENDPOINTS) - platdata->tx_fifo_sz_nb = DWC2_MAX_HW_ENDPOINTS; - if (platdata->tx_fifo_sz_nb) { + if (plat->tx_fifo_sz_nb > DWC2_MAX_HW_ENDPOINTS) + plat->tx_fifo_sz_nb = DWC2_MAX_HW_ENDPOINTS; + if (plat->tx_fifo_sz_nb) { ret = dev_read_u32_array(dev, "g-tx-fifo-size", - platdata->tx_fifo_sz_array, - platdata->tx_fifo_sz_nb); + plat->tx_fifo_sz_array, + plat->tx_fifo_sz_nb); if (ret) return ret; } - platdata->force_b_session_valid = + plat->force_b_session_valid = dev_read_bool(dev, "u-boot,force-b-session-valid"); - platdata->force_vbus_detection = + plat->force_vbus_detection = dev_read_bool(dev, "u-boot,force-vbus-detection"); - /* force platdata according compatible */ + /* force plat according compatible */ drvdata = dev_get_driver_data(dev); if (drvdata) { set_params = (void *)drvdata; - set_params(platdata); + set_params(plat); } return 0; @@ -1091,10 +1090,10 @@ static int dwc2_udc_otg_clk_init(struct udevice *dev, static int dwc2_udc_otg_probe(struct udevice *dev) { - struct dwc2_plat_otg_data *platdata = dev_get_platdata(dev); + struct dwc2_plat_otg_data *plat = dev_get_platdata(dev); struct dwc2_priv_data *priv = dev_get_priv(dev); struct dwc2_usbotg_reg *usbotg_reg = - (struct dwc2_usbotg_reg *)platdata->regs_otg; + (struct dwc2_usbotg_reg *)plat->regs_otg; int ret; ret = dwc2_udc_otg_clk_init(dev, &priv->clks); @@ -1109,10 +1108,10 @@ static int dwc2_udc_otg_probe(struct udevice *dev) if (ret) return ret; - if (platdata->activate_stm_id_vb_detection) { + if (plat->activate_stm_id_vb_detection) { if (CONFIG_IS_ENABLED(DM_REGULATOR) && - (!platdata->force_b_session_valid || - platdata->force_vbus_detection)) { + (!plat->force_b_session_valid || + plat->force_vbus_detection)) { ret = device_get_supply_regulator(dev, "usb33d-supply", &priv->usb33d_supply); if (ret) { @@ -1126,8 +1125,8 @@ static int dwc2_udc_otg_probe(struct udevice *dev) } } - if (platdata->force_b_session_valid && - !platdata->force_vbus_detection) { + if (plat->force_b_session_valid && + !plat->force_vbus_detection) { /* Override VBUS detection: enable then value*/ setbits_le32(&usbotg_reg->gotgctl, VB_VALOEN); setbits_le32(&usbotg_reg->gotgctl, VB_VALOVAL); @@ -1136,7 +1135,7 @@ static int dwc2_udc_otg_probe(struct udevice *dev) setbits_le32(&usbotg_reg->ggpio, GGPIO_STM32_OTG_GCCFG_VBDEN); } - if (platdata->force_b_session_valid) { + if (plat->force_b_session_valid) { /* Override B session bits: enable then value */ setbits_le32(&usbotg_reg->gotgctl, A_VALOEN | B_VALOEN); setbits_le32(&usbotg_reg->gotgctl, @@ -1148,7 +1147,7 @@ static int dwc2_udc_otg_probe(struct udevice *dev) } } - ret = dwc2_udc_probe(platdata); + ret = dwc2_udc_probe(plat); if (ret) return ret; @@ -1189,15 +1188,15 @@ U_BOOT_DRIVER(dwc2_udc_otg) = { .ofdata_to_platdata = dwc2_udc_otg_ofdata_to_platdata, .probe = dwc2_udc_otg_probe, .remove = dwc2_udc_otg_remove, - .platdata_auto = sizeof(struct dwc2_plat_otg_data), + .plat_auto = sizeof(struct dwc2_plat_otg_data), .priv_auto = sizeof(struct dwc2_priv_data), }; int dwc2_udc_B_session_valid(struct udevice *dev) { - struct dwc2_plat_otg_data *platdata = dev_get_platdata(dev); + struct dwc2_plat_otg_data *plat = dev_get_platdata(dev); struct dwc2_usbotg_reg *usbotg_reg = - (struct dwc2_usbotg_reg *)platdata->regs_otg; + (struct dwc2_usbotg_reg *)plat->regs_otg; return readl(&usbotg_reg->gotgctl) & B_SESSION_VALID; } diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 0cce8e24c5..9d4bb9dfac 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -2692,7 +2692,7 @@ U_BOOT_DRIVER(eth_usb) = { .probe = usb_eth_probe, .ops = &usb_eth_ops, .priv_auto = sizeof(struct ether_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; #endif /* CONFIG_DM_ETH */ diff --git a/drivers/usb/gadget/max3420_udc.c b/drivers/usb/gadget/max3420_udc.c index 775754a037..36f3eb54d8 100644 --- a/drivers/usb/gadget/max3420_udc.c +++ b/drivers/usb/gadget/max3420_udc.c @@ -826,7 +826,7 @@ static int max3420_udc_probe(struct udevice *dev) uint speed, mode; struct udevice *spid; - slave_pdata = dev_get_parent_platdata(dev); + slave_pdata = dev_get_parent_plat(dev); cs = slave_pdata->cs; speed = slave_pdata->max_hz; mode = slave_pdata->mode; diff --git a/drivers/usb/host/dwc3-of-simple.c b/drivers/usb/host/dwc3-of-simple.c index 6240a453a0..9b1edcd700 100644 --- a/drivers/usb/host/dwc3-of-simple.c +++ b/drivers/usb/host/dwc3-of-simple.c @@ -102,6 +102,6 @@ U_BOOT_DRIVER(dwc3_of_simple) = { .of_match = dwc3_of_simple_ids, .probe = dwc3_of_simple_probe, .remove = dwc3_of_simple_remove, - .platdata_auto = sizeof(struct dwc3_of_simple), + .plat_auto = sizeof(struct dwc3_of_simple), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/dwc3-sti-glue.c b/drivers/usb/host/dwc3-sti-glue.c index ba008bf686..e9ebe2ef7c 100644 --- a/drivers/usb/host/dwc3-sti-glue.c +++ b/drivers/usb/host/dwc3-sti-glue.c @@ -246,6 +246,6 @@ U_BOOT_DRIVER(dwc3_sti_glue) = { .probe = sti_dwc3_glue_probe, .remove = sti_dwc3_glue_remove, .bind = sti_dwc3_glue_bind, - .platdata_auto = sizeof(struct sti_dwc3_glue_platdata), + .plat_auto = sizeof(struct sti_dwc3_glue_platdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index 955cacdd98..22a35a5280 100644 --- a/drivers/usb/host/ehci-atmel.c +++ b/drivers/usb/host/ehci-atmel.c @@ -124,7 +124,7 @@ U_BOOT_DRIVER(ehci_atmel) = { .probe = ehci_atmel_probe, .remove = ehci_deregister, .ops = &ehci_usb_ops, - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .priv_auto = sizeof(struct ehci_atmel_priv), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c index 3728b238d4..d1ff3f4ce1 100644 --- a/drivers/usb/host/ehci-exynos.c +++ b/drivers/usb/host/ehci-exynos.c @@ -259,6 +259,6 @@ U_BOOT_DRIVER(usb_ehci) = { .remove = ehci_usb_remove, .ops = &ehci_usb_ops, .priv_auto = sizeof(struct exynos_ehci), - .platdata_auto = sizeof(struct exynos_ehci_platdata), + .plat_auto = sizeof(struct exynos_ehci_platdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index a53493a617..9824b7b190 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -145,7 +145,7 @@ U_BOOT_DRIVER(ehci_fsl) = { .probe = ehci_fsl_probe, .remove = ehci_deregister, .ops = &ehci_usb_ops, - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .priv_auto = sizeof(struct ehci_fsl_priv), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c index 329593689f..f9e24b99a0 100644 --- a/drivers/usb/host/ehci-marvell.c +++ b/drivers/usb/host/ehci-marvell.c @@ -152,7 +152,7 @@ U_BOOT_DRIVER(ehci_mvebu) = { .probe = ehci_mvebu_probe, .remove = ehci_deregister, .ops = &ehci_usb_ops, - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .priv_auto = sizeof(struct ehci_mvebu_priv), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c index 61ff13e2b8..13ee268e8d 100644 --- a/drivers/usb/host/ehci-msm.c +++ b/drivers/usb/host/ehci-msm.c @@ -145,6 +145,6 @@ U_BOOT_DRIVER(usb_ehci) = { .remove = ehci_usb_remove, .ops = &ehci_usb_ops, .priv_auto = sizeof(struct msm_ehci_priv), - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c index 2943b84500..df54431bff 100644 --- a/drivers/usb/host/ehci-mx5.c +++ b/drivers/usb/host/ehci-mx5.c @@ -367,7 +367,7 @@ U_BOOT_DRIVER(usb_mx5) = { .probe = ehci_usb_probe, .remove = ehci_deregister, .ops = &ehci_usb_ops, - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .priv_auto = sizeof(struct ehci_mx5_priv_data), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index cd22b07651..981bf81454 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -650,7 +650,7 @@ U_BOOT_DRIVER(usb_mx6) = { .probe = ehci_usb_probe, .remove = ehci_deregister, .ops = &ehci_usb_ops, - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .priv_auto = sizeof(struct ehci_mx6_priv_data), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index ac264a2f38..51c5029c16 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -403,7 +403,7 @@ U_BOOT_DRIVER(usb_omap_ehci) = { .of_match = omap_ehci_dt_ids, .probe = omap_ehci_probe, .ofdata_to_platdata = ehci_usb_ofdata_to_platdata, - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .priv_auto = sizeof(struct ehci_omap_priv_data), .remove = ehci_deregister, .ops = &ehci_usb_ops, diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 7d91846d07..61f5a6ce61 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -163,7 +163,7 @@ U_BOOT_DRIVER(ehci_pci) = { .remove = ehci_pci_remove, .of_match = ehci_pci_ids, .ops = &ehci_usb_ops, - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .priv_auto = sizeof(struct ehci_pci_priv), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 9ffaf0060a..c76e9c3b29 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -865,7 +865,7 @@ U_BOOT_DRIVER(usb_ehci) = { .probe = ehci_usb_probe, .remove = ehci_deregister, .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, }; diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c index f370052961..c0500e3112 100644 --- a/drivers/usb/host/ehci-vf.c +++ b/drivers/usb/host/ehci-vf.c @@ -355,7 +355,7 @@ U_BOOT_DRIVER(usb_ehci) = { .remove = ehci_deregister, .ops = &ehci_usb_ops, .ofdata_to_platdata = vf_usb_ofdata_to_platdata, - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .priv_auto = sizeof(struct ehci_vf_priv_data), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/ehci-zynq.c b/drivers/usb/host/ehci-zynq.c index 738eed3bfe..df7ea0a484 100644 --- a/drivers/usb/host/ehci-zynq.c +++ b/drivers/usb/host/ehci-zynq.c @@ -85,7 +85,7 @@ U_BOOT_DRIVER(ehci_zynq) = { .probe = ehci_zynq_probe, .remove = ehci_deregister, .ops = &ehci_usb_ops, - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .priv_auto = sizeof(struct zynq_ehci_priv), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c index 48ffa4af5e..c53b6f58e3 100644 --- a/drivers/usb/host/ohci-pci.c +++ b/drivers/usb/host/ohci-pci.c @@ -39,7 +39,7 @@ U_BOOT_DRIVER(ohci_pci) = { .remove = ohci_pci_remove, .of_match = ohci_pci_ids, .ops = &ohci_usb_ops, - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .priv_auto = sizeof(ohci_t), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c index 1e7bec9106..8e4e9e8999 100644 --- a/drivers/usb/host/usb-uclass.c +++ b/drivers/usb/host/usb-uclass.c @@ -575,7 +575,7 @@ static int usb_find_and_bind_driver(struct udevice *parent, drv = entry->driver; /* * 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 @@ -587,7 +587,7 @@ static int usb_find_and_bind_driver(struct udevice *parent, goto error; debug("%s: Match found: %s\n", __func__, drv->name); dev->driver_data = id->driver_info; - plat = dev_get_parent_platdata(dev); + plat = dev_get_parent_plat(dev); plat->id = *id; *devp = dev; return 0; @@ -622,7 +622,7 @@ static int usb_find_child(struct udevice *parent, for (device_find_first_child(parent, &dev); dev; device_find_next_child(&dev)) { - struct usb_dev_platdata *plat = dev_get_parent_platdata(dev); + struct usb_dev_platdata *plat = dev_get_parent_plat(dev); /* If this device is already in use, skip it */ if (device_active(dev)) @@ -707,7 +707,7 @@ int usb_scan_device(struct udevice *parent, int port, return ret; created = true; } - plat = dev_get_parent_platdata(dev); + plat = dev_get_parent_plat(dev); debug("%s: Probing '%s', plat=%p\n", __func__, dev->name, plat); plat->devnum = udev->devnum; plat->udev = udev; @@ -770,7 +770,7 @@ int usb_detect_change(void) static int usb_child_post_bind(struct udevice *dev) { - struct usb_dev_platdata *plat = dev_get_parent_platdata(dev); + struct usb_dev_platdata *plat = dev_get_parent_plat(dev); int val; if (!dev_of_valid(dev)) @@ -809,7 +809,7 @@ struct udevice *usb_get_bus(struct udevice *dev) int usb_child_pre_probe(struct udevice *dev) { struct usb_device *udev = dev_get_parent_priv(dev); - struct usb_dev_platdata *plat = dev_get_parent_platdata(dev); + struct usb_dev_platdata *plat = dev_get_parent_plat(dev); int ret; if (plat->udev) { @@ -854,7 +854,7 @@ UCLASS_DRIVER(usb) = { .per_device_auto = sizeof(struct usb_bus_priv), .child_post_bind = usb_child_post_bind, .child_pre_probe = usb_child_pre_probe, - .per_child_platdata_auto = sizeof(struct usb_dev_platdata), + .per_child_plat_auto = sizeof(struct usb_dev_platdata), }; UCLASS_DRIVER(usb_dev_generic) = { diff --git a/drivers/usb/host/xhci-brcm.c b/drivers/usb/host/xhci-brcm.c index f50f069fc7..cc20cf0b6c 100644 --- a/drivers/usb/host/xhci-brcm.c +++ b/drivers/usb/host/xhci-brcm.c @@ -92,7 +92,7 @@ U_BOOT_DRIVER(usb_xhci) = { .remove = xhci_brcm_deregister, .ops = &xhci_usb_ops, .of_match = xhci_brcm_ids, - .platdata_auto = sizeof(struct brcm_xhci_platdata), + .plat_auto = sizeof(struct brcm_xhci_platdata), .priv_auto = sizeof(struct xhci_ctrl), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c index 4dba569937..a57762f246 100644 --- a/drivers/usb/host/xhci-dwc3.c +++ b/drivers/usb/host/xhci-dwc3.c @@ -187,7 +187,7 @@ U_BOOT_DRIVER(xhci_dwc3) = { .remove = xhci_dwc3_remove, .ops = &xhci_usb_ops, .priv_auto = sizeof(struct xhci_ctrl), - .platdata_auto = sizeof(struct xhci_dwc3_platdata), + .plat_auto = sizeof(struct xhci_dwc3_platdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; #endif diff --git a/drivers/usb/host/xhci-exynos5.c b/drivers/usb/host/xhci-exynos5.c index 6e1b5f005f..39e651e2fd 100644 --- a/drivers/usb/host/xhci-exynos5.c +++ b/drivers/usb/host/xhci-exynos5.c @@ -255,7 +255,7 @@ U_BOOT_DRIVER(usb_xhci) = { .probe = xhci_usb_probe, .remove = xhci_usb_remove, .ops = &xhci_usb_ops, - .platdata_auto = sizeof(struct exynos_xhci_platdata), + .plat_auto = sizeof(struct exynos_xhci_platdata), .priv_auto = sizeof(struct exynos_xhci), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/xhci-fsl.c b/drivers/usb/host/xhci-fsl.c index 95714d8338..e54db0f8e2 100644 --- a/drivers/usb/host/xhci-fsl.c +++ b/drivers/usb/host/xhci-fsl.c @@ -169,7 +169,7 @@ U_BOOT_DRIVER(xhci_fsl) = { .probe = xhci_fsl_probe, .remove = xhci_fsl_remove, .ops = &xhci_usb_ops, - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .priv_auto = sizeof(struct xhci_fsl_priv), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/xhci-mvebu.c b/drivers/usb/host/xhci-mvebu.c index 6f56cc8384..1762bbb34b 100644 --- a/drivers/usb/host/xhci-mvebu.c +++ b/drivers/usb/host/xhci-mvebu.c @@ -96,7 +96,7 @@ U_BOOT_DRIVER(usb_xhci) = { .probe = xhci_usb_probe, .remove = xhci_deregister, .ops = &xhci_usb_ops, - .platdata_auto = sizeof(struct mvebu_xhci_platdata), + .plat_auto = sizeof(struct mvebu_xhci_platdata), .priv_auto = sizeof(struct mvebu_xhci), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 888b17ba4c..96d1de67d9 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -59,7 +59,7 @@ U_BOOT_DRIVER(xhci_pci) = { .remove = xhci_deregister, .of_match = xhci_pci_ids, .ops = &xhci_usb_ops, - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .priv_auto = sizeof(struct xhci_ctrl), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c index 4322fb2e4d..2ef072b60e 100644 --- a/drivers/usb/host/xhci-rcar.c +++ b/drivers/usb/host/xhci-rcar.c @@ -161,7 +161,7 @@ U_BOOT_DRIVER(usb_xhci) = { .ops = &xhci_usb_ops, .of_match = xhci_rcar_ids, .ofdata_to_platdata = xhci_rcar_ofdata_to_platdata, - .platdata_auto = sizeof(struct rcar_xhci_platdata), + .plat_auto = sizeof(struct rcar_xhci_platdata), .priv_auto = sizeof(struct rcar_xhci), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; diff --git a/drivers/usb/musb-new/da8xx.c b/drivers/usb/musb-new/da8xx.c index 6c0d0b8b16..2889e855ab 100644 --- a/drivers/usb/musb-new/da8xx.c +++ b/drivers/usb/musb-new/da8xx.c @@ -258,43 +258,43 @@ struct da8xx_musb_platdata { static int da8xx_musb_ofdata_to_platdata(struct udevice *dev) { - struct da8xx_musb_platdata *platdata = dev_get_platdata(dev); + struct da8xx_musb_platdata *plat = dev_get_platdata(dev); const void *fdt = gd->fdt_blob; int node = dev_of_offset(dev); - platdata->base = (void *)dev_read_addr_ptr(dev); - platdata->musb_config.multipoint = 1; - platdata->musb_config.dyn_fifo = 1; - platdata->musb_config.num_eps = 5; - platdata->musb_config.ram_bits = 10; - platdata->plat.power = fdtdec_get_int(fdt, node, "power", 50); - platdata->otg_board_data.interface_type = MUSB_INTERFACE_UTMI; - platdata->plat.mode = MUSB_HOST; - platdata->otg_board_data.dev = dev; - platdata->plat.config = &platdata->musb_config; - platdata->plat.platform_ops = &da8xx_ops; - platdata->plat.board_data = &platdata->otg_board_data; - platdata->otg_board_data.clear_irq = da8xx_musb_clear_irq; - platdata->otg_board_data.reset = da8xx_musb_reset; + plat->base = (void *)dev_read_addr_ptr(dev); + plat->musb_config.multipoint = 1; + plat->musb_config.dyn_fifo = 1; + plat->musb_config.num_eps = 5; + plat->musb_config.ram_bits = 10; + plat->plat.power = fdtdec_get_int(fdt, node, "power", 50); + plat->otg_board_data.interface_type = MUSB_INTERFACE_UTMI; + plat->plat.mode = MUSB_HOST; + plat->otg_board_data.dev = dev; + plat->plat.config = &plat->musb_config; + plat->plat.platform_ops = &da8xx_ops; + plat->plat.board_data = &plat->otg_board_data; + plat->otg_board_data.clear_irq = da8xx_musb_clear_irq; + plat->otg_board_data.reset = da8xx_musb_reset; return 0; } static int da8xx_musb_probe(struct udevice *dev) { struct musb_host_data *host = dev_get_priv(dev); - struct da8xx_musb_platdata *platdata = dev_get_platdata(dev); + struct da8xx_musb_platdata *plat = dev_get_platdata(dev); struct usb_bus_priv *priv = dev_get_uclass_priv(dev); struct omap_musb_board_data *otg_board_data; int ret; void *base = dev_read_addr_ptr(dev); /* Get the phy info from the device tree */ - ret = generic_phy_get_by_name(dev, "usb-phy", &platdata->phy); + ret = generic_phy_get_by_name(dev, "usb-phy", &plat->phy); if (ret) return ret; /* Initialize the phy */ - ret = generic_phy_init(&platdata->phy); + ret = generic_phy_init(&plat->phy); if (ret) return ret; @@ -302,14 +302,14 @@ static int da8xx_musb_probe(struct udevice *dev) lpsc_on(33); /* Enable phy */ - generic_phy_power_on(&platdata->phy); + generic_phy_power_on(&plat->phy); priv->desc_before_addr = true; - otg_board_data = &platdata->otg_board_data; + otg_board_data = &plat->otg_board_data; - host->host = musb_init_controller(&platdata->plat, + host->host = musb_init_controller(&plat->plat, (struct device *)otg_board_data, - platdata->base); + plat->base); if (!host->host) { ret = -ENODEV; goto shutdown; /* Shutdown what we started */ @@ -321,7 +321,7 @@ static int da8xx_musb_probe(struct udevice *dev) return 0; shutdown: /* Turn off the phy if we fail */ - generic_phy_power_off(&platdata->phy); + generic_phy_power_off(&plat->phy); lpsc_disable(33); return ret; } @@ -348,6 +348,6 @@ U_BOOT_DRIVER(da8xx_musb) = { .probe = da8xx_musb_probe, .remove = da8xx_musb_remove, .ops = &musb_usb_ops, - .platdata_auto = sizeof(struct da8xx_musb_platdata), + .plat_auto = sizeof(struct da8xx_musb_platdata), .priv_auto = sizeof(struct musb_host_data), }; diff --git a/drivers/usb/musb-new/mt85xx.c b/drivers/usb/musb-new/mt85xx.c index 8adfa426c4..4847b2c80d 100644 --- a/drivers/usb/musb-new/mt85xx.c +++ b/drivers/usb/musb-new/mt85xx.c @@ -414,6 +414,6 @@ U_BOOT_DRIVER(mtk_musb) = { #ifdef CONFIG_USB_MUSB_HOST .ops = &musb_usb_ops, #endif - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .priv_auto = sizeof(struct mtk_musb_glue), }; diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c index 2e029d84bc..9150c4d745 100644 --- a/drivers/usb/musb-new/omap2430.c +++ b/drivers/usb/musb-new/omap2430.c @@ -151,67 +151,63 @@ struct omap2430_musb_platdata { static int omap2430_musb_ofdata_to_platdata(struct udevice *dev) { - struct omap2430_musb_platdata *platdata = dev_get_platdata(dev); + struct omap2430_musb_platdata *plat = dev_get_platdata(dev); const void *fdt = gd->fdt_blob; int node = dev_of_offset(dev); - platdata->base = (void *)dev_read_addr_ptr(dev); + plat->base = (void *)dev_read_addr_ptr(dev); - platdata->musb_config.multipoint = fdtdec_get_int(fdt, node, - "multipoint", - -1); - if (platdata->musb_config.multipoint < 0) { + plat->musb_config.multipoint = fdtdec_get_int(fdt, node, "multipoint", + -1); + if (plat->musb_config.multipoint < 0) { pr_err("MUSB multipoint DT entry missing\n"); return -ENOENT; } - platdata->musb_config.dyn_fifo = 1; - platdata->musb_config.num_eps = fdtdec_get_int(fdt, node, - "num-eps", -1); - if (platdata->musb_config.num_eps < 0) { + plat->musb_config.dyn_fifo = 1; + plat->musb_config.num_eps = fdtdec_get_int(fdt, node, "num-eps", -1); + if (plat->musb_config.num_eps < 0) { pr_err("MUSB num-eps DT entry missing\n"); return -ENOENT; } - platdata->musb_config.ram_bits = fdtdec_get_int(fdt, node, - "ram-bits", -1); - if (platdata->musb_config.ram_bits < 0) { + plat->musb_config.ram_bits = fdtdec_get_int(fdt, node, "ram-bits", -1); + if (plat->musb_config.ram_bits < 0) { pr_err("MUSB ram-bits DT entry missing\n"); return -ENOENT; } - platdata->plat.power = fdtdec_get_int(fdt, node, - "power", -1); - if (platdata->plat.power < 0) { + plat->plat.power = fdtdec_get_int(fdt, node, "power", -1); + if (plat->plat.power < 0) { pr_err("MUSB power DT entry missing\n"); return -ENOENT; } - platdata->otg_board_data.interface_type = fdtdec_get_int(fdt, node, - "interface-type", -1); - if (platdata->otg_board_data.interface_type < 0) { + plat->otg_board_data.interface_type = fdtdec_get_int(fdt, node, + "interface-type", + -1); + if (plat->otg_board_data.interface_type < 0) { pr_err("MUSB interface-type DT entry missing\n"); return -ENOENT; } #if 0 /* In a perfect world, mode would be set to OTG, mode 3 from DT */ - platdata->plat.mode = fdtdec_get_int(fdt, node, - "mode", -1); - if (platdata->plat.mode < 0) { + plat->plat.mode = fdtdec_get_int(fdt, node, "mode", -1); + if (plat->plat.mode < 0) { pr_err("MUSB mode DT entry missing\n"); return -ENOENT; } #else /* MUSB_OTG, it doesn't work */ #ifdef CONFIG_USB_MUSB_HOST /* Host seems to be the only option that works */ - platdata->plat.mode = MUSB_HOST; + plat->plat.mode = MUSB_HOST; #else /* For that matter, MUSB_PERIPHERAL doesn't either */ - platdata->plat.mode = MUSB_PERIPHERAL; + plat->plat.mode = MUSB_PERIPHERAL; #endif #endif - platdata->otg_board_data.dev = dev; - platdata->plat.config = &platdata->musb_config; - platdata->plat.platform_ops = &omap2430_ops; - platdata->plat.board_data = &platdata->otg_board_data; + plat->otg_board_data.dev = dev; + plat->plat.config = &plat->musb_config; + plat->plat.platform_ops = &omap2430_ops; + plat->plat.board_data = &plat->otg_board_data; return 0; } @@ -222,7 +218,7 @@ static int omap2430_musb_probe(struct udevice *dev) #else struct musb *musbp; #endif - struct omap2430_musb_platdata *platdata = dev_get_platdata(dev); + struct omap2430_musb_platdata *plat = dev_get_platdata(dev); struct usb_bus_priv *priv = dev_get_uclass_priv(dev); struct omap_musb_board_data *otg_board_data; int ret = 0; @@ -230,21 +226,20 @@ static int omap2430_musb_probe(struct udevice *dev) priv->desc_before_addr = true; - otg_board_data = &platdata->otg_board_data; + otg_board_data = &plat->otg_board_data; #ifdef CONFIG_USB_MUSB_HOST - host->host = musb_init_controller(&platdata->plat, + host->host = musb_init_controller(&plat->plat, (struct device *)otg_board_data, - platdata->base); + plat->base); if (!host->host) { return -EIO; } ret = musb_lowlevel_init(host); #else - musbp = musb_register(&platdata->plat, - (struct device *)otg_board_data, - platdata->base); + musbp = musb_register(&plat->plat, (struct device *)otg_board_data, + plat->base); if (IS_ERR_OR_NULL(musbp)) return -EINVAL; #endif @@ -280,7 +275,7 @@ U_BOOT_DRIVER(omap2430_musb) = { #ifdef CONFIG_USB_MUSB_HOST .ops = &musb_usb_ops, #endif - .platdata_auto = sizeof(struct omap2430_musb_platdata), + .plat_auto = sizeof(struct omap2430_musb_platdata), .priv_auto = sizeof(struct musb_host_data), }; diff --git a/drivers/usb/musb-new/pic32.c b/drivers/usb/musb-new/pic32.c index e45ab20562..7970d1620f 100644 --- a/drivers/usb/musb-new/pic32.c +++ b/drivers/usb/musb-new/pic32.c @@ -288,6 +288,6 @@ U_BOOT_DRIVER(usb_musb) = { #ifdef CONFIG_USB_MUSB_HOST .ops = &musb_usb_ops, #endif - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .priv_auto = sizeof(struct pic32_musb_data), }; diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c index 10bc3e8956..1337e5260b 100644 --- a/drivers/usb/musb-new/sunxi.c +++ b/drivers/usb/musb-new/sunxi.c @@ -552,6 +552,6 @@ U_BOOT_DRIVER(usb_musb) = { #ifdef CONFIG_USB_MUSB_HOST .ops = &musb_usb_ops, #endif - .platdata_auto = sizeof(struct usb_platdata), + .plat_auto = sizeof(struct usb_platdata), .priv_auto = sizeof(struct sunxi_glue), }; diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c index 34b1a34d2c..29a06320e6 100644 --- a/drivers/usb/musb-new/ti-musb.c +++ b/drivers/usb/musb-new/ti-musb.c @@ -33,17 +33,17 @@ DECLARE_GLOBAL_DATA_PTR; static void ti_musb_set_phy_power(struct udevice *dev, u8 on) { - struct ti_musb_platdata *platdata = dev_get_platdata(dev); + struct ti_musb_platdata *plat = dev_get_platdata(dev); - if (!platdata->ctrl_mod_base) + if (!plat->ctrl_mod_base) return; if (on) { - clrsetbits_le32(platdata->ctrl_mod_base, + clrsetbits_le32(plat->ctrl_mod_base, CM_PHY_PWRDN | CM_PHY_OTG_PWRDN, OTGVDET_EN | OTGSESSENDEN); } else { - clrsetbits_le32(platdata->ctrl_mod_base, 0, + clrsetbits_le32(plat->ctrl_mod_base, 0, CM_PHY_PWRDN | CM_PHY_OTG_PWRDN); } } @@ -79,7 +79,7 @@ static int ti_musb_get_usb_index(int node) static int ti_musb_ofdata_to_platdata(struct udevice *dev) { - struct ti_musb_platdata *platdata = dev_get_platdata(dev); + struct ti_musb_platdata *plat = dev_get_platdata(dev); const void *fdt = gd->fdt_blob; int node = dev_of_offset(dev); int phys; @@ -87,18 +87,18 @@ static int ti_musb_ofdata_to_platdata(struct udevice *dev) int usb_index; struct musb_hdrc_config *musb_config; - platdata->base = (void *)devfdt_get_addr_index(dev, 1); + plat->base = (void *)devfdt_get_addr_index(dev, 1); phys = fdtdec_lookup_phandle(fdt, node, "phys"); ctrl_mod = fdtdec_lookup_phandle(fdt, phys, "ti,ctrl_mod"); - platdata->ctrl_mod_base = (void *)fdtdec_get_addr(fdt, ctrl_mod, "reg"); + plat->ctrl_mod_base = (void *)fdtdec_get_addr(fdt, ctrl_mod, "reg"); usb_index = ti_musb_get_usb_index(node); switch (usb_index) { case 1: - platdata->ctrl_mod_base += AM335X_USB1_CTRL; + plat->ctrl_mod_base += AM335X_USB1_CTRL; break; case 0: - platdata->ctrl_mod_base += AM335X_USB0_CTRL; + plat->ctrl_mod_base += AM335X_USB0_CTRL; break; default: break; @@ -130,15 +130,15 @@ static int ti_musb_ofdata_to_platdata(struct udevice *dev) return -ENOENT; } - platdata->plat.config = musb_config; + plat->plat.config = musb_config; - platdata->plat.power = fdtdec_get_int(fdt, node, "mentor,power", -1); - if (platdata->plat.power < 0) { + plat->plat.power = fdtdec_get_int(fdt, node, "mentor,power", -1); + if (plat->plat.power < 0) { pr_err("MUSB mentor,power DT entry missing\n"); return -ENOENT; } - platdata->plat.platform_ops = &musb_dsps_ops; + plat->plat.platform_ops = &musb_dsps_ops; return 0; } @@ -147,15 +147,15 @@ static int ti_musb_ofdata_to_platdata(struct udevice *dev) static int ti_musb_host_probe(struct udevice *dev) { struct musb_host_data *host = dev_get_priv(dev); - struct ti_musb_platdata *platdata = dev_get_platdata(dev); + struct ti_musb_platdata *plat = dev_get_platdata(dev); struct usb_bus_priv *priv = dev_get_uclass_priv(dev); int ret; priv->desc_before_addr = true; - host->host = musb_init_controller(&platdata->plat, + host->host = musb_init_controller(&plat->plat, NULL, - platdata->base); + plat->base); if (!host->host) return -EIO; @@ -178,18 +178,18 @@ static int ti_musb_host_remove(struct udevice *dev) #if CONFIG_IS_ENABLED(OF_CONTROL) static int ti_musb_host_ofdata_to_platdata(struct udevice *dev) { - struct ti_musb_platdata *platdata = dev_get_platdata(dev); + struct ti_musb_platdata *plat = dev_get_platdata(dev); const void *fdt = gd->fdt_blob; int node = dev_of_offset(dev); int ret; ret = ti_musb_ofdata_to_platdata(dev); if (ret) { - pr_err("platdata dt parse error\n"); + pr_err("plat dt parse error\n"); return ret; } - platdata->plat.mode = MUSB_HOST; + plat->plat.mode = MUSB_HOST; return 0; } @@ -204,7 +204,7 @@ U_BOOT_DRIVER(ti_musb_host) = { .probe = ti_musb_host_probe, .remove = ti_musb_host_remove, .ops = &musb_usb_ops, - .platdata_auto = sizeof(struct ti_musb_platdata), + .plat_auto = sizeof(struct ti_musb_platdata), .priv_auto = sizeof(struct musb_host_data), }; @@ -216,17 +216,17 @@ struct ti_musb_peripheral { #if CONFIG_IS_ENABLED(OF_CONTROL) static int ti_musb_peripheral_ofdata_to_platdata(struct udevice *dev) { - struct ti_musb_platdata *platdata = dev_get_platdata(dev); + struct ti_musb_platdata *plat = dev_get_platdata(dev); const void *fdt = gd->fdt_blob; int node = dev_of_offset(dev); int ret; ret = ti_musb_ofdata_to_platdata(dev); if (ret) { - pr_err("platdata dt parse error\n"); + pr_err("plat dt parse error\n"); return ret; } - platdata->plat.mode = MUSB_PERIPHERAL; + plat->plat.mode = MUSB_PERIPHERAL; return 0; } @@ -244,12 +244,12 @@ int dm_usb_gadget_handle_interrupts(struct udevice *dev) static int ti_musb_peripheral_probe(struct udevice *dev) { struct ti_musb_peripheral *priv = dev_get_priv(dev); - struct ti_musb_platdata *platdata = dev_get_platdata(dev); + struct ti_musb_platdata *plat = dev_get_platdata(dev); int ret; - priv->periph = musb_init_controller(&platdata->plat, + priv->periph = musb_init_controller(&plat->plat, NULL, - platdata->base); + plat->base); if (!priv->periph) return -EIO; @@ -277,7 +277,7 @@ U_BOOT_DRIVER(ti_musb_peripheral) = { .probe = ti_musb_peripheral_probe, .remove = ti_musb_peripheral_remove, .ops = &musb_usb_ops, - .platdata_auto = sizeof(struct ti_musb_platdata), + .plat_auto = sizeof(struct ti_musb_platdata), .priv_auto = sizeof(struct ti_musb_peripheral), .flags = DM_FLAG_PRE_RELOC, }; diff --git a/drivers/video/am335x-fb.c b/drivers/video/am335x-fb.c index 6620c793a1..26c6a46d5b 100644 --- a/drivers/video/am335x-fb.c +++ b/drivers/video/am335x-fb.c @@ -368,7 +368,7 @@ struct am335x_fb_priv { static int am335x_fb_remove(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); uc_plat->base -= 0x20; uc_plat->size += 0x20; @@ -377,7 +377,7 @@ static int am335x_fb_remove(struct udevice *dev) static int am335x_fb_probe(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); struct video_priv *uc_priv = dev_get_uclass_priv(dev); struct am335x_fb_priv *priv = dev_get_priv(dev); struct am335x_lcdhw *regs = priv->regs; @@ -592,7 +592,7 @@ static int am335x_fb_ofdata_to_platdata(struct udevice *dev) static int am335x_fb_bind(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); uc_plat->size = ((LCD_MAX_WIDTH * LCD_MAX_HEIGHT * (1 << LCD_MAX_LOG2_BPP)) >> 3) + 0x20; diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c index 3eb80c1394..0930d195d0 100644 --- a/drivers/video/atmel_hlcdfb.c +++ b/drivers/video/atmel_hlcdfb.c @@ -293,7 +293,7 @@ static int at91_hlcdc_enable_clk(struct udevice *dev) static void atmel_hlcdc_init(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); struct atmel_hlcdc_priv *priv = dev_get_priv(dev); struct atmel_hlcd_regs *regs = priv->regs; struct display_timing *timing = &priv->timing; @@ -539,7 +539,7 @@ static int atmel_hlcdc_ofdata_to_platdata(struct udevice *dev) static int atmel_hlcdc_bind(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); uc_plat->size = LCD_MAX_WIDTH * LCD_MAX_HEIGHT * (1 << LCD_MAX_LOG2_BPP) / 8; diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index b129309d34..3af3ea4da2 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c @@ -245,7 +245,7 @@ ulong calc_fbsize(void) #ifdef CONFIG_DM_VIDEO static int atmel_fb_lcd_probe(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); struct video_priv *uc_priv = dev_get_uclass_priv(dev); struct atmel_fb_priv *priv = dev_get_priv(dev); struct display_timing *timing = &priv->timing; @@ -285,7 +285,7 @@ static int atmel_fb_ofdata_to_platdata(struct udevice *dev) static int atmel_fb_lcd_bind(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); uc_plat->size = LCD_MAX_WIDTH * LCD_MAX_HEIGHT * (1 << VIDEO_BPP16) / 8; @@ -306,7 +306,7 @@ U_BOOT_DRIVER(atmel_fb) = { .bind = atmel_fb_lcd_bind, .ofdata_to_platdata = atmel_fb_ofdata_to_platdata, .probe = atmel_fb_lcd_probe, - .platdata_auto = sizeof(struct atmel_lcd_platdata), + .plat_auto = sizeof(struct atmel_lcd_platdata), .priv_auto = sizeof(struct atmel_fb_priv), }; #endif diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c index 0888cb0019..95662f14b8 100644 --- a/drivers/video/bcm2835.c +++ b/drivers/video/bcm2835.c @@ -13,7 +13,7 @@ static int bcm2835_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); int ret; int w, h, pitch; diff --git a/drivers/video/bridge/anx6345.c b/drivers/video/bridge/anx6345.c index 147cdcc6d5..93fa25f16e 100644 --- a/drivers/video/bridge/anx6345.c +++ b/drivers/video/bridge/anx6345.c @@ -74,7 +74,7 @@ static int anx6345_read(struct udevice *dev, unsigned int addr_off, static int anx6345_write_r0(struct udevice *dev, unsigned char reg_addr, unsigned char value) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); return anx6345_write(dev, chip->chip_addr, reg_addr, value); } @@ -82,7 +82,7 @@ static int anx6345_write_r0(struct udevice *dev, unsigned char reg_addr, static int anx6345_read_r0(struct udevice *dev, unsigned char reg_addr, unsigned char *value) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); return anx6345_read(dev, chip->chip_addr, reg_addr, value); } @@ -90,7 +90,7 @@ static int anx6345_read_r0(struct udevice *dev, unsigned char reg_addr, static int anx6345_write_r1(struct udevice *dev, unsigned char reg_addr, unsigned char value) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); return anx6345_write(dev, chip->chip_addr + 1, reg_addr, value); } @@ -98,7 +98,7 @@ static int anx6345_write_r1(struct udevice *dev, unsigned char reg_addr, static int anx6345_read_r1(struct udevice *dev, unsigned char reg_addr, unsigned char *value) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); return anx6345_read(dev, chip->chip_addr + 1, reg_addr, value); } diff --git a/drivers/video/bridge/ps862x.c b/drivers/video/bridge/ps862x.c index 8399c6f74c..76115b7bc5 100644 --- a/drivers/video/bridge/ps862x.c +++ b/drivers/video/bridge/ps862x.c @@ -37,7 +37,7 @@ DECLARE_GLOBAL_DATA_PTR; static int ps8622_write(struct udevice *dev, unsigned addr_off, unsigned char reg_addr, unsigned char value) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); uint8_t buf[2]; struct i2c_msg msg; int ret; diff --git a/drivers/video/broadwell_igd.c b/drivers/video/broadwell_igd.c index bc91e7bda5..94d9470751 100644 --- a/drivers/video/broadwell_igd.c +++ b/drivers/video/broadwell_igd.c @@ -661,7 +661,7 @@ static int broadwell_igd_int15_handler(void) static int broadwell_igd_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); bool is_broadwell; ulong fbbase; @@ -756,7 +756,7 @@ static int broadwell_igd_ofdata_to_platdata(struct udevice *dev) static int broadwell_igd_bind(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); /* Set the maximum supported resolution */ uc_plat->size = 2560 * 1600 * 4; @@ -782,5 +782,5 @@ U_BOOT_DRIVER(broadwell_igd) = { .bind = broadwell_igd_bind, .probe = broadwell_igd_probe, .priv_auto = sizeof(struct broadwell_igd_priv), - .platdata_auto = sizeof(struct broadwell_igd_plat), + .plat_auto = sizeof(struct broadwell_igd_plat), }; diff --git a/drivers/video/coreboot.c b/drivers/video/coreboot.c index c8797a0d9c..043cc627a7 100644 --- a/drivers/video/coreboot.c +++ b/drivers/video/coreboot.c @@ -38,7 +38,7 @@ static int save_vesa_mode(struct cb_framebuffer *fb, static int coreboot_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 cb_framebuffer *fb = lib_sysinfo.framebuffer; struct vesa_mode_info *vesa = &mode_info.vesa; diff --git a/drivers/video/display-uclass.c b/drivers/video/display-uclass.c index 5d6f0c1731..068108e915 100644 --- a/drivers/video/display-uclass.c +++ b/drivers/video/display-uclass.c @@ -31,7 +31,7 @@ int display_enable(struct udevice *dev, int panel_bpp, if (ret) return ret; - disp_uc_plat = dev_get_uclass_platdata(dev); + disp_uc_plat = dev_get_uclass_plat(dev); disp_uc_plat->in_use = true; return 0; @@ -71,7 +71,7 @@ int display_read_timing(struct udevice *dev, struct display_timing *timing) bool display_in_use(struct udevice *dev) { - struct display_plat *disp_uc_plat = dev_get_uclass_platdata(dev); + struct display_plat *disp_uc_plat = dev_get_uclass_plat(dev); return disp_uc_plat->in_use; } @@ -79,5 +79,5 @@ bool display_in_use(struct udevice *dev) UCLASS_DRIVER(display) = { .id = UCLASS_DISPLAY, .name = "display", - .per_device_platdata_auto = sizeof(struct display_plat), + .per_device_plat_auto = sizeof(struct display_plat), }; diff --git a/drivers/video/efi.c b/drivers/video/efi.c index 47441a35a6..ceb6f85d25 100644 --- a/drivers/video/efi.c +++ b/drivers/video/efi.c @@ -110,7 +110,7 @@ static int save_vesa_mode(struct vesa_mode_info *vesa) static int efi_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; diff --git a/drivers/video/exynos/exynos_fb.c b/drivers/video/exynos/exynos_fb.c index 7022eec4b7..64bc847884 100644 --- a/drivers/video/exynos/exynos_fb.c +++ b/drivers/video/exynos/exynos_fb.c @@ -377,7 +377,7 @@ void exynos_fimd_disable_sysmmu(void) void exynos_fimd_lcd_init(struct udevice *dev) { struct exynos_fb_priv *priv = dev_get_priv(dev); - struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *plat = dev_get_uclass_plat(dev); struct exynos_fb *reg = priv->reg; unsigned int cfg = 0, rgb_mode; unsigned int offset; @@ -692,7 +692,7 @@ static int exynos_fb_probe(struct udevice *dev) static int exynos_fb_bind(struct udevice *dev) { - struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *plat = dev_get_uclass_plat(dev); /* This is the maximum panel size we expect to see */ plat->size = 1920 * 1080 * 2; diff --git a/drivers/video/fsl_dcu_fb.c b/drivers/video/fsl_dcu_fb.c index e9d05c9394..9224347ab1 100644 --- a/drivers/video/fsl_dcu_fb.c +++ b/drivers/video/fsl_dcu_fb.c @@ -484,7 +484,7 @@ void *video_hw_init(void) static int fsl_dcu_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 fb_info fbinfo = { 0 }; unsigned int win_x; @@ -516,7 +516,7 @@ static int fsl_dcu_video_probe(struct udevice *dev) static int fsl_dcu_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); unsigned int win_x; unsigned int win_y; unsigned int depth = 0, freq = 0; diff --git a/drivers/video/imx/mxc_ipuv3_fb.c b/drivers/video/imx/mxc_ipuv3_fb.c index dc8f2cfd80..0bbd974c2a 100644 --- a/drivers/video/imx/mxc_ipuv3_fb.c +++ b/drivers/video/imx/mxc_ipuv3_fb.c @@ -383,7 +383,7 @@ static int mxcfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) static int mxcfb_map_video_memory(struct fb_info *fbi) { struct mxcfb_info *mxc_fbi = (struct mxcfb_info *)fbi->par; - struct video_uc_platdata *plat = dev_get_uclass_platdata(mxc_fbi->udev); + struct video_uc_platdata *plat = dev_get_uclass_plat(mxc_fbi->udev); if (fbi->fix.smem_len < fbi->var.yres_virtual * fbi->fix.line_length) { fbi->fix.smem_len = fbi->var.yres_virtual * @@ -586,7 +586,7 @@ enum { static int ipuv3_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); #if defined(CONFIG_DISPLAY) struct udevice *disp_dev; @@ -647,7 +647,7 @@ struct ipuv3_video_priv { static int ipuv3_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); plat->size = LCD_MAX_WIDTH * LCD_MAX_HEIGHT * (1 << VIDEO_BPP32) / 8; diff --git a/drivers/video/ivybridge_igd.c b/drivers/video/ivybridge_igd.c index 2587f53ac1..9f10689ce3 100644 --- a/drivers/video/ivybridge_igd.c +++ b/drivers/video/ivybridge_igd.c @@ -753,7 +753,7 @@ static int gma_func0_init(struct udevice *dev) static int bd82x6x_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); ulong fbbase; void *gtt_bar; int ret, rev; @@ -781,7 +781,7 @@ static int bd82x6x_video_probe(struct udevice *dev) static int bd82x6x_video_bind(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); /* Set the maximum supported resolution */ uc_plat->size = 2560 * 1600 * 4; diff --git a/drivers/video/mali_dp.c b/drivers/video/mali_dp.c index 0ffdd7b98f..6c73bd2d62 100644 --- a/drivers/video/mali_dp.c +++ b/drivers/video/mali_dp.c @@ -260,7 +260,7 @@ static int malidp_update_timings_from_edid(struct udevice *dev, static int malidp_probe(struct udevice *dev) { struct video_priv *uc_priv = dev_get_uclass_priv(dev); - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); ofnode framebuffer = ofnode_find_subnode(dev_ofnode(dev), "framebuffer"); struct malidp_priv *priv = dev_get_priv(dev); struct display_timing timings; @@ -382,7 +382,7 @@ fail_aclk: static int malidp_bind(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); /* choose max possible size: 2K x 2K, XRGB888 framebuffer */ uc_plat->size = 4 * 2048 * 2048; diff --git a/drivers/video/meson/meson_plane.c b/drivers/video/meson/meson_plane.c index b367276f23..313c013a7d 100644 --- a/drivers/video/meson/meson_plane.c +++ b/drivers/video/meson/meson_plane.c @@ -100,7 +100,7 @@ meson_vpp_disable_interlace_vscaler_osd1(struct meson_vpu_priv *priv) void meson_vpu_setup_plane(struct udevice *dev, bool is_interlaced) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); struct video_priv *uc_priv = dev_get_uclass_priv(dev); struct meson_vpu_priv *priv = dev_get_priv(dev); u32 osd1_ctrl_stat; diff --git a/drivers/video/meson/meson_vpu.c b/drivers/video/meson/meson_vpu.c index 23b5ec6ef1..b5614fafe8 100644 --- a/drivers/video/meson/meson_vpu.c +++ b/drivers/video/meson/meson_vpu.c @@ -43,7 +43,7 @@ bool meson_vpu_is_compatible(struct meson_vpu_priv *priv, static int meson_vpu_setup_mode(struct udevice *dev, struct udevice *disp) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); struct video_priv *uc_priv = dev_get_uclass_priv(dev); struct display_timing timing; bool is_cvbs = false; @@ -138,7 +138,7 @@ static int meson_vpu_probe(struct udevice *dev) static int meson_vpu_bind(struct udevice *dev) { - struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *plat = dev_get_uclass_plat(dev); plat->size = VPU_MAX_WIDTH * VPU_MAX_HEIGHT * (1 << VPU_MAX_LOG2_BPP) / 8; diff --git a/drivers/video/mvebu_lcd.c b/drivers/video/mvebu_lcd.c index af97c71156..bc789ecc7b 100644 --- a/drivers/video/mvebu_lcd.c +++ b/drivers/video/mvebu_lcd.c @@ -526,7 +526,7 @@ static void mvebu_lcd_register_init(struct mvebu_lcd_info *lcd_info, static int mvebu_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 mvebu_video_priv *priv = dev_get_priv(dev); struct mvebu_lcd_info lcd_info; @@ -575,7 +575,7 @@ static int mvebu_video_probe(struct udevice *dev) static int mvebu_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); plat->size = LCD_MAX_WIDTH * LCD_MAX_HEIGHT * (1 << LCD_MAX_LOG2_BPP) / 8; diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 6589a2a09d..5b770a7a0b 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -356,7 +356,7 @@ static int mxs_of_get_timings(struct udevice *dev, static int mxs_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 display_timing timings; @@ -409,7 +409,7 @@ static int mxs_video_probe(struct udevice *dev) static int mxs_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); struct display_timing timings; u32 bpp = 0; u32 bytes_pp = 0; @@ -443,7 +443,7 @@ static int mxs_video_bind(struct udevice *dev) static int mxs_video_remove(struct udevice *dev) { - struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *plat = dev_get_uclass_plat(dev); mxs_remove_common(plat->base); diff --git a/drivers/video/nexell_display.c b/drivers/video/nexell_display.c index d0b8943312..b1f8134ca4 100644 --- a/drivers/video/nexell_display.c +++ b/drivers/video/nexell_display.c @@ -404,9 +404,9 @@ static struct nx_display_dev *nx_display_setup(void) __func__); return NULL; } - plat = dev_get_uclass_platdata(dev); + plat = dev_get_uclass_plat(dev); if (!dev) { - debug("%s(): dev_get_uclass_platdata(dev) == NULL --> return NULL\n", + debug("%s(): dev_get_uclass_plat(dev) == NULL --> return NULL\n", __func__); return NULL; } @@ -534,7 +534,7 @@ __weak void lcd_enable(void) static int nx_display_probe(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); struct video_priv *uc_priv = dev_get_uclass_priv(dev); struct nx_display_platdata *plat = dev_get_platdata(dev); static GraphicDevice *graphic_device; @@ -619,7 +619,7 @@ static int nx_display_probe(struct udevice *dev) static int nx_display_bind(struct udevice *dev) { - struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *plat = dev_get_uclass_plat(dev); debug("%s()\n", __func__); @@ -643,7 +643,7 @@ U_BOOT_DRIVER(nexell_display) = { .name = "nexell-display", .id = UCLASS_VIDEO, .of_match = nx_display_ids, - .platdata_auto = + .plat_auto = sizeof(struct nx_display_platdata), .bind = nx_display_bind, .probe = nx_display_probe, diff --git a/drivers/video/orisetech_otm8009a.c b/drivers/video/orisetech_otm8009a.c index bb8c33bfc7..190bb55164 100644 --- a/drivers/video/orisetech_otm8009a.c +++ b/drivers/video/orisetech_otm8009a.c @@ -366,6 +366,6 @@ U_BOOT_DRIVER(otm8009a_panel) = { .ops = &otm8009a_panel_ops, .ofdata_to_platdata = otm8009a_panel_ofdata_to_platdata, .probe = otm8009a_panel_probe, - .platdata_auto = sizeof(struct mipi_dsi_panel_plat), + .plat_auto = sizeof(struct mipi_dsi_panel_plat), .priv_auto = sizeof(struct otm8009a_panel_priv), }; diff --git a/drivers/video/pwm_backlight.c b/drivers/video/pwm_backlight.c index 49a3c7a58e..d1407977aa 100644 --- a/drivers/video/pwm_backlight.c +++ b/drivers/video/pwm_backlight.c @@ -84,10 +84,10 @@ static int enable_sequence(struct udevice *dev, int seq) switch (seq) { case 0: if (priv->reg) { - __maybe_unused struct dm_regulator_uclass_platdata + __maybe_unused struct dm_regulator_uclass_plat *plat; - plat = dev_get_uclass_platdata(priv->reg); + plat = dev_get_uclass_plat(priv->reg); log_debug("Enable '%s', regulator '%s'/'%s'\n", dev->name, priv->reg->name, plat->name); ret = regulator_set_enable(priv->reg, true); diff --git a/drivers/video/raydium-rm68200.c b/drivers/video/raydium-rm68200.c index 9d103f1f17..82e8f04d8f 100644 --- a/drivers/video/raydium-rm68200.c +++ b/drivers/video/raydium-rm68200.c @@ -338,6 +338,6 @@ U_BOOT_DRIVER(rm68200_panel) = { .ops = &rm68200_panel_ops, .ofdata_to_platdata = rm68200_panel_ofdata_to_platdata, .probe = rm68200_panel_probe, - .platdata_auto = sizeof(struct mipi_dsi_panel_plat), + .plat_auto = sizeof(struct mipi_dsi_panel_plat), .priv_auto = sizeof(struct rm68200_panel_priv), }; diff --git a/drivers/video/rockchip/rk3288_hdmi.c b/drivers/video/rockchip/rk3288_hdmi.c index 41f05b7ec6..a25b40c37f 100644 --- a/drivers/video/rockchip/rk3288_hdmi.c +++ b/drivers/video/rockchip/rk3288_hdmi.c @@ -25,7 +25,7 @@ static int rk3288_hdmi_enable(struct udevice *dev, int panel_bpp, const struct display_timing *edid) { struct rk_hdmi_priv *priv = dev_get_priv(dev); - struct display_plat *uc_plat = dev_get_uclass_platdata(dev); + struct display_plat *uc_plat = dev_get_uclass_plat(dev); int vop_id = uc_plat->source_id; struct rk3288_grf *grf = priv->grf; @@ -58,7 +58,7 @@ static int rk3288_hdmi_ofdata_to_platdata(struct udevice *dev) static int rk3288_clk_config(struct udevice *dev) { - struct display_plat *uc_plat = dev_get_uclass_platdata(dev); + struct display_plat *uc_plat = dev_get_uclass_plat(dev); struct clk clk; int ret; diff --git a/drivers/video/rockchip/rk3288_mipi.c b/drivers/video/rockchip/rk3288_mipi.c index ff6f132bab..f8b83a99dc 100644 --- a/drivers/video/rockchip/rk3288_mipi.c +++ b/drivers/video/rockchip/rk3288_mipi.c @@ -31,7 +31,7 @@ static int rk_mipi_dsi_source_select(struct udevice *dev) { struct rk_mipi_priv *priv = dev_get_priv(dev); struct rk3288_grf *grf = priv->grf; - struct display_plat *disp_uc_plat = dev_get_uclass_platdata(dev); + struct display_plat *disp_uc_plat = dev_get_uclass_plat(dev); /* Select the video source */ switch (disp_uc_plat->source_id) { diff --git a/drivers/video/rockchip/rk3399_hdmi.c b/drivers/video/rockchip/rk3399_hdmi.c index d9f15adc5c..39f0c323f3 100644 --- a/drivers/video/rockchip/rk3399_hdmi.c +++ b/drivers/video/rockchip/rk3399_hdmi.c @@ -23,7 +23,7 @@ static int rk3399_hdmi_enable(struct udevice *dev, int panel_bpp, const struct display_timing *edid) { struct rk_hdmi_priv *priv = dev_get_priv(dev); - struct display_plat *uc_plat = dev_get_uclass_platdata(dev); + struct display_plat *uc_plat = dev_get_uclass_plat(dev); int vop_id = uc_plat->source_id; struct rk3399_grf_regs *grf = priv->grf; diff --git a/drivers/video/rockchip/rk3399_mipi.c b/drivers/video/rockchip/rk3399_mipi.c index 873f7fdae0..3b8ac3f730 100644 --- a/drivers/video/rockchip/rk3399_mipi.c +++ b/drivers/video/rockchip/rk3399_mipi.c @@ -29,7 +29,7 @@ static int rk_mipi_dsi_source_select(struct udevice *dev) { struct rk_mipi_priv *priv = dev_get_priv(dev); struct rk3399_grf_regs *grf = priv->grf; - struct display_plat *disp_uc_plat = dev_get_uclass_platdata(dev); + struct display_plat *disp_uc_plat = dev_get_uclass_plat(dev); /* Select the video source */ switch (disp_uc_plat->source_id) { diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c index 282fe09fdf..30fe8cee3c 100644 --- a/drivers/video/rockchip/rk_edp.c +++ b/drivers/video/rockchip/rk_edp.c @@ -1026,7 +1026,7 @@ static int rk_edp_remove(struct udevice *dev) static int rk_edp_probe(struct udevice *dev) { - struct display_plat *uc_plat = dev_get_uclass_platdata(dev); + struct display_plat *uc_plat = dev_get_uclass_plat(dev); struct rk_edp_priv *priv = dev_get_priv(dev); struct rk3288_edp *regs = priv->regs; struct clk clk; diff --git a/drivers/video/rockchip/rk_lvds.c b/drivers/video/rockchip/rk_lvds.c index c93b5dfeed..74a1d3071d 100644 --- a/drivers/video/rockchip/rk_lvds.c +++ b/drivers/video/rockchip/rk_lvds.c @@ -53,7 +53,7 @@ int rk_lvds_enable(struct udevice *dev, int panel_bpp, const struct display_timing *edid) { struct rk_lvds_priv *priv = dev_get_priv(dev); - struct display_plat *uc_plat = dev_get_uclass_platdata(dev); + struct display_plat *uc_plat = dev_get_uclass_plat(dev); int ret = 0; unsigned int val = 0; diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c index 6475b3e2af..c20d158c9f 100644 --- a/drivers/video/rockchip/rk_vop.c +++ b/drivers/video/rockchip/rk_vop.c @@ -283,7 +283,7 @@ static int rk_display_init(struct udevice *dev, ulong fbbase, ofnode ep_node) break; }; - disp_uc_plat = dev_get_uclass_platdata(disp); + disp_uc_plat = dev_get_uclass_plat(disp); debug("Found device '%s', disp_uc_priv=%p\n", disp->name, disp_uc_plat); if (display_in_use(disp)) { debug(" - device in use\n"); @@ -364,7 +364,7 @@ void rk_vop_probe_regulators(struct udevice *dev, int rk_vop_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 rk_vop_priv *priv = dev_get_priv(dev); int ret = 0; ofnode port, node; @@ -406,7 +406,7 @@ int rk_vop_probe(struct udevice *dev) int rk_vop_bind(struct udevice *dev) { - struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *plat = dev_get_uclass_plat(dev); plat->size = 4 * (CONFIG_VIDEO_ROCKCHIP_MAX_XRES * CONFIG_VIDEO_ROCKCHIP_MAX_YRES); diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c index c989510640..cf1446e2e7 100644 --- a/drivers/video/sandbox_sdl.c +++ b/drivers/video/sandbox_sdl.c @@ -23,7 +23,7 @@ enum { static int sandbox_sdl_probe(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); struct sandbox_sdl_plat *plat = dev_get_platdata(dev); struct video_priv *uc_priv = dev_get_uclass_priv(dev); struct sandbox_state *state = state_get_current(); @@ -49,7 +49,7 @@ static int sandbox_sdl_probe(struct udevice *dev) static int sandbox_sdl_bind(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); struct sandbox_sdl_plat *plat = dev_get_platdata(dev); int ret = 0; @@ -78,5 +78,5 @@ U_BOOT_DRIVER(sandbox_lcd_sdl) = { .of_match = sandbox_sdl_ids, .bind = sandbox_sdl_bind, .probe = sandbox_sdl_probe, - .platdata_auto = sizeof(struct sandbox_sdl_plat), + .plat_auto = sizeof(struct sandbox_sdl_plat), }; diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c index 0c5b40c30b..7f94018787 100644 --- a/drivers/video/simplefb.c +++ b/drivers/video/simplefb.c @@ -12,7 +12,7 @@ static int simple_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); const void *blob = gd->fdt_blob; const int node = dev_of_offset(dev); diff --git a/drivers/video/stm32/stm32_ltdc.c b/drivers/video/stm32/stm32_ltdc.c index 07a9acbb8e..ff28bdba57 100644 --- a/drivers/video/stm32/stm32_ltdc.c +++ b/drivers/video/stm32/stm32_ltdc.c @@ -329,7 +329,7 @@ static void stm32_ltdc_set_layer1(struct stm32_ltdc_priv *priv, ulong fb_addr) static int stm32_ltdc_probe(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); struct video_priv *uc_priv = dev_get_uclass_priv(dev); struct stm32_ltdc_priv *priv = dev_get_priv(dev); struct udevice *bridge = NULL; @@ -452,7 +452,7 @@ static int stm32_ltdc_probe(struct udevice *dev) static int stm32_ltdc_bind(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); uc_plat->size = CONFIG_VIDEO_STM32_MAX_XRES * CONFIG_VIDEO_STM32_MAX_YRES * diff --git a/drivers/video/sunxi/sunxi_de2.c b/drivers/video/sunxi/sunxi_de2.c index b657e163f0..5540e70fa0 100644 --- a/drivers/video/sunxi/sunxi_de2.c +++ b/drivers/video/sunxi/sunxi_de2.c @@ -189,7 +189,7 @@ static int sunxi_de2_init(struct udevice *dev, ulong fbbase, struct display_plat *disp_uc_plat; int ret; - disp_uc_plat = dev_get_uclass_platdata(disp); + disp_uc_plat = dev_get_uclass_plat(disp); debug("Using device '%s', disp_uc_priv=%p\n", disp->name, disp_uc_plat); if (display_in_use(disp)) { debug(" - device in use\n"); @@ -237,7 +237,7 @@ static int sunxi_de2_init(struct udevice *dev, ulong fbbase, static int sunxi_de2_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 udevice *disp; int ret; @@ -299,7 +299,7 @@ static int sunxi_de2_probe(struct udevice *dev) static int sunxi_de2_bind(struct udevice *dev) { - struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *plat = dev_get_uclass_plat(dev); plat->size = LCD_MAX_WIDTH * LCD_MAX_HEIGHT * (1 << LCD_MAX_LOG2_BPP) / 8; @@ -383,7 +383,7 @@ int sunxi_simplefb_setup(void *blob) } de2_priv = dev_get_uclass_priv(de2); - de2_plat = dev_get_uclass_platdata(de2); + de2_plat = dev_get_uclass_plat(de2); offset = sunxi_simplefb_fdt_match(blob, pipeline); if (offset < 0) { diff --git a/drivers/video/sunxi/sunxi_dw_hdmi.c b/drivers/video/sunxi/sunxi_dw_hdmi.c index 6b6792a3dd..3e8d71538f 100644 --- a/drivers/video/sunxi/sunxi_dw_hdmi.c +++ b/drivers/video/sunxi/sunxi_dw_hdmi.c @@ -340,7 +340,7 @@ static int sunxi_dw_hdmi_enable(struct udevice *dev, int panel_bpp, static int sunxi_dw_hdmi_probe(struct udevice *dev) { - struct display_plat *uc_plat = dev_get_uclass_platdata(dev); + struct display_plat *uc_plat = dev_get_uclass_plat(dev); struct sunxi_dw_hdmi_priv *priv = dev_get_priv(dev); struct sunxi_ccm_reg * const ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c index 2519933374..10b834ca76 100644 --- a/drivers/video/tegra.c +++ b/drivers/video/tegra.c @@ -299,7 +299,7 @@ static int tegra_display_probe(const void *blob, struct tegra_lcd_priv *priv, static int tegra_lcd_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 tegra_lcd_priv *priv = dev_get_priv(dev); const void *blob = gd->fdt_blob; @@ -393,7 +393,7 @@ static int tegra_lcd_ofdata_to_platdata(struct udevice *dev) static int tegra_lcd_bind(struct udevice *dev) { - struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *plat = dev_get_uclass_plat(dev); const void *blob = gd->fdt_blob; int node = dev_of_offset(dev); int rgb; diff --git a/drivers/video/tegra124/display.c b/drivers/video/tegra124/display.c index 6c27932263..f834bd9f59 100644 --- a/drivers/video/tegra124/display.c +++ b/drivers/video/tegra124/display.c @@ -351,7 +351,7 @@ static int display_init(struct udevice *dev, void *lcdbase, return ret; } - disp_uc_plat = dev_get_uclass_platdata(dp_dev); + disp_uc_plat = dev_get_uclass_plat(dp_dev); debug("Found device '%s', disp_uc_priv=%p\n", dp_dev->name, disp_uc_plat); disp_uc_plat->src_dev = dev; @@ -465,7 +465,7 @@ static int tegra124_lcd_init(struct udevice *dev, void *lcdbase, static int tegra124_lcd_probe(struct udevice *dev) { - struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *plat = dev_get_uclass_plat(dev); ulong start; int ret; @@ -482,7 +482,7 @@ static int tegra124_lcd_probe(struct udevice *dev) static int tegra124_lcd_bind(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); uc_plat->size = LCD_MAX_WIDTH * LCD_MAX_HEIGHT * (1 << VIDEO_BPP16) / 8; diff --git a/drivers/video/tegra124/dp.c b/drivers/video/tegra124/dp.c index 881923f229..8519b534a2 100644 --- a/drivers/video/tegra124/dp.c +++ b/drivers/video/tegra124/dp.c @@ -1596,7 +1596,7 @@ static int dp_tegra_probe(struct udevice *dev) { struct tegra_dp_plat *plat = dev_get_platdata(dev); struct tegra_dp_priv *priv = dev_get_priv(dev); - struct display_plat *disp_uc_plat = dev_get_uclass_platdata(dev); + struct display_plat *disp_uc_plat = dev_get_uclass_plat(dev); priv->regs = (struct dpaux_ctlr *)plat->base; priv->enabled = false; @@ -1620,5 +1620,5 @@ U_BOOT_DRIVER(dp_tegra) = { .probe = dp_tegra_probe, .ops = &dp_tegra_ops, .priv_auto = sizeof(struct tegra_dp_priv), - .platdata_auto = sizeof(struct tegra_dp_plat), + .plat_auto = sizeof(struct tegra_dp_plat), }; diff --git a/drivers/video/vesa.c b/drivers/video/vesa.c index 9656326bdb..e370cddda9 100644 --- a/drivers/video/vesa.c +++ b/drivers/video/vesa.c @@ -13,7 +13,7 @@ static int vesa_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); ulong fbbase; int ret; @@ -31,7 +31,7 @@ static int vesa_video_probe(struct udevice *dev) static int vesa_video_bind(struct udevice *dev) { - struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *uc_plat = dev_get_uclass_plat(dev); /* Set the maximum supported resolution */ uc_plat->size = 2560 * 1600 * 4; diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 925731341c..2cd0d947f0 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -68,7 +68,7 @@ void video_set_flush_dcache(struct udevice *dev, bool flush) static ulong alloc_fb(struct udevice *dev, ulong *addrp) { - struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); + struct video_uc_platdata *plat = dev_get_uclass_plat(dev); ulong base, align, size; if (!plat->size) @@ -301,7 +301,7 @@ static int video_pre_remove(struct udevice *dev) /* Set up the display ready for use */ static int video_post_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 *priv = dev_get_uclass_priv(dev); char name[30], drv[15], *str; const char *drv_name = drv; @@ -410,5 +410,5 @@ UCLASS_DRIVER(video) = { .pre_remove = video_pre_remove, .priv_auto = sizeof(struct video_uc_priv), .per_device_auto = sizeof(struct video_priv), - .per_device_platdata_auto = sizeof(struct video_uc_platdata), + .per_device_plat_auto = sizeof(struct video_uc_platdata), }; diff --git a/drivers/virtio/virtio_blk.c b/drivers/virtio/virtio_blk.c index a007a6a33a..3ff74f4a97 100644 --- a/drivers/virtio/virtio_blk.c +++ b/drivers/virtio/virtio_blk.c @@ -72,7 +72,7 @@ static ulong virtio_blk_write(struct udevice *dev, lbaint_t start, static int virtio_blk_bind(struct udevice *dev) { struct virtio_dev_priv *uc_priv = dev_get_uclass_priv(dev->parent); - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); int devnum; desc->if_type = IF_TYPE_VIRTIO; @@ -106,7 +106,7 @@ static int virtio_blk_bind(struct udevice *dev) static int virtio_blk_probe(struct udevice *dev) { struct virtio_blk_priv *priv = dev_get_priv(dev); - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); u64 cap; int ret; diff --git a/drivers/virtio/virtio_net.c b/drivers/virtio/virtio_net.c index e1831cf961..b32ce3c1b1 100644 --- a/drivers/virtio/virtio_net.c +++ b/drivers/virtio/virtio_net.c @@ -234,6 +234,6 @@ U_BOOT_DRIVER(virtio_net) = { .remove = virtio_reset, .ops = &virtio_net_ops, .priv_auto = sizeof(struct virtio_net_priv), - .platdata_auto = sizeof(struct eth_pdata), + .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ACTIVE_DMA, }; diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c index 0a2431a97f..8aaa44983e 100644 --- a/drivers/virtio/virtio_pci_legacy.c +++ b/drivers/virtio/virtio_pci_legacy.c @@ -292,7 +292,7 @@ static int virtio_pci_bind(struct udevice *udev) static int virtio_pci_probe(struct udevice *udev) { - struct pci_child_platdata *pplat = dev_get_parent_platdata(udev); + struct pci_child_platdata *pplat = dev_get_parent_plat(udev); struct virtio_dev_priv *uc_priv = dev_get_uclass_priv(udev); struct virtio_pci_priv *priv = dev_get_priv(udev); u16 subvendor, subdevice; diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index 8996ac0d6e..620d094b78 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c @@ -456,7 +456,7 @@ static int virtio_pci_bind(struct udevice *udev) static int virtio_pci_probe(struct udevice *udev) { - struct pci_child_platdata *pplat = dev_get_parent_platdata(udev); + struct pci_child_platdata *pplat = dev_get_parent_plat(udev); struct virtio_dev_priv *uc_priv = dev_get_uclass_priv(udev); struct virtio_pci_priv *priv = dev_get_priv(udev); u16 subvendor; diff --git a/drivers/w1-eeprom/ds24xxx.c b/drivers/w1-eeprom/ds24xxx.c index 0967accdf0..d12fd5754e 100644 --- a/drivers/w1-eeprom/ds24xxx.c +++ b/drivers/w1-eeprom/ds24xxx.c @@ -31,7 +31,7 @@ static int ds24xxx_probe(struct udevice *dev) { struct w1_device *w1; - w1 = dev_get_parent_platdata(dev); + w1 = dev_get_parent_plat(dev); w1->id = 0; return 0; } diff --git a/drivers/w1-eeprom/ds2502.c b/drivers/w1-eeprom/ds2502.c index 19ee4b17ea..b3d68d7f05 100644 --- a/drivers/w1-eeprom/ds2502.c +++ b/drivers/w1-eeprom/ds2502.c @@ -222,7 +222,7 @@ static int ds2502_probe(struct udevice *dev) { struct w1_device *w1; - w1 = dev_get_parent_platdata(dev); + w1 = dev_get_parent_plat(dev); w1->id = 0; return 0; } diff --git a/drivers/w1-eeprom/w1-eeprom-uclass.c b/drivers/w1-eeprom/w1-eeprom-uclass.c index d515b4c536..97a9d43b03 100644 --- a/drivers/w1-eeprom/w1-eeprom-uclass.c +++ b/drivers/w1-eeprom/w1-eeprom-uclass.c @@ -53,7 +53,7 @@ int w1_eeprom_register_new_device(u64 id) if (dev_get_driver_data(dev) == family) { struct w1_device *w1; - w1 = dev_get_parent_platdata(dev); + w1 = dev_get_parent_plat(dev); if (w1->id) /* device already in use */ continue; w1->id = id; @@ -70,7 +70,7 @@ int w1_eeprom_register_new_device(u64 id) int w1_eeprom_get_id(struct udevice *dev, u64 *id) { - struct w1_device *w1 = dev_get_parent_platdata(dev); + struct w1_device *w1 = dev_get_parent_plat(dev); if (!w1) return -ENODEV; diff --git a/drivers/w1/mxc_w1.c b/drivers/w1/mxc_w1.c index aced1b0e2e..d8cbff7b49 100644 --- a/drivers/w1/mxc_w1.c +++ b/drivers/w1/mxc_w1.c @@ -230,6 +230,6 @@ U_BOOT_DRIVER(mxc_w1_drv) = { .of_match = mxc_w1_id, .ofdata_to_platdata = mxc_w1_ofdata_to_platdata, .ops = &mxc_w1_ops, - .platdata_auto = sizeof(struct mxc_w1_pdata), + .plat_auto = sizeof(struct mxc_w1_pdata), .probe = mxc_w1_probe, }; diff --git a/drivers/w1/w1-gpio.c b/drivers/w1/w1-gpio.c index 6e48e53ddc..2e5064fcc5 100644 --- a/drivers/w1/w1-gpio.c +++ b/drivers/w1/w1-gpio.c @@ -174,5 +174,5 @@ U_BOOT_DRIVER(w1_gpio_drv) = { .of_match = w1_gpio_id, .ofdata_to_platdata = w1_gpio_ofdata_to_platdata, .ops = &w1_gpio_ops, - .platdata_auto = sizeof(struct w1_gpio_pdata), + .plat_auto = sizeof(struct w1_gpio_pdata), }; diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c index af1fe5fd22..8bc6cb13f4 100644 --- a/drivers/w1/w1-uclass.c +++ b/drivers/w1/w1-uclass.c @@ -130,14 +130,14 @@ int w1_get_bus(int busnum, struct udevice **busp) u8 w1_get_device_family(struct udevice *dev) { - struct w1_device *w1 = dev_get_parent_platdata(dev); + struct w1_device *w1 = dev_get_parent_plat(dev); return w1->id & 0xff; } int w1_reset_select(struct udevice *dev) { - struct w1_device *w1 = dev_get_parent_platdata(dev); + struct w1_device *w1 = dev_get_parent_plat(dev); struct udevice *bus = dev_get_parent(dev); const struct w1_ops *ops = device_get_ops(bus); int i; @@ -235,5 +235,5 @@ UCLASS_DRIVER(w1) = { #if CONFIG_IS_ENABLED(OF_CONTROL) .post_bind = dm_scan_fdt_dev, #endif - .per_child_platdata_auto = sizeof(struct w1_device), + .per_child_plat_auto = sizeof(struct w1_device), }; diff --git a/drivers/watchdog/xilinx_tb_wdt.c b/drivers/watchdog/xilinx_tb_wdt.c index a7fb3b4630..b3ee68d3a6 100644 --- a/drivers/watchdog/xilinx_tb_wdt.c +++ b/drivers/watchdog/xilinx_tb_wdt.c @@ -34,16 +34,16 @@ struct xlnx_wdt_platdata { static int xlnx_wdt_reset(struct udevice *dev) { u32 reg; - struct xlnx_wdt_platdata *platdata = dev_get_platdata(dev); + struct xlnx_wdt_platdata *plat = dev_get_platdata(dev); debug("%s ", __func__); /* Read the current contents of TCSR0 */ - reg = readl(&platdata->regs->twcsr0); + reg = readl(&plat->regs->twcsr0); /* Clear the watchdog WDS bit */ if (reg & (XWT_CSR0_EWDT1_MASK | XWT_CSRX_EWDT2_MASK)) - writel(reg | XWT_CSR0_WDS_MASK, &platdata->regs->twcsr0); + writel(reg | XWT_CSR0_WDS_MASK, &plat->regs->twcsr0); return 0; } @@ -51,18 +51,18 @@ static int xlnx_wdt_reset(struct udevice *dev) static int xlnx_wdt_stop(struct udevice *dev) { u32 reg; - struct xlnx_wdt_platdata *platdata = dev_get_platdata(dev); + struct xlnx_wdt_platdata *plat = dev_get_platdata(dev); - if (platdata->enable_once) { + if (plat->enable_once) { debug("Can't stop Xilinx watchdog.\n"); return -EBUSY; } /* Read the current contents of TCSR0 */ - reg = readl(&platdata->regs->twcsr0); + reg = readl(&plat->regs->twcsr0); - writel(reg & ~XWT_CSR0_EWDT1_MASK, &platdata->regs->twcsr0); - writel(~XWT_CSRX_EWDT2_MASK, &platdata->regs->twcsr1); + writel(reg & ~XWT_CSR0_EWDT1_MASK, &plat->regs->twcsr0); + writel(~XWT_CSRX_EWDT2_MASK, &plat->regs->twcsr1); debug("Watchdog disabled!\n"); @@ -71,14 +71,14 @@ static int xlnx_wdt_stop(struct udevice *dev) static int xlnx_wdt_start(struct udevice *dev, u64 timeout, ulong flags) { - struct xlnx_wdt_platdata *platdata = dev_get_platdata(dev); + struct xlnx_wdt_platdata *plat = dev_get_platdata(dev); debug("%s:\n", __func__); writel((XWT_CSR0_WRS_MASK | XWT_CSR0_WDS_MASK | XWT_CSR0_EWDT1_MASK), - &platdata->regs->twcsr0); + &plat->regs->twcsr0); - writel(XWT_CSRX_EWDT2_MASK, &platdata->regs->twcsr1); + writel(XWT_CSRX_EWDT2_MASK, &plat->regs->twcsr1); return 0; } @@ -92,16 +92,16 @@ static int xlnx_wdt_probe(struct udevice *dev) static int xlnx_wdt_ofdata_to_platdata(struct udevice *dev) { - struct xlnx_wdt_platdata *platdata = dev_get_platdata(dev); + struct xlnx_wdt_platdata *plat = dev_get_platdata(dev); - platdata->regs = (struct watchdog_regs *)dev_read_addr(dev); - if (IS_ERR(platdata->regs)) - return PTR_ERR(platdata->regs); + plat->regs = (struct watchdog_regs *)dev_read_addr(dev); + if (IS_ERR(plat->regs)) + return PTR_ERR(plat->regs); - platdata->enable_once = dev_read_u32_default(dev, - "xlnx,wdt-enable-once", 0); + plat->enable_once = dev_read_u32_default(dev, "xlnx,wdt-enable-once", + 0); - debug("%s: wdt-enable-once %d\n", __func__, platdata->enable_once); + debug("%s: wdt-enable-once %d\n", __func__, plat->enable_once); return 0; } @@ -123,7 +123,7 @@ U_BOOT_DRIVER(xlnx_wdt) = { .id = UCLASS_WDT, .of_match = xlnx_wdt_ids, .probe = xlnx_wdt_probe, - .platdata_auto = sizeof(struct xlnx_wdt_platdata), + .plat_auto = sizeof(struct xlnx_wdt_platdata), .ofdata_to_platdata = xlnx_wdt_ofdata_to_platdata, .ops = &xlnx_wdt_ops, }; diff --git a/drivers/watchdog/xilinx_wwdt.c b/drivers/watchdog/xilinx_wwdt.c index 9505874ba4..35d310d625 100644 --- a/drivers/watchdog/xilinx_wwdt.c +++ b/drivers/watchdog/xilinx_wwdt.c @@ -125,7 +125,7 @@ static int xlnx_wwdt_start(struct udevice *dev, u64 timeout, ulong flags) static int xlnx_wwdt_probe(struct udevice *dev) { int ret; - struct xlnx_wwdt_platdata *platdata = dev_get_platdata(dev); + struct xlnx_wwdt_platdata *plat = dev_get_platdata(dev); struct xlnx_wwdt_priv *wdt = dev_get_priv(dev); dev_dbg(dev, "%s: Probing wdt%u\n", __func__, dev->seq); @@ -136,7 +136,7 @@ static int xlnx_wwdt_probe(struct udevice *dev) return ret; } - wdt->enable_once = platdata->enable_once; + wdt->enable_once = plat->enable_once; ret = clk_get_by_index(dev, 0, &wdt->clk); if (ret < 0) @@ -147,11 +147,11 @@ static int xlnx_wwdt_probe(struct udevice *dev) static int xlnx_wwdt_ofdata_to_platdata(struct udevice *dev) { - struct xlnx_wwdt_platdata *platdata = dev_get_platdata(dev); + struct xlnx_wwdt_platdata *plat = dev_get_platdata(dev); - platdata->enable_once = dev_read_u32_default(dev, - "xlnx,wdt-enable-once", 0); - dev_dbg(dev, "wdt-enable-once %d\n", platdata->enable_once); + plat->enable_once = dev_read_u32_default(dev, "xlnx,wdt-enable-once", + 0); + dev_dbg(dev, "wdt-enable-once %d\n", plat->enable_once); return 0; } @@ -173,7 +173,7 @@ U_BOOT_DRIVER(xlnx_wwdt) = { .of_match = xlnx_wwdt_ids, .probe = xlnx_wwdt_probe, .priv_auto = sizeof(struct xlnx_wwdt_priv), - .platdata_auto = sizeof(struct xlnx_wwdt_platdata), + .plat_auto = sizeof(struct xlnx_wwdt_platdata), .ofdata_to_platdata = xlnx_wwdt_ofdata_to_platdata, .ops = &xlnx_wwdt_ops, }; diff --git a/drivers/xen/pvblock.c b/drivers/xen/pvblock.c index cbb51d26b9..b0c93d6cf6 100644 --- a/drivers/xen/pvblock.c +++ b/drivers/xen/pvblock.c @@ -600,7 +600,7 @@ static ulong pvblock_iop(struct udevice *udev, lbaint_t blknr, lbaint_t blkcnt, void *buffer, int write) { struct blkfront_dev *blk_dev = dev_get_priv(udev); - struct blk_desc *desc = dev_get_uclass_platdata(udev); + struct blk_desc *desc = dev_get_uclass_plat(udev); struct blkfront_aiocb aiocb; lbaint_t blocks_todo; bool unaligned; @@ -658,7 +658,7 @@ ulong pvblock_blk_write(struct udevice *udev, lbaint_t blknr, lbaint_t blkcnt, static int pvblock_blk_bind(struct udevice *udev) { - struct blk_desc *desc = dev_get_uclass_platdata(udev); + struct blk_desc *desc = dev_get_uclass_plat(udev); int devnum; desc->if_type = IF_TYPE_PVBLOCK; @@ -685,12 +685,12 @@ static int pvblock_blk_bind(struct udevice *udev) static int pvblock_blk_probe(struct udevice *udev) { struct blkfront_dev *blk_dev = dev_get_priv(udev); - struct blkfront_platdata *platdata = dev_get_platdata(udev); - struct blk_desc *desc = dev_get_uclass_platdata(udev); + struct blkfront_platdata *plat = dev_get_platdata(udev); + struct blk_desc *desc = dev_get_uclass_plat(udev); int ret, devid; - devid = platdata->devid; - free(platdata); + devid = plat->devid; + free(plat); ret = init_blkfront(devid, blk_dev); if (ret < 0) @@ -737,27 +737,27 @@ static int on_new_vbd(struct udevice *parent, unsigned int devid) { struct driver_info info; struct udevice *udev; - struct blkfront_platdata *platdata; + struct blkfront_platdata *plat; int ret; debug("New " DRV_NAME_BLK ", device ID %d\n", devid); - platdata = malloc(sizeof(struct blkfront_platdata)); - if (!platdata) { + plat = malloc(sizeof(struct blkfront_platdata)); + if (!plat) { printf("Failed to allocate platform data\n"); return -ENOMEM; } - platdata->devid = devid; + plat->devid = devid; info.name = DRV_NAME_BLK; - info.platdata = platdata; + info.plat = plat; ret = device_bind_by_name(parent, false, &info, &udev); if (ret < 0) { printf("Failed to bind " DRV_NAME_BLK " to device with ID %d, ret: %d\n", devid, ret); - free(platdata); + free(plat); } return ret; } @@ -802,7 +802,7 @@ static void print_pvblock_devices(void) class_name = uclass_get_name(UCLASS_PVBLOCK); for (blk_first_device(IF_TYPE_PVBLOCK, &udev); udev; blk_next_device(&udev), first = false) { - struct blk_desc *desc = dev_get_uclass_platdata(udev); + struct blk_desc *desc = dev_get_uclass_plat(udev); if (!first) puts(", "); diff --git a/include/adc.h b/include/adc.h index 5841dfb54b..0d1a666908 100644 --- a/include/adc.h +++ b/include/adc.h @@ -40,7 +40,7 @@ struct adc_channel { }; /** - * struct adc_uclass_platdata - basic ADC info + * struct adc_uclass_plat - basic ADC info * * Note: The positive/negative reference Voltage is only a name and it doesn't * provide an information about the value polarity. It is possible, for both @@ -71,7 +71,7 @@ struct adc_channel { * @vdd_microvolts - positive reference Voltage value * @vss_microvolts - negative reference Voltage value */ -struct adc_uclass_platdata { +struct adc_uclass_plat { int data_format; unsigned int data_mask; unsigned int data_timeout_us; diff --git a/include/blk.h b/include/blk.h index 9ee10fb80e..c4401b0025 100644 --- a/include/blk.h +++ b/include/blk.h @@ -56,7 +56,7 @@ enum sig_type { /* * With driver model (CONFIG_BLK) this is uclass platform data, accessible - * with dev_get_uclass_platdata(dev) + * with dev_get_uclass_plat(dev) */ struct blk_desc { /* diff --git a/include/cpu.h b/include/cpu.h index 78e88b9ed0..1d53308f7a 100644 --- a/include/cpu.h +++ b/include/cpu.h @@ -17,7 +17,7 @@ * @timebase_freq: the current frequency at which the cpu timer timebase * registers are updated (in Hz) * - * This can be accessed with dev_get_parent_platdata() for any UCLASS_CPU + * This can be accessed with dev_get_parent_plat() for any UCLASS_CPU * device. */ struct cpu_platdata { diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h index 578a483497..2e9c1d5ef9 100644 --- a/include/dm/device-internal.h +++ b/include/dm/device-internal.h @@ -19,8 +19,8 @@ struct udevice; * device_bind() - Create a device and bind it to a driver * * Called to set up a new device attached to a driver. The device will either - * have platdata, or a device tree node which can be used to create the - * platdata. + * have plat, or a device tree node which can be used to create the + * plat. * * Once bound a device exists but is not yet active until device_probe() is * called. @@ -28,7 +28,7 @@ struct udevice; * @parent: Pointer to device's parent, under which this driver will exist * @drv: Device's driver * @name: Name of device (e.g. device tree node name) - * @platdata: Pointer to data for this device - the structure is device- + * @plat: Pointer to data for this device - the structure is device- * specific but may include the device's I/O address, etc.. This is NULL for * devices which use device tree. * @ofnode: Devicetree node for this device. This is ofnode_null() for @@ -37,7 +37,7 @@ struct udevice; * @return 0 if OK, -ve on error */ 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); /** @@ -72,7 +72,7 @@ int device_bind_with_driver_data(struct udevice *parent, * @parent: Pointer to device's parent * @pre_reloc_only: If true, bind the driver only if its DM_FLAG_PRE_RELOC flag * is set. If false bind the driver always. - * @info: Name and platdata for this device + * @info: Name and plat for this device * @devp: if non-NULL, returns a pointer to the bound device * @return 0 if OK, -ve on error */ diff --git a/include/dm/device.h b/include/dm/device.h index f4c2b9b246..5d31a2c715 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -23,16 +23,16 @@ struct driver_info; /* Driver is active (probed). Cleared when it is removed */ #define DM_FLAG_ACTIVATED (1 << 0) -/* DM is responsible for allocating and freeing platdata */ +/* DM is responsible for allocating and freeing plat */ #define DM_FLAG_ALLOC_PDATA (1 << 1) /* DM should init this device prior to relocation */ #define DM_FLAG_PRE_RELOC (1 << 2) -/* DM is responsible for allocating and freeing parent_platdata */ +/* DM is responsible for allocating and freeing parent_plat */ #define DM_FLAG_ALLOC_PARENT_PDATA (1 << 3) -/* DM is responsible for allocating and freeing uclass_platdata */ +/* DM is responsible for allocating and freeing uclass_plat */ #define DM_FLAG_ALLOC_UCLASS_PDATA (1 << 4) /* Allocate driver private data on a DMA boundary */ @@ -64,7 +64,7 @@ struct driver_info; /* DM does not enable/disable the power domains corresponding to this device */ #define DM_FLAG_DEFAULT_PD_CTRL_OFF (1 << 11) -/* Driver platdata has been read. Cleared when the device is removed */ +/* Driver plat has been read. Cleared when the device is removed */ #define DM_FLAG_PLATDATA_VALID (1 << 12) /* @@ -104,21 +104,21 @@ enum { * particular port or peripheral (essentially a driver instance). * * A device will come into existence through a 'bind' call, either due to - * a U_BOOT_DEVICE() macro (in which case platdata is non-NULL) or a node + * a U_BOOT_DEVICE() macro (in which case plat is non-NULL) or a node * in the device tree (in which case of_offset is >= 0). In the latter case - * we translate the device tree information into platdata in a function + * we translate the device tree information into plat in a function * implemented by the driver ofdata_to_platdata method (called just before the * probe method if the device has a device tree node. * - * All three of platdata, priv and uclass_priv can be allocated by the - * driver, or you can use the 'auto' members of struct driver and + * All three of plat, priv and uclass_priv can be allocated by the + * driver, or you can use the auto_alloc_size members of struct driver and * struct uclass_driver to have driver model do this automatically. * * @driver: The driver used by this device * @name: Name of device, typically the FDT node name - * @platdata: Configuration data for this device - * @parent_platdata: The parent bus's configuration data for this device - * @uclass_platdata: The uclass's configuration data for this device + * @plat: Configuration data for this device + * @parent_plat: The parent bus's configuration data for this device + * @uclass_plat: The uclass's configuration data for this device * @node: Reference to device tree node for this device * @driver_data: Driver data word for the entry that matched this device with * its driver @@ -142,9 +142,9 @@ enum { struct udevice { const struct driver *driver; const char *name; - void *platdata; - void *parent_platdata; - void *uclass_platdata; + void *plat; + void *parent_plat; + void *uclass_plat; ofnode node; ulong driver_data; struct udevice *parent; @@ -203,7 +203,7 @@ struct udevice_id { * * This holds methods for setting up a new device, and also removing it. * The device needs information to set itself up - this is provided either - * by platdata or a device tree node (which we find by looking up + * by plat or a device tree node (which we find by looking up * matching compatible strings with of_match). * * Drivers all belong to a uclass, representing a class of devices of the @@ -228,17 +228,17 @@ struct udevice_id { * @priv_auto: If non-zero this is the size of the private data * to be allocated in the device's ->priv pointer. If zero, then the driver * is responsible for allocating any data required. - * @platdata_auto: If non-zero this is the size of the - * platform data to be allocated in the device's ->platdata pointer. + * @plat_auto: If non-zero this is the size of the + * platform data to be allocated in the device's ->plat pointer. * This is typically only useful for device-tree-aware drivers (those with - * an of_match), since drivers which use platdata will have the data + * an of_match), since drivers which use plat will have the data * provided in the U_BOOT_DEVICE() instantiation. * @per_child_auto: Each device can hold private data owned by * its parent. If required this will be automatically allocated if this * value is non-zero. - * @per_child_platdata_auto: A bus likes to store information about + * @per_child_plat_auto: A bus likes to store information about * its children. If non-zero this is the size of this data, to be allocated - * in the child's parent_platdata pointer. + * in the child's parent_plat pointer. * @ops: Driver-specific operations. This is typically a list of function * pointers defined by the driver, to implement driver functions required by * the uclass. @@ -259,9 +259,9 @@ struct driver { int (*child_pre_probe)(struct udevice *dev); int (*child_post_remove)(struct udevice *dev); int priv_auto; - int platdata_auto; + int plat_auto; int per_child_auto; - int per_child_platdata_auto; + int per_child_plat_auto; const void *ops; /* driver-specific operations */ uint32_t flags; #if CONFIG_IS_ENABLED(ACPIGEN) @@ -295,24 +295,24 @@ struct driver { void *dev_get_platdata(const struct udevice *dev); /** - * dev_get_parent_platdata() - Get the parent platform data for a device + * dev_get_parent_plat() - Get the parent platform data for a device * * This checks that dev is not NULL, but no other checks for now * * @dev Device to check * @return parent's platform data, or NULL if none */ -void *dev_get_parent_platdata(const struct udevice *dev); +void *dev_get_parent_plat(const struct udevice *dev); /** - * dev_get_uclass_platdata() - Get the uclass platform data for a device + * dev_get_uclass_plat() - Get the uclass platform data for a device * * This checks that dev is not NULL, but no other checks for now * * @dev Device to check * @return uclass's platform data, or NULL if none */ -void *dev_get_uclass_platdata(const struct udevice *dev); +void *dev_get_uclass_plat(const struct udevice *dev); /** * dev_get_priv() - Get the private data for a device @@ -622,7 +622,7 @@ int device_find_child_by_name(const struct udevice *parent, const char *name, struct udevice **devp); /** - * device_first_child_ofdata_err() - Find the first child and reads its platdata + * device_first_child_ofdata_err() - Find the first child and reads its plat * * The ofdata_to_platdata() method is called on the child before it is returned, * but the child is not probed. @@ -635,7 +635,7 @@ int device_first_child_ofdata_err(struct udevice *parent, struct udevice **devp); /* - * device_next_child_ofdata_err() - Find the next child and read its platdata + * device_next_child_ofdata_err() - Find the next child and read its plat * * The ofdata_to_platdata() method is called on the child before it is returned, * but the child is not probed. diff --git a/include/dm/lists.h b/include/dm/lists.h index 810e244d9e..070bc9c19f 100644 --- a/include/dm/lists.h +++ b/include/dm/lists.h @@ -16,7 +16,7 @@ * lists_driver_lookup_name() - Return u_boot_driver corresponding to name * * This function returns a pointer to a driver given its name. This is used - * for binding a driver given its name and platdata. + * for binding a driver given its name and plat. * * @name: Name of driver to look up * @return pointer to driver, or NULL if not found diff --git a/include/dm/pci.h b/include/dm/pci.h index 10f9fd9e37..bddacbf599 100644 --- a/include/dm/pci.h +++ b/include/dm/pci.h @@ -30,7 +30,7 @@ int pci_get_devfn(struct udevice *dev); * * This returns an int to avoid a dependency on pci.h * - * @reg: reg value from dt-platdata.c array (first member). This is not a + * @reg: reg value from dt-plat.c array (first member). This is not a * pointer type, since the caller may use fdt32_t or fdt64_t depending on * the address sizes. * @return device/function for that device (pci_dev_t format) diff --git a/include/dm/platdata.h b/include/dm/platdata.h index 216efa8ef7..6094b663f8 100644 --- a/include/dm/platdata.h +++ b/include/dm/platdata.h @@ -20,13 +20,13 @@ * available). U-Boot's driver model uses device tree for configuration. * * @name: Driver name - * @platdata: Driver-specific platform data + * @plat: Driver-specific platform data * @platdata_size: Size of platform data structure * @parent_idx: Index of the parent driver_info structure */ struct driver_info { const char *name; - const void *platdata; + const void *plat; #if CONFIG_IS_ENABLED(OF_PLATDATA) unsigned short platdata_size; short parent_idx; @@ -57,7 +57,7 @@ struct driver_rt { * available). U-Boot's driver model uses device tree for configuration. * * When of-platdata is in use, U_BOOT_DEVICE() cannot be used outside of the - * dt-platdata.c file created by dtoc + * dt-plat.c file created by dtoc */ #if CONFIG_IS_ENABLED(OF_PLATDATA) && !defined(DT_PLATDATA_C) #define U_BOOT_DEVICE(__name) _Static_assert(false, \ diff --git a/include/dm/root.h b/include/dm/root.h index 830e31312d..113e92ec78 100644 --- a/include/dm/root.h +++ b/include/dm/root.h @@ -33,7 +33,7 @@ void dm_fixup_for_gd_move(struct global_data *new_gd); /** * dm_scan_platdata() - Scan all platform data and bind drivers * - * This scans all available platdata and creates drivers for each + * This scans all available plat and creates drivers for each * * @pre_reloc_only: If true, bind only drivers with the DM_FLAG_PRE_RELOC * flag. If false bind all drivers. diff --git a/include/dm/uclass.h b/include/dm/uclass.h index e74082fbdf..068e8ea8bf 100644 --- a/include/dm/uclass.h +++ b/include/dm/uclass.h @@ -71,15 +71,15 @@ struct udevice; * @per_device_auto: Each device can hold private data owned * by the uclass. If required this will be automatically allocated if this * value is non-zero. - * @per_device_platdata_auto: Each device can hold platform data - * owned by the uclass as 'dev->uclass_platdata'. If the value is non-zero, + * @per_device_plat_auto: Each device can hold platform data + * owned by the uclass as 'dev->uclass_plat'. If the value is non-zero, * then this will be automatically allocated. * @per_child_auto: Each child device (of a parent in this * uclass) can hold parent data for the device/uclass. This value is only * used as a fallback if this member is 0 in the driver. - * @per_child_platdata_auto: A bus likes to store information about + * @per_child_plat_auto: A bus likes to store information about * its children. If non-zero this is the size of this data, to be allocated - * in the child device's parent_platdata pointer. This value is only used as + * in the child device's parent_plat pointer. This value is only used as * a fallback if this member is 0 in the driver. * @ops: Uclass operations, providing the consistent interface to devices * within the uclass. @@ -100,9 +100,9 @@ struct uclass_driver { int (*destroy)(struct uclass *class); int priv_auto; int per_device_auto; - int per_device_platdata_auto; + int per_device_plat_auto; int per_child_auto; - int per_child_platdata_auto; + int per_child_plat_auto; const void *ops; uint32_t flags; }; diff --git a/include/dwmmc.h b/include/dwmmc.h index c53694654e..4515a44dc2 100644 --- a/include/dwmmc.h +++ b/include/dwmmc.h @@ -256,7 +256,7 @@ static inline u8 dwmci_readb(struct dwmci_host *host, int reg) * ... * * Inside U_BOOT_DRIVER(): - * .platdata_auto = sizeof(struct rockchip_mmc_plat), + * .plat_auto = sizeof(struct rockchip_mmc_plat), * * To access platform data: * struct rockchip_mmc_plat *plat = dev_get_platdata(dev); diff --git a/include/i2c.h b/include/i2c.h index 880aa8032b..d0a390141b 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -71,7 +71,7 @@ struct udevice; * An I2C chip is a device on the I2C bus. It sits at a particular address * and normally supports 7-bit or 10-bit addressing. * - * To obtain this structure, use dev_get_parent_platdata(dev) where dev is + * To obtain this structure, use dev_get_parent_plat(dev) where dev is * the chip to examine. * * @chip_addr: Chip address on bus diff --git a/include/net.h b/include/net.h index aff6674bb3..13da69b7c1 100644 --- a/include/net.h +++ b/include/net.h @@ -115,7 +115,7 @@ enum eth_state_t { * @enetaddr: The Ethernet MAC address that is loaded from EEPROM or env * @phy_interface: PHY interface to use - see PHY_INTERFACE_MODE_... * @max_speed: Maximum speed of Ethernet connection supported by MAC - * @priv_pdata: device specific platdata + * @priv_pdata: device specific plat */ struct eth_pdata { phys_addr_t iobase; diff --git a/include/pci.h b/include/pci.h index d1ccf6c963..a8472dd268 100644 --- a/include/pci.h +++ b/include/pci.h @@ -903,7 +903,7 @@ struct udevice; * * Every device on a PCI bus has this per-child data. * - * It can be accessed using dev_get_parent_platdata(dev) if dev->parent is a + * It can be accessed using dev_get_parent_plat(dev) if dev->parent is a * PCI bus (i.e. UCLASS_PCI) * * @devfn: Encoded device and function index - see PCI_DEVFN() diff --git a/include/power/regulator.h b/include/power/regulator.h index 7f278e8c7d..19a3b7b502 100644 --- a/include/power/regulator.h +++ b/include/power/regulator.h @@ -16,15 +16,15 @@ * 'UCLASS_REGULATOR' and the regulator driver API. * * The regulator uclass - is based on uclass platform data which is allocated, - * automatically for each regulator device on bind and 'dev->uclass_platdata' - * points to it. The data type is: 'struct dm_regulator_uclass_platdata'. + * automatically for each regulator device on bind and 'dev->uclass_plat' + * points to it. The data type is: 'struct dm_regulator_uclass_plat'. * The uclass file: 'drivers/power/regulator/regulator-uclass.c' * * The regulator device - is based on driver's model 'struct udevice'. * The API can use regulator name in two meanings: * - devname - the regulator device's name: 'dev->name' - * - platname - the device's platdata's name. So in the code it looks like: - * 'uc_pdata = dev->uclass_platdata'; 'name = uc_pdata->name'. + * - platname - the device's plat's name. So in the code it looks like: + * 'uc_pdata = dev->uclass_plat'; 'name = uc_pdata->name'. * * The regulator device driver - provide an implementation of uclass operations * pointed by 'dev->driver->ops' as a struct of type 'struct dm_regulator_ops'. @@ -135,7 +135,7 @@ enum regulator_flag { }; /** - * struct dm_regulator_uclass_platdata - pointed by dev->uclass_platdata, and + * struct dm_regulator_uclass_plat - pointed by dev->uclass_plat, and * allocated on each regulator bind. This structure holds an information * about each regulator's constraints and supported operation modes. * There is no "step" voltage value - so driver should take care of this. @@ -162,7 +162,7 @@ enum regulator_flag { * The constraints: type, mode, mode_count, can be set by device driver, e.g. * by the driver '.probe' method. */ -struct dm_regulator_uclass_platdata { +struct dm_regulator_uclass_plat { enum regulator_type type; struct dm_regulator_mode *mode; int mode_count; @@ -422,7 +422,7 @@ int regulators_enable_boot_on(bool verbose); * regulator_autoset: setup the voltage/current on a regulator * * The setup depends on constraints found in device's uclass's platform data - * (struct dm_regulator_uclass_platdata): + * (struct dm_regulator_uclass_plat): * * - Enable - will set - if any of: 'always_on' or 'boot_on' is set to true, * or if both are unset, then the function returns @@ -431,7 +431,7 @@ int regulators_enable_boot_on(bool verbose); * * The function returns on the first-encountered error. * - * @platname - expected string for dm_regulator_uclass_platdata .name field + * @platname - expected string for dm_regulator_uclass_plat .name field * @devp - returned pointer to the regulator device - if non-NULL passed * @return: 0 on success or negative value of errno. */ @@ -440,7 +440,7 @@ int regulator_autoset(struct udevice *dev); /** * regulator_autoset_by_name: setup the regulator given by its uclass's * platform data name field. The setup depends on constraints found in device's - * uclass's platform data (struct dm_regulator_uclass_platdata): + * uclass's platform data (struct dm_regulator_uclass_plat): * - Enable - will set - if any of: 'always_on' or 'boot_on' is set to true, * or if both are unset, then the function returns * - Voltage value - will set - if '.min_uV' and '.max_uV' values are equal @@ -448,7 +448,7 @@ int regulator_autoset(struct udevice *dev); * * The function returns on first encountered error. * - * @platname - expected string for dm_regulator_uclass_platdata .name field + * @platname - expected string for dm_regulator_uclass_plat .name field * @devp - returned pointer to the regulator device - if non-NULL passed * @return: 0 on success or negative value of errno. * @@ -464,7 +464,7 @@ int regulator_autoset_by_name(const char *platname, struct udevice **devp); * regulator_autoset_by_name() for each name from the list. * * @list_platname - an array of expected strings for .name field of each - * regulator's uclass platdata + * regulator's uclass plat * @list_devp - an array of returned pointers to the successfully setup * regulator devices if non-NULL passed * @verbose - (true/false) print each regulator setup info, or be quiet @@ -499,9 +499,9 @@ int regulator_get_by_devname(const char *devname, struct udevice **devp); /** * regulator_get_by_platname: returns the pointer to the pmic regulator device. - * Search by name, found in regulator uclass platdata. + * Search by name, found in regulator uclass plat. * - * @platname - expected string for uc_pdata->name of regulator uclass platdata + * @platname - expected string for uc_pdata->name of regulator uclass plat * @devp - returns pointer to the regulator device or NULL on error * @return 0 on success or negative value of errno. * diff --git a/include/remoteproc.h b/include/remoteproc.h index 74d01723f6..089131f65f 100644 --- a/include/remoteproc.h +++ b/include/remoteproc.h @@ -34,7 +34,7 @@ enum rproc_mem_type { * @mem_type: one of 'enum rproc_mem_type' * @driver_plat_data: driver specific platform data that may be needed. * - * This can be accessed with dev_get_uclass_platdata() for any UCLASS_REMOTEPROC + * This can be accessed with dev_get_uclass_plat() for any UCLASS_REMOTEPROC * device. * */ diff --git a/include/sdhci.h b/include/sdhci.h index d04afd53b1..69c2087c10 100644 --- a/include/sdhci.h +++ b/include/sdhci.h @@ -440,7 +440,7 @@ static inline u8 sdhci_readb(struct sdhci_host *host, int reg) * ... * * Inside U_BOOT_DRIVER(): - * .platdata_auto = sizeof(struct msm_sdhc_plat), + * .plat_auto = sizeof(struct msm_sdhc_plat), * * To access platform data: * struct msm_sdhc_plat *plat = dev_get_platdata(dev); diff --git a/include/spi.h b/include/spi.h index f69c08d287..176a42cb13 100644 --- a/include/spi.h +++ b/include/spi.h @@ -48,8 +48,8 @@ struct dm_spi_bus { * struct dm_spi_platdata - platform data for all SPI slaves * * This describes a SPI slave, a child device of the SPI bus. To obtain this - * struct from a spi_slave, use dev_get_parent_platdata(dev) or - * dev_get_parent_platdata(slave->dev). + * struct from a spi_slave, use dev_get_parent_plat(dev) or + * dev_get_parent_plat(slave->dev). * * This data is immuatable. Each time the device is probed, @max_hz and @mode * will be copied to struct spi_slave. @@ -566,12 +566,12 @@ int spi_find_bus_and_cs(int busnum, int cs, struct udevice **busp, * is automatically bound on this chip select with requested speed and mode. * * Ths new slave device is probed ready for use with the speed and mode - * from platdata when available or the requested values. + * from plat when available or the requested values. * * @busnum: SPI bus number * @cs: Chip select to look for - * @speed: SPI speed to use for this slave when not available in platdata - * @mode: SPI mode to use for this slave when not available in platdata + * @speed: SPI speed to use for this slave when not available in plat + * @mode: SPI mode to use for this slave when not available in plat * @drv_name: Name of driver to attach to this chip select * @dev_name: Name of the new device thus created * @busp: Returns bus device diff --git a/include/usb.h b/include/usb.h index 5a7af882fb..a3323f5801 100644 --- a/include/usb.h +++ b/include/usb.h @@ -608,7 +608,7 @@ struct usb_platdata { /** * struct usb_dev_platdata - Platform data about a USB device * - * Given a USB device dev this structure is dev_get_parent_platdata(dev). + * Given a USB device dev this structure is dev_get_parent_plat(dev). * This is used by sandbox to provide emulation data also. * * @id: ID used to match this device @@ -662,7 +662,7 @@ struct usb_bus_priv { * struct usb_emul_platdata - platform data about the USB emulator * * Given a USB emulator (UCLASS_USB_EMUL) 'dev', this is - * dev_get_uclass_platdata(dev). + * dev_get_uclass_plat(dev). * * @port1: USB emulator device port number on the parent hub */ diff --git a/include/video.h b/include/video.h index 9d09d2409a..31a12bd799 100644 --- a/include/video.h +++ b/include/video.h @@ -21,7 +21,7 @@ struct udevice; * struct video_uc_platdata - uclass platform data for a video device * * This holds information that the uclass needs to know about each device. It - * is accessed using dev_get_uclass_platdata(dev). See 'Theory of operation' at + * is accessed using dev_get_uclass_plat(dev). See 'Theory of operation' at * the top of video-uclass.c for details on how this information is set. * * @align: Frame-buffer alignment, indicating the memory boundary the frame @@ -125,7 +125,7 @@ struct video_ops { * * Note: This function is for internal use. * - * This uses the uclass platdata's @size and @align members to figure out + * This uses the uclass plat's @size and @align members to figure out * a size and position for each frame buffer as part of the pre-relocation * process of determining the post-relocation memory layout. * diff --git a/lib/acpi/acpi_device.c b/lib/acpi/acpi_device.c index c3439a5988..52b21cea70 100644 --- a/lib/acpi/acpi_device.c +++ b/lib/acpi/acpi_device.c @@ -602,7 +602,7 @@ static void acpi_device_write_i2c(struct acpi_ctx *ctx, static int acpi_device_set_i2c(const struct udevice *dev, struct acpi_i2c *i2c, const char *scope) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); struct udevice *bus = dev_get_parent(dev); memset(i2c, '\0', sizeof(*i2c)); @@ -727,7 +727,7 @@ static int acpi_device_set_spi(const struct udevice *dev, struct acpi_spi *spi, struct dm_spi_slave_platdata *plat; struct spi_slave *slave = dev_get_parent_priv(dev); - plat = dev_get_parent_platdata(slave->dev); + plat = dev_get_parent_plat(slave->dev); memset(spi, '\0', sizeof(*spi)); spi->device_select = plat->cs; spi->device_select_polarity = SPI_POLARITY_LOW; diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_block_device.c index fcd6eb8799..830fdabe38 100644 --- a/lib/efi_driver/efi_block_device.c +++ b/lib/efi_driver/efi_block_device.c @@ -59,8 +59,8 @@ struct efi_blk_platdata { static ulong efi_bl_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, void *buffer) { - struct efi_blk_platdata *platdata = dev_get_platdata(dev); - struct efi_block_io *io = platdata->io; + struct efi_blk_platdata *plat = dev_get_platdata(dev); + struct efi_block_io *io = plat->io; efi_status_t ret; EFI_PRINT("%s: read '%s', from block " LBAFU ", " LBAFU " blocks\n", @@ -88,8 +88,8 @@ static ulong efi_bl_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, static ulong efi_bl_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, const void *buffer) { - struct efi_blk_platdata *platdata = dev_get_platdata(dev); - struct efi_block_io *io = platdata->io; + struct efi_blk_platdata *plat = dev_get_platdata(dev); + struct efi_block_io *io = plat->io; efi_status_t ret; EFI_PRINT("%s: write '%s', from block " LBAFU ", " LBAFU " blocks\n", @@ -118,7 +118,7 @@ static int efi_bl_bind_partitions(efi_handle_t handle, struct udevice *dev) struct blk_desc *desc; const char *if_typename; - desc = dev_get_uclass_platdata(dev); + desc = dev_get_uclass_plat(dev); if_typename = blk_get_if_type_name(desc->if_type); return efi_disk_create_partitions(handle, desc, if_typename, @@ -140,7 +140,7 @@ static int efi_bl_bind(efi_handle_t handle, void *interface) struct efi_object *obj = efi_search_obj(handle); struct efi_block_io *io = interface; int disks; - struct efi_blk_platdata *platdata; + struct efi_blk_platdata *plat; EFI_PRINT("%s: handle %p, interface %p\n", __func__, handle, io); @@ -169,9 +169,9 @@ static int efi_bl_bind(efi_handle_t handle, void *interface) /* Set the DM_FLAG_NAME_ALLOCED flag to avoid a memory leak */ device_set_name_alloced(bdev); - platdata = dev_get_platdata(bdev); - platdata->handle = handle; - platdata->io = interface; + plat = dev_get_platdata(bdev); + plat->handle = handle; + plat->io = interface; ret = device_probe(bdev); if (ret) @@ -196,7 +196,7 @@ U_BOOT_DRIVER(efi_blk) = { .name = "efi_blk", .id = UCLASS_BLK, .ops = &efi_blk_ops, - .platdata_auto = sizeof(struct efi_blk_platdata), + .plat_auto = sizeof(struct efi_blk_platdata), }; /* EFI driver operators */ diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index 8a5c13c424..78191f672c 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -531,7 +531,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) case UCLASS_ETH: { struct efi_device_path_mac_addr *dp = dp_fill(buf, dev->parent); - struct eth_pdata *pdata = dev->platdata; + struct eth_pdata *pdata = dev->plat; dp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_MSG_MAC_ADDR; @@ -551,7 +551,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) case UCLASS_ROOT: { /* stop traversing parents at this point: */ struct efi_device_path_vendor *dp; - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); dp_fill(buf, dev->parent); dp = buf; @@ -568,7 +568,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) #ifdef CONFIG_VIRTIO_BLK case UCLASS_VIRTIO: { struct efi_device_path_vendor *dp; - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); dp_fill(buf, dev->parent); dp = buf; @@ -586,7 +586,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) case UCLASS_IDE: { struct efi_device_path_atapi *dp = dp_fill(buf, dev->parent); - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); dp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_MSG_ATAPI; @@ -603,7 +603,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) case UCLASS_SCSI: { struct efi_device_path_scsi *dp = dp_fill(buf, dev->parent); - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); dp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_MSG_SCSI; @@ -617,7 +617,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) case UCLASS_MMC: { struct efi_device_path_sd_mmc_path *sddp = dp_fill(buf, dev->parent); - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); sddp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; sddp->dp.sub_type = is_sd(desc) ? @@ -632,7 +632,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) case UCLASS_AHCI: { struct efi_device_path_sata *dp = dp_fill(buf, dev->parent); - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); dp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_MSG_SATA; diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index 496ef29dd8..26b953461b 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -547,7 +547,7 @@ efi_status_t efi_disk_register(void) for (uclass_first_device_check(UCLASS_BLK, &dev); dev; uclass_next_device_check(&dev)) { - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); const char *if_typename = blk_get_if_type_name(desc->if_type); /* Add block device for the full device */ diff --git a/lib/smbios.c b/lib/smbios.c index 485a812c77..4bd16556e3 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -229,7 +229,7 @@ static void smbios_write_type4_dm(struct smbios_type4 *t, ofnode node) uclass_find_first_device(UCLASS_CPU, &cpu); if (cpu) { - struct cpu_platdata *plat = dev_get_parent_platdata(cpu); + struct cpu_platdata *plat = dev_get_parent_plat(cpu); if (plat->family) processor_family = plat->family; diff --git a/net/eth-uclass.c b/net/eth-uclass.c index 9525adba00..ca083b442c 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -149,7 +149,7 @@ unsigned char *eth_get_ethaddr(void) struct eth_pdata *pdata; if (eth_get_dev()) { - pdata = eth_get_dev()->platdata; + pdata = eth_get_dev()->plat; return pdata->enetaddr; } @@ -203,7 +203,7 @@ static int eth_write_hwaddr(struct udevice *dev) /* seq is valid since the device is active */ if (eth_get_ops(dev)->write_hwaddr && !eth_mac_skip(dev->seq)) { - pdata = dev->platdata; + pdata = dev->plat; if (!is_valid_ethaddr(pdata->enetaddr)) { printf("\nError: %s address %pM illegal value\n", dev->name, pdata->enetaddr); @@ -237,7 +237,7 @@ static int on_ethaddr(const char *name, const char *value, enum env_op op, retval = uclass_find_device_by_seq(UCLASS_ETH, index, false, &dev); if (!retval) { - struct eth_pdata *pdata = dev->platdata; + struct eth_pdata *pdata = dev->plat; switch (op) { case env_op_create: case env_op_overwrite: @@ -506,7 +506,7 @@ static bool eth_dev_get_mac_address(struct udevice *dev, u8 mac[ARP_HLEN]) static int eth_post_probe(struct udevice *dev) { struct eth_device_priv *priv = dev->uclass_priv; - struct eth_pdata *pdata = dev->platdata; + struct eth_pdata *pdata = dev->plat; unsigned char env_enetaddr[ARP_HLEN]; char *source = "DT"; @@ -583,7 +583,7 @@ static int eth_post_probe(struct udevice *dev) static int eth_pre_remove(struct udevice *dev) { - struct eth_pdata *pdata = dev->platdata; + struct eth_pdata *pdata = dev->plat; eth_get_ops(dev)->stop(dev); diff --git a/net/mdio-mux-uclass.c b/net/mdio-mux-uclass.c index 3fb4184099..5f38f9fde4 100644 --- a/net/mdio-mux-uclass.c +++ b/net/mdio-mux-uclass.c @@ -65,7 +65,7 @@ static int mmux_change_sel(struct udevice *ch, bool sel) struct udevice *mux = ch->parent; struct mdio_mux_perdev_priv *priv = dev_get_uclass_priv(mux); struct mdio_mux_ops *ops = mdio_mux_get_ops(mux); - struct mdio_mux_ch_data *ch_data = dev_get_parent_platdata(ch); + struct mdio_mux_ch_data *ch_data = dev_get_parent_plat(ch); int err = 0; if (sel) { @@ -147,7 +147,7 @@ static int mmux_reset(struct udevice *ch) /* Picks up the mux selection value for each child */ static int dm_mdio_mux_child_post_bind(struct udevice *ch) { - struct mdio_mux_ch_data *ch_data = dev_get_parent_platdata(ch); + struct mdio_mux_ch_data *ch_data = dev_get_parent_plat(ch); ch_data->sel = dev_read_u32_default(ch, "reg", MDIO_MUX_SELECT_NONE); @@ -229,5 +229,5 @@ UCLASS_DRIVER(mdio_mux) = { .post_bind = dm_mdio_mux_post_bind, .post_probe = dm_mdio_mux_post_probe, .per_device_auto = sizeof(struct mdio_mux_perdev_priv), - .per_child_platdata_auto = sizeof(struct mdio_mux_ch_data), + .per_child_plat_auto = sizeof(struct mdio_mux_ch_data), }; diff --git a/test/dm/acpi.c b/test/dm/acpi.c index d53f997760..d0c49c73ce 100644 --- a/test/dm/acpi.c +++ b/test/dm/acpi.c @@ -110,7 +110,7 @@ U_BOOT_DRIVER(testacpi_drv) = { .of_match = testacpi_ids, .id = UCLASS_TEST_ACPI, .bind = dm_scan_fdt_dev, - .platdata_auto = sizeof(struct testacpi_platdata), + .plat_auto = sizeof(struct testacpi_platdata), ACPI_OPS_PTR(&testacpi_ops) }; diff --git a/test/dm/adc.c b/test/dm/adc.c index 8c6e4b0604..740167e16b 100644 --- a/test/dm/adc.c +++ b/test/dm/adc.c @@ -67,7 +67,7 @@ static int dm_test_adc_supply(struct unit_test_state *uts) ut_assertok(regulator_set_value(supply, SANDBOX_BUCK2_SET_UV)); ut_asserteq(SANDBOX_BUCK2_SET_UV, regulator_get_value(supply)); - /* Update ADC platdata and get new Vdd value */ + /* Update ADC plat and get new Vdd value */ ut_assertok(adc_vdd_value(dev, &uV)); ut_asserteq(SANDBOX_BUCK2_SET_UV, uV); diff --git a/test/dm/blk.c b/test/dm/blk.c index f34c13f751..23940b3e03 100644 --- a/test/dm/blk.c +++ b/test/dm/blk.c @@ -139,7 +139,7 @@ static int dm_test_blk_devnum(struct unit_test_state *uts) * Check that the block device devnum matches its parent's * sequence number */ - desc = dev_get_uclass_platdata(dev); + desc = dev_get_uclass_plat(dev); ut_asserteq(desc->devnum, i); } diff --git a/test/dm/bus.c b/test/dm/bus.c index c7ad63c112..0e83dc14d7 100644 --- a/test/dm/bus.c +++ b/test/dm/bus.c @@ -19,7 +19,7 @@ DECLARE_GLOBAL_DATA_PTR; -struct dm_test_parent_platdata { +struct dm_test_parent_plat { int count; int bind_flag; int uclass_bind_flag; @@ -39,9 +39,9 @@ static int testbus_drv_probe(struct udevice *dev) static int testbus_child_post_bind(struct udevice *dev) { - struct dm_test_parent_platdata *plat; + struct dm_test_parent_plat *plat; - plat = dev_get_parent_platdata(dev); + plat = dev_get_parent_plat(dev); plat->bind_flag = 1; plat->uclass_bind_flag = 2; @@ -101,10 +101,10 @@ U_BOOT_DRIVER(testbus_drv) = { .probe = testbus_drv_probe, .child_post_bind = testbus_child_post_bind, .priv_auto = sizeof(struct dm_test_priv), - .platdata_auto = sizeof(struct dm_test_pdata), + .plat_auto = sizeof(struct dm_test_pdata), .per_child_auto = sizeof(struct dm_test_parent_data), - .per_child_platdata_auto = - sizeof(struct dm_test_parent_platdata), + .per_child_plat_auto = + sizeof(struct dm_test_parent_plat), .child_pre_probe = testbus_child_pre_probe, .child_post_remove = testbus_child_post_remove, }; @@ -370,9 +370,9 @@ static int dm_test_bus_parent_ops(struct unit_test_state *uts) } DM_TEST(dm_test_bus_parent_ops, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); -static int test_bus_parent_platdata(struct unit_test_state *uts) +static int test_bus_parent_plat(struct unit_test_state *uts) { - struct dm_test_parent_platdata *plat; + struct dm_test_parent_plat *plat; struct udevice *bus, *dev; /* Check that the bus has no children */ @@ -386,7 +386,7 @@ static int test_bus_parent_platdata(struct unit_test_state *uts) dev; device_find_next_child(&dev)) { /* Check that platform data is allocated */ - plat = dev_get_parent_platdata(dev); + plat = dev_get_parent_plat(dev); ut_assert(plat != NULL); /* @@ -398,7 +398,7 @@ static int test_bus_parent_platdata(struct unit_test_state *uts) device_probe(dev); device_remove(dev, DM_REMOVE_NORMAL); - ut_asserteq_ptr(plat, dev_get_parent_platdata(dev)); + ut_asserteq_ptr(plat, dev_get_parent_plat(dev)); ut_asserteq(1, plat->count); ut_assertok(device_probe(dev)); } @@ -410,7 +410,7 @@ static int test_bus_parent_platdata(struct unit_test_state *uts) dev; device_find_next_child(&dev)) { /* Check that platform data is allocated */ - plat = dev_get_parent_platdata(dev); + plat = dev_get_parent_plat(dev); ut_assert(plat != NULL); ut_asserteq(1, plat->count); } @@ -423,13 +423,13 @@ static int test_bus_parent_platdata(struct unit_test_state *uts) device_unbind(dev); } while (dev); - /* Now the child platdata should be removed and re-added */ + /* Now the child plat should be removed and re-added */ device_probe(bus); for (device_find_first_child(bus, &dev); dev; device_find_next_child(&dev)) { /* Check that platform data is allocated */ - plat = dev_get_parent_platdata(dev); + plat = dev_get_parent_plat(dev); ut_assert(plat != NULL); ut_asserteq(0, plat->count); } @@ -439,14 +439,14 @@ static int test_bus_parent_platdata(struct unit_test_state *uts) } /* Test that the bus can store platform data about each child */ -static int dm_test_bus_parent_platdata(struct unit_test_state *uts) +static int dm_test_bus_parent_plat(struct unit_test_state *uts) { - return test_bus_parent_platdata(uts); + return test_bus_parent_plat(uts); } -DM_TEST(dm_test_bus_parent_platdata, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); +DM_TEST(dm_test_bus_parent_plat, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); /* As above but the size is controlled by the uclass */ -static int dm_test_bus_parent_platdata_uclass(struct unit_test_state *uts) +static int dm_test_bus_parent_plat_uclass(struct unit_test_state *uts) { struct udevice *bus; struct driver *drv; @@ -456,28 +456,28 @@ static int dm_test_bus_parent_platdata_uclass(struct unit_test_state *uts) /* Set the driver size to 0 so that the uclass size is used */ ut_assertok(uclass_find_device(UCLASS_TEST_BUS, 0, &bus)); drv = (struct driver *)bus->driver; - size = drv->per_child_platdata_auto; + size = drv->per_child_plat_auto; #ifdef CONFIG_SANDBOX os_mprotect_allow(bus->uclass->uc_drv, sizeof(*bus->uclass->uc_drv)); os_mprotect_allow(drv, sizeof(*drv)); #endif - bus->uclass->uc_drv->per_child_platdata_auto = size; - drv->per_child_platdata_auto = 0; - ret = test_bus_parent_platdata(uts); + bus->uclass->uc_drv->per_child_plat_auto = size; + drv->per_child_plat_auto = 0; + ret = test_bus_parent_plat(uts); if (ret) return ret; - bus->uclass->uc_drv->per_child_platdata_auto = 0; - drv->per_child_platdata_auto = size; + bus->uclass->uc_drv->per_child_plat_auto = 0; + drv->per_child_plat_auto = size; return 0; } -DM_TEST(dm_test_bus_parent_platdata_uclass, +DM_TEST(dm_test_bus_parent_plat_uclass, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); /* Test that the child post_bind method is called */ static int dm_test_bus_child_post_bind(struct unit_test_state *uts) { - struct dm_test_parent_platdata *plat; + struct dm_test_parent_plat *plat; struct udevice *bus, *dev; ut_assertok(uclass_get_device(UCLASS_TEST_BUS, 0, &bus)); @@ -485,7 +485,7 @@ static int dm_test_bus_child_post_bind(struct unit_test_state *uts) dev; device_find_next_child(&dev)) { /* Check that platform data is allocated */ - plat = dev_get_parent_platdata(dev); + plat = dev_get_parent_plat(dev); ut_assert(plat != NULL); ut_asserteq(1, plat->bind_flag); } @@ -498,7 +498,7 @@ DM_TEST(dm_test_bus_child_post_bind, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); /* Test that the child post_bind method is called */ static int dm_test_bus_child_post_bind_uclass(struct unit_test_state *uts) { - struct dm_test_parent_platdata *plat; + struct dm_test_parent_plat *plat; struct udevice *bus, *dev; ut_assertok(uclass_get_device(UCLASS_TEST_BUS, 0, &bus)); @@ -506,7 +506,7 @@ static int dm_test_bus_child_post_bind_uclass(struct unit_test_state *uts) dev; device_find_next_child(&dev)) { /* Check that platform data is allocated */ - plat = dev_get_parent_platdata(dev); + plat = dev_get_parent_plat(dev); ut_assert(plat != NULL); ut_asserteq(2, plat->uclass_bind_flag); } diff --git a/test/dm/core.c b/test/dm/core.c index c3e8922d64..617458f985 100644 --- a/test/dm/core.c +++ b/test/dm/core.c @@ -45,27 +45,27 @@ static const struct dm_test_pdata test_pdata_pre_reloc = { U_BOOT_DEVICE(dm_test_info1) = { .name = "test_drv", - .platdata = &test_pdata[0], + .plat = &test_pdata[0], }; U_BOOT_DEVICE(dm_test_info2) = { .name = "test_drv", - .platdata = &test_pdata[1], + .plat = &test_pdata[1], }; U_BOOT_DEVICE(dm_test_info3) = { .name = "test_drv", - .platdata = &test_pdata[2], + .plat = &test_pdata[2], }; static struct driver_info driver_info_manual = { .name = "test_manual_drv", - .platdata = &test_pdata_manual, + .plat = &test_pdata_manual, }; static struct driver_info driver_info_pre_reloc = { .name = "test_pre_reloc_drv", - .platdata = &test_pdata_pre_reloc, + .plat = &test_pdata_pre_reloc, }; static struct driver_info driver_info_act_dma = { @@ -105,7 +105,7 @@ int dm_leak_check_end(struct unit_test_state *uts) return 0; } -/* Test that binding with platdata occurs correctly */ +/* Test that binding with plat occurs correctly */ static int dm_test_autobind(struct unit_test_state *uts) { struct dm_test_state *dms = uts->priv; @@ -140,7 +140,7 @@ static int dm_test_autobind(struct unit_test_state *uts) } DM_TEST(dm_test_autobind, 0); -/* Test that binding with uclass platdata allocation occurs correctly */ +/* Test that binding with uclass plat allocation occurs correctly */ static int dm_test_autobind_uclass_pdata_alloc(struct unit_test_state *uts) { struct dm_test_perdev_uc_pdata *uc_pdata; @@ -152,16 +152,16 @@ static int dm_test_autobind_uclass_pdata_alloc(struct unit_test_state *uts) /** * Test if test uclass driver requires allocation for the uclass - * platform data and then check the dev->uclass_platdata pointer. + * platform data and then check the dev->uclass_plat pointer. */ - ut_assert(uc->uc_drv->per_device_platdata_auto); + ut_assert(uc->uc_drv->per_device_plat_auto); for (uclass_find_first_device(UCLASS_TEST, &dev); dev; uclass_find_next_device(&dev)) { ut_assertnonnull(dev); - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ut_assert(uc_pdata); } @@ -169,7 +169,7 @@ static int dm_test_autobind_uclass_pdata_alloc(struct unit_test_state *uts) } DM_TEST(dm_test_autobind_uclass_pdata_alloc, UT_TESTF_SCAN_PDATA); -/* Test that binding with uclass platdata setting occurs correctly */ +/* Test that binding with uclass plat setting occurs correctly */ static int dm_test_autobind_uclass_pdata_valid(struct unit_test_state *uts) { struct dm_test_perdev_uc_pdata *uc_pdata; @@ -184,7 +184,7 @@ static int dm_test_autobind_uclass_pdata_valid(struct unit_test_state *uts) uclass_find_next_device(&dev)) { ut_assertnonnull(dev); - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ut_assert(uc_pdata); ut_assert(uc_pdata->intval1 == TEST_UC_PDATA_INTVAL1); ut_assert(uc_pdata->intval2 == TEST_UC_PDATA_INTVAL2); @@ -255,7 +255,7 @@ static int dm_test_autoprobe(struct unit_test_state *uts) ut_assert(priv); ut_asserteq(expected_base_add, priv->base_add); - pdata = dev->platdata; + pdata = dev->plat; expected_base_add += pdata->ping_add; } @@ -263,7 +263,7 @@ static int dm_test_autoprobe(struct unit_test_state *uts) } DM_TEST(dm_test_autoprobe, UT_TESTF_SCAN_PDATA); -/* Check that we see the correct platdata in each device */ +/* Check that we see the correct plat in each device */ static int dm_test_platdata(struct unit_test_state *uts) { const struct dm_test_pdata *pdata; @@ -273,7 +273,7 @@ static int dm_test_platdata(struct unit_test_state *uts) for (i = 0; i < 3; i++) { ut_assertok(uclass_find_device(UCLASS_TEST, i, &dev)); ut_assert(dev); - pdata = dev->platdata; + pdata = dev->plat; ut_assert(pdata->ping_add == test_pdata[i].ping_add); } @@ -400,10 +400,10 @@ int dm_check_operations(struct unit_test_state *uts, struct udevice *dev, int expected; int pingret; - /* Getting the child device should allocate platdata / priv */ + /* Getting the child device should allocate plat / priv */ ut_assertok(testfdt_ping(dev, 10, &pingret)); ut_assert(dev->priv); - ut_assert(dev->platdata); + ut_assert(dev->plat); expected = 10 + base; ut_asserteq(expected, pingret); @@ -438,7 +438,7 @@ static int dm_test_operations(struct unit_test_state *uts) /* * Get the 'reg' property, which tells us what the ping add - * should be. We don't use the platdata because we want + * should be. We don't use the plat because we want * to test the code that sets that up (testfdt_drv_probe()). */ base = test_pdata[i].ping_add; @@ -547,7 +547,7 @@ static int create_children(struct unit_test_state *uts, struct udevice *parent, &driver_info_manual, &dev)); pdata = calloc(1, sizeof(*pdata)); pdata->ping_add = key + i; - dev->platdata = pdata; + dev->plat = pdata; if (child) child[i] = dev; } diff --git a/test/dm/devres.c b/test/dm/devres.c index e1e088a3ca..00edbd0e9c 100644 --- a/test/dm/devres.c +++ b/test/dm/devres.c @@ -158,7 +158,7 @@ static int dm_test_devres_phase(struct unit_test_state *uts) ut_asserteq(1, stats.allocs); ut_asserteq(TEST_DEVRES_SIZE, stats.total_size); - /* Getting platdata should add one allocation */ + /* Getting plat should add one allocation */ ut_assertok(device_ofdata_to_platdata(dev)); devres_get_stats(dev, &stats); ut_asserteq(2, stats.allocs); diff --git a/test/dm/gpio.c b/test/dm/gpio.c index 54e960b185..d7b85e74ce 100644 --- a/test/dm/gpio.c +++ b/test/dm/gpio.c @@ -30,7 +30,7 @@ static int dm_test_gpio(struct unit_test_state *uts) /* * We expect to get 4 banks. One is anonymous (just numbered) and - * comes from platdata. The other are named a (20 gpios), + * comes from plat. The other are named a (20 gpios), * b (10 gpios) and c (10 gpios) and come from the device tree. See * test/dm/test.dts. */ diff --git a/test/dm/ofread.c b/test/dm/ofread.c index 9064426e21..8c7dd82513 100644 --- a/test/dm/ofread.c +++ b/test/dm/ofread.c @@ -33,7 +33,7 @@ static int dm_test_ofnode_get_property_by_prop(struct unit_test_state *uts) ut_asserteq(4, len); break; case 3: - /* only for platdata */ + /* only for plat */ ut_asserteq_str("name", propname); ut_asserteq(6, len); ut_asserteq_str("flash", value); diff --git a/test/dm/regulator.c b/test/dm/regulator.c index 0e7a232a70..86f4862d9d 100644 --- a/test/dm/regulator.c +++ b/test/dm/regulator.c @@ -50,7 +50,7 @@ static const char *regulator_names[OUTPUT_COUNT][OUTPUT_NAME_COUNT] = { /* Test regulator get method */ static int dm_test_power_regulator_get(struct unit_test_state *uts) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; struct udevice *dev_by_devname; struct udevice *dev_by_platname; const char *devname; @@ -77,7 +77,7 @@ static int dm_test_power_regulator_get(struct unit_test_state *uts) * a device with the name equal to the requested one. */ ut_assertok(regulator_get_by_platname(platname, &dev_by_platname)); - uc_pdata = dev_get_uclass_platdata(dev_by_platname); + uc_pdata = dev_get_uclass_plat(dev_by_platname); ut_assert(uc_pdata); ut_asserteq_str(platname, uc_pdata->name); @@ -95,7 +95,7 @@ DM_TEST(dm_test_power_regulator_get, UT_TESTF_SCAN_FDT); /* Test regulator set and get Voltage method */ static int dm_test_power_regulator_set_get_voltage(struct unit_test_state *uts) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; struct udevice *dev; const char *platname; int val_set, val_get; @@ -104,7 +104,7 @@ static int dm_test_power_regulator_set_get_voltage(struct unit_test_state *uts) platname = regulator_names[BUCK1][PLATNAME]; ut_assertok(regulator_get_by_platname(platname, &dev)); - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ut_assert(uc_pdata); val_set = uc_pdata->min_uV; @@ -122,7 +122,7 @@ DM_TEST(dm_test_power_regulator_set_get_voltage, UT_TESTF_SCAN_FDT); /* Test regulator set and get Current method */ static int dm_test_power_regulator_set_get_current(struct unit_test_state *uts) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; struct udevice *dev; const char *platname; int val_set, val_get; @@ -131,7 +131,7 @@ static int dm_test_power_regulator_set_get_current(struct unit_test_state *uts) platname = regulator_names[LDO1][PLATNAME]; ut_assertok(regulator_get_by_platname(platname, &dev)); - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ut_assert(uc_pdata); val_set = uc_pdata->min_uA; @@ -146,7 +146,7 @@ static int dm_test_power_regulator_set_get_current(struct unit_test_state *uts) platname = regulator_names[LDO2][PLATNAME]; ut_assertok(regulator_get_by_platname(platname, &dev)); - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ut_assert(uc_pdata); ut_asserteq(-ENODATA, uc_pdata->min_uA); ut_asserteq(-ENODATA, uc_pdata->max_uA); @@ -220,7 +220,7 @@ DM_TEST(dm_test_power_regulator_set_get_mode, UT_TESTF_SCAN_FDT); /* Test regulator set and get suspend Voltage method */ static int dm_test_power_regulator_set_get_suspend_voltage(struct unit_test_state *uts) { - struct dm_regulator_uclass_platdata *uc_pdata; + struct dm_regulator_uclass_plat *uc_pdata; const struct dm_regulator_ops *ops; struct udevice *dev; const char *platname; @@ -230,7 +230,7 @@ static int dm_test_power_regulator_set_get_suspend_voltage(struct unit_test_stat platname = regulator_names[BUCK1][PLATNAME]; ut_assertok(regulator_get_by_platname(platname, &dev)); - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ut_assert(uc_pdata); ops = dev_get_driver_ops(dev); diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c index 79f39d0823..4fb8ea4534 100644 --- a/test/dm/test-fdt.c +++ b/test/dm/test-fdt.c @@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR; static int testfdt_drv_ping(struct udevice *dev, int pingval, int *pingret) { - const struct dm_test_pdata *pdata = dev->platdata; + const struct dm_test_pdata *pdata = dev->plat; struct dm_test_priv *priv = dev_get_priv(dev); *pingret = pingval + pdata->ping_add; @@ -87,7 +87,7 @@ U_BOOT_DRIVER(testfdt_drv) = { .probe = testfdt_drv_probe, .ops = &test_ops, .priv_auto = sizeof(struct dm_test_priv), - .platdata_auto = sizeof(struct dm_test_pdata), + .plat_auto = sizeof(struct dm_test_pdata), }; static const struct udevice_id testfdt1_ids[] = { @@ -105,7 +105,7 @@ U_BOOT_DRIVER(testfdt1_drv) = { .probe = testfdt_drv_probe, .ops = &test_ops, .priv_auto = sizeof(struct dm_test_priv), - .platdata_auto = sizeof(struct dm_test_pdata), + .plat_auto = sizeof(struct dm_test_pdata), .flags = DM_FLAG_PRE_RELOC, }; @@ -147,7 +147,7 @@ U_BOOT_DRIVER(testprobe_drv) = { .of_match = testprobe_ids, .id = UCLASS_TEST_PROBE, .probe = testprobe_drv_probe, - .platdata_auto = sizeof(struct dm_testprobe_pdata), + .plat_auto = sizeof(struct dm_testprobe_pdata), }; UCLASS_DRIVER(testprobe) = { @@ -204,7 +204,7 @@ U_BOOT_DRIVER(testdevres_drv) = { .bind = testdevres_drv_bind, .ofdata_to_platdata = testdevres_drv_ofdata_to_platdata, .probe = testdevres_drv_probe, - .platdata_auto = sizeof(struct dm_testdevres_pdata), + .plat_auto = sizeof(struct dm_testdevres_pdata), .priv_auto = sizeof(struct dm_testdevres_priv), }; @@ -232,7 +232,7 @@ int dm_check_devices(struct unit_test_state *uts, int num_devices) /* * Get the 'ping-expect' property, which tells us what the - * ping add should be. We don't use the platdata because we + * ping add should be. We don't use the plat because we * want to test the code that sets that up * (testfdt_drv_probe()). */ @@ -271,7 +271,7 @@ static int dm_test_fdt(struct unit_test_state *uts) ret = uclass_find_device(UCLASS_TEST_FDT, i, &dev); ut_assert(!ret); ut_assert(!dev_get_priv(dev)); - ut_assert(dev->platdata); + ut_assert(dev->plat); } ut_assertok(dm_check_devices(uts, num_devices)); diff --git a/test/dm/test-uclass.c b/test/dm/test-uclass.c index 94c2753ed9..378fc1e536 100644 --- a/test/dm/test-uclass.c +++ b/test/dm/test-uclass.c @@ -36,7 +36,7 @@ static int test_post_bind(struct udevice *dev) dm_testdrv_op_count[DM_TEST_OP_POST_BIND]++; ut_assert(!device_active(dev)); - uc_pdata = dev_get_uclass_platdata(dev); + uc_pdata = dev_get_uclass_plat(dev); ut_assert(uc_pdata); uc_pdata->intval1 = TEST_UC_PDATA_INTVAL1; @@ -82,7 +82,7 @@ static int test_post_probe(struct udevice *dev) if (&prev->uclass_node != &uc->dev_head) { struct dm_test_uclass_perdev_priv *prev_uc_priv = dev_get_uclass_priv(prev); - struct dm_test_pdata *pdata = prev->platdata; + struct dm_test_pdata *pdata = prev->plat; ut_assert(pdata); ut_assert(prev_uc_priv); @@ -126,6 +126,6 @@ UCLASS_DRIVER(test) = { .destroy = test_destroy, .priv_auto = sizeof(struct dm_test_uclass_priv), .per_device_auto = sizeof(struct dm_test_uclass_perdev_priv), - .per_device_platdata_auto = + .per_device_plat_auto = sizeof(struct dm_test_perdev_uc_pdata), }; diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py index b0d3c27720..2f3413cf20 100644 --- a/tools/dtoc/dtb_platdata.py +++ b/tools/dtoc/dtb_platdata.py @@ -659,7 +659,7 @@ class DtbPlatdata(object): # Add a device declaration self.buf('U_BOOT_DEVICE(%s) = {\n' % var_name) self.buf('\t.name\t\t= "%s",\n' % struct_name) - self.buf('\t.platdata\t= &%s%s,\n' % (VAL_PREFIX, var_name)) + self.buf('\t.plat\t= &%s%s,\n' % (VAL_PREFIX, var_name)) self.buf('\t.platdata_size\t= sizeof(%s%s),\n' % (VAL_PREFIX, var_name)) idx = -1 if node.parent and node.parent in self._valid_nodes: diff --git a/tools/dtoc/test_dtoc.py b/tools/dtoc/test_dtoc.py index 6dd8a5ca47..6992a66c88 100755 --- a/tools/dtoc/test_dtoc.py +++ b/tools/dtoc/test_dtoc.py @@ -217,7 +217,7 @@ static struct dtd_sandbox_i2c_test dtv_i2c_at_0 = { }; U_BOOT_DEVICE(i2c_at_0) = { \t.name\t\t= "sandbox_i2c_test", -\t.platdata\t= &dtv_i2c_at_0, +\t.plat\t= &dtv_i2c_at_0, \t.platdata_size\t= sizeof(dtv_i2c_at_0), \t.parent_idx\t= -1, }; @@ -229,7 +229,7 @@ static struct dtd_sandbox_pmic_test dtv_pmic_at_9 = { }; U_BOOT_DEVICE(pmic_at_9) = { \t.name\t\t= "sandbox_pmic_test", -\t.platdata\t= &dtv_pmic_at_9, +\t.plat\t= &dtv_pmic_at_9, \t.platdata_size\t= sizeof(dtv_pmic_at_9), \t.parent_idx\t= 0, }; @@ -249,7 +249,7 @@ static struct dtd_sandbox_spl_test dtv_spl_test = { }; U_BOOT_DEVICE(spl_test) = { \t.name\t\t= "sandbox_spl_test", -\t.platdata\t= &dtv_spl_test, +\t.plat\t= &dtv_spl_test, \t.platdata_size\t= sizeof(dtv_spl_test), \t.parent_idx\t= -1, }; @@ -268,7 +268,7 @@ static struct dtd_sandbox_spl_test dtv_spl_test2 = { }; U_BOOT_DEVICE(spl_test2) = { \t.name\t\t= "sandbox_spl_test", -\t.platdata\t= &dtv_spl_test2, +\t.plat\t= &dtv_spl_test2, \t.platdata_size\t= sizeof(dtv_spl_test2), \t.parent_idx\t= -1, }; @@ -281,7 +281,7 @@ static struct dtd_sandbox_spl_test dtv_spl_test3 = { }; U_BOOT_DEVICE(spl_test3) = { \t.name\t\t= "sandbox_spl_test", -\t.platdata\t= &dtv_spl_test3, +\t.plat\t= &dtv_spl_test3, \t.platdata_size\t= sizeof(dtv_spl_test3), \t.parent_idx\t= -1, }; @@ -291,7 +291,7 @@ static struct dtd_sandbox_spl_test_2 dtv_spl_test4 = { }; U_BOOT_DEVICE(spl_test4) = { \t.name\t\t= "sandbox_spl_test_2", -\t.platdata\t= &dtv_spl_test4, +\t.plat\t= &dtv_spl_test4, \t.platdata_size\t= sizeof(dtv_spl_test4), \t.parent_idx\t= -1, }; @@ -325,7 +325,7 @@ static struct dtd_sandbox_gpio dtv_gpios_at_0 = { }; U_BOOT_DEVICE(gpios_at_0) = { \t.name\t\t= "sandbox_gpio", -\t.platdata\t= &dtv_gpios_at_0, +\t.plat\t= &dtv_gpios_at_0, \t.platdata_size\t= sizeof(dtv_gpios_at_0), \t.parent_idx\t= -1, }; @@ -357,7 +357,7 @@ static struct dtd_invalid dtv_spl_test = { }; U_BOOT_DEVICE(spl_test) = { \t.name\t\t= "invalid", -\t.platdata\t= &dtv_spl_test, +\t.plat\t= &dtv_spl_test, \t.platdata_size\t= sizeof(dtv_spl_test), \t.parent_idx\t= -1, }; @@ -392,7 +392,7 @@ static struct dtd_target dtv_phandle2_target = { }; U_BOOT_DEVICE(phandle2_target) = { \t.name\t\t= "target", -\t.platdata\t= &dtv_phandle2_target, +\t.plat\t= &dtv_phandle2_target, \t.platdata_size\t= sizeof(dtv_phandle2_target), \t.parent_idx\t= -1, }; @@ -403,7 +403,7 @@ static struct dtd_target dtv_phandle3_target = { }; U_BOOT_DEVICE(phandle3_target) = { \t.name\t\t= "target", -\t.platdata\t= &dtv_phandle3_target, +\t.plat\t= &dtv_phandle3_target, \t.platdata_size\t= sizeof(dtv_phandle3_target), \t.parent_idx\t= -1, }; @@ -414,7 +414,7 @@ static struct dtd_target dtv_phandle_target = { }; U_BOOT_DEVICE(phandle_target) = { \t.name\t\t= "target", -\t.platdata\t= &dtv_phandle_target, +\t.plat\t= &dtv_phandle_target, \t.platdata_size\t= sizeof(dtv_phandle_target), \t.parent_idx\t= -1, }; @@ -429,7 +429,7 @@ static struct dtd_source dtv_phandle_source = { }; U_BOOT_DEVICE(phandle_source) = { \t.name\t\t= "source", -\t.platdata\t= &dtv_phandle_source, +\t.plat\t= &dtv_phandle_source, \t.platdata_size\t= sizeof(dtv_phandle_source), \t.parent_idx\t= -1, }; @@ -441,7 +441,7 @@ static struct dtd_source dtv_phandle_source2 = { }; U_BOOT_DEVICE(phandle_source2) = { \t.name\t\t= "source", -\t.platdata\t= &dtv_phandle_source2, +\t.plat\t= &dtv_phandle_source2, \t.platdata_size\t= sizeof(dtv_phandle_source2), \t.parent_idx\t= -1, }; @@ -479,7 +479,7 @@ static struct dtd_target dtv_phandle_target = { }; U_BOOT_DEVICE(phandle_target) = { \t.name\t\t= "target", -\t.platdata\t= &dtv_phandle_target, +\t.plat\t= &dtv_phandle_target, \t.platdata_size\t= sizeof(dtv_phandle_target), \t.parent_idx\t= -1, }; @@ -491,7 +491,7 @@ static struct dtd_source dtv_phandle_source2 = { }; U_BOOT_DEVICE(phandle_source2) = { \t.name\t\t= "source", -\t.platdata\t= &dtv_phandle_source2, +\t.plat\t= &dtv_phandle_source2, \t.platdata_size\t= sizeof(dtv_phandle_source2), \t.parent_idx\t= -1, }; @@ -514,7 +514,7 @@ static struct dtd_target dtv_phandle2_target = { }; U_BOOT_DEVICE(phandle2_target) = { \t.name\t\t= "target", -\t.platdata\t= &dtv_phandle2_target, +\t.plat\t= &dtv_phandle2_target, \t.platdata_size\t= sizeof(dtv_phandle2_target), \t.parent_idx\t= -1, }; @@ -525,7 +525,7 @@ static struct dtd_target dtv_phandle3_target = { }; U_BOOT_DEVICE(phandle3_target) = { \t.name\t\t= "target", -\t.platdata\t= &dtv_phandle3_target, +\t.plat\t= &dtv_phandle3_target, \t.platdata_size\t= sizeof(dtv_phandle3_target), \t.parent_idx\t= -1, }; @@ -536,7 +536,7 @@ static struct dtd_target dtv_phandle_target = { }; U_BOOT_DEVICE(phandle_target) = { \t.name\t\t= "target", -\t.platdata\t= &dtv_phandle_target, +\t.plat\t= &dtv_phandle_target, \t.platdata_size\t= sizeof(dtv_phandle_target), \t.parent_idx\t= -1, }; @@ -551,7 +551,7 @@ static struct dtd_source dtv_phandle_source = { }; U_BOOT_DEVICE(phandle_source) = { \t.name\t\t= "source", -\t.platdata\t= &dtv_phandle_source, +\t.plat\t= &dtv_phandle_source, \t.platdata_size\t= sizeof(dtv_phandle_source), \t.parent_idx\t= -1, }; @@ -563,7 +563,7 @@ static struct dtd_source dtv_phandle_source2 = { }; U_BOOT_DEVICE(phandle_source2) = { \t.name\t\t= "source", -\t.platdata\t= &dtv_phandle_source2, +\t.plat\t= &dtv_phandle_source2, \t.platdata_size\t= sizeof(dtv_phandle_source2), \t.parent_idx\t= -1, }; @@ -621,7 +621,7 @@ static struct dtd_test1 dtv_test1 = { }; U_BOOT_DEVICE(test1) = { \t.name\t\t= "test1", -\t.platdata\t= &dtv_test1, +\t.plat\t= &dtv_test1, \t.platdata_size\t= sizeof(dtv_test1), \t.parent_idx\t= -1, }; @@ -632,7 +632,7 @@ static struct dtd_test2 dtv_test2 = { }; U_BOOT_DEVICE(test2) = { \t.name\t\t= "test2", -\t.platdata\t= &dtv_test2, +\t.plat\t= &dtv_test2, \t.platdata_size\t= sizeof(dtv_test2), \t.parent_idx\t= -1, }; @@ -643,7 +643,7 @@ static struct dtd_test3 dtv_test3 = { }; U_BOOT_DEVICE(test3) = { \t.name\t\t= "test3", -\t.platdata\t= &dtv_test3, +\t.plat\t= &dtv_test3, \t.platdata_size\t= sizeof(dtv_test3), \t.parent_idx\t= -1, }; @@ -676,7 +676,7 @@ static struct dtd_test1 dtv_test1 = { }; U_BOOT_DEVICE(test1) = { \t.name\t\t= "test1", -\t.platdata\t= &dtv_test1, +\t.plat\t= &dtv_test1, \t.platdata_size\t= sizeof(dtv_test1), \t.parent_idx\t= -1, }; @@ -687,7 +687,7 @@ static struct dtd_test2 dtv_test2 = { }; U_BOOT_DEVICE(test2) = { \t.name\t\t= "test2", -\t.platdata\t= &dtv_test2, +\t.plat\t= &dtv_test2, \t.platdata_size\t= sizeof(dtv_test2), \t.parent_idx\t= -1, }; @@ -723,7 +723,7 @@ static struct dtd_test1 dtv_test1 = { }; U_BOOT_DEVICE(test1) = { \t.name\t\t= "test1", -\t.platdata\t= &dtv_test1, +\t.plat\t= &dtv_test1, \t.platdata_size\t= sizeof(dtv_test1), \t.parent_idx\t= -1, }; @@ -734,7 +734,7 @@ static struct dtd_test2 dtv_test2 = { }; U_BOOT_DEVICE(test2) = { \t.name\t\t= "test2", -\t.platdata\t= &dtv_test2, +\t.plat\t= &dtv_test2, \t.platdata_size\t= sizeof(dtv_test2), \t.parent_idx\t= -1, }; @@ -745,7 +745,7 @@ static struct dtd_test3 dtv_test3 = { }; U_BOOT_DEVICE(test3) = { \t.name\t\t= "test3", -\t.platdata\t= &dtv_test3, +\t.plat\t= &dtv_test3, \t.platdata_size\t= sizeof(dtv_test3), \t.parent_idx\t= -1, }; @@ -781,7 +781,7 @@ static struct dtd_test1 dtv_test1 = { }; U_BOOT_DEVICE(test1) = { \t.name\t\t= "test1", -\t.platdata\t= &dtv_test1, +\t.plat\t= &dtv_test1, \t.platdata_size\t= sizeof(dtv_test1), \t.parent_idx\t= -1, }; @@ -792,7 +792,7 @@ static struct dtd_test2 dtv_test2 = { }; U_BOOT_DEVICE(test2) = { \t.name\t\t= "test2", -\t.platdata\t= &dtv_test2, +\t.plat\t= &dtv_test2, \t.platdata_size\t= sizeof(dtv_test2), \t.parent_idx\t= -1, }; @@ -803,7 +803,7 @@ static struct dtd_test3 dtv_test3 = { }; U_BOOT_DEVICE(test3) = { \t.name\t\t= "test3", -\t.platdata\t= &dtv_test3, +\t.plat\t= &dtv_test3, \t.platdata_size\t= sizeof(dtv_test3), \t.parent_idx\t= -1, }; @@ -854,7 +854,7 @@ static struct dtd_sandbox_spl_test dtv_spl_test = { }; U_BOOT_DEVICE(spl_test) = { \t.name\t\t= "sandbox_spl_test", -\t.platdata\t= &dtv_spl_test, +\t.plat\t= &dtv_spl_test, \t.platdata_size\t= sizeof(dtv_spl_test), \t.parent_idx\t= -1, }; @@ -865,7 +865,7 @@ static struct dtd_sandbox_spl_test dtv_spl_test2 = { }; U_BOOT_DEVICE(spl_test2) = { \t.name\t\t= "sandbox_spl_test", -\t.platdata\t= &dtv_spl_test2, +\t.plat\t= &dtv_spl_test2, \t.platdata_size\t= sizeof(dtv_spl_test2), \t.parent_idx\t= -1, };