.write = stm32mp_bsec_write,
};
-static int stm32mp_bsec_ofdata_to_platdata(struct udevice *dev)
+static int stm32mp_bsec_of_to_plat(struct udevice *dev)
{
struct stm32mp_bsec_platdata *plat = dev_get_plat(dev);
.name = "stm32mp_bsec",
.id = UCLASS_MISC,
.of_match = stm32mp_bsec_ids,
- .ofdata_to_platdata = stm32mp_bsec_ofdata_to_platdata,
+ .of_to_plat = stm32mp_bsec_of_to_plat,
.plat_auto = sizeof(struct stm32mp_bsec_platdata),
.ops = &stm32mp_bsec_ops,
.probe = stm32mp_bsec_probe,
return 0;
}
-static int stm32mp_pwr_ofdata_to_platdata(struct udevice *dev)
+static int stm32mp_pwr_of_to_plat(struct udevice *dev)
{
struct stm32mp_pwr_priv *priv = dev_get_priv(dev);
.of_match = stm32mp_pwr_ids,
.bind = stm32mp_pwr_bind,
.ops = &stm32mp_pwr_ops,
- .ofdata_to_platdata = stm32mp_pwr_ofdata_to_platdata,
+ .of_to_plat = stm32mp_pwr_of_to_plat,
.priv_auto = sizeof(struct stm32mp_pwr_priv),
};
return ret;
}
-static int acpi_gpe_ofdata_to_platdata(struct udevice *dev)
+static int acpi_gpe_of_to_plat(struct udevice *dev)
{
struct acpi_gpe_priv *priv = dev_get_priv(dev);
.id = UCLASS_IRQ,
.of_match = acpi_gpe_ids,
.ops = &acpi_gpe_ops,
- .ofdata_to_platdata = acpi_gpe_ofdata_to_platdata,
+ .of_to_plat = acpi_gpe_of_to_plat,
.priv_auto = sizeof(struct acpi_gpe_priv),
};
return 0;
}
-static int apl_hostbridge_ofdata_to_platdata(struct udevice *dev)
+static int apl_hostbridge_of_to_plat(struct udevice *dev)
{
struct apl_hostbridge_platdata *plat = dev_get_plat(dev);
struct udevice *pinctrl;
.name = "intel_apl_hostbridge",
.id = UCLASS_NORTHBRIDGE,
.of_match = apl_hostbridge_ids,
- .ofdata_to_platdata = apl_hostbridge_ofdata_to_platdata,
+ .of_to_plat = apl_hostbridge_of_to_plat,
.probe = apl_hostbridge_probe,
.remove = apl_hostbridge_remove,
.plat_auto = sizeof(struct apl_hostbridge_platdata),
.name = "intel_apl_pmc",
.id = UCLASS_ACPI_PMC,
.of_match = apl_pmc_ids,
- .ofdata_to_platdata = apl_pmc_ofdata_to_uc_platdata,
+ .of_to_plat = apl_pmc_ofdata_to_uc_platdata,
.probe = apl_pmc_probe,
.ops = &apl_pmc_ops,
.plat_auto = sizeof(struct apl_pmc_platdata),
*
* When running with of-platdata (generally TPL), the platdata is converted to
* something that ns16550 expects. When running withoutof-platdata (SPL, U-Boot
- * proper), we use ns16550's ofdata_to_platdata routine.
+ * proper), we use ns16550's of_to_plat routine.
*/
static int apl_ns16550_probe(struct udevice *dev)
return ns16550_serial_probe(dev);
}
-static int apl_ns16550_ofdata_to_platdata(struct udevice *dev)
+static int apl_ns16550_of_to_plat(struct udevice *dev)
{
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct dtd_intel_apl_ns16550 *dtplat = dev_get_plat(dev);
#else
int ret;
- ret = ns16550_serial_ofdata_to_platdata(dev);
+ ret = ns16550_serial_of_to_plat(dev);
if (ret)
return ret;
#endif /* OF_PLATDATA */
.plat_auto = sizeof(struct ns16550_platdata),
.priv_auto = sizeof(struct NS16550),
.ops = &ns16550_serial_ops,
- .ofdata_to_platdata = apl_ns16550_ofdata_to_platdata,
+ .of_to_plat = apl_ns16550_of_to_plat,
.probe = apl_ns16550_probe,
};
return 0;
}
-static int broadwell_adsp_ofdata_to_platdata(struct udevice *dev)
+static int broadwell_adsp_of_to_plat(struct udevice *dev)
{
struct broadwell_adsp_priv *priv = dev_get_priv(dev);
U_BOOT_DRIVER(broadwell_adsp_drv) = {
.name = "adsp",
.id = UCLASS_SYSCON,
- .ofdata_to_platdata = broadwell_adsp_ofdata_to_platdata,
+ .of_to_plat = broadwell_adsp_of_to_plat,
.of_match = broadwell_adsp_ids,
.bind = dm_scan_fdt_dev,
.probe = broadwell_adsp_probe,
return 0;
}
-static int broadwell_sata_ofdata_to_platdata(struct udevice *dev)
+static int broadwell_sata_of_to_plat(struct udevice *dev)
{
struct sata_platdata *plat = dev_get_plat(dev);
const void *blob = gd->fdt_blob;
.name = "ahci_broadwell",
.id = UCLASS_AHCI,
.of_match = broadwell_ahci_ids,
- .ofdata_to_platdata = broadwell_sata_ofdata_to_platdata,
+ .of_to_plat = broadwell_sata_of_to_plat,
.probe = broadwell_sata_probe,
.plat_auto = sizeof(struct sata_platdata),
};
return 0;
}
-static int itss_ofdata_to_platdata(struct udevice *dev)
+static int itss_of_to_plat(struct udevice *dev)
{
struct itss_priv *priv = dev_get_priv(dev);
int ret;
.of_match = itss_ids,
.ops = &itss_ops,
.bind = itss_bind,
- .ofdata_to_platdata = itss_ofdata_to_platdata,
+ .of_to_plat = itss_of_to_plat,
.plat_auto = sizeof(struct itss_platdata),
.priv_auto = sizeof(struct itss_priv),
};
return 0;
}
-int p2sb_ofdata_to_platdata(struct udevice *dev)
+int p2sb_of_to_plat(struct udevice *dev)
{
struct p2sb_uc_priv *upriv = dev_get_uclass_priv(dev);
struct p2sb_platdata *plat = dev_get_plat(dev);
.probe = p2sb_probe,
.remove = p2sb_remove,
.ops = &p2sb_ops,
- .ofdata_to_platdata = p2sb_ofdata_to_platdata,
+ .of_to_plat = p2sb_of_to_plat,
.plat_auto = sizeof(struct p2sb_platdata),
.per_child_plat_auto =
sizeof(struct p2sb_child_platdata),
* The serial port info hob is generated by Slim Bootloader, so eligible for
* Slim Bootloader based boards only.
*/
-static int slimbootloader_serial_ofdata_to_platdata(struct udevice *dev)
+static int slimbootloader_serial_of_to_plat(struct udevice *dev)
{
const efi_guid_t guid = SBL_SERIAL_PORT_INFO_GUID;
struct sbl_serial_port_info *data;
.name = "serial_slimbootloader",
.id = UCLASS_SERIAL,
.of_match = slimbootloader_serial_ids,
- .ofdata_to_platdata = slimbootloader_serial_ofdata_to_platdata,
+ .of_to_plat = slimbootloader_serial_of_to_plat,
.plat_auto = sizeof(struct ns16550_platdata),
.priv_auto = sizeof(struct NS16550),
.probe = ns16550_serial_probe,
int intel_pinctrl_probe(struct udevice *dev);
/**
- * intel_pinctrl_ofdata_to_platdata() - Handle common plat setup
+ * intel_pinctrl_of_to_plat() - Handle common plat setup
*
* @dev: Pinctrl device
* @comm: Pad community for this device
* @num_cfgs: Number of configuration words for each pad
* @return 0 if OK, -EDOM if @comm is NULL, other -ve value on other error
*/
-int intel_pinctrl_ofdata_to_platdata(struct udevice *dev,
- const struct pad_community *comm,
- int num_cfgs);
+int intel_pinctrl_of_to_plat(struct udevice *dev,
+ const struct pad_community *comm, int num_cfgs);
/**
* pinctrl_route_gpe() - set GPIO groups for the general-purpose-event blocks
* Intel Galileo gen2 board uses GPIO Resume Well bank pin0 as the PERST# pin.
*
* We cannot use any public GPIO APIs in <asm-generic/gpio.h> to control this
- * pin, as these APIs will eventually call into gpio_ich6_ofdata_to_platdata()
+ * pin, as these APIs will eventually call into gpio_ich6_of_to_plat()
* in the Intel ICH6 GPIO driver where it calls PCI configuration space access
* APIs which will trigger PCI enumeration process.
*
going.
- -EINVAL which typically indicates that something was missing or wrong in
the device tree node. Check that everything is correct and look at the
- ofdata_to_platdata() method in the driver.
+ of_to_plat() method in the driver.
If there is no error, you should check if the device is actually bound. Call
dm_dump_all() just before you locate the device to make sure it exists.
* 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 plat - see later
+ * of_to_plat - 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
-The sequence to get a device to work is bind, ofdata_to_platdata (if using
+The sequence to get a device to work is bind, of_to_plat (if using
device tree) and probe.
.. code-block:: c
.plat_auto = sizeof(struct dm_test_pdata),
- .ofdata_to_platdata = testfdt_ofdata_to_platdata,
+ .of_to_plat = testfdt_of_to_plat,
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
+and zeroed before the driver's of_to_plat() method is called. The
+of_to_plat() method, which the driver write supplies, should parse
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.
-Note that both methods are optional. If you provide an ofdata_to_platdata
+Note that both methods are optional. If you provide an of_to_plat
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 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,
+in your of_to_plat (or probe) method to allocate the required memory,
and you should free it in the remove method.
The driver model tree is intended to mirror that of the device tree. The
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
+The device's of_to_plat() implemnents allocation and reading of
plat. A parent's ofdata is always read before a child.
The steps are:
space. The controller can hold information about the USB state of each
of its children.
- 5. If the driver provides an ofdata_to_platdata() method, then this is
+ 5. If the driver provides an of_to_plat() 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->plat. After this point, the device
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
- decoding in ofdata_to_platdata() rather than in probe(). (Apart from the
+ entry to of_to_plat(). But if not, you can allocate it yourself in
+ of_to_plat(). Note that it is preferable to do all the device tree
+ decoding in of_to_plat() rather than in probe(). (Apart from the
ugliness of mixing configuration and run-time data, one day it is possible
that U-Boot will cache platform data for devices which are regularly
de/activated).
Having probing separate from ofdata-reading helps deal with of-platdata, where
the probe() method is common to both DT/of-platdata operation, but the
-ofdata_to_platdata() method is implemented differently.
+of_to_plat() method is implemented differently.
Another case has come up where this separate is useful. Generation of ACPI
tables uses the of-platdata but does not want to probe the device. Probing
present will cause an error on probe, yet we still must tell Linux about
the SD card connector in case it is used while Linux is running.
-It is important that the ofdata_to_platdata() method does not actually probe
+It is important that the of_to_plat() method does not actually probe
the device itself. However there are cases where other devices must be probed
-in the ofdata_to_platdata() method. An example is where a device requires a
+in the of_to_plat() method. An example is where a device requires a
GPIO for it to operate. To select a GPIO obviously requires that the GPIO
device is probed. This is OK when used by common, core devices such as GPIO,
clock, interrupts, reset and the like.
If your device relies on its parent setting up a suitable address space, so
that dev_read_addr() works correctly, then make sure that the parent device
-has its setup code in ofdata_to_platdata(). If it has it in the probe method,
+has its setup code in of_to_plat(). If it has it in the probe method,
then you cannot call dev_read_addr() from the child device's
-ofdata_to_platdata() method. Move it to probe() instead. Buses like PCI can
+of_to_plat() method. Move it to probe() instead. Buses like PCI can
fall afoul of this rule.
Activation/probe
happens automatically within the driver model core; or
- when plat_auto is 0, both the allocation (in probe()
- or preferably ofdata_to_platdata()) and the deallocation in remove()
+ or preferably of_to_plat()) and the deallocation in remove()
are the responsibility of the driver author.
5. The device sequence number is set to -1, meaning that it no longer
.name = "eth_ape",
.id = UCLASS_ETH,
.of_match = eth_ape_ids,
- .ofdata_to_platdata = eth_ape_ofdata_to_platdata,
+ .of_to_plat = eth_ape_of_to_plat,
.probe = eth_ape_probe,
.ops = ð_ape_ops,
.priv_auto = sizeof(struct eth_ape_priv),
struct dtd_rockchip_rk3288_dw_mshc *plat = dev_get_plat(dev);
This avoids the code overhead of converting the device tree data to
-platform data in the driver. The ofdata_to_platdata() method should
+platform data in the driver. The of_to_plat() method should
therefore do nothing in such a driver.
Note that for the platform data to be matched with a driver, the 'name'
Therefore it is recommended that the of-platdata structure should be used
only in the probe() method of your driver. It cannot be used in the
-ofdata_to_platdata() method since this is not called when platform data is
+of_to_plat() method since this is not called when platform data is
already present.
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.
+of_to_plat() method and wrapped with #if.
For example:
int fifo_depth;
};
- static int mmc_ofdata_to_platdata(struct udevice *dev)
+ static int mmc_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
/* Decode the device tree data */
.name = "mmc_drv",
.id = UCLASS_MMC,
.of_match = mmc_ids,
- .ofdata_to_platdata = mmc_ofdata_to_platdata,
+ .of_to_plat = mmc_of_to_plat,
.probe = mmc_probe,
.priv_auto = sizeof(struct mmc_priv),
.plat_auto = sizeof(struct mmc_platdata),
The of-platdata struct contents is copied from the C structure data to the
start of the newly allocated area. In the case where device tree is used,
the platform data is allocated, and starts zeroed. In this case the
-ofdata_to_platdata() method should still set up the platform data (and the
+of_to_plat() method should still set up the platform data (and the
of-platdata struct will not be present).
SPL must use either of-platdata or device tree. Drivers cannot use both at
return NULL;
}
- static int exynos_spi_ofdata_to_platdata(struct udevice *dev)
+ static int exynos_spi_of_to_plat(struct udevice *dev)
{
return -ENODEV;
}
.id = UCLASS_SPI,
.of_match = exynos_spi_ids,
.ops = &exynos_spi_ops,
- .ofdata_to_platdata = exynos_spi_ofdata_to_platdata,
+ .of_to_plat = exynos_spi_of_to_plat,
.probe = exynos_spi_probe,
.remove = exynos_spi_remove,
};
};
-Write ofdata_to_platdata() [for device tree only]
+Write of_to_plat() [for device tree only]
-------------------------------------------------
This method will convert information in the device tree node into a C
.. code-block:: c
- static int exynos_spi_ofdata_to_platdata(struct udevice *bus)
+ static int exynos_spi_of_to_plat(struct udevice *bus)
{
struct exynos_spi_platdata *plat = bus->plat;
const void *blob = gd->fdt_blob;
.name = "ehci_tegra",
.id = UCLASS_USB,
.of_match = ehci_usb_ids,
- .ofdata_to_platdata = ehci_usb_ofdata_to_platdata,
+ .of_to_plat = ehci_usb_of_to_plat,
.probe = tegra_ehci_usb_probe,
.remove = tegra_ehci_usb_remove,
.ops = &ehci_usb_ops,
Here ehci_usb_ids is used to list the controllers that the driver supports.
Each has its own data value. Controllers must be in the UCLASS_USB uclass.
-The ofdata_to_platdata() method allows the controller driver to grab any
+The of_to_plat() method allows the controller driver to grab any
necessary settings from the device tree.
The ops here are ehci_usb_ops. All EHCI drivers will use these same ops in
return 0;
}
-int exynos_adc_ofdata_to_platdata(struct udevice *dev)
+int exynos_adc_of_to_plat(struct udevice *dev)
{
struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
struct exynos_adc_priv *priv = dev_get_priv(dev);
.of_match = exynos_adc_ids,
.ops = &exynos_adc_ops,
.probe = exynos_adc_probe,
- .ofdata_to_platdata = exynos_adc_ofdata_to_platdata,
+ .of_to_plat = exynos_adc_of_to_plat,
.priv_auto = sizeof(struct exynos_adc_priv),
};
return 0;
}
-int meson_saradc_ofdata_to_platdata(struct udevice *dev)
+int meson_saradc_of_to_plat(struct udevice *dev)
{
struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
struct meson_saradc_priv *priv = dev_get_priv(dev);
.of_match = meson_saradc_ids,
.ops = &meson_saradc_ops,
.probe = meson_saradc_probe,
- .ofdata_to_platdata = meson_saradc_ofdata_to_platdata,
+ .of_to_plat = meson_saradc_of_to_plat,
.priv_auto = sizeof(struct meson_saradc_priv),
};
return 0;
}
-int rockchip_saradc_ofdata_to_platdata(struct udevice *dev)
+int rockchip_saradc_of_to_plat(struct udevice *dev)
{
struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
struct rockchip_saradc_priv *priv = dev_get_priv(dev);
.of_match = rockchip_saradc_ids,
.ops = &rockchip_saradc_ops,
.probe = rockchip_saradc_probe,
- .ofdata_to_platdata = rockchip_saradc_ofdata_to_platdata,
+ .of_to_plat = rockchip_saradc_of_to_plat,
.priv_auto = sizeof(struct rockchip_saradc_priv),
};
return 0;
}
-int sandbox_adc_ofdata_to_platdata(struct udevice *dev)
+int sandbox_adc_of_to_plat(struct udevice *dev)
{
struct adc_uclass_plat *uc_pdata = dev_get_uclass_plat(dev);
.of_match = sandbox_adc_ids,
.ops = &sandbox_adc_ops,
.probe = sandbox_adc_probe,
- .ofdata_to_platdata = sandbox_adc_ofdata_to_platdata,
+ .of_to_plat = sandbox_adc_of_to_plat,
.priv_auto = sizeof(struct sandbox_adc_priv),
};
return ahci_bind_scsi(dev, &scsi_dev);
}
-static int dwc_ahci_ofdata_to_platdata(struct udevice *dev)
+static int dwc_ahci_of_to_plat(struct udevice *dev)
{
struct dwc_ahci_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
.id = UCLASS_AHCI,
.of_match = dwc_ahci_ids,
.bind = dwc_ahci_bind,
- .ofdata_to_platdata = dwc_ahci_ofdata_to_platdata,
+ .of_to_plat = dwc_ahci_of_to_plat,
.ops = &scsi_ops,
.probe = dwc_ahci_probe,
.priv_auto = sizeof(struct dwc_ahci_priv),
.plat_auto = sizeof(struct fsl_ata_priv),
};
-static int fsl_ata_ofdata_to_platdata(struct udevice *dev)
+static int fsl_ata_of_to_plat(struct udevice *dev)
{
struct fsl_ata_priv *priv = dev_get_priv(dev);
.id = UCLASS_AHCI,
.of_match = fsl_ata_ids,
.ops = &sata_fsl_ahci_ops,
- .ofdata_to_platdata = fsl_ata_ofdata_to_platdata,
+ .of_to_plat = fsl_ata_of_to_plat,
.probe = fsl_ata_probe,
.remove = fsl_ata_remove,
.priv_auto = sizeof(struct fsl_ata_priv),
return ahci_bind_scsi(dev, &scsi_dev);
}
-static int mtk_ahci_ofdata_to_platdata(struct udevice *dev)
+static int mtk_ahci_of_to_plat(struct udevice *dev)
{
struct mtk_ahci_priv *priv = dev_get_priv(dev);
.id = UCLASS_AHCI,
.of_match = mtk_ahci_ids,
.bind = mtk_ahci_bind,
- .ofdata_to_platdata = mtk_ahci_ofdata_to_platdata,
+ .of_to_plat = mtk_ahci_of_to_plat,
.ops = &scsi_ops,
.probe = mtk_ahci_probe,
.priv_auto = sizeof(struct mtk_ahci_priv),
{ }
};
-static int sata_ceva_ofdata_to_platdata(struct udevice *dev)
+static int sata_ceva_of_to_plat(struct udevice *dev)
{
struct ceva_sata_priv *priv = dev_get_priv(dev);
struct resource res_regs;
.ops = &scsi_ops,
.priv_auto = sizeof(struct ceva_sata_priv),
.probe = sata_ceva_probe,
- .ofdata_to_platdata = sata_ceva_ofdata_to_platdata,
+ .of_to_plat = sata_ceva_of_to_plat,
};
return 0;
}
-static int v5l2_ofdata_to_platdata(struct udevice *dev)
+static int v5l2_of_to_plat(struct udevice *dev)
{
struct v5l2_plat *plat = dev_get_plat(dev);
struct l2cache *regs;
.name = "v5l2_cache",
.id = UCLASS_CACHE,
.of_match = v5l2_cache_ids,
- .ofdata_to_platdata = v5l2_ofdata_to_platdata,
+ .of_to_plat = v5l2_of_to_plat,
.probe = v5l2_probe,
.plat_auto = sizeof(struct v5l2_plat),
.ops = &v5l2_cache_ops,
return 0;
}
-static int socfpga_clk_ofdata_to_platdata(struct udevice *dev)
+static int socfpga_clk_of_to_plat(struct udevice *dev)
{
struct socfpga_clk_platdata *plat = dev_get_plat(dev);
fdt_addr_t addr;
.of_match = socfpga_clk_match,
.ops = &socfpga_clk_ops,
.probe = socfpga_clk_probe,
- .ofdata_to_platdata = socfpga_clk_ofdata_to_platdata,
+ .of_to_plat = socfpga_clk_of_to_plat,
.plat_auto = sizeof(struct socfpga_clk_platdata),
};
return 0;
}
-static int socfpga_a10_ofdata_to_platdata(struct udevice *dev)
+static int socfpga_a10_of_to_plat(struct udevice *dev)
{
struct socfpga_a10_clk_platdata *plat = dev_get_plat(dev);
unsigned int divreg[3], gatereg[2];
.ops = &socfpga_a10_clk_ops,
.bind = socfpga_a10_clk_bind,
.probe = socfpga_a10_clk_probe,
- .ofdata_to_platdata = socfpga_a10_ofdata_to_platdata,
+ .of_to_plat = socfpga_a10_of_to_plat,
.plat_auto = sizeof(struct socfpga_a10_clk_platdata),
};
.enable = ast2500_clk_enable,
};
-static int ast2500_clk_ofdata_to_platdata(struct udevice *dev)
+static int ast2500_clk_of_to_plat(struct udevice *dev)
{
struct ast2500_clk_priv *priv = dev_get_priv(dev);
.priv_auto = sizeof(struct ast2500_clk_priv),
.ops = &ast2500_clk_ops,
.bind = ast2500_clk_bind,
- .ofdata_to_platdata = ast2500_clk_ofdata_to_platdata,
+ .of_to_plat = ast2500_clk_of_to_plat,
};
.get_rate = utmi_clk_get_rate,
};
-static int utmi_clk_ofdata_to_platdata(struct udevice *dev)
+static int utmi_clk_of_to_plat(struct udevice *dev)
{
struct pmc_platdata *plat = dev_get_plat(dev);
struct udevice *syscon;
.id = UCLASS_CLK,
.of_match = utmi_clk_match,
.probe = utmi_clk_probe,
- .ofdata_to_platdata = utmi_clk_ofdata_to_platdata,
+ .of_to_plat = utmi_clk_of_to_plat,
.plat_auto = sizeof(struct pmc_platdata),
.ops = &utmi_clk_ops,
};
.set_rate = generic_clk_set_rate,
};
-static int generic_clk_ofdata_to_platdata(struct udevice *dev)
+static int generic_clk_of_to_plat(struct udevice *dev)
{
struct generic_clk_priv *priv = dev_get_priv(dev);
u32 cells[GENERATED_SOURCE_MAX];
.name = "generic-clk",
.id = UCLASS_CLK,
.probe = at91_clk_probe,
- .ofdata_to_platdata = generic_clk_ofdata_to_platdata,
+ .of_to_plat = generic_clk_of_to_plat,
.priv_auto = sizeof(struct generic_clk_priv),
.plat_auto = sizeof(struct pmc_platdata),
.ops = &generic_clk_ops,
.set_rate = at91_usb_clk_set_rate,
};
-static int at91_usb_clk_ofdata_to_platdata(struct udevice *dev)
+static int at91_usb_clk_of_to_plat(struct udevice *dev)
{
struct at91_usb_clk_priv *priv = dev_get_priv(dev);
u32 cells[AT91_USB_CLK_SOURCE_MAX];
.id = UCLASS_CLK,
.of_match = at91_usb_clk_match,
.probe = at91_usb_clk_probe,
- .ofdata_to_platdata = at91_usb_clk_ofdata_to_platdata,
+ .of_to_plat = at91_usb_clk_of_to_plat,
.priv_auto = sizeof(struct at91_usb_clk_priv),
.plat_auto = sizeof(struct pmc_platdata),
.ops = &at91_usb_clk_ops,
.get_rate = clk_boston_get_rate,
};
-static int clk_boston_ofdata_to_platdata(struct udevice *dev)
+static int clk_boston_of_to_plat(struct udevice *dev)
{
struct clk_boston *state = dev_get_plat(dev);
struct udevice *syscon;
.name = "boston_clock",
.id = UCLASS_CLK,
.of_match = clk_boston_match,
- .ofdata_to_platdata = clk_boston_ofdata_to_platdata,
+ .of_to_plat = clk_boston_of_to_plat,
.plat_auto = sizeof(struct clk_boston),
.ops = &clk_boston_ops,
};
.get_rate = clk_fixed_factor_get_rate,
};
-static int clk_fixed_factor_ofdata_to_platdata(struct udevice *dev)
+static int clk_fixed_factor_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
int err;
.name = "fixed_factor_clock",
.id = UCLASS_CLK,
.of_match = clk_fixed_factor_match,
- .ofdata_to_platdata = clk_fixed_factor_ofdata_to_platdata,
+ .of_to_plat = clk_fixed_factor_of_to_plat,
.plat_auto = sizeof(struct clk_fixed_factor),
.ops = &clk_fixed_factor_ops,
};
.enable = dummy_enable,
};
-static int clk_fixed_rate_ofdata_to_platdata(struct udevice *dev)
+static int clk_fixed_rate_of_to_plat(struct udevice *dev)
{
struct clk *clk = &to_clk_fixed_rate(dev)->clk;
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
.name = "fixed_clock",
.id = UCLASS_CLK,
.of_match = clk_fixed_rate_match,
- .ofdata_to_platdata = clk_fixed_rate_ofdata_to_platdata,
+ .of_to_plat = clk_fixed_rate_of_to_plat,
.plat_auto = sizeof(struct clk_fixed_rate),
.ops = &clk_fixed_rate_ops,
.flags = DM_FLAG_PRE_RELOC,
return 0;
}
-static int px30_clk_ofdata_to_platdata(struct udevice *dev)
+static int px30_clk_of_to_plat(struct udevice *dev)
{
struct px30_clk_priv *priv = dev_get_priv(dev);
.id = UCLASS_CLK,
.of_match = px30_clk_ids,
.priv_auto = sizeof(struct px30_clk_priv),
- .ofdata_to_platdata = px30_clk_ofdata_to_platdata,
+ .of_to_plat = px30_clk_of_to_plat,
.ops = &px30_clk_ops,
.bind = px30_clk_bind,
.probe = px30_clk_probe,
return 0;
}
-static int px30_pmuclk_ofdata_to_platdata(struct udevice *dev)
+static int px30_pmuclk_of_to_plat(struct udevice *dev)
{
struct px30_pmuclk_priv *priv = dev_get_priv(dev);
.id = UCLASS_CLK,
.of_match = px30_pmuclk_ids,
.priv_auto = sizeof(struct px30_pmuclk_priv),
- .ofdata_to_platdata = px30_pmuclk_ofdata_to_platdata,
+ .of_to_plat = px30_pmuclk_of_to_plat,
.ops = &px30_pmuclk_ops,
.probe = px30_pmuclk_probe,
};
.set_rate = rk3036_clk_set_rate,
};
-static int rk3036_clk_ofdata_to_platdata(struct udevice *dev)
+static int rk3036_clk_of_to_plat(struct udevice *dev)
{
struct rk3036_clk_priv *priv = dev_get_priv(dev);
.id = UCLASS_CLK,
.of_match = rk3036_clk_ids,
.priv_auto = sizeof(struct rk3036_clk_priv),
- .ofdata_to_platdata = rk3036_clk_ofdata_to_platdata,
+ .of_to_plat = rk3036_clk_of_to_plat,
.ops = &rk3036_clk_ops,
.bind = rk3036_clk_bind,
.probe = rk3036_clk_probe,
.set_rate = rk3128_clk_set_rate,
};
-static int rk3128_clk_ofdata_to_platdata(struct udevice *dev)
+static int rk3128_clk_of_to_plat(struct udevice *dev)
{
struct rk3128_clk_priv *priv = dev_get_priv(dev);
.id = UCLASS_CLK,
.of_match = rk3128_clk_ids,
.priv_auto = sizeof(struct rk3128_clk_priv),
- .ofdata_to_platdata = rk3128_clk_ofdata_to_platdata,
+ .of_to_plat = rk3128_clk_of_to_plat,
.ops = &rk3128_clk_ops,
.bind = rk3128_clk_bind,
.probe = rk3128_clk_probe,
.set_rate = rk3188_clk_set_rate,
};
-static int rk3188_clk_ofdata_to_platdata(struct udevice *dev)
+static int rk3188_clk_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3188_clk_priv *priv = dev_get_priv(dev);
.plat_auto = sizeof(struct rk3188_clk_plat),
.ops = &rk3188_clk_ops,
.bind = rk3188_clk_bind,
- .ofdata_to_platdata = rk3188_clk_ofdata_to_platdata,
+ .of_to_plat = rk3188_clk_of_to_plat,
.probe = rk3188_clk_probe,
};
.set_parent = rk322x_clk_set_parent,
};
-static int rk322x_clk_ofdata_to_platdata(struct udevice *dev)
+static int rk322x_clk_of_to_plat(struct udevice *dev)
{
struct rk322x_clk_priv *priv = dev_get_priv(dev);
.id = UCLASS_CLK,
.of_match = rk322x_clk_ids,
.priv_auto = sizeof(struct rk322x_clk_priv),
- .ofdata_to_platdata = rk322x_clk_ofdata_to_platdata,
+ .of_to_plat = rk322x_clk_of_to_plat,
.ops = &rk322x_clk_ops,
.bind = rk322x_clk_bind,
.probe = rk322x_clk_probe,
#endif
};
-static int rk3288_clk_ofdata_to_platdata(struct udevice *dev)
+static int rk3288_clk_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3288_clk_priv *priv = dev_get_priv(dev);
.plat_auto = sizeof(struct rk3288_clk_plat),
.ops = &rk3288_clk_ops,
.bind = rk3288_clk_bind,
- .ofdata_to_platdata = rk3288_clk_ofdata_to_platdata,
+ .of_to_plat = rk3288_clk_of_to_plat,
.probe = rk3288_clk_probe,
};
return ret;
}
-static int rk3308_clk_ofdata_to_platdata(struct udevice *dev)
+static int rk3308_clk_of_to_plat(struct udevice *dev)
{
struct rk3308_clk_priv *priv = dev_get_priv(dev);
.id = UCLASS_CLK,
.of_match = rk3308_clk_ids,
.priv_auto = sizeof(struct rk3308_clk_priv),
- .ofdata_to_platdata = rk3308_clk_ofdata_to_platdata,
+ .of_to_plat = rk3308_clk_of_to_plat,
.ops = &rk3308_clk_ops,
.bind = rk3308_clk_bind,
.probe = rk3308_clk_probe,
return 0;
}
-static int rk3328_clk_ofdata_to_platdata(struct udevice *dev)
+static int rk3328_clk_of_to_plat(struct udevice *dev)
{
struct rk3328_clk_priv *priv = dev_get_priv(dev);
.id = UCLASS_CLK,
.of_match = rk3328_clk_ids,
.priv_auto = sizeof(struct rk3328_clk_priv),
- .ofdata_to_platdata = rk3328_clk_ofdata_to_platdata,
+ .of_to_plat = rk3328_clk_of_to_plat,
.ops = &rk3328_clk_ops,
.bind = rk3328_clk_bind,
.probe = rk3328_clk_probe,
return 0;
}
-static int rk3368_clk_ofdata_to_platdata(struct udevice *dev)
+static int rk3368_clk_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3368_clk_priv *priv = dev_get_priv(dev);
#if CONFIG_IS_ENABLED(OF_PLATDATA)
.plat_auto = sizeof(struct rk3368_clk_plat),
#endif
- .ofdata_to_platdata = rk3368_clk_ofdata_to_platdata,
+ .of_to_plat = rk3368_clk_of_to_plat,
.ops = &rk3368_clk_ops,
.bind = rk3368_clk_bind,
.probe = rk3368_clk_probe,
return 0;
}
-static int rk3399_clk_ofdata_to_platdata(struct udevice *dev)
+static int rk3399_clk_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3399_clk_priv *priv = dev_get_priv(dev);
.id = UCLASS_CLK,
.of_match = rk3399_clk_ids,
.priv_auto = sizeof(struct rk3399_clk_priv),
- .ofdata_to_platdata = rk3399_clk_ofdata_to_platdata,
+ .of_to_plat = rk3399_clk_of_to_plat,
.ops = &rk3399_clk_ops,
.bind = rk3399_clk_bind,
.probe = rk3399_clk_probe,
return 0;
}
-static int rk3399_pmuclk_ofdata_to_platdata(struct udevice *dev)
+static int rk3399_pmuclk_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3399_pmuclk_priv *priv = dev_get_priv(dev);
.id = UCLASS_CLK,
.of_match = rk3399_pmuclk_ids,
.priv_auto = sizeof(struct rk3399_pmuclk_priv),
- .ofdata_to_platdata = rk3399_pmuclk_ofdata_to_platdata,
+ .of_to_plat = rk3399_pmuclk_of_to_plat,
.ops = &rk3399_pmuclk_ops,
.probe = rk3399_pmuclk_probe,
.bind = rk3399_pmuclk_bind,
aclk_bus, aclk_peri, hclk_peri, pclk_peri);
}
-static int rv1108_clk_ofdata_to_platdata(struct udevice *dev)
+static int rv1108_clk_of_to_plat(struct udevice *dev)
{
struct rv1108_clk_priv *priv = dev_get_priv(dev);
.priv_auto = sizeof(struct rv1108_clk_priv),
.ops = &rv1108_clk_ops,
.bind = rv1108_clk_bind,
- .ofdata_to_platdata = rv1108_clk_ofdata_to_platdata,
+ .of_to_plat = rv1108_clk_of_to_plat,
.probe = rv1108_clk_probe,
};
void *start = ctx->current;
log_debug("- method %d, %s %p\n", method, parent->name, func);
- ret = device_ofdata_to_platdata(parent);
+ ret = device_of_to_plat(parent);
if (ret)
return log_msg_ret("ofdata", ret);
ret = func(parent, ctx);
return priv;
}
-int device_ofdata_to_platdata(struct udevice *dev)
+int device_of_to_plat(struct udevice *dev)
{
const struct driver *drv;
int size = 0;
/* Ensure all parents have ofdata */
if (dev->parent) {
- ret = device_ofdata_to_platdata(dev->parent);
+ ret = device_of_to_plat(dev->parent);
if (ret)
goto fail;
}
}
- if (drv->ofdata_to_platdata &&
+ if (drv->of_to_plat &&
(CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_of_node(dev))) {
- ret = drv->ofdata_to_platdata(dev);
+ ret = drv->of_to_plat(dev);
if (ret)
goto fail;
}
drv = dev->driver;
assert(drv);
- ret = device_ofdata_to_platdata(dev);
+ ret = device_of_to_plat(dev);
if (ret)
goto fail;
if (!dev)
return -ENODEV;
- ret = device_ofdata_to_platdata(dev);
+ ret = device_of_to_plat(dev);
if (ret)
return ret;
if (!dev)
return -ENODEV;
- ret = device_ofdata_to_platdata(dev);
+ ret = device_of_to_plat(dev);
if (ret)
return ret;
/** enum devres_phase - Shows where resource was allocated
*
* DEVRES_PHASE_BIND: In the bind() method
- * DEVRES_PHASE_OFDATA: In the ofdata_to_platdata() method
+ * DEVRES_PHASE_OFDATA: In the of_to_plat() method
* DEVRES_PHASE_PROBE: In the probe() method
*/
enum devres_phase {
entry->remove += gd->reloc_off;
if (entry->unbind)
entry->unbind += gd->reloc_off;
- if (entry->ofdata_to_platdata)
- entry->ofdata_to_platdata += gd->reloc_off;
+ if (entry->of_to_plat)
+ entry->of_to_plat += gd->reloc_off;
if (entry->child_post_bind)
entry->child_post_bind += gd->reloc_off;
if (entry->child_pre_probe)
return temp;
}
-static int altera_gen5_sdram_ofdata_to_platdata(struct udevice *dev)
+static int altera_gen5_sdram_of_to_plat(struct udevice *dev)
{
struct altera_gen5_sdram_platdata *plat = dev->plat;
.id = UCLASS_RAM,
.of_match = altera_gen5_sdram_ids,
.ops = &altera_gen5_sdram_ops,
- .ofdata_to_platdata = altera_gen5_sdram_ofdata_to_platdata,
+ .of_to_plat = altera_gen5_sdram_of_to_plat,
.plat_auto = sizeof(struct altera_gen5_sdram_platdata),
.probe = altera_gen5_sdram_probe,
.priv_auto = sizeof(struct altera_gen5_sdram_priv),
return size;
}
-static int altera_sdram_ofdata_to_platdata(struct udevice *dev)
+static int altera_sdram_of_to_plat(struct udevice *dev)
{
struct altera_sdram_platdata *plat = dev->plat;
fdt_addr_t addr;
.id = UCLASS_RAM,
.of_match = altera_sdram_ids,
.ops = &altera_sdram_ops,
- .ofdata_to_platdata = altera_sdram_ofdata_to_platdata,
+ .of_to_plat = altera_sdram_of_to_plat,
.plat_auto = sizeof(struct altera_sdram_platdata),
.probe = altera_sdram_probe,
.priv_auto = sizeof(struct altera_sdram_priv),
.set_light = set_light,
};
-static int shape_ofdata_to_platdata(struct udevice *dev)
+static int shape_of_to_plat(struct udevice *dev)
{
struct dm_demo_pdata *pdata = dev_get_plat(dev);
int ret;
.name = "demo_shape_drv",
.of_match = demo_shape_id,
.id = UCLASS_DEMO,
- .ofdata_to_platdata = shape_ofdata_to_platdata,
+ .of_to_plat = shape_of_to_plat,
.ops = &shape_ops,
.probe = dm_shape_probe,
.remove = dm_shape_remove,
.hello = simple_hello,
};
-static int demo_shape_ofdata_to_platdata(struct udevice *dev)
+static int demo_shape_of_to_plat(struct udevice *dev)
{
/* Parse the data that is common with all demo devices */
return demo_parse_dt(dev);
.name = "demo_simple_drv",
.of_match = demo_shape_id,
.id = UCLASS_DEMO,
- .ofdata_to_platdata = demo_shape_ofdata_to_platdata,
+ .of_to_plat = demo_shape_of_to_plat,
.ops = &simple_ops,
.plat_auto = sizeof(struct dm_demo_pdata),
};
return 0;
}
-static int ti_edma3_ofdata_to_platdata(struct udevice *dev)
+static int ti_edma3_of_to_plat(struct udevice *dev)
{
struct ti_edma3_priv *priv = dev_get_priv(dev);
.id = UCLASS_DMA,
.of_match = ti_edma3_ids,
.ops = &ti_edma3_ops,
- .ofdata_to_platdata = ti_edma3_ofdata_to_platdata,
+ .of_to_plat = ti_edma3_of_to_plat,
.probe = ti_edma3_probe,
.priv_auto = sizeof(struct ti_edma3_priv),
};
return 0;
}
-static int altera_pio_ofdata_to_platdata(struct udevice *dev)
+static int altera_pio_of_to_plat(struct udevice *dev)
{
struct altera_pio_platdata *plat = dev_get_plat(dev);
.id = UCLASS_GPIO,
.of_match = altera_pio_ids,
.ops = &altera_pio_ops,
- .ofdata_to_platdata = altera_pio_ofdata_to_platdata,
+ .of_to_plat = altera_pio_of_to_plat,
.plat_auto = sizeof(struct altera_pio_platdata),
.probe = altera_pio_probe,
};
}
#if CONFIG_IS_ENABLED(OF_CONTROL)
-static int bcm2835_gpio_ofdata_to_platdata(struct udevice *dev)
+static int bcm2835_gpio_of_to_plat(struct udevice *dev)
{
struct bcm2835_gpio_platdata *plat = dev_get_plat(dev);
fdt_addr_t addr;
U_BOOT_DRIVER(gpio_bcm2835) = {
.name = "gpio_bcm2835",
.id = UCLASS_GPIO,
- .ofdata_to_platdata = of_match_ptr(bcm2835_gpio_ofdata_to_platdata),
+ .of_to_plat = of_match_ptr(bcm2835_gpio_of_to_plat),
.plat_auto = sizeof(struct bcm2835_gpio_platdata),
.ops = &gpio_bcm2835_ops,
.probe = bcm2835_gpio_probe,
{ }
};
-static int davinci_gpio_ofdata_to_platdata(struct udevice *dev)
+static int davinci_gpio_of_to_plat(struct udevice *dev)
{
struct davinci_gpio_platdata *plat = dev_get_plat(dev);
fdt_addr_t addr;
.name = "ti_dm6441_gpio",
.id = UCLASS_GPIO,
.ops = &gpio_davinci_ops,
- .ofdata_to_platdata = of_match_ptr(davinci_gpio_ofdata_to_platdata),
+ .of_to_plat = of_match_ptr(davinci_gpio_of_to_plat),
.of_match = davinci_gpio_ids,
.bind = dm_scan_fdt_dev,
.plat_auto = sizeof(struct davinci_gpio_platdata),
u32 val[2];
};
-static int gpio_hog_ofdata_to_platdata(struct udevice *dev)
+static int gpio_hog_of_to_plat(struct udevice *dev)
{
struct gpio_hog_data *plat = dev_get_plat(dev);
const char *nodename;
U_BOOT_DRIVER(gpio_hog) = {
.name = "gpio_hog",
.id = UCLASS_NOP,
- .ofdata_to_platdata = gpio_hog_ofdata_to_platdata,
+ .of_to_plat = gpio_hog_of_to_plat,
.probe = gpio_hog_probe,
.priv_auto = sizeof(struct gpio_hog_priv),
.plat_auto = sizeof(struct gpio_hog_data),
return 0;
}
-static int broadwell_gpio_ofdata_to_platdata(struct udevice *dev)
+static int broadwell_gpio_of_to_plat(struct udevice *dev)
{
struct broadwell_bank_platdata *plat = dev_get_plat(dev);
u32 gpiobase;
.id = UCLASS_GPIO,
.of_match = intel_broadwell_gpio_ids,
.ops = &gpio_broadwell_ops,
- .ofdata_to_platdata = broadwell_gpio_ofdata_to_platdata,
+ .of_to_plat = broadwell_gpio_of_to_plat,
.probe = broadwell_gpio_probe,
.priv_auto = sizeof(struct broadwell_bank_priv),
.plat_auto = sizeof(struct broadwell_bank_platdata),
return 0;
}
-static int intel_gpio_ofdata_to_platdata(struct udevice *dev)
+static int intel_gpio_of_to_plat(struct udevice *dev)
{
struct gpio_dev_priv *upriv = dev_get_uclass_priv(dev);
struct intel_pinctrl_priv *pinctrl_priv = dev_get_priv(dev->parent);
.id = UCLASS_GPIO,
.of_match = intel_intel_gpio_ids,
.ops = &gpio_intel_ops,
- .ofdata_to_platdata = intel_gpio_ofdata_to_platdata,
+ .of_to_plat = intel_gpio_of_to_plat,
.probe = intel_gpio_probe,
};
return 0;
}
-static int gpio_ich6_ofdata_to_platdata(struct udevice *dev)
+static int gpio_ich6_of_to_plat(struct udevice *dev)
{
struct ich6_bank_platdata *plat = dev_get_plat(dev);
u32 gpiobase;
.id = UCLASS_GPIO,
.of_match = intel_ich6_gpio_ids,
.ops = &gpio_ich6_ops,
- .ofdata_to_platdata = gpio_ich6_ofdata_to_platdata,
+ .of_to_plat = gpio_ich6_of_to_plat,
.probe = ich6_gpio_probe,
.priv_auto = sizeof(struct ich6_bank_priv),
.plat_auto = sizeof(struct ich6_bank_platdata),
return GPIOF_INPUT;
}
-static int iproc_gpio_ofdata_to_platdata(struct udevice *dev)
+static int iproc_gpio_of_to_plat(struct udevice *dev)
{
struct iproc_gpio_platdata *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
.id = UCLASS_GPIO,
.of_match = iproc_gpio_ids,
.ops = &iproc_gpio_ops,
- .ofdata_to_platdata = iproc_gpio_ofdata_to_platdata,
+ .of_to_plat = iproc_gpio_of_to_plat,
.plat_auto = sizeof(struct iproc_gpio_platdata),
};
}
#if CONFIG_IS_ENABLED(OF_CONTROL)
-static int mpc83xx_spisel_boot_ofdata_to_platdata(struct udevice *dev)
+static int mpc83xx_spisel_boot_of_to_plat(struct udevice *dev)
{
struct mpc8xxx_gpio_plat *plat = dev_get_plat(dev);
fdt_addr_t addr;
.id = UCLASS_GPIO,
.ops = &mpc83xx_spisel_boot_ops,
#if CONFIG_IS_ENABLED(OF_CONTROL)
- .ofdata_to_platdata = mpc83xx_spisel_boot_ofdata_to_platdata,
+ .of_to_plat = mpc83xx_spisel_boot_of_to_plat,
.plat_auto = sizeof(struct mpc8xxx_gpio_plat),
.of_match = mpc83xx_spisel_boot_ids,
#endif
}
#if CONFIG_IS_ENABLED(OF_CONTROL)
-static int mpc8xxx_gpio_ofdata_to_platdata(struct udevice *dev)
+static int mpc8xxx_gpio_of_to_plat(struct udevice *dev)
{
struct mpc8xxx_gpio_plat *plat = dev_get_plat(dev);
struct mpc8xxx_gpio_data *data = dev_get_priv(dev);
.id = UCLASS_GPIO,
.ops = &gpio_mpc8xxx_ops,
#if CONFIG_IS_ENABLED(OF_CONTROL)
- .ofdata_to_platdata = mpc8xxx_gpio_ofdata_to_platdata,
+ .of_to_plat = mpc8xxx_gpio_of_to_plat,
.plat_auto = sizeof(struct mpc8xxx_gpio_plat),
.of_match = mpc8xxx_gpio_ids,
#endif
return priv->base == FDT_ADDR_T_NONE ? -EINVAL : 0;
}
-static int msm_gpio_ofdata_to_platdata(struct udevice *dev)
+static int msm_gpio_of_to_plat(struct udevice *dev)
{
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
.name = "gpio_msm",
.id = UCLASS_GPIO,
.of_match = msm_gpio_ids,
- .ofdata_to_platdata = msm_gpio_ofdata_to_platdata,
+ .of_to_plat = msm_gpio_of_to_plat,
.probe = msm_gpio_probe,
.ops = &gpio_msm_ops,
.priv_auto = sizeof(struct msm_gpio_bank),
return 0;
}
-static int mxc_gpio_ofdata_to_platdata(struct udevice *dev)
+static int mxc_gpio_of_to_plat(struct udevice *dev)
{
struct mxc_gpio_plat *plat = dev_get_plat(dev);
if (!CONFIG_IS_ENABLED(OF_PLATDATA)) {
.id = UCLASS_GPIO,
.ops = &gpio_mxc_ops,
.probe = mxc_gpio_probe,
- .ofdata_to_platdata = mxc_gpio_ofdata_to_platdata,
+ .of_to_plat = mxc_gpio_of_to_plat,
.plat_auto = sizeof(struct mxc_gpio_plat),
.priv_auto = sizeof(struct mxc_bank_info),
.of_match = mxc_gpio_ids,
}
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
-static int mxs_ofdata_to_platdata(struct udevice *dev)
+static int mxs_of_to_plat(struct udevice *dev)
{
struct mxs_gpio_platdata *plat = dev->plat;
struct fdtdec_phandle_args args;
.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,
+ .of_to_plat = mxs_of_to_plat,
#endif
};
return 0;
}
-static int nx_gpio_ofdata_to_platdata(struct udevice *dev)
+static int nx_gpio_of_to_plat(struct udevice *dev)
{
struct nx_gpio_platdata *plat = dev_get_plat(dev);
.id = UCLASS_GPIO,
.of_match = nx_gpio_ids,
.ops = &nx_gpio_ops,
- .ofdata_to_platdata = nx_gpio_ofdata_to_platdata,
+ .of_to_plat = nx_gpio_of_to_plat,
.plat_auto = sizeof(struct nx_gpio_platdata),
.probe = nx_gpio_probe,
};
{ }
};
-static int omap_gpio_ofdata_to_platdata(struct udevice *dev)
+static int omap_gpio_of_to_plat(struct udevice *dev)
{
struct omap_gpio_platdata *plat = dev_get_plat(dev);
fdt_addr_t addr;
#if CONFIG_IS_ENABLED(OF_CONTROL)
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
.of_match = omap_gpio_ids,
- .ofdata_to_platdata = of_match_ptr(omap_gpio_ofdata_to_platdata),
+ .of_to_plat = of_match_ptr(omap_gpio_of_to_plat),
.plat_auto = sizeof(struct omap_gpio_platdata),
#endif
#else
.id = UCLASS_GPIO,
.ops = &pcf8575_gpio_ops,
.of_match = pcf8575_gpio_ids,
- .ofdata_to_platdata = pcf8575_ofdata_platdata,
+ .of_to_plat = pcf8575_ofdata_platdata,
.probe = pcf8575_gpio_probe,
.plat_auto = sizeof(struct pcf8575_chip),
};
return 0;
}
-static int pm8916_gpio_ofdata_to_platdata(struct udevice *dev)
+static int pm8916_gpio_of_to_plat(struct udevice *dev)
{
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
.name = "gpio_pm8916",
.id = UCLASS_GPIO,
.of_match = pm8916_gpio_ids,
- .ofdata_to_platdata = pm8916_gpio_ofdata_to_platdata,
+ .of_to_plat = pm8916_gpio_of_to_plat,
.probe = pm8916_gpio_probe,
.ops = &pm8916_gpio_ops,
.priv_auto = sizeof(struct pm8916_gpio_bank),
return 0;
}
-static int pm8941_pwrkey_ofdata_to_platdata(struct udevice *dev)
+static int pm8941_pwrkey_of_to_plat(struct udevice *dev)
{
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
.name = "pwrkey_pm8916",
.id = UCLASS_GPIO,
.of_match = pm8941_pwrkey_ids,
- .ofdata_to_platdata = pm8941_pwrkey_ofdata_to_platdata,
+ .of_to_plat = pm8941_pwrkey_of_to_plat,
.probe = pm8941_pwrkey_probe,
.ops = &pm8941_pwrkey_ops,
.priv_auto = sizeof(struct pm8916_gpio_bank),
#endif
};
-static int sandbox_gpio_ofdata_to_platdata(struct udevice *dev)
+static int sandbox_gpio_of_to_plat(struct udevice *dev)
{
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
.name = "sandbox_gpio",
.id = UCLASS_GPIO,
.of_match = sandbox_gpio_ids,
- .ofdata_to_platdata = sandbox_gpio_ofdata_to_platdata,
+ .of_to_plat = sandbox_gpio_of_to_plat,
.probe = gpio_sandbox_probe,
.remove = gpio_sandbox_remove,
.ops = &gpio_sandbox_ops,
.get_function = sifive_gpio_get_function,
};
-static int sifive_gpio_ofdata_to_platdata(struct udevice *dev)
+static int sifive_gpio_of_to_plat(struct udevice *dev)
{
struct sifive_gpio_platdata *plat = dev_get_plat(dev);
fdt_addr_t addr;
.name = "gpio_sifive",
.id = UCLASS_GPIO,
.of_match = sifive_gpio_match,
- .ofdata_to_platdata = of_match_ptr(sifive_gpio_ofdata_to_platdata),
+ .of_to_plat = of_match_ptr(sifive_gpio_of_to_plat),
.plat_auto = sizeof(struct sifive_gpio_platdata),
.ops = &sifive_gpio_ops,
.probe = sifive_gpio_probe,
.id = UCLASS_GPIO,
.ops = &gpio_vybrid_ops,
.of_match = vybrid_gpio_ids,
- .ofdata_to_platdata = vybrid_gpio_odata_to_platdata,
+ .of_to_plat = vybrid_gpio_odata_to_platdata,
.probe = vybrid_gpio_probe,
.priv_auto = sizeof(struct vybrid_gpios),
.plat_auto = sizeof(struct vybrid_gpio_platdata),
return 0;
}
-static int xilinx_gpio_ofdata_to_platdata(struct udevice *dev)
+static int xilinx_gpio_of_to_plat(struct udevice *dev)
{
struct xilinx_gpio_platdata *plat = dev_get_plat(dev);
int is_dual;
.id = UCLASS_GPIO,
.ops = &xilinx_gpio_ops,
.of_match = xilinx_gpio_ids,
- .ofdata_to_platdata = xilinx_gpio_ofdata_to_platdata,
+ .of_to_plat = xilinx_gpio_of_to_plat,
.probe = xilinx_gpio_probe,
.plat_auto = sizeof(struct xilinx_gpio_platdata),
.priv_auto = sizeof(struct xilinx_gpio_privdata),
return 0;
}
-static int zynq_gpio_ofdata_to_platdata(struct udevice *dev)
+static int zynq_gpio_of_to_plat(struct udevice *dev)
{
struct zynq_gpio_platdata *plat = dev_get_plat(dev);
.id = UCLASS_GPIO,
.ops = &gpio_zynq_ops,
.of_match = zynq_gpio_ids,
- .ofdata_to_platdata = zynq_gpio_ofdata_to_platdata,
+ .of_to_plat = zynq_gpio_of_to_plat,
.probe = zynq_gpio_probe,
.plat_auto = sizeof(struct zynq_gpio_platdata),
};
return 0;
}
-int acpi_i2c_ofdata_to_platdata(struct udevice *dev)
+int acpi_i2c_of_to_plat(struct udevice *dev)
{
struct acpi_i2c_priv *priv = dev_get_priv(dev);
extern struct acpi_ops acpi_i2c_ops;
-int acpi_i2c_ofdata_to_platdata(struct udevice *dev);
+int acpi_i2c_of_to_plat(struct udevice *dev);
#endif
| I2CD_INTR_ABNORMAL, &priv->regs->icr);
}
-static int ast_i2c_ofdata_to_platdata(struct udevice *dev)
+static int ast_i2c_of_to_plat(struct udevice *dev)
{
struct ast_i2c_priv *priv = dev_get_priv(dev);
int ret;
.id = UCLASS_I2C,
.of_match = ast_i2c_ids,
.probe = ast_i2c_probe,
- .ofdata_to_platdata = ast_i2c_ofdata_to_platdata,
+ .of_to_plat = ast_i2c_of_to_plat,
.priv_auto = sizeof(struct ast_i2c_priv),
.ops = &ast_i2c_ops,
};
return bus->speed;
}
-static int at91_i2c_ofdata_to_platdata(struct udevice *dev)
+static int at91_i2c_of_to_plat(struct udevice *dev)
{
const void *blob = gd->fdt_blob;
struct at91_i2c_bus *bus = dev_get_priv(dev);
.id = UCLASS_I2C,
.of_match = at91_i2c_ids,
.probe = at91_i2c_probe,
- .ofdata_to_platdata = at91_i2c_ofdata_to_platdata,
+ .of_to_plat = at91_i2c_of_to_plat,
.per_child_auto = sizeof(struct dm_i2c_chip),
.priv_auto = sizeof(struct at91_i2c_bus),
.ops = &at91_i2c_ops,
return cros_ec_i2c_tunnel(dev->parent, i2c_bus->remote_bus, msg, nmsgs);
}
-static int cros_ec_i2c_ofdata_to_platdata(struct udevice *dev)
+static int cros_ec_i2c_of_to_plat(struct udevice *dev)
{
struct cros_ec_i2c_bus *i2c_bus = dev_get_priv(dev);
const void *blob = gd->fdt_blob;
.name = "cros_ec_tunnel",
.id = UCLASS_I2C,
.of_match = cros_ec_i2c_ids,
- .ofdata_to_platdata = cros_ec_i2c_ofdata_to_platdata,
+ .of_to_plat = cros_ec_i2c_of_to_plat,
.priv_auto = sizeof(struct cros_ec_i2c_bus),
.ops = &cros_ec_i2c_ops,
};
return ret;
}
-int designware_i2c_ofdata_to_platdata(struct udevice *bus)
+int designware_i2c_of_to_plat(struct udevice *bus)
{
struct dw_i2c *priv = dev_get_priv(bus);
int ret;
.name = "i2c_designware",
.id = UCLASS_I2C,
.of_match = designware_i2c_ids,
- .ofdata_to_platdata = designware_i2c_ofdata_to_platdata,
+ .of_to_plat = designware_i2c_of_to_plat,
.probe = designware_i2c_probe,
.priv_auto = sizeof(struct dw_i2c),
.remove = designware_i2c_remove,
int designware_i2c_probe(struct udevice *bus);
int designware_i2c_remove(struct udevice *dev);
-int designware_i2c_ofdata_to_platdata(struct udevice *bus);
+int designware_i2c_of_to_plat(struct udevice *bus);
/**
* dw_i2c_gen_speed_config() - Calculate config info from requested speed
/* Have a weak function for now - possibly should be a new uclass */
__weak void lpss_reset_release(void *regs);
-static int designware_i2c_pci_ofdata_to_platdata(struct udevice *dev)
+static int designware_i2c_pci_of_to_plat(struct udevice *dev)
{
struct dw_i2c *priv = dev_get_priv(dev);
if (dev_get_driver_data(dev) == INTEL_APL)
priv->has_spk_cnt = true;
- return designware_i2c_ofdata_to_platdata(dev);
+ return designware_i2c_of_to_plat(dev);
}
static int designware_i2c_pci_probe(struct udevice *dev)
.id = UCLASS_I2C,
.of_match = designware_i2c_pci_ids,
.bind = designware_i2c_pci_bind,
- .ofdata_to_platdata = designware_i2c_pci_ofdata_to_platdata,
+ .of_to_plat = designware_i2c_pci_of_to_plat,
.probe = designware_i2c_pci_probe,
.priv_auto = sizeof(struct dw_i2c),
.remove = designware_i2c_remove,
return ret != I2C_OK;
}
-static int s3c_i2c_ofdata_to_platdata(struct udevice *dev)
+static int s3c_i2c_of_to_plat(struct udevice *dev)
{
const void *blob = gd->fdt_blob;
struct s3c24x0_i2c_bus *i2c_bus = dev_get_priv(dev);
.name = "i2c_s3c_hs",
.id = UCLASS_I2C,
.of_match = exynos_hs_i2c_ids,
- .ofdata_to_platdata = s3c_i2c_ofdata_to_platdata,
+ .of_to_plat = s3c_i2c_of_to_plat,
.priv_auto = sizeof(struct s3c24x0_i2c_bus),
.ops = &exynos_hs_i2c_ops,
};
return __i2c_set_bus_speed(dev->base, speed, dev->i2c_clk);
}
-static int fsl_i2c_ofdata_to_platdata(struct udevice *bus)
+static int fsl_i2c_of_to_plat(struct udevice *bus)
{
struct fsl_i2c_dev *dev = dev_get_priv(bus);
struct clk clock;
.id = UCLASS_I2C,
.of_match = fsl_i2c_ids,
.probe = fsl_i2c_probe,
- .ofdata_to_platdata = fsl_i2c_ofdata_to_platdata,
+ .of_to_plat = fsl_i2c_of_to_plat,
.priv_auto = sizeof(struct fsl_i2c_dev),
.ops = &fsl_i2c_ops,
};
return ret;
}
-static int cdns_i2c_ofdata_to_platdata(struct udevice *dev)
+static int cdns_i2c_of_to_plat(struct udevice *dev)
{
struct i2c_cdns_bus *i2c_bus = dev_get_priv(dev);
struct cdns_i2c_platform_data *pdata =
.name = "i2c_cdns",
.id = UCLASS_I2C,
.of_match = cdns_i2c_of_match,
- .ofdata_to_platdata = cdns_i2c_ofdata_to_platdata,
+ .of_to_plat = cdns_i2c_of_to_plat,
.priv_auto = sizeof(struct i2c_cdns_bus),
.ops = &cdns_i2c_ops,
};
return 0;
}
-static int ca_i2c_ofdata_to_platdata(struct udevice *bus)
+static int ca_i2c_of_to_plat(struct udevice *bus)
{
struct ca_i2c *priv = dev_get_priv(bus);
.name = "i2c_cortina",
.id = UCLASS_I2C,
.of_match = ca_i2c_ids,
- .ofdata_to_platdata = ca_i2c_ofdata_to_platdata,
+ .of_to_plat = ca_i2c_of_to_plat,
.probe = ca_i2c_probe,
.priv_auto = sizeof(struct ca_i2c),
.ops = &ca_i2c_ops,
return 0;
}
-static int i2c_gpio_ofdata_to_platdata(struct udevice *dev)
+static int i2c_gpio_of_to_plat(struct udevice *dev)
{
struct i2c_gpio_bus *bus = dev_get_priv(dev);
int ret;
.id = UCLASS_I2C,
.of_match = i2c_gpio_ids,
.probe = i2c_gpio_drv_probe,
- .ofdata_to_platdata = i2c_gpio_ofdata_to_platdata,
+ .of_to_plat = i2c_gpio_of_to_plat,
.priv_auto = sizeof(struct i2c_gpio_bus),
.ops = &i2c_gpio_ops,
};
}
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
-int i2c_chip_ofdata_to_platdata(struct udevice *dev, struct dm_i2c_chip *chip)
+int i2c_chip_of_to_plat(struct udevice *dev, struct dm_i2c_chip *chip)
{
int addr;
if (!dev_of_valid(dev))
return 0;
- return i2c_chip_ofdata_to_platdata(dev, plat);
+ return i2c_chip_of_to_plat(dev, plat);
#else
return 0;
#endif
.id = UCLASS_I2C_GENERIC,
.of_match = generic_chip_i2c_ids,
#if CONFIG_IS_ENABLED(ACPIGEN)
- .ofdata_to_platdata = acpi_i2c_ofdata_to_platdata,
+ .of_to_plat = acpi_i2c_of_to_plat,
.priv_auto = sizeof(struct acpi_i2c_priv),
#endif
ACPI_OPS_PTR(&acpi_i2c_ops)
return iproc_i2c_init(bus);
}
-static int iproc_i2c_ofdata_to_platdata(struct udevice *bus)
+static int iproc_i2c_of_to_plat(struct udevice *bus)
{
struct iproc_i2c *bus_prvdata = dev_get_priv(bus);
int node = dev_of_offset(bus);
.name = "iproc_i2c",
.id = UCLASS_I2C,
.of_match = iproc_i2c_ids,
- .ofdata_to_platdata = iproc_i2c_ofdata_to_platdata,
+ .of_to_plat = iproc_i2c_of_to_plat,
.probe = iproc_i2c_probe,
.priv_auto = sizeof(struct iproc_i2c),
.ops = &iproc_i2c_ops,
{ }
};
-static int pca954x_ofdata_to_platdata(struct udevice *dev)
+static int pca954x_of_to_plat(struct udevice *dev)
{
struct pca954x_priv *priv = dev_get_priv(dev);
const struct chip_desc *chip = &chips[dev_get_driver_data(dev)];
.probe = pca954x_probe,
.remove = pca954x_remove,
.ops = &pca954x_ops,
- .ofdata_to_platdata = pca954x_ofdata_to_platdata,
+ .of_to_plat = pca954x_of_to_plat,
.priv_auto = sizeof(struct pca954x_priv),
};
return 0;
}
-static int mvtwsi_i2c_ofdata_to_platdata(struct udevice *bus)
+static int mvtwsi_i2c_of_to_plat(struct udevice *bus)
{
struct mvtwsi_i2c_dev *dev = dev_get_priv(bus);
.of_match = mvtwsi_i2c_ids,
.bind = mvtwsi_i2c_bind,
.probe = mvtwsi_i2c_probe,
- .ofdata_to_platdata = mvtwsi_i2c_ofdata_to_platdata,
+ .of_to_plat = mvtwsi_i2c_of_to_plat,
.priv_auto = sizeof(struct mvtwsi_i2c_dev),
.ops = &mvtwsi_i2c_ops,
};
}
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
-static int omap_i2c_ofdata_to_platdata(struct udevice *bus)
+static int omap_i2c_of_to_plat(struct udevice *bus)
{
struct omap_i2c_platdata *plat = dev_get_plat(bus);
.id = UCLASS_I2C,
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
.of_match = omap_i2c_ids,
- .ofdata_to_platdata = omap_i2c_ofdata_to_platdata,
+ .of_to_plat = omap_i2c_of_to_plat,
.plat_auto = sizeof(struct omap_i2c_platdata),
#endif
.probe = omap_i2c_probe,
return 0;
}
-static int rockchip_i2c_ofdata_to_platdata(struct udevice *bus)
+static int rockchip_i2c_of_to_plat(struct udevice *bus)
{
struct rk_i2c *priv = dev_get_priv(bus);
int ret;
.name = "rockchip_rk3066_i2c",
.id = UCLASS_I2C,
.of_match = rockchip_i2c_ids,
- .ofdata_to_platdata = rockchip_i2c_ofdata_to_platdata,
+ .of_to_plat = rockchip_i2c_of_to_plat,
.probe = rockchip_i2c_probe,
.priv_auto = sizeof(struct rk_i2c),
.ops = &rockchip_i2c_ops,
return ret ? -EREMOTEIO : 0;
}
-static int s3c_i2c_ofdata_to_platdata(struct udevice *dev)
+static int s3c_i2c_of_to_plat(struct udevice *dev)
{
const void *blob = gd->fdt_blob;
struct s3c24x0_i2c_bus *i2c_bus = dev_get_priv(dev);
.name = "i2c_s3c",
.id = UCLASS_I2C,
.of_match = s3c_i2c_ids,
- .ofdata_to_platdata = s3c_i2c_ofdata_to_platdata,
+ .of_to_plat = s3c_i2c_of_to_plat,
.priv_auto = sizeof(struct s3c24x0_i2c_bus),
.ops = &s3c_i2c_ops,
};
return ret;
}
-static int stm32_ofdata_to_platdata(struct udevice *dev)
+static int stm32_of_to_plat(struct udevice *dev)
{
struct stm32_i2c_priv *i2c_priv = dev_get_priv(dev);
u32 rise_time, fall_time;
.name = "stm32f7-i2c",
.id = UCLASS_I2C,
.of_match = stm32_i2c_of_match,
- .ofdata_to_platdata = stm32_ofdata_to_platdata,
+ .of_to_plat = stm32_of_to_plat,
.probe = stm32_i2c_probe,
.priv_auto = sizeof(struct stm32_i2c_priv),
.ops = &stm32_i2c_ops,
.set_state = cortina_led_set_state,
};
-static int ca_led_ofdata_to_platdata(struct udevice *dev)
+static int ca_led_of_to_plat(struct udevice *dev)
{
struct led_uc_plat *uc_plat = dev_get_uclass_plat(dev);
.name = "ca-leds",
.id = UCLASS_LED,
.of_match = ca_led_ids,
- .ofdata_to_platdata = ca_led_ofdata_to_platdata,
+ .of_to_plat = ca_led_of_to_plat,
.bind = cortina_led_bind,
.probe = cortina_led_probe,
.plat_auto = sizeof(struct cortina_led_platdata),
return 0;
}
-static int altera_sysid_ofdata_to_platdata(struct udevice *dev)
+static int altera_sysid_of_to_plat(struct udevice *dev)
{
struct altera_sysid_platdata *plat = dev_get_plat(dev);
.name = "altera_sysid",
.id = UCLASS_MISC,
.of_match = altera_sysid_ids,
- .ofdata_to_platdata = altera_sysid_ofdata_to_platdata,
+ .of_to_plat = altera_sysid_of_to_plat,
.plat_auto = sizeof(struct altera_sysid_platdata),
.ops = &altera_sysid_ops,
};
return 0;
}
-static int atsha204a_ofdata_to_platdata(struct udevice *dev)
+static int atsha204a_of_to_plat(struct udevice *dev)
{
fdt_addr_t *priv = dev_get_priv(dev);
fdt_addr_t addr;
.name = "atsha204",
.id = UCLASS_MISC,
.of_match = atsha204a_ids,
- .ofdata_to_platdata = atsha204a_ofdata_to_platdata,
+ .of_to_plat = atsha204a_of_to_plat,
.priv_auto = sizeof(fdt_addr_t),
};
return ret;
}
-static int fs_loader_ofdata_to_platdata(struct udevice *dev)
+static int fs_loader_of_to_plat(struct udevice *dev)
{
u32 phandlepart[2];
.id = UCLASS_FS_FIRMWARE_LOADER,
.of_match = fs_loader_ids,
.probe = fs_loader_probe,
- .ofdata_to_platdata = fs_loader_ofdata_to_platdata,
+ .of_to_plat = fs_loader_of_to_plat,
.plat_auto = sizeof(struct device_platdata),
.priv_auto = sizeof(struct firmware),
};
.size = i2c_eeprom_std_size,
};
-static int i2c_eeprom_std_ofdata_to_platdata(struct udevice *dev)
+static int i2c_eeprom_std_of_to_plat(struct udevice *dev)
{
struct i2c_eeprom *priv = dev_get_priv(dev);
struct i2c_eeprom_drv_data *data =
.of_match = i2c_eeprom_std_ids,
.bind = i2c_eeprom_std_bind,
.probe = i2c_eeprom_std_probe,
- .ofdata_to_platdata = i2c_eeprom_std_ofdata_to_platdata,
+ .of_to_plat = i2c_eeprom_std_of_to_plat,
.priv_auto = sizeof(struct i2c_eeprom),
.ops = &i2c_eeprom_std_ops,
};
return 0;
}
-static int i2c_eeprom_partition_ofdata_to_platdata(struct udevice *dev)
+static int i2c_eeprom_partition_of_to_plat(struct udevice *dev)
{
struct i2c_eeprom_partition *priv = dev_get_priv(dev);
u32 reg[2];
.name = "i2c_eeprom_partition",
.id = UCLASS_I2C_EEPROM,
.probe = i2c_eeprom_partition_probe,
- .ofdata_to_platdata = i2c_eeprom_partition_ofdata_to_platdata,
+ .of_to_plat = i2c_eeprom_partition_of_to_plat,
.priv_auto = sizeof(struct i2c_eeprom_partition),
.ops = &i2c_eeprom_partition_ops,
};
.xfer = sandbox_i2c_eeprom_xfer,
};
-static int sandbox_i2c_eeprom_ofdata_to_platdata(struct udevice *dev)
+static int sandbox_i2c_eeprom_of_to_plat(struct udevice *dev)
{
struct sandbox_i2c_flash_plat_data *plat = dev_get_plat(dev);
.name = "sandbox_i2c_eeprom_emul",
.id = UCLASS_I2C_EMUL,
.of_match = sandbox_i2c_ids,
- .ofdata_to_platdata = sandbox_i2c_eeprom_ofdata_to_platdata,
+ .of_to_plat = sandbox_i2c_eeprom_of_to_plat,
.probe = sandbox_i2c_eeprom_probe,
.remove = sandbox_i2c_eeprom_remove,
.priv_auto = sizeof(struct sandbox_i2c_flash),
u32 flexcom_mode;
};
-static int microchip_flexcom_ofdata_to_platdata(struct udevice *dev)
+static int microchip_flexcom_of_to_plat(struct udevice *dev)
{
struct microchip_flexcom_platdata *plat = dev_get_plat(dev);
int ret;
.name = "microchip_flexcom",
.id = UCLASS_MISC,
.of_match = microchip_flexcom_ids,
- .ofdata_to_platdata = microchip_flexcom_ofdata_to_platdata,
+ .of_to_plat = microchip_flexcom_of_to_plat,
.plat_auto = sizeof(struct microchip_flexcom_platdata),
};
.read = rockchip_efuse_read,
};
-static int rockchip_efuse_ofdata_to_platdata(struct udevice *dev)
+static int rockchip_efuse_of_to_plat(struct udevice *dev)
{
struct rockchip_efuse_platdata *plat = dev_get_plat(dev);
.name = "rockchip_efuse",
.id = UCLASS_MISC,
.of_match = rockchip_efuse_ids,
- .ofdata_to_platdata = rockchip_efuse_ofdata_to_platdata,
+ .of_to_plat = rockchip_efuse_of_to_plat,
.plat_auto = sizeof(struct rockchip_efuse_platdata),
.ops = &rockchip_efuse_ops,
};
.read = rockchip_otp_read,
};
-static int rockchip_otp_ofdata_to_platdata(struct udevice *dev)
+static int rockchip_otp_of_to_plat(struct udevice *dev)
{
struct rockchip_otp_platdata *otp = dev_get_plat(dev);
.id = UCLASS_MISC,
.of_match = rockchip_otp_ids,
.ops = &rockchip_otp_ops,
- .ofdata_to_platdata = rockchip_otp_ofdata_to_platdata,
+ .of_to_plat = rockchip_otp_of_to_plat,
.plat_auto = sizeof(struct rockchip_otp_platdata),
};
return size;
}
-static int sifive_otp_ofdata_to_platdata(struct udevice *dev)
+static int sifive_otp_of_to_plat(struct udevice *dev)
{
struct sifive_otp_platdata *plat = dev_get_plat(dev);
int ret;
.name = "sifive_otp",
.id = UCLASS_MISC,
.of_match = sifive_otp_ids,
- .ofdata_to_platdata = sifive_otp_ofdata_to_platdata,
+ .of_to_plat = sifive_otp_of_to_plat,
.plat_auto = sizeof(struct sifive_otp_platdata),
.ops = &sifive_otp_ops,
};
return 0;
}
-static int am654_sdhci_ofdata_to_platdata(struct udevice *dev)
+static int am654_sdhci_of_to_plat(struct udevice *dev)
{
struct am654_sdhci_plat *plat = dev_get_plat(dev);
struct sdhci_host *host = dev_get_priv(dev);
.name = "am654_sdhci",
.id = UCLASS_MMC,
.of_match = am654_sdhci_ids,
- .ofdata_to_platdata = am654_sdhci_ofdata_to_platdata,
+ .of_to_plat = am654_sdhci_of_to_plat,
.ops = &sdhci_ops,
.bind = am654_sdhci_bind,
.probe = am654_sdhci_probe,
.get_cd = dm_mmc_getcd,
};
-static int arm_pl180_mmc_ofdata_to_platdata(struct udevice *dev)
+static int arm_pl180_mmc_of_to_plat(struct udevice *dev)
{
struct pl180_mmc_host *host = dev->priv;
fdt_addr_t addr;
.of_match = arm_pl180_mmc_match,
.ops = &arm_pl180_dm_mmc_ops,
.probe = arm_pl180_mmc_probe,
- .ofdata_to_platdata = arm_pl180_mmc_ofdata_to_platdata,
+ .of_to_plat = arm_pl180_mmc_of_to_plat,
.bind = arm_pl180_mmc_bind,
.priv_auto = sizeof(struct pl180_mmc_host),
.plat_auto = sizeof(struct arm_pl180_mmc_plat),
return SD_SCLK_MAX / clk_div / (host->div + 1);
}
-static int ca_dwmmc_ofdata_to_platdata(struct udevice *dev)
+static int ca_dwmmc_of_to_plat(struct udevice *dev)
{
struct ca_dwmmc_priv_data *priv = dev_get_priv(dev);
struct dwmci_host *host = &priv->host;
.name = "cortina_dwmmc",
.id = UCLASS_MMC,
.of_match = ca_dwmmc_ids,
- .ofdata_to_platdata = ca_dwmmc_ofdata_to_platdata,
+ .of_to_plat = ca_dwmmc_of_to_plat,
.bind = ca_dwmmc_bind,
.ops = &ca_dwmci_dm_ops,
.probe = ca_dwmmc_probe,
}
#if CONFIG_IS_ENABLED(OF_CONTROL)
-static int davinci_mmc_ofdata_to_platdata(struct udevice *dev)
+static int davinci_mmc_of_to_plat(struct udevice *dev)
{
struct davinci_mmc_plat *plat = dev_get_plat(dev);
struct mmc_config *cfg = &plat->cfg;
#if CONFIG_IS_ENABLED(OF_CONTROL)
.of_match = davinci_mmc_ids,
.plat_auto = sizeof(struct davinci_mmc_plat),
- .ofdata_to_platdata = davinci_mmc_ofdata_to_platdata,
+ .of_to_plat = davinci_mmc_of_to_plat,
#endif
#if CONFIG_BLK
.bind = davinci_mmc_bind,
{
}
-static int fsl_esdhc_ofdata_to_platdata(struct udevice *dev)
+static int fsl_esdhc_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct fsl_esdhc_priv *priv = dev_get_priv(dev);
.name = "fsl_esdhc",
.id = UCLASS_MMC,
.of_match = fsl_esdhc_ids,
- .ofdata_to_platdata = fsl_esdhc_ofdata_to_platdata,
+ .of_to_plat = fsl_esdhc_of_to_plat,
.ops = &fsl_esdhc_ops,
#if CONFIG_IS_ENABLED(BLK)
.bind = fsl_esdhc_bind,
cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
}
-static int ftsdc010_mmc_ofdata_to_platdata(struct udevice *dev)
+static int ftsdc010_mmc_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct ftsdc_priv *priv = dev_get_priv(dev);
.name = "ftsdc010_mmc",
.id = UCLASS_MMC,
.of_match = ftsdc010_mmc_ids,
- .ofdata_to_platdata = ftsdc010_mmc_ofdata_to_platdata,
+ .of_to_plat = ftsdc010_mmc_of_to_plat,
.ops = &dm_ftsdc010_mmc_ops,
.bind = ftsdc010_mmc_bind,
.probe = ftsdc010_mmc_probe,
bool use_fifo;
};
-static int hi6220_dwmmc_ofdata_to_platdata(struct udevice *dev)
+static int hi6220_dwmmc_of_to_plat(struct udevice *dev)
{
struct hi6220_dwmmc_priv_data *priv = dev_get_priv(dev);
struct dwmci_host *host = &priv->host;
.name = "hi6220_dwmmc",
.id = UCLASS_MMC,
.of_match = hi6220_dwmmc_ids,
- .ofdata_to_platdata = hi6220_dwmmc_ofdata_to_platdata,
+ .of_to_plat = hi6220_dwmmc_of_to_plat,
.ops = &dm_dwmci_ops,
.bind = hi6220_dwmmc_bind,
.probe = hi6220_dwmmc_probe,
.set_ios = jz_mmc_dm_set_ios,
};
-static int jz_mmc_ofdata_to_platdata(struct udevice *dev)
+static int jz_mmc_of_to_plat(struct udevice *dev)
{
struct jz_mmc_priv *priv = dev_get_priv(dev);
struct jz_mmc_plat *plat = dev_get_plat(dev);
.name = "jz_mmc",
.id = UCLASS_MMC,
.of_match = jz_mmc_ids,
- .ofdata_to_platdata = jz_mmc_ofdata_to_platdata,
+ .of_to_plat = jz_mmc_of_to_plat,
.bind = jz_mmc_bind,
.probe = jz_mmc_probe,
.priv_auto = sizeof(struct jz_mmc_priv),
.set_ios = meson_dm_mmc_set_ios,
};
-static int meson_mmc_ofdata_to_platdata(struct udevice *dev)
+static int meson_mmc_of_to_plat(struct udevice *dev)
{
struct meson_mmc_platdata *pdata = dev_get_plat(dev);
fdt_addr_t addr;
.ops = &meson_dm_mmc_ops,
.probe = meson_mmc_probe,
.bind = meson_mmc_bind,
- .ofdata_to_platdata = meson_mmc_ofdata_to_platdata,
+ .of_to_plat = meson_mmc_of_to_plat,
.plat_auto = sizeof(struct meson_mmc_platdata),
};
return 0;
}
-static int msm_ofdata_to_platdata(struct udevice *dev)
+static int msm_of_to_plat(struct udevice *dev)
{
struct udevice *parent = dev->parent;
struct msm_sdhc *priv = dev_get_priv(dev);
.name = "msm_sdc",
.id = UCLASS_MMC,
.of_match = msm_mmc_ids,
- .ofdata_to_platdata = msm_ofdata_to_platdata,
+ .of_to_plat = msm_of_to_plat,
.ops = &sdhci_ops,
.bind = msm_sdc_bind,
.probe = msm_sdc_probe,
return 0;
}
-static int msdc_ofdata_to_platdata(struct udevice *dev)
+static int msdc_of_to_plat(struct udevice *dev)
{
struct msdc_plat *plat = dev_get_plat(dev);
struct msdc_host *host = dev_get_priv(dev);
.name = "mtk_sd",
.id = UCLASS_MMC,
.of_match = msdc_ids,
- .ofdata_to_platdata = msdc_ofdata_to_platdata,
+ .of_to_plat = msdc_of_to_plat,
.bind = msdc_drv_bind,
.probe = msdc_drv_probe,
.ops = &msdc_ops,
};
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
-static int mxsmmc_ofdata_to_platdata(struct udevice *bus)
+static int mxsmmc_of_to_plat(struct udevice *bus)
{
struct mxsmmc_platdata *plat = bus->plat;
u32 prop[2];
.id = UCLASS_MMC,
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
.of_match = mxsmmc_ids,
- .ofdata_to_platdata = mxsmmc_ofdata_to_platdata,
+ .of_to_plat = mxsmmc_of_to_plat,
#endif
.ops = &mxsmmc_ops,
#if CONFIG_IS_ENABLED(BLK)
return rate;
}
-static int nexell_dwmmc_ofdata_to_platdata(struct udevice *dev)
+static int nexell_dwmmc_of_to_plat(struct udevice *dev)
{
struct nexell_dwmmc_priv *priv = dev_get_priv(dev);
struct dwmci_host *host = &priv->host;
.name = "nexell_dwmmc",
.id = UCLASS_MMC,
.of_match = nexell_dwmmc_ids,
- .ofdata_to_platdata = nexell_dwmmc_ofdata_to_platdata,
+ .of_to_plat = nexell_dwmmc_of_to_plat,
.ops = &dm_dwmci_ops,
.bind = nexell_dwmmc_bind,
.probe = nexell_dwmmc_probe,
}
#endif
-static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
+static int omap_hsmmc_of_to_plat(struct udevice *dev)
{
struct omap_hsmmc_plat *plat = dev_get_plat(dev);
struct omap_mmc_of_data *of_data = (void *)dev_get_driver_data(dev);
.id = UCLASS_MMC,
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
.of_match = omap_hsmmc_ids,
- .ofdata_to_platdata = omap_hsmmc_ofdata_to_platdata,
+ .of_to_plat = omap_hsmmc_of_to_plat,
.plat_auto = sizeof(struct omap_hsmmc_plat),
#endif
#ifdef CONFIG_BLK
return sdhci_probe(dev);
}
-static int pci_mmc_ofdata_to_platdata(struct udevice *dev)
+static int pci_mmc_of_to_plat(struct udevice *dev)
{
struct pci_mmc_priv *priv = dev_get_priv(dev);
.id = UCLASS_MMC,
.of_match = pci_mmc_match,
.bind = pci_mmc_bind,
- .ofdata_to_platdata = pci_mmc_ofdata_to_platdata,
+ .of_to_plat = pci_mmc_of_to_plat,
.probe = pci_mmc_probe,
.ops = &sdhci_ops,
.priv_auto = sizeof(struct pci_mmc_priv),
return freq;
}
-static int rockchip_dwmmc_ofdata_to_platdata(struct udevice *dev)
+static int rockchip_dwmmc_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct rockchip_dwmmc_priv *priv = dev_get_priv(dev);
.name = "rockchip_rk3288_dw_mshc",
.id = UCLASS_MMC,
.of_match = rockchip_dwmmc_ids,
- .ofdata_to_platdata = rockchip_dwmmc_ofdata_to_platdata,
+ .of_to_plat = rockchip_dwmmc_of_to_plat,
.ops = &dm_dwmci_ops,
.bind = rockchip_dwmmc_bind,
.probe = rockchip_dwmmc_probe,
return sdhci_probe(dev);
}
-static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev)
+static int arasan_sdhci_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct sdhci_host *host = dev_get_priv(dev);
.name = "rockchip_rk3399_sdhci_5_1",
.id = UCLASS_MMC,
.of_match = arasan_sdhci_ids,
- .ofdata_to_platdata = arasan_sdhci_ofdata_to_platdata,
+ .of_to_plat = arasan_sdhci_of_to_plat,
.ops = &sdhci_ops,
.bind = rockchip_sdhci_bind,
.probe = arasan_sdhci_probe,
return ret;
}
-static int snps_dwmmc_ofdata_to_platdata(struct udevice *dev)
+static int snps_dwmmc_of_to_plat(struct udevice *dev)
{
struct snps_dwmci_priv_data *priv = dev_get_priv(dev);
struct dwmci_host *host = &priv->host;
.name = "snps_dw_mmc",
.id = UCLASS_MMC,
.of_match = snps_dwmmc_ids,
- .ofdata_to_platdata = snps_dwmmc_ofdata_to_platdata,
+ .of_to_plat = snps_dwmmc_of_to_plat,
.ops = &snps_dwmci_dm_ops,
.bind = snps_dwmmc_bind,
.probe = snps_dwmmc_probe,
return 0;
}
-static int socfpga_dwmmc_ofdata_to_platdata(struct udevice *dev)
+static int socfpga_dwmmc_of_to_plat(struct udevice *dev)
{
struct dwmci_socfpga_priv_data *priv = dev_get_priv(dev);
struct dwmci_host *host = &priv->host;
.name = "socfpga_dwmmc",
.id = UCLASS_MMC,
.of_match = socfpga_dwmmc_ids,
- .ofdata_to_platdata = socfpga_dwmmc_ofdata_to_platdata,
+ .of_to_plat = socfpga_dwmmc_of_to_plat,
.ops = &dm_dwmci_ops,
.bind = socfpga_dwmmc_bind,
.probe = socfpga_dwmmc_probe,
return sdhci_probe(dev);
}
-static int sti_sdhci_ofdata_to_platdata(struct udevice *dev)
+static int sti_sdhci_of_to_plat(struct udevice *dev)
{
struct sdhci_host *host = dev_get_priv(dev);
.of_match = sti_sdhci_ids,
.bind = sti_sdhci_bind,
.ops = &sdhci_ops,
- .ofdata_to_platdata = sti_sdhci_ofdata_to_platdata,
+ .of_to_plat = sti_sdhci_of_to_plat,
.probe = sti_sdhci_probe,
.priv_auto = sizeof(struct sdhci_host),
.plat_auto = sizeof(struct sti_sdhci_plat),
return ret;
}
-static int xenon_sdhci_ofdata_to_platdata(struct udevice *dev)
+static int xenon_sdhci_of_to_plat(struct udevice *dev)
{
struct sdhci_host *host = dev_get_priv(dev);
struct xenon_sdhci_priv *priv = dev_get_priv(dev);
.name = "xenon_sdhci",
.id = UCLASS_MMC,
.of_match = xenon_sdhci_ids,
- .ofdata_to_platdata = xenon_sdhci_ofdata_to_platdata,
+ .of_to_plat = xenon_sdhci_of_to_plat,
.ops = &sdhci_ops,
.bind = xenon_sdhci_bind,
.probe = xenon_sdhci_probe,
return sdhci_probe(dev);
}
-static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev)
+static int arasan_sdhci_of_to_plat(struct udevice *dev)
{
struct arasan_sdhci_priv *priv = dev_get_priv(dev);
.name = "arasan_sdhci",
.id = UCLASS_MMC,
.of_match = arasan_sdhci_ids,
- .ofdata_to_platdata = arasan_sdhci_ofdata_to_platdata,
+ .of_to_plat = arasan_sdhci_of_to_plat,
.ops = &sdhci_ops,
.bind = arasan_sdhci_bind,
.probe = arasan_sdhci_probe,
return 0;
}
-static int altera_qspi_ofdata_to_platdata(struct udevice *dev)
+static int altera_qspi_of_to_plat(struct udevice *dev)
{
struct altera_qspi_platdata *pdata = dev_get_plat(dev);
void *blob = (void *)gd->fdt_blob;
.name = "altera_qspi",
.id = UCLASS_MTD,
.of_match = altera_qspi_ids,
- .ofdata_to_platdata = altera_qspi_ofdata_to_platdata,
+ .of_to_plat = altera_qspi_of_to_plat,
.plat_auto = sizeof(struct altera_qspi_platdata),
.probe = altera_qspi_probe,
};
{}
};
-static int octeontx_nand_ofdata_to_platdata(struct udevice *dev)
+static int octeontx_nand_of_to_plat(struct udevice *dev)
{
return 0;
}
.name = OCTEONTX_NAND_DRIVER_NAME,
.id = UCLASS_MTD,
.of_match = of_match_ptr(octeontx_nand_ids),
- .ofdata_to_platdata = octeontx_nand_ofdata_to_platdata,
+ .of_to_plat = octeontx_nand_of_to_plat,
.probe = octeontx_pci_nand_probe,
.priv_auto = sizeof(struct octeontx_nfc),
.remove = octeontx_pci_nand_disable,
return pos == bytes ? 0 : -EIO;
}
-int sandbox_sf_ofdata_to_platdata(struct udevice *dev)
+int sandbox_sf_of_to_plat(struct udevice *dev)
{
struct sandbox_spi_flash_plat_data *pdata = dev_get_plat(dev);
.name = "sandbox_sf_emul",
.id = UCLASS_SPI_EMUL,
.of_match = sandbox_sf_ids,
- .ofdata_to_platdata = sandbox_sf_ofdata_to_platdata,
+ .of_to_plat = sandbox_sf_of_to_plat,
.probe = sandbox_sf_probe,
.remove = sandbox_sf_remove,
.priv_auto = sizeof(struct sandbox_spi_flash),
.write_hwaddr = ag7xxx_eth_write_hwaddr,
};
-static int ag7xxx_eth_ofdata_to_platdata(struct udevice *dev)
+static int ag7xxx_eth_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
const char *phy_mode;
.name = "eth_ag7xxx",
.id = UCLASS_ETH,
.of_match = ag7xxx_eth_ids,
- .ofdata_to_platdata = ag7xxx_eth_ofdata_to_platdata,
+ .of_to_plat = ag7xxx_eth_of_to_plat,
.probe = ag7xxx_eth_probe,
.remove = ag7xxx_eth_remove,
.ops = &ag7xxx_eth_ops,
return ret;
}
-static int altera_tse_ofdata_to_platdata(struct udevice *dev)
+static int altera_tse_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
const char *phy_mode;
.id = UCLASS_ETH,
.of_match = altera_tse_ids,
.ops = &altera_tse_ops,
- .ofdata_to_platdata = altera_tse_ofdata_to_platdata,
+ .of_to_plat = altera_tse_of_to_plat,
.plat_auto = sizeof(struct eth_pdata),
.priv_auto = sizeof(struct altera_tse_priv),
.probe = altera_tse_probe,
.stop = bcmgenet_gmac_eth_stop,
};
-static int bcmgenet_eth_ofdata_to_platdata(struct udevice *dev)
+static int bcmgenet_eth_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
struct bcmgenet_eth_priv *priv = dev_get_priv(dev);
.name = "eth_bcmgenet",
.id = UCLASS_ETH,
.of_match = bcmgenet_eth_ids,
- .ofdata_to_platdata = bcmgenet_eth_ofdata_to_platdata,
+ .of_to_plat = bcmgenet_eth_of_to_plat,
.probe = bcmgenet_eth_probe,
.ops = &bcmgenet_gmac_eth_ops,
.priv_auto = sizeof(struct bcmgenet_eth_priv),
.write_hwaddr = designware_eth_write_hwaddr,
};
-int designware_eth_ofdata_to_platdata(struct udevice *dev)
+int designware_eth_of_to_plat(struct udevice *dev)
{
struct dw_eth_pdata *dw_pdata = dev_get_plat(dev);
#if CONFIG_IS_ENABLED(DM_GPIO)
.name = "eth_designware",
.id = UCLASS_ETH,
.of_match = designware_eth_ids,
- .ofdata_to_platdata = designware_eth_ofdata_to_platdata,
+ .of_to_plat = designware_eth_of_to_plat,
.bind = designware_eth_bind,
.probe = designware_eth_probe,
.remove = designware_eth_remove,
};
#ifdef CONFIG_DM_ETH
-int designware_eth_ofdata_to_platdata(struct udevice *dev);
+int designware_eth_of_to_plat(struct udevice *dev);
int designware_eth_probe(struct udevice *dev);
extern const struct eth_ops designware_eth_ops;
return designware_eth_probe(dev);
}
-static int dwmac_s700_ofdata_to_platdata(struct udevice *dev)
+static int dwmac_s700_of_to_plat(struct udevice *dev)
{
- return designware_eth_ofdata_to_platdata(dev);
+ return designware_eth_of_to_plat(dev);
}
static const struct udevice_id dwmac_s700_ids[] = {
.name = "dwmac_s700",
.id = UCLASS_ETH,
.of_match = dwmac_s700_ids,
- .ofdata_to_platdata = dwmac_s700_ofdata_to_platdata,
+ .of_to_plat = dwmac_s700_of_to_plat,
.probe = dwmac_s700_probe,
.ops = &designware_eth_ops,
.priv_auto = sizeof(struct dw_eth_dev),
u32 reg_shift;
};
-static int dwmac_socfpga_ofdata_to_platdata(struct udevice *dev)
+static int dwmac_socfpga_of_to_plat(struct udevice *dev)
{
struct dwmac_socfpga_platdata *pdata = dev_get_plat(dev);
struct regmap *regmap;
pdata->phy_intf = range + args.args[0];
pdata->reg_shift = args.args[1];
- return designware_eth_ofdata_to_platdata(dev);
+ return designware_eth_of_to_plat(dev);
}
static int dwmac_socfpga_probe(struct udevice *dev)
.name = "dwmac_socfpga",
.id = UCLASS_ETH,
.of_match = dwmac_socfpga_ids,
- .ofdata_to_platdata = dwmac_socfpga_ofdata_to_platdata,
+ .of_to_plat = dwmac_socfpga_of_to_plat,
.probe = dwmac_socfpga_probe,
.ops = &designware_eth_ops,
.priv_auto = sizeof(struct dw_eth_dev),
ethoc_stop_common(dev_get_priv(dev));
}
-static int ethoc_ofdata_to_platdata(struct udevice *dev)
+static int ethoc_of_to_plat(struct udevice *dev)
{
struct ethoc_eth_pdata *pdata = dev_get_plat(dev);
fdt_addr_t addr;
.name = "ethoc",
.id = UCLASS_ETH,
.of_match = ethoc_ids,
- .ofdata_to_platdata = ethoc_ofdata_to_platdata,
+ .of_to_plat = ethoc_of_to_plat,
.probe = ethoc_probe,
.remove = ethoc_remove,
.ops = ðoc_ops,
return 0;
}
-static int fecmxc_ofdata_to_platdata(struct udevice *dev)
+static int fecmxc_of_to_plat(struct udevice *dev)
{
int ret = 0;
struct eth_pdata *pdata = dev_get_plat(dev);
.name = "fecmxc",
.id = UCLASS_ETH,
.of_match = fecmxc_ids,
- .ofdata_to_platdata = fecmxc_ofdata_to_platdata,
+ .of_to_plat = fecmxc_of_to_plat,
.probe = fecmxc_probe,
.remove = fecmxc_remove,
.ops = &fecmxc_ops,
};
/*
- * Boot sequence, called just after mcffec_ofdata_to_platdata,
+ * Boot sequence, called just after mcffec_of_to_plat,
* as DM way, it replaces old mcffec_initialize.
*/
static int mcdmafec_probe(struct udevice *dev)
/*
* Boot sequence, called 1st
*/
-static int mcdmafec_ofdata_to_platdata(struct udevice *dev)
+static int mcdmafec_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
const u32 *val;
.name = "mcdmafec",
.id = UCLASS_ETH,
.of_match = mcdmafec_ids,
- .ofdata_to_platdata = mcdmafec_ofdata_to_platdata,
+ .of_to_plat = mcdmafec_of_to_plat,
.probe = mcdmafec_probe,
.remove = mcdmafec_remove,
.ops = &mcdmafec_ops,
return ftgmac100_set_mac(priv, pdata->enetaddr);
}
-static int ftgmac100_ofdata_to_platdata(struct udevice *dev)
+static int ftgmac100_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
struct ftgmac100_data *priv = dev_get_priv(dev);
.name = "ftgmac100",
.id = UCLASS_ETH,
.of_match = ftgmac100_ids,
- .ofdata_to_platdata = ftgmac100_ofdata_to_platdata,
+ .of_to_plat = ftgmac100_of_to_plat,
.probe = ftgmac100_probe,
.remove = ftgmac100_remove,
.ops = &ftgmac100_ops,
return NULL;
}
-static int ftmac100_ofdata_to_platdata(struct udevice *dev)
+static int ftmac100_of_to_plat(struct udevice *dev)
{
struct ftmac100_data *priv = dev_get_priv(dev);
struct eth_pdata *pdata = dev_get_plat(dev);
.id = UCLASS_ETH,
.of_match = ftmac100_ids,
.bind = ftmac100_bind,
- .ofdata_to_platdata = ftmac100_ofdata_to_platdata,
+ .of_to_plat = ftmac100_of_to_plat,
.probe = ftmac100_probe,
.ops = &ftmac100_ops,
.priv_auto = sizeof(struct ftmac100_data),
};
-static int gmac_rockchip_ofdata_to_platdata(struct udevice *dev)
+static int gmac_rockchip_of_to_plat(struct udevice *dev)
{
struct gmac_rockchip_platdata *pdata = dev_get_plat(dev);
const char *string;
if (pdata->rx_delay == -ENOENT)
pdata->rx_delay = dev_read_u32_default(dev, "rx-delay", 0x10);
- return designware_eth_ofdata_to_platdata(dev);
+ return designware_eth_of_to_plat(dev);
}
static int px30_gmac_fix_mac_speed(struct dw_eth_dev *priv)
.name = "gmac_rockchip",
.id = UCLASS_ETH,
.of_match = rockchip_gmac_ids,
- .ofdata_to_platdata = gmac_rockchip_ofdata_to_platdata,
+ .of_to_plat = gmac_rockchip_of_to_plat,
.probe = gmac_rockchip_probe,
.ops = &gmac_rockchip_eth_ops,
.priv_auto = sizeof(struct dw_eth_dev),
return 0;
}
-static int higmac_ofdata_to_platdata(struct udevice *dev)
+static int higmac_of_to_plat(struct udevice *dev)
{
struct higmac_priv *priv = dev_get_priv(dev);
int phyintf = PHY_INTERFACE_MODE_NONE;
.name = "eth_higmac",
.id = UCLASS_ETH,
.of_match = higmac_ids,
- .ofdata_to_platdata = higmac_ofdata_to_platdata,
+ .of_to_plat = higmac_of_to_plat,
.probe = higmac_probe,
.remove = higmac_remove,
.ops = &higmac_ops,
return 0;
}
-static int ks8851_ofdata_to_platdata(struct udevice *dev)
+static int ks8851_of_to_plat(struct udevice *dev)
{
struct ks_net *ks = dev_get_priv(dev);
struct eth_pdata *pdata = dev_get_plat(dev);
.id = UCLASS_ETH,
.of_match = ks8851_ids,
.bind = ks8851_bind,
- .ofdata_to_platdata = ks8851_ofdata_to_platdata,
+ .of_to_plat = ks8851_of_to_plat,
.probe = ks8851_probe,
.ops = &ks8851_ops,
.priv_auto = sizeof(struct ks_net),
return 0;
}
-static int ldpaa_eth_ofdata_to_platdata(struct udevice *dev)
+static int ldpaa_eth_of_to_plat(struct udevice *dev)
{
struct ldpaa_eth_priv *priv = dev_get_priv(dev);
const char *phy_mode_str;
.name = "ldpaa_eth",
.id = UCLASS_ETH,
.of_match = ldpaa_eth_of_ids,
- .ofdata_to_platdata = ldpaa_eth_ofdata_to_platdata,
+ .of_to_plat = ldpaa_eth_of_to_plat,
.bind = ldpaa_eth_bind,
.probe = ldpaa_eth_probe,
.ops = &ldpaa_eth_ops,
}
/**
- * macb_late_eth_ofdata_to_platdata
+ * macb_late_eth_of_to_plat
* @dev: udevice struct
* Returns 0 when operation success and negative errno number
* when operation failed.
*/
-int __weak macb_late_eth_ofdata_to_platdata(struct udevice *dev)
+int __weak macb_late_eth_of_to_plat(struct udevice *dev)
{
return 0;
}
-static int macb_eth_ofdata_to_platdata(struct udevice *dev)
+static int macb_eth_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
if (!pdata->iobase)
return -EINVAL;
- return macb_late_eth_ofdata_to_platdata(dev);
+ return macb_late_eth_of_to_plat(dev);
}
static const struct macb_config sama5d4_config = {
.name = "eth_macb",
.id = UCLASS_ETH,
.of_match = macb_eth_ids,
- .ofdata_to_platdata = macb_eth_ofdata_to_platdata,
+ .of_to_plat = macb_eth_of_to_plat,
.probe = macb_eth_probe,
.remove = macb_eth_remove,
.ops = &macb_eth_ops,
};
/*
- * Boot sequence, called just after mcffec_ofdata_to_platdata,
+ * Boot sequence, called just after mcffec_of_to_plat,
* as DM way, it replaces old mcffec_initialize.
*/
static int mcffec_probe(struct udevice *dev)
/*
* Boot sequence, called 1st
*/
-static int mcffec_ofdata_to_platdata(struct udevice *dev)
+static int mcffec_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
const u32 *val;
.name = "mcffec",
.id = UCLASS_ETH,
.of_match = mcffec_ids,
- .ofdata_to_platdata = mcffec_ofdata_to_platdata,
+ .of_to_plat = mcffec_of_to_plat,
.probe = mcffec_probe,
.remove = mcffec_remove,
.ops = &mcffec_ops,
return 0;
}
-static int mtk_eth_ofdata_to_platdata(struct udevice *dev)
+static int mtk_eth_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
struct mtk_eth_priv *priv = dev_get_priv(dev);
.name = "mtk-eth",
.id = UCLASS_ETH,
.of_match = mtk_eth_ids,
- .ofdata_to_platdata = mtk_eth_ofdata_to_platdata,
+ .of_to_plat = mtk_eth_of_to_plat,
.plat_auto = sizeof(struct eth_pdata),
.probe = mtk_eth_probe,
.remove = mtk_eth_remove,
.write_hwaddr = mvgbe_write_hwaddr,
};
-static int mvgbe_ofdata_to_platdata(struct udevice *dev)
+static int mvgbe_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
struct mvgbe_device *dmvgbe = dev_get_priv(dev);
.name = "mvgbe",
.id = UCLASS_ETH,
.of_match = mvgbe_ids,
- .ofdata_to_platdata = mvgbe_ofdata_to_platdata,
+ .of_to_plat = mvgbe_of_to_plat,
.probe = mvgbe_probe,
.ops = &mvgbe_ops,
.priv_auto = sizeof(struct mvgbe_device),
else
mvneta_conf_mbus_windows(pp);
- /* PHY interface is already decoded in mvneta_ofdata_to_platdata() */
+ /* PHY interface is already decoded in mvneta_of_to_plat() */
pp->phy_interface = pdata->phy_interface;
/* fetch 'fixed-link' property from 'neta' node */
.write_hwaddr = mvneta_write_hwaddr,
};
-static int mvneta_ofdata_to_platdata(struct udevice *dev)
+static int mvneta_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
const char *phy_mode;
.name = "mvneta",
.id = UCLASS_ETH,
.of_match = mvneta_ids,
- .ofdata_to_platdata = mvneta_ofdata_to_platdata,
+ .of_to_plat = mvneta_of_to_plat,
.probe = mvneta_probe,
.ops = &mvneta_ops,
.priv_auto = sizeof(struct mvneta_port),
return 0;
}
-static int qe_uec_ofdata_to_platdata(struct udevice *dev)
+static int qe_uec_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
const char *phy_mode;
.name = QE_UEC_DRIVER_NAME,
.id = UCLASS_ETH,
.of_match = qe_uec_ids,
- .ofdata_to_platdata = qe_uec_ofdata_to_platdata,
+ .of_to_plat = qe_uec_of_to_plat,
.probe = qe_uec_probe,
.remove = qe_uec_remove,
.ops = &qe_uec_eth_ops,
.write_hwaddr = ravb_write_hwaddr,
};
-int ravb_ofdata_to_platdata(struct udevice *dev)
+int ravb_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
const char *phy_mode;
.name = "ravb",
.id = UCLASS_ETH,
.of_match = ravb_ids,
- .ofdata_to_platdata = ravb_ofdata_to_platdata,
+ .of_to_plat = ravb_of_to_plat,
.probe = ravb_probe,
.remove = ravb_remove,
.ops = &ravb_ops,
.read_rom_hwaddr = sb_eth_raw_read_rom_hwaddr,
};
-static int sb_eth_raw_ofdata_to_platdata(struct udevice *dev)
+static int sb_eth_raw_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
struct eth_sandbox_raw_priv *priv = dev_get_priv(dev);
.name = "eth_sandbox_raw",
.id = UCLASS_ETH,
.of_match = sb_eth_raw_ids,
- .ofdata_to_platdata = sb_eth_raw_ofdata_to_platdata,
+ .of_to_plat = sb_eth_raw_of_to_plat,
.ops = &sb_eth_raw_ops,
.priv_auto = sizeof(struct eth_sandbox_raw_priv),
.plat_auto = sizeof(struct eth_pdata),
return 0;
}
-static int sb_eth_ofdata_to_platdata(struct udevice *dev)
+static int sb_eth_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
struct eth_sandbox_priv *priv = dev_get_priv(dev);
.name = "eth_sandbox",
.id = UCLASS_ETH,
.of_match = sb_eth_ids,
- .ofdata_to_platdata = sb_eth_ofdata_to_platdata,
+ .of_to_plat = sb_eth_of_to_plat,
.remove = sb_eth_remove,
.ops = &sb_eth_ops,
.priv_auto = sizeof(struct eth_sandbox_priv),
.write_hwaddr = sh_ether_write_hwaddr,
};
-int sh_ether_ofdata_to_platdata(struct udevice *dev)
+int sh_ether_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
const char *phy_mode;
.name = "sh_ether",
.id = UCLASS_ETH,
.of_match = sh_ether_ids,
- .ofdata_to_platdata = sh_ether_ofdata_to_platdata,
+ .of_to_plat = sh_ether_of_to_plat,
.probe = sh_ether_probe,
.remove = sh_ether_remove,
.ops = &sh_ether_ops,
return 0;
}
-static int smc911x_ofdata_to_platdata(struct udevice *dev)
+static int smc911x_of_to_plat(struct udevice *dev)
{
struct smc911x_priv *priv = dev_get_priv(dev);
struct eth_pdata *pdata = dev_get_plat(dev);
.id = UCLASS_ETH,
.of_match = smc911x_ids,
.bind = smc911x_bind,
- .ofdata_to_platdata = smc911x_ofdata_to_platdata,
+ .of_to_plat = smc911x_of_to_plat,
.probe = smc911x_probe,
.ops = &smc911x_ops,
.priv_auto = sizeof(struct smc911x_priv),
return 0;
}
-static int ave_ofdata_to_platdata(struct udevice *dev)
+static int ave_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
struct ave_private *priv = dev_get_priv(dev);
.of_match = ave_ids,
.probe = ave_probe,
.remove = ave_remove,
- .ofdata_to_platdata = ave_ofdata_to_platdata,
+ .of_to_plat = ave_of_to_plat,
.ops = &ave_ops,
.priv_auto = sizeof(struct ave_private),
.plat_auto = sizeof(struct eth_pdata),
return 0;
}
-static int sun8i_emac_eth_ofdata_to_platdata(struct udevice *dev)
+static int sun8i_emac_eth_of_to_plat(struct udevice *dev)
{
struct sun8i_eth_pdata *sun8i_pdata = dev_get_plat(dev);
struct eth_pdata *pdata = &sun8i_pdata->eth_pdata;
.name = "eth_sun8i_emac",
.id = UCLASS_ETH,
.of_match = sun8i_emac_eth_ids,
- .ofdata_to_platdata = sun8i_emac_eth_ofdata_to_platdata,
+ .of_to_plat = sun8i_emac_eth_of_to_plat,
.probe = sun8i_emac_eth_probe,
.ops = &sun8i_emac_eth_ops,
.priv_auto = sizeof(struct emac_eth_dev),
.stop = sunxi_emac_eth_stop,
};
-static int sunxi_emac_eth_ofdata_to_platdata(struct udevice *dev)
+static int sunxi_emac_eth_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
.name = "eth_sunxi_emac",
.id = UCLASS_ETH,
.of_match = sunxi_emac_eth_ids,
- .ofdata_to_platdata = sunxi_emac_eth_ofdata_to_platdata,
+ .of_to_plat = sunxi_emac_eth_of_to_plat,
.probe = sunxi_emac_eth_probe,
.ops = &sunxi_emac_eth_ops,
.priv_auto = sizeof(struct emac_eth_dev),
"max-speed", 0);
}
-static int cpsw_eth_ofdata_to_platdata(struct udevice *dev)
+static int cpsw_eth_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
struct cpsw_platform_data *data;
.id = UCLASS_ETH,
#if CONFIG_IS_ENABLED(OF_CONTROL)
.of_match = cpsw_eth_ids,
- .ofdata_to_platdata = cpsw_eth_ofdata_to_platdata,
+ .of_to_plat = cpsw_eth_of_to_plat,
.plat_auto = sizeof(struct eth_pdata),
#endif
.probe = cpsw_eth_probe,
return 0;
}
-static int ks2_sl_eth_ofdata_to_platdata(struct udevice *dev)
+static int ks2_sl_eth_of_to_plat(struct udevice *dev)
{
struct ks2_eth_priv *priv = dev_get_priv(dev);
struct eth_pdata *pdata = dev_get_plat(dev);
return 0;
}
-static int ks2_eth_ofdata_to_platdata(struct udevice *dev)
+static int ks2_eth_of_to_plat(struct udevice *dev)
{
struct ks2_eth_priv *priv = dev_get_priv(dev);
struct eth_pdata *pdata = dev_get_plat(dev);
U_BOOT_DRIVER(eth_ks2_slave) = {
.name = "eth_ks2_sl",
.id = UCLASS_ETH,
- .ofdata_to_platdata = ks2_sl_eth_ofdata_to_platdata,
+ .of_to_plat = ks2_sl_eth_of_to_plat,
.probe = ks2_eth_probe,
.remove = ks2_eth_remove,
.ops = &ks2_eth_ops,
.name = "eth_ks2",
.id = UCLASS_ETH,
.of_match = ks2_eth_ids,
- .ofdata_to_platdata = ks2_eth_ofdata_to_platdata,
+ .of_to_plat = ks2_eth_of_to_plat,
.probe = ks2_eth_probe,
.remove = ks2_eth_remove,
.ops = &ks2_eth_ops,
.write_hwaddr = axiemac_write_hwaddr,
};
-static int axi_emac_ofdata_to_platdata(struct udevice *dev)
+static int axi_emac_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
struct axidma_priv *priv = dev_get_priv(dev);
.name = "axi_emac",
.id = UCLASS_ETH,
.of_match = axi_emac_ids,
- .ofdata_to_platdata = axi_emac_ofdata_to_platdata,
+ .of_to_plat = axi_emac_of_to_plat,
.probe = axi_emac_probe,
.remove = axi_emac_remove,
.ops = &axi_emac_ops,
.stop = emaclite_stop,
};
-static int emaclite_ofdata_to_platdata(struct udevice *dev)
+static int emaclite_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
struct xemaclite *emaclite = dev_get_priv(dev);
.name = "emaclite",
.id = UCLASS_ETH,
.of_match = emaclite_ids,
- .ofdata_to_platdata = emaclite_ofdata_to_platdata,
+ .of_to_plat = emaclite_of_to_plat,
.probe = emaclite_probe,
.remove = emaclite_remove,
.ops = &emaclite_ops,
.read_rom_hwaddr = zynq_gem_read_rom_mac,
};
-static int zynq_gem_ofdata_to_platdata(struct udevice *dev)
+static int zynq_gem_of_to_plat(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_plat(dev);
struct zynq_gem_priv *priv = dev_get_priv(dev);
.name = "zynq_gem",
.id = UCLASS_ETH,
.of_match = zynq_gem_ids,
- .ofdata_to_platdata = zynq_gem_ofdata_to_platdata,
+ .of_to_plat = zynq_gem_of_to_plat,
.probe = zynq_gem_probe,
.remove = zynq_gem_remove,
.ops = &zynq_gem_ops,
}
/**
- * pcie_advk_ofdata_to_platdata() - Translate from DT to device state
+ * pcie_advk_of_to_plat() - Translate from DT to device state
*
* @dev: A pointer to the device being operated on
*
*
* Return: 0 on success, else -EINVAL
*/
-static int pcie_advk_ofdata_to_platdata(struct udevice *dev)
+static int pcie_advk_of_to_plat(struct udevice *dev)
{
struct pcie_advk *pcie = dev_get_priv(dev);
.id = UCLASS_PCI,
.of_match = pcie_advk_ids,
.ops = &pcie_advk_ops,
- .ofdata_to_platdata = pcie_advk_ofdata_to_platdata,
+ .of_to_plat = pcie_advk_of_to_plat,
.probe = pcie_advk_probe,
.remove = pcie_advk_remove,
.flags = DM_FLAG_OS_PREPARE,
return 0;
}
-static int rcar_gen2_pci_ofdata_to_platdata(struct udevice *dev)
+static int rcar_gen2_pci_of_to_plat(struct udevice *dev)
{
struct rcar_gen2_pci_priv *priv = dev_get_priv(dev);
.of_match = rcar_gen2_pci_ids,
.ops = &rcar_gen2_pci_ops,
.probe = rcar_gen2_pci_probe,
- .ofdata_to_platdata = rcar_gen2_pci_ofdata_to_platdata,
+ .of_to_plat = rcar_gen2_pci_of_to_plat,
.priv_auto = sizeof(struct rcar_gen2_pci_priv),
};
return 0;
}
-static int rcar_gen3_pcie_ofdata_to_platdata(struct udevice *dev)
+static int rcar_gen3_pcie_of_to_plat(struct udevice *dev)
{
struct rcar_gen3_pcie_priv *priv = dev_get_plat(dev);
.of_match = rcar_gen3_pcie_ids,
.ops = &rcar_gen3_pcie_ops,
.probe = rcar_gen3_pcie_probe,
- .ofdata_to_platdata = rcar_gen3_pcie_ofdata_to_platdata,
+ .of_to_plat = rcar_gen3_pcie_of_to_plat,
.plat_auto = sizeof(struct rcar_gen3_pcie_priv),
};
* will produce a bad BDF>
*
* A common cause of this problem is that this function is called in the
- * ofdata_to_platdata() method of @dev. Accessing the PCI bus in that
+ * of_to_plat() method of @dev. Accessing the PCI bus in that
* method is not allowed, since it has not yet been probed. To fix this,
* move that access to the probe() method of @dev instead.
*/
return 0;
}
-static int mpc85xx_pci_ofdata_to_platdata(struct udevice *dev)
+static int mpc85xx_pci_of_to_plat(struct udevice *dev)
{
struct mpc85xx_pci_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
.ops = &mpc85xx_pci_ops,
.probe = mpc85xx_pci_dm_probe,
.remove = mpc85xx_pci_dm_remove,
- .ofdata_to_platdata = mpc85xx_pci_ofdata_to_platdata,
+ .of_to_plat = mpc85xx_pci_of_to_plat,
.priv_auto = sizeof(struct mpc85xx_pci_priv),
};
return -ENOENT;
}
-static int mvebu_pcie_ofdata_to_platdata(struct udevice *dev)
+static int mvebu_pcie_of_to_plat(struct udevice *dev)
{
struct mvebu_pcie *pcie = dev_get_plat(dev);
int ret = 0;
.id = UCLASS_PCI,
.ops = &mvebu_pcie_ops,
.probe = mvebu_pcie_probe,
- .ofdata_to_platdata = mvebu_pcie_ofdata_to_platdata,
+ .of_to_plat = mvebu_pcie_of_to_plat,
.plat_auto = sizeof(struct mvebu_pcie),
};
return ret;
}
-static int pci_octeontx_ofdata_to_platdata(struct udevice *dev)
+static int pci_octeontx_of_to_plat(struct udevice *dev)
{
return 0;
}
.id = UCLASS_PCI,
.of_match = pci_octeontx_ids,
.ops = &pci_octeontx_ops,
- .ofdata_to_platdata = pci_octeontx_ofdata_to_platdata,
+ .of_to_plat = pci_octeontx_of_to_plat,
.probe = pci_octeontx_probe,
.priv_auto = sizeof(struct octeontx_pci),
.flags = DM_FLAG_PRE_RELOC,
},
};
-static int pci_tegra_ofdata_to_platdata(struct udevice *dev)
+static int pci_tegra_of_to_plat(struct udevice *dev)
{
struct tegra_pcie *pcie = dev_get_priv(dev);
enum tegra_pci_id id;
.id = UCLASS_PCI,
.of_match = pci_tegra_ids,
.ops = &pci_tegra_ops,
- .ofdata_to_platdata = pci_tegra_ofdata_to_platdata,
+ .of_to_plat = pci_tegra_of_to_plat,
.probe = pci_tegra_probe,
.priv_auto = sizeof(struct tegra_pcie),
};
return 0;
}
-static int brcm_pcie_ofdata_to_platdata(struct udevice *dev)
+static int brcm_pcie_of_to_plat(struct udevice *dev)
{
struct brcm_pcie *pcie = dev_get_priv(dev);
ofnode dn = dev_ofnode(dev);
.ops = &brcm_pcie_ops,
.of_match = brcm_pcie_ids,
.probe = brcm_pcie_probe,
- .ofdata_to_platdata = brcm_pcie_ofdata_to_platdata,
+ .of_to_plat = brcm_pcie_of_to_plat,
.priv_auto = sizeof(struct brcm_pcie),
};
}
/**
- * pcie_dw_mvebu_ofdata_to_platdata() - Translate from DT to device state
+ * pcie_dw_mvebu_of_to_plat() - Translate from DT to device state
*
* @dev: A pointer to the device being operated on
*
*
* Return: 0 on success, else -EINVAL
*/
-static int pcie_dw_mvebu_ofdata_to_platdata(struct udevice *dev)
+static int pcie_dw_mvebu_of_to_plat(struct udevice *dev)
{
struct pcie_dw_mvebu *pcie = dev_get_priv(dev);
.id = UCLASS_PCI,
.of_match = pcie_dw_mvebu_ids,
.ops = &pcie_dw_mvebu_ops,
- .ofdata_to_platdata = pcie_dw_mvebu_ofdata_to_platdata,
+ .of_to_plat = pcie_dw_mvebu_of_to_plat,
.probe = pcie_dw_mvebu_probe,
.priv_auto = sizeof(struct pcie_dw_mvebu),
};
}
/**
- * pcie_dw_ti_ofdata_to_platdata() - Translate from DT to device state
+ * pcie_dw_ti_of_to_plat() - Translate from DT to device state
*
* @dev: A pointer to the device being operated on
*
*
* Return: 0 on success, else -EINVAL
*/
-static int pcie_dw_ti_ofdata_to_platdata(struct udevice *dev)
+static int pcie_dw_ti_of_to_plat(struct udevice *dev)
{
struct pcie_dw_ti *pcie = dev_get_priv(dev);
.id = UCLASS_PCI,
.of_match = pcie_dw_ti_ids,
.ops = &pcie_dw_ti_ops,
- .ofdata_to_platdata = pcie_dw_ti_ofdata_to_platdata,
+ .of_to_plat = pcie_dw_ti_of_to_plat,
.probe = pcie_dw_ti_probe,
.priv_auto = sizeof(struct pcie_dw_ti),
};
}
/**
- * pci_generic_ecam_ofdata_to_platdata() - Translate from DT to device state
+ * pci_generic_ecam_of_to_plat() - Translate from DT to device state
* @dev: A pointer to the device being operated on
*
* Translate relevant data from the device tree pertaining to device @dev into
*
* Return: 0 on success, else -EINVAL
*/
-static int pci_generic_ecam_ofdata_to_platdata(struct udevice *dev)
+static int pci_generic_ecam_of_to_plat(struct udevice *dev)
{
struct generic_ecam_pcie *pcie = dev_get_priv(dev);
struct fdt_resource reg_res;
.of_match = pci_generic_ecam_ids,
.ops = &pci_generic_ecam_ops,
.probe = pci_generic_ecam_probe,
- .ofdata_to_platdata = pci_generic_ecam_ofdata_to_platdata,
+ .of_to_plat = pci_generic_ecam_of_to_plat,
.priv_auto = sizeof(struct generic_ecam_pcie),
};
return 0;
}
-static int fsl_pcie_ofdata_to_platdata(struct udevice *dev)
+static int fsl_pcie_of_to_plat(struct udevice *dev)
{
struct fsl_pcie *pcie = dev_get_priv(dev);
struct fsl_pcie_data *info;
.id = UCLASS_PCI,
.of_match = fsl_pcie_ids,
.ops = &fsl_pcie_ops,
- .ofdata_to_platdata = fsl_pcie_ofdata_to_platdata,
+ .of_to_plat = fsl_pcie_of_to_plat,
.probe = fsl_pcie_probe,
.priv_auto = sizeof(struct fsl_pcie),
};
return 0;
}
-static int imx_pcie_ofdata_to_platdata(struct udevice *dev)
+static int imx_pcie_of_to_plat(struct udevice *dev)
{
struct imx_pcie_priv *priv = dev_get_priv(dev);
.ops = &imx_pcie_ops,
.probe = imx_pcie_dm_probe,
.remove = imx_pcie_dm_remove,
- .ofdata_to_platdata = imx_pcie_ofdata_to_platdata,
+ .of_to_plat = imx_pcie_of_to_plat,
.priv_auto = sizeof(struct imx_pcie_priv),
.flags = DM_FLAG_OS_PREPARE,
};
return 0;
}
-static int pcie_intel_fpga_ofdata_to_platdata(struct udevice *dev)
+static int pcie_intel_fpga_of_to_plat(struct udevice *dev)
{
struct intel_fpga_pcie *pcie = dev_get_priv(dev);
struct fdt_resource reg_res;
.id = UCLASS_PCI,
.of_match = pcie_intel_fpga_ids,
.ops = &pcie_intel_fpga_ops,
- .ofdata_to_platdata = pcie_intel_fpga_ofdata_to_platdata,
+ .of_to_plat = pcie_intel_fpga_of_to_plat,
.probe = pcie_intel_fpga_probe,
.priv_auto = sizeof(struct intel_fpga_pcie),
};
}
/**
- * pci_phytium_ofdata_to_platdata() - Translate from DT to device state
+ * pci_phytium_of_to_plat() - Translate from DT to device state
* @dev: A pointer to the device being operated on
*
* Translate relevant data from the device tree pertaining to device @dev into
*
* Return: 0 on success, else -EINVAL
*/
-static int pci_phytium_ofdata_to_platdata(struct udevice *dev)
+static int pci_phytium_of_to_plat(struct udevice *dev)
{
struct phytium_pcie *pcie = dev_get_priv(dev);
struct fdt_resource reg_res;
.id = UCLASS_PCI,
.of_match = pci_phytium_ids,
.ops = &pci_phytium_ops,
- .ofdata_to_platdata = pci_phytium_ofdata_to_platdata,
+ .of_to_plat = pci_phytium_of_to_plat,
.priv_auto = sizeof(struct phytium_pcie),
};
}
/**
- * pcie_xilinx_ofdata_to_platdata() - Translate from DT to device state
+ * pcie_xilinx_of_to_plat() - Translate from DT to device state
* @dev: A pointer to the device being operated on
*
* Translate relevant data from the device tree pertaining to device @dev into
*
* Return: 0 on success, else -EINVAL
*/
-static int pcie_xilinx_ofdata_to_platdata(struct udevice *dev)
+static int pcie_xilinx_of_to_plat(struct udevice *dev)
{
struct xilinx_pcie *pcie = dev_get_priv(dev);
struct fdt_resource reg_res;
.id = UCLASS_PCI,
.of_match = pcie_xilinx_ids,
.ops = &pcie_xilinx_ops,
- .ofdata_to_platdata = pcie_xilinx_ofdata_to_platdata,
+ .of_to_plat = pcie_xilinx_of_to_plat,
.priv_auto = sizeof(struct xilinx_pcie),
};
{}
};
-int bcm283x_pinctl_ofdata_to_platdata(struct udevice *dev)
+int bcm283x_pinctl_of_to_plat(struct udevice *dev)
{
struct bcm283x_pinctrl_priv *priv;
.name = "bcm283x_pinctrl",
.id = UCLASS_PINCTRL,
.of_match = of_match_ptr(bcm2835_pinctrl_id),
- .ofdata_to_platdata = bcm283x_pinctl_ofdata_to_platdata,
+ .of_to_plat = bcm283x_pinctl_of_to_plat,
.priv_auto = sizeof(struct bcm283x_pinctrl_priv),
.ops = &bcm283x_pinctrl_ops,
.probe = bcm283x_pinctl_probe,
/*
* We have to probe each one of these since the community link is only
- * attached in intel_pinctrl_ofdata_to_platdata().
+ * attached in intel_pinctrl_of_to_plat().
*/
uclass_foreach_dev_probe(UCLASS_PINCTRL, dev) {
struct intel_pinctrl_priv *priv = dev_get_priv(dev);
return 0;
}
-int intel_pinctrl_ofdata_to_platdata(struct udevice *dev,
- const struct pad_community *comm,
- int num_cfgs)
+int intel_pinctrl_of_to_plat(struct udevice *dev,
+ const struct pad_community *comm, int num_cfgs)
{
struct p2sb_child_platdata *pplat = dev_get_parent_plat(dev);
struct intel_pinctrl_priv *priv = dev_get_priv(dev);
},
};
-static int apl_pinctrl_ofdata_to_platdata(struct udevice *dev)
+static int apl_pinctrl_of_to_plat(struct udevice *dev)
{
struct p2sb_child_platdata *pplat;
const struct pad_community *comm = NULL;
comm = &apl_gpio_communities[i];
}
- return intel_pinctrl_ofdata_to_platdata(dev, comm, 2);
+ return intel_pinctrl_of_to_plat(dev, comm, 2);
}
static const struct udevice_id apl_gpio_ids[] = {
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
.bind = dm_scan_fdt_dev,
#endif
- .ofdata_to_platdata = apl_pinctrl_ofdata_to_platdata,
+ .of_to_plat = apl_pinctrl_of_to_plat,
.priv_auto = sizeof(struct intel_pinctrl_priv),
.plat_auto = sizeof(struct apl_gpio_platdata),
};
return ret;
}
-static int mt7628_pinctrl_ofdata_to_platdata(struct udevice *dev)
+static int mt7628_pinctrl_of_to_plat(struct udevice *dev)
{
struct mt7628_pinctrl_priv *priv = dev_get_priv(dev);
.name = "mt7628-pinctrl",
.id = UCLASS_PINCTRL,
.of_match = mt7628_pinctrl_ids,
- .ofdata_to_platdata = mt7628_pinctrl_ofdata_to_platdata,
+ .of_to_plat = mt7628_pinctrl_of_to_plat,
.ops = &mt7628_pinctrl_ops,
.probe = mt7628_pinctrl_probe,
.priv_auto = sizeof(struct mt7628_pinctrl_priv),
qe_cfg_iopin(par_io, port, pin, dir, open_drain, assign);
}
#else
-static int qe_io_ofdata_to_platdata(struct udevice *dev)
+static int qe_io_of_to_plat(struct udevice *dev)
{
struct qe_io_platdata *plat = dev->plat;
fdt_addr_t addr;
.id = UCLASS_PINCTRL,
.of_match = of_match_ptr(par_io_pinctrl_match),
.probe = par_io_pinctrl_probe,
- .ofdata_to_platdata = qe_io_ofdata_to_platdata,
+ .of_to_plat = qe_io_of_to_plat,
.plat_auto = sizeof(struct qe_io_platdata),
.ops = &par_io_pinctrl_ops,
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
return len;
}
-static int single_ofdata_to_platdata(struct udevice *dev)
+static int single_of_to_plat(struct udevice *dev)
{
fdt_addr_t addr;
u32 of_reg[2];
.of_match = single_pinctrl_match,
.ops = &single_pinctrl_ops,
.plat_auto = sizeof(struct single_pdata),
- .ofdata_to_platdata = single_ofdata_to_platdata,
+ .of_to_plat = single_of_to_plat,
};
return 0;
}
-static int imx8_power_domain_ofdata_to_platdata(struct udevice *dev)
+static int imx8_power_domain_of_to_plat(struct udevice *dev)
{
int reg;
struct imx8_power_domain_platdata *pdata = dev_get_plat(dev);
.of_match = imx8_power_domain_ids,
.bind = imx8_power_domain_bind,
.probe = imx8_power_domain_probe,
- .ofdata_to_platdata = imx8_power_domain_ofdata_to_platdata,
+ .of_to_plat = imx8_power_domain_of_to_plat,
.plat_auto = sizeof(struct imx8_power_domain_platdata),
.priv_auto = sizeof(struct imx8_power_domain_priv),
.ops = &imx8_power_domain_ops,
return 0;
}
-static int imx8m_power_domain_ofdata_to_platdata(struct udevice *dev)
+static int imx8m_power_domain_of_to_plat(struct udevice *dev)
{
struct imx8m_power_domain_platdata *pdata = dev_get_plat(dev);
.of_match = imx8m_power_domain_ids,
.bind = imx8m_power_domain_bind,
.probe = imx8m_power_domain_probe,
- .ofdata_to_platdata = imx8m_power_domain_ofdata_to_platdata,
+ .of_to_plat = imx8m_power_domain_of_to_plat,
.plat_auto = sizeof(struct imx8m_power_domain_platdata),
.ops = &imx8m_power_domain_ops,
};
return ret;
}
-static int sandbox_i2c_pmic_ofdata_to_platdata(struct udevice *emul)
+static int sandbox_i2c_pmic_of_to_plat(struct udevice *emul)
{
struct sandbox_i2c_pmic_plat_data *plat = dev_get_plat(emul);
struct udevice *pmic_dev = i2c_emul_get_device(emul);
.name = "sandbox_i2c_pmic_emul",
.id = UCLASS_I2C_EMUL,
.of_match = sandbox_i2c_pmic_ids,
- .ofdata_to_platdata = sandbox_i2c_pmic_ofdata_to_platdata,
+ .of_to_plat = sandbox_i2c_pmic_of_to_plat,
.probe = sandbox_i2c_pmic_probe,
.plat_auto = sizeof(struct sandbox_i2c_pmic_plat_data),
.ops = &sandbox_i2c_pmic_emul_ops,
unsigned int sleep_vol_cache;
};
-static int fan53555_regulator_ofdata_to_platdata(struct udevice *dev)
+static int fan53555_regulator_of_to_plat(struct udevice *dev)
{
struct fan53555_platdata *dev_pdata = dev_get_plat(dev);
struct dm_regulator_uclass_plat *uc_pdata =
.name = "fan53555_regulator",
.id = UCLASS_REGULATOR,
.ops = &fan53555_regulator_ops,
- .ofdata_to_platdata = fan53555_regulator_ofdata_to_platdata,
+ .of_to_plat = fan53555_regulator_of_to_plat,
.plat_auto = sizeof(struct fan53555_platdata),
.priv_auto = sizeof(struct fan53555_priv),
.probe = fan53555_probe,
#include "regulator_common.h"
-static int fixed_regulator_ofdata_to_platdata(struct udevice *dev)
+static int fixed_regulator_of_to_plat(struct udevice *dev)
{
struct dm_regulator_uclass_plat *uc_pdata;
struct regulator_common_platdata *dev_pdata;
uc_pdata->type = REGULATOR_TYPE_FIXED;
- return regulator_common_ofdata_to_platdata(dev, dev_pdata, "gpio");
+ return regulator_common_of_to_plat(dev, dev_pdata, "gpio");
}
static int fixed_regulator_get_value(struct udevice *dev)
.id = UCLASS_REGULATOR,
.ops = &fixed_regulator_ops,
.of_match = fixed_regulator_ids,
- .ofdata_to_platdata = fixed_regulator_ofdata_to_platdata,
+ .of_to_plat = fixed_regulator_of_to_plat,
.plat_auto = sizeof(struct regulator_common_platdata),
};
int voltages[GPIO_REGULATOR_MAX_STATES];
};
-static int gpio_regulator_ofdata_to_platdata(struct udevice *dev)
+static int gpio_regulator_of_to_plat(struct udevice *dev)
{
struct dm_regulator_uclass_plat *uc_pdata;
struct gpio_regulator_platdata *dev_pdata;
j++;
}
- return regulator_common_ofdata_to_platdata(dev, &dev_pdata->common, "enable-gpios");
+ return regulator_common_of_to_plat(dev, &dev_pdata->common, "enable-gpios");
}
static int gpio_regulator_get_value(struct udevice *dev)
.id = UCLASS_REGULATOR,
.ops = &gpio_regulator_ops,
.of_match = gpio_regulator_ids,
- .ofdata_to_platdata = gpio_regulator_ofdata_to_platdata,
+ .of_to_plat = gpio_regulator_of_to_plat,
.plat_auto = sizeof(struct gpio_regulator_platdata),
};
return regmap_read(priv->regmap, priv->offset, (u32 *)buff);
}
-static int pbias_ofdata_to_platdata(struct udevice *dev)
+static int pbias_of_to_plat(struct udevice *dev)
{
struct pbias_priv *priv = dev_get_priv(dev);
struct udevice *syscon;
.of_match = pbias_ids,
.bind = pbias_bind,
.ops = &pbias_ops,
- .ofdata_to_platdata = pbias_ofdata_to_platdata,
+ .of_to_plat = pbias_of_to_plat,
.priv_auto = sizeof(struct pbias_priv),
};
return ret;
}
-static int pwm_regulator_ofdata_to_platdata(struct udevice *dev)
+static int pwm_regulator_of_to_plat(struct udevice *dev)
{
struct pwm_regulator_info *priv = dev_get_priv(dev);
struct ofnode_phandle_args args;
.ops = &pwm_regulator_ops,
.probe = pwm_regulator_probe,
.of_match = pwm_regulator_ids,
- .ofdata_to_platdata = pwm_regulator_ofdata_to_platdata,
+ .of_to_plat = pwm_regulator_of_to_plat,
.priv_auto = sizeof(struct pwm_regulator_info),
};
#include "regulator_common.h"
-int regulator_common_ofdata_to_platdata(struct udevice *dev,
- struct regulator_common_platdata *dev_pdata, const char *enable_gpio_name)
+int regulator_common_of_to_plat(struct udevice *dev,
+ struct regulator_common_platdata *dev_pdata,
+ const char *enable_gpio_name)
{
struct gpio_desc *gpio;
int flags = GPIOD_IS_OUT;
unsigned int off_on_delay_us;
};
-int regulator_common_ofdata_to_platdata(struct udevice *dev,
- struct regulator_common_platdata *dev_pdata, const char *enable_gpio_name);
+int regulator_common_of_to_plat(struct udevice *dev,
+ struct regulator_common_platdata *dev_pdata,
+ const char *enable_gpio_name);
int regulator_common_get_enable(const struct udevice *dev,
struct regulator_common_platdata *dev_pdata);
int regulator_common_set_enable(const struct udevice *dev,
return vout;
}
-static int tps65910_regulator_ofdata_to_platdata(struct udevice *dev)
+static int tps65910_regulator_of_to_plat(struct udevice *dev)
{
struct udevice *supply;
int ret;
.id = UCLASS_REGULATOR,
.ops = &tps65910_boost_ops,
.plat_auto = sizeof(struct tps65910_regulator_pdata),
- .ofdata_to_platdata = tps65910_regulator_ofdata_to_platdata,
+ .of_to_plat = tps65910_regulator_of_to_plat,
};
static const struct dm_regulator_ops tps65910_buck_ops = {
.id = UCLASS_REGULATOR,
.ops = &tps65910_buck_ops,
.plat_auto = sizeof(struct tps65910_regulator_pdata),
- .ofdata_to_platdata = tps65910_regulator_ofdata_to_platdata,
+ .of_to_plat = tps65910_regulator_of_to_plat,
};
static const struct dm_regulator_ops tps65910_ldo_ops = {
.id = UCLASS_REGULATOR,
.ops = &tps65910_ldo_ops,
.plat_auto = sizeof(struct tps65910_regulator_pdata),
- .ofdata_to_platdata = tps65910_regulator_ofdata_to_platdata,
+ .of_to_plat = tps65910_regulator_of_to_plat,
};
return 0;
}
-static int exynos_pwm_ofdata_to_platdata(struct udevice *dev)
+static int exynos_pwm_of_to_plat(struct udevice *dev)
{
struct exynos_pwm_priv *priv = dev_get_priv(dev);
.of_match = exynos_channels,
.ops = &exynos_pwm_ops,
.probe = exynos_pwm_probe,
- .ofdata_to_platdata = exynos_pwm_ofdata_to_platdata,
+ .of_to_plat = exynos_pwm_of_to_plat,
.priv_auto = sizeof(struct exynos_pwm_priv),
};
return 0;
};
-static int imx_pwm_ofdata_to_platdata(struct udevice *dev)
+static int imx_pwm_of_to_plat(struct udevice *dev)
{
struct imx_pwm_priv *priv = dev_get_priv(dev);
.id = UCLASS_PWM,
.of_match = imx_pwm_ids,
.ops = &imx_pwm_ops,
- .ofdata_to_platdata = imx_pwm_ofdata_to_platdata,
+ .of_to_plat = imx_pwm_of_to_plat,
.probe = imx_pwm_probe,
.priv_auto = sizeof(struct imx_pwm_priv),
};
return meson_pwm_set_config(dev, channeln, channel->period_ns, channel->duty_ns);
}
-static int meson_pwm_ofdata_to_platdata(struct udevice *dev)
+static int meson_pwm_of_to_plat(struct udevice *dev)
{
struct meson_pwm *priv = dev_get_priv(dev);
.id = UCLASS_PWM,
.of_match = meson_pwm_ids,
.ops = &meson_pwm_ops,
- .ofdata_to_platdata = meson_pwm_ofdata_to_platdata,
+ .of_to_plat = meson_pwm_of_to_plat,
.probe = meson_pwm_probe,
.priv_auto = sizeof(struct meson_pwm),
};
return 0;
}
-static int pwm_sifive_ofdata_to_platdata(struct udevice *dev)
+static int pwm_sifive_of_to_plat(struct udevice *dev)
{
struct pwm_sifive_priv *priv = dev_get_priv(dev);
.id = UCLASS_PWM,
.of_match = pwm_sifive_ids,
.ops = &pwm_sifive_ops,
- .ofdata_to_platdata = pwm_sifive_ofdata_to_platdata,
+ .of_to_plat = pwm_sifive_of_to_plat,
.probe = pwm_sifive_probe,
.priv_auto = sizeof(struct pwm_sifive_priv),
};
return 0;
}
-static int rk_pwm_ofdata_to_platdata(struct udevice *dev)
+static int rk_pwm_of_to_plat(struct udevice *dev)
{
struct rk_pwm_priv *priv = dev_get_priv(dev);
.id = UCLASS_PWM,
.of_match = rk_pwm_ids,
.ops = &rk_pwm_ops,
- .ofdata_to_platdata = rk_pwm_ofdata_to_platdata,
+ .of_to_plat = rk_pwm_of_to_plat,
.probe = rk_pwm_probe,
.priv_auto = sizeof(struct rk_pwm_priv),
};
return 0;
}
-static int sunxi_pwm_ofdata_to_platdata(struct udevice *dev)
+static int sunxi_pwm_of_to_plat(struct udevice *dev)
{
struct sunxi_pwm_priv *priv = dev_get_priv(dev);
.id = UCLASS_PWM,
.of_match = sunxi_pwm_ids,
.ops = &sunxi_pwm_ops,
- .ofdata_to_platdata = sunxi_pwm_ofdata_to_platdata,
+ .of_to_plat = sunxi_pwm_of_to_plat,
.probe = sunxi_pwm_probe,
.priv_auto = sizeof(struct sunxi_pwm_priv),
};
return 0;
}
-static int tegra_pwm_ofdata_to_platdata(struct udevice *dev)
+static int tegra_pwm_of_to_plat(struct udevice *dev)
{
struct tegra_pwm_priv *priv = dev_get_priv(dev);
.id = UCLASS_PWM,
.of_match = tegra_pwm_ids,
.ops = &tegra_pwm_ops,
- .ofdata_to_platdata = tegra_pwm_ofdata_to_platdata,
+ .of_to_plat = tegra_pwm_of_to_plat,
.priv_auto = sizeof(struct tegra_pwm_priv),
};
return 0;
}
-static int ast2500_sdrammc_ofdata_to_platdata(struct udevice *dev)
+static int ast2500_sdrammc_of_to_plat(struct udevice *dev)
{
struct dram_info *priv = dev_get_priv(dev);
struct regmap *map;
.id = UCLASS_RAM,
.of_match = ast2500_sdrammc_ids,
.ops = &ast2500_sdrammc_ops,
- .ofdata_to_platdata = ast2500_sdrammc_ofdata_to_platdata,
+ .of_to_plat = ast2500_sdrammc_of_to_plat,
.probe = ast2500_sdrammc_probe,
.priv_auto = sizeof(struct dram_info),
};
return 0;
}
-static int imxrt_semc_ofdata_to_platdata(struct udevice *dev)
+static int imxrt_semc_of_to_plat(struct udevice *dev)
{
struct imxrt_sdram_params *params = dev_get_plat(dev);
ofnode bank_node;
.id = UCLASS_RAM,
.of_match = imxrt_semc_ids,
.ops = &imxrt_semc_ops,
- .ofdata_to_platdata = imxrt_semc_ofdata_to_platdata,
+ .of_to_plat = imxrt_semc_of_to_plat,
.probe = imxrt_semc_probe,
.plat_auto = sizeof(struct imxrt_sdram_params),
};
return 0;
}
-static int mpc83xx_sdram_ofdata_to_platdata(struct udevice *dev)
+static int mpc83xx_sdram_of_to_plat(struct udevice *dev)
{
return 0;
}
.id = UCLASS_RAM,
.of_match = mpc83xx_sdram_ids,
.ops = &mpc83xx_sdram_ops,
- .ofdata_to_platdata = mpc83xx_sdram_ofdata_to_platdata,
+ .of_to_plat = mpc83xx_sdram_of_to_plat,
.probe = mpc83xx_sdram_probe,
.priv_auto = sizeof(struct mpc83xx_sdram_priv),
};
}
#endif
-static int rk3368_dmc_ofdata_to_platdata(struct udevice *dev)
+static int rk3368_dmc_of_to_plat(struct udevice *dev)
{
int ret = 0;
.ops = &rk3368_dmc_ops,
.probe = rk3368_dmc_probe,
.priv_auto = sizeof(struct dram_info),
- .ofdata_to_platdata = rk3368_dmc_ofdata_to_platdata,
+ .of_to_plat = rk3368_dmc_of_to_plat,
.probe = rk3368_dmc_probe,
.priv_auto = sizeof(struct dram_info),
.plat_auto = sizeof(struct rk3368_sdram_params),
return sdram_init(priv, params);
}
-static int rk3188_dmc_ofdata_to_platdata(struct udevice *dev)
+static int rk3188_dmc_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3188_sdram_params *params = dev_get_plat(dev);
.of_match = rk3188_dmc_ids,
.ops = &rk3188_dmc_ops,
#ifdef CONFIG_SPL_BUILD
- .ofdata_to_platdata = rk3188_dmc_ofdata_to_platdata,
+ .of_to_plat = rk3188_dmc_of_to_plat,
#endif
.probe = rk3188_dmc_probe,
.priv_auto = sizeof(struct dram_info),
return ret;
}
-static int rk322x_dmc_ofdata_to_platdata(struct udevice *dev)
+static int rk322x_dmc_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk322x_sdram_params *params = dev_get_plat(dev);
.of_match = rk322x_dmc_ids,
.ops = &rk322x_dmc_ops,
#ifdef CONFIG_TPL_BUILD
- .ofdata_to_platdata = rk322x_dmc_ofdata_to_platdata,
+ .of_to_plat = rk322x_dmc_of_to_plat,
#endif
.probe = rk322x_dmc_probe,
.priv_auto = sizeof(struct dram_info),
return sdram_init(priv, params);
}
-static int rk3288_dmc_ofdata_to_platdata(struct udevice *dev)
+static int rk3288_dmc_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct rk3288_sdram_params *params = dev_get_plat(dev);
.ops = &rk3288_dmc_ops,
#if defined(CONFIG_TPL_BUILD) || \
(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
- .ofdata_to_platdata = rk3288_dmc_ofdata_to_platdata,
+ .of_to_plat = rk3288_dmc_of_to_plat,
#endif
.probe = rk3288_dmc_probe,
.priv_auto = sizeof(struct dram_info),
return 0;
}
-static int rk3328_dmc_ofdata_to_platdata(struct udevice *dev)
+static int rk3328_dmc_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct rockchip_dmc_plat *plat = dev_get_plat(dev);
.of_match = rk3328_dmc_ids,
.ops = &rk3328_dmc_ops,
#ifdef CONFIG_TPL_BUILD
- .ofdata_to_platdata = rk3328_dmc_ofdata_to_platdata,
+ .of_to_plat = rk3328_dmc_of_to_plat,
#endif
.probe = rk3328_dmc_probe,
.priv_auto = sizeof(struct dram_info),
return 0;
}
-static int rk3399_dmc_ofdata_to_platdata(struct udevice *dev)
+static int rk3399_dmc_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct rockchip_dmc_plat *plat = dev_get_plat(dev);
.ops = &rk3399_dmc_ops,
#if defined(CONFIG_TPL_BUILD) || \
(!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))
- .ofdata_to_platdata = rk3399_dmc_ofdata_to_platdata,
+ .of_to_plat = rk3399_dmc_of_to_plat,
#endif
.probe = rk3399_dmc_probe,
.priv_auto = sizeof(struct dram_info),
return 0;
}
-static int stm32_fmc_ofdata_to_platdata(struct udevice *dev)
+static int stm32_fmc_of_to_plat(struct udevice *dev)
{
struct stm32_sdram_params *params = dev_get_plat(dev);
struct bank_params *bank_params;
.id = UCLASS_RAM,
.of_match = stm32_fmc_ids,
.ops = &stm32_fmc_ops,
- .ofdata_to_platdata = stm32_fmc_ofdata_to_platdata,
+ .of_to_plat = stm32_fmc_of_to_plat,
.probe = stm32_fmc_probe,
.plat_auto = sizeof(struct stm32_sdram_params),
};
return 0;
}
-static int mtmips_reset_ofdata_to_platdata(struct udevice *dev)
+static int mtmips_reset_of_to_plat(struct udevice *dev)
{
struct mtmips_reset_priv *priv = dev_get_priv(dev);
.name = "mtmips-reset",
.id = UCLASS_RESET,
.of_match = mtmips_reset_ids,
- .ofdata_to_platdata = mtmips_reset_ofdata_to_platdata,
+ .of_to_plat = mtmips_reset_of_to_plat,
.probe = mtmips_reset_probe,
.priv_auto = sizeof(struct mtmips_reset_priv),
.ops = &mtmips_reset_ops,
}
/**
- * meson_rng_ofdata_to_platdata() - transfer device tree data to plaform data
+ * meson_rng_of_to_plat() - transfer device tree data to plaform data
*
* @dev: device
* Return: 0 if ok
*/
-static int meson_rng_ofdata_to_platdata(struct udevice *dev)
+static int meson_rng_of_to_plat(struct udevice *dev)
{
struct meson_rng_platdata *pdata = dev_get_plat(dev);
int err;
.probe = meson_rng_probe,
.remove = meson_rng_remove,
.plat_auto = sizeof(struct meson_rng_platdata),
- .ofdata_to_platdata = meson_rng_ofdata_to_platdata,
+ .of_to_plat = meson_rng_of_to_plat,
};
return ret;
}
-static int rockchip_rng_ofdata_to_platdata(struct udevice *dev)
+static int rockchip_rng_of_to_plat(struct udevice *dev)
{
struct rk_rng_platdata *pdata = dev_get_priv(dev);
.of_match = rockchip_rng_match,
.ops = &rockchip_rng_ops,
.probe = rockchip_rng_probe,
- .ofdata_to_platdata = rockchip_rng_ofdata_to_platdata,
+ .of_to_plat = rockchip_rng_of_to_plat,
.priv_auto = sizeof(struct rk_rng_platdata),
};
return stm32_rng_cleanup(pdata);
}
-static int stm32_rng_ofdata_to_platdata(struct udevice *dev)
+static int stm32_rng_of_to_plat(struct udevice *dev)
{
struct stm32_rng_platdata *pdata = dev_get_plat(dev);
int err;
.probe = stm32_rng_probe,
.remove = stm32_rng_remove,
.plat_auto = sizeof(struct stm32_rng_platdata),
- .ofdata_to_platdata = stm32_rng_ofdata_to_platdata,
+ .of_to_plat = stm32_rng_of_to_plat,
};
{ }
};
-static int mv_rtc_ofdata_to_platdata(struct udevice *dev)
+static int mv_rtc_of_to_plat(struct udevice *dev)
{
struct mvrtc_pdata *pdata = dev_get_plat(dev);
U_BOOT_DRIVER(rtc_mv) = {
.name = "rtc-mv",
.id = UCLASS_RTC,
- .ofdata_to_platdata = mv_rtc_ofdata_to_platdata,
+ .of_to_plat = mv_rtc_of_to_plat,
.of_match = mv_rtc_ids,
.ops = &mv_rtc_ops,
};
{ }
};
-static int pl031_ofdata_to_platdata(struct udevice *dev)
+static int pl031_of_to_plat(struct udevice *dev)
{
struct pl031_platdata *pdata = dev_get_plat(dev);
.id = UCLASS_RTC,
.of_match = pl031_ids,
.probe = pl031_probe,
- .ofdata_to_platdata = pl031_ofdata_to_platdata,
+ .of_to_plat = pl031_of_to_plat,
.plat_auto = sizeof(struct pl031_platdata),
.ops = &pl031_ops,
};
return 0;
}
-static int altera_jtaguart_ofdata_to_platdata(struct udevice *dev)
+static int altera_jtaguart_of_to_plat(struct udevice *dev)
{
struct altera_jtaguart_platdata *plat = dev_get_plat(dev);
.name = "altera_jtaguart",
.id = UCLASS_SERIAL,
.of_match = altera_jtaguart_ids,
- .ofdata_to_platdata = altera_jtaguart_ofdata_to_platdata,
+ .of_to_plat = altera_jtaguart_of_to_plat,
.plat_auto = sizeof(struct altera_jtaguart_platdata),
.probe = altera_jtaguart_probe,
.ops = &altera_jtaguart_ops,
return 0;
}
-static int altera_uart_ofdata_to_platdata(struct udevice *dev)
+static int altera_uart_of_to_plat(struct udevice *dev)
{
struct altera_uart_platdata *plat = dev_get_plat(dev);
.name = "altera_uart",
.id = UCLASS_SERIAL,
.of_match = altera_uart_ids,
- .ofdata_to_platdata = altera_uart_ofdata_to_platdata,
+ .of_to_plat = altera_uart_of_to_plat,
.plat_auto = sizeof(struct altera_uart_platdata),
.probe = altera_uart_probe,
.ops = &altera_uart_ops,
#endif
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
-int ns16550_serial_ofdata_to_platdata(struct udevice *dev)
+int ns16550_serial_of_to_plat(struct udevice *dev)
{
struct ns16550_platdata *plat = dev->plat;
const u32 port_type = dev_get_driver_data(dev);
.id = UCLASS_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,
+ .of_to_plat = ns16550_serial_of_to_plat,
.plat_auto = sizeof(struct ns16550_platdata),
#endif
.priv_auto = sizeof(struct NS16550),
"white",
};
-static int sandbox_serial_ofdata_to_platdata(struct udevice *dev)
+static int sandbox_serial_of_to_plat(struct udevice *dev)
{
struct sandbox_serial_platdata *plat = dev->plat;
const char *colour;
.name = "sandbox_serial",
.id = UCLASS_SERIAL,
.of_match = sandbox_serial_ids,
- .ofdata_to_platdata = sandbox_serial_ofdata_to_platdata,
+ .of_to_plat = sandbox_serial_of_to_plat,
.plat_auto = sizeof(struct sandbox_serial_platdata),
.priv_auto = sizeof(struct sandbox_serial_priv),
.probe = sandbox_serial_probe,
{ }
};
-static int arc_serial_ofdata_to_platdata(struct udevice *dev)
+static int arc_serial_of_to_plat(struct udevice *dev)
{
struct arc_serial_platdata *plat = dev_get_plat(dev);
DECLARE_GLOBAL_DATA_PTR;
.name = "serial_arc",
.id = UCLASS_SERIAL,
.of_match = arc_serial_ids,
- .ofdata_to_platdata = arc_serial_ofdata_to_platdata,
+ .of_to_plat = arc_serial_of_to_plat,
.plat_auto = sizeof(struct arc_serial_platdata),
.probe = arc_serial_probe,
.ops = &arc_serial_ops,
return -ENODEV;
/*
- * Read the ofdata here rather than in an ofdata_to_platdata() method
+ * Read the ofdata here rather than in an of_to_plat() method
* since we need the soc simple-bus to be probed so that the 'ranges'
* property is used.
*/
return -ENODEV;
/*
- * Read the ofdata here rather than in an ofdata_to_platdata() method
+ * Read the ofdata here rather than in an of_to_plat() method
* since we need the soc simple-bus to be probed so that the 'ranges'
* property is used.
*/
- ret = pl01x_serial_ofdata_to_platdata(dev);
+ ret = pl01x_serial_of_to_plat(dev);
if (ret)
return ret;
#include <serial.h>
#include <asm/arch/sysinfo.h>
-static int coreboot_ofdata_to_platdata(struct udevice *dev)
+static int coreboot_of_to_plat(struct udevice *dev)
{
struct ns16550_platdata *plat = dev_get_plat(dev);
struct cb_serial *cb_info = lib_sysinfo.serial;
.of_match = coreboot_serial_ids,
.priv_auto = sizeof(struct NS16550),
.plat_auto = sizeof(struct ns16550_platdata),
- .ofdata_to_platdata = coreboot_ofdata_to_platdata,
+ .of_to_plat = coreboot_of_to_plat,
.probe = ns16550_serial_probe,
.ops = &ns16550_serial_ops,
.flags = DM_FLAG_PRE_RELOC,
return 0;
}
-static int ca_serial_ofdata_to_platdata(struct udevice *dev)
+static int ca_serial_of_to_plat(struct udevice *dev)
{
struct ca_uart_priv *priv = dev_get_priv(dev);
.name = "serial_cortina",
.id = UCLASS_SERIAL,
.of_match = ca_serial_ids,
- .ofdata_to_platdata = ca_serial_ofdata_to_platdata,
+ .of_to_plat = ca_serial_of_to_plat,
.priv_auto = sizeof(struct ca_uart_priv),
.probe = ca_serial_probe,
.ops = &ca_serial_ops
.name = "serial_intel_mid",
.id = UCLASS_SERIAL,
.of_match = mid_serial_ids,
- .ofdata_to_platdata = ns16550_serial_ofdata_to_platdata,
+ .of_to_plat = ns16550_serial_of_to_plat,
.plat_auto = sizeof(struct ns16550_platdata),
.priv_auto = sizeof(struct NS16550),
.probe = mid_serial_probe,
return _lpuart_serial_init(dev);
}
-static int lpuart_serial_ofdata_to_platdata(struct udevice *dev)
+static int lpuart_serial_of_to_plat(struct udevice *dev)
{
struct lpuart_serial_platdata *plat = dev->plat;
const void *blob = gd->fdt_blob;
.name = "serial_lpuart",
.id = UCLASS_SERIAL,
.of_match = lpuart_serial_ids,
- .ofdata_to_platdata = lpuart_serial_ofdata_to_platdata,
+ .of_to_plat = lpuart_serial_of_to_plat,
.plat_auto = sizeof(struct lpuart_serial_platdata),
.probe = lpuart_serial_probe,
.ops = &lpuart_serial_ops,
return 0;
}
-static int coldfire_ofdata_to_platdata(struct udevice *dev)
+static int coldfire_of_to_plat(struct udevice *dev)
{
struct coldfire_serial_platdata *plat = dev_get_plat(dev);
fdt_addr_t addr_base;
.name = "serial_coldfire",
.id = UCLASS_SERIAL,
.of_match = coldfire_serial_ids,
- .ofdata_to_platdata = coldfire_ofdata_to_platdata,
+ .of_to_plat = coldfire_of_to_plat,
.plat_auto = sizeof(struct coldfire_serial_platdata),
.probe = coldfire_serial_probe,
.ops = &coldfire_serial_ops,
}
}
-static int meson_serial_ofdata_to_platdata(struct udevice *dev)
+static int meson_serial_of_to_plat(struct udevice *dev)
{
struct meson_serial_platdata *plat = dev->plat;
fdt_addr_t addr;
.of_match = meson_serial_ids,
.probe = meson_serial_probe,
.ops = &meson_serial_ops,
- .ofdata_to_platdata = meson_serial_ofdata_to_platdata,
+ .of_to_plat = meson_serial_of_to_plat,
.plat_auto = sizeof(struct meson_serial_platdata),
};
return 0;
}
-static int msm_serial_ofdata_to_platdata(struct udevice *dev)
+static int msm_serial_of_to_plat(struct udevice *dev)
{
struct msm_serial_data *priv = dev_get_priv(dev);
.name = "serial_msm",
.id = UCLASS_SERIAL,
.of_match = msm_serial_ids,
- .ofdata_to_platdata = msm_serial_ofdata_to_platdata,
+ .of_to_plat = msm_serial_of_to_plat,
.priv_auto = sizeof(struct msm_serial_data),
.probe = msm_serial_probe,
.ops = &msm_serial_ops,
return 0;
}
-static int mtk_serial_ofdata_to_platdata(struct udevice *dev)
+static int mtk_serial_of_to_plat(struct udevice *dev)
{
struct mtk_serial_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
.name = "serial_mtk",
.id = UCLASS_SERIAL,
.of_match = mtk_serial_ids,
- .ofdata_to_platdata = mtk_serial_ofdata_to_platdata,
+ .of_to_plat = mtk_serial_of_to_plat,
.priv_auto = sizeof(struct mtk_serial_priv),
.probe = mtk_serial_probe,
.ops = &mtk_serial_ops,
return 0;
}
-static int mvebu_serial_ofdata_to_platdata(struct udevice *dev)
+static int mvebu_serial_of_to_plat(struct udevice *dev)
{
struct mvebu_platdata *plat = dev_get_plat(dev);
.name = "serial_mvebu",
.id = UCLASS_SERIAL,
.of_match = mvebu_serial_ids,
- .ofdata_to_platdata = mvebu_serial_ofdata_to_platdata,
+ .of_to_plat = mvebu_serial_of_to_plat,
.plat_auto = sizeof(struct mvebu_platdata),
.probe = mvebu_serial_probe,
.ops = &mvebu_serial_ops,
};
#if CONFIG_IS_ENABLED(OF_CONTROL)
-static int mxc_serial_ofdata_to_platdata(struct udevice *dev)
+static int mxc_serial_of_to_plat(struct udevice *dev)
{
struct mxc_serial_platdata *plat = dev->plat;
fdt_addr_t addr;
.id = UCLASS_SERIAL,
#if CONFIG_IS_ENABLED(OF_CONTROL)
.of_match = mxc_serial_ids,
- .ofdata_to_platdata = mxc_serial_ofdata_to_platdata,
+ .of_to_plat = mxc_serial_of_to_plat,
.plat_auto = sizeof(struct mxc_serial_platdata),
#endif
.probe = mxc_serial_probe,
#if CONFIG_IS_ENABLED(DM_SERIAL)
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
-static int omap_serial_ofdata_to_platdata(struct udevice *dev)
+static int omap_serial_of_to_plat(struct udevice *dev)
{
struct ns16550_platdata *plat = dev->plat;
fdt_addr_t addr;
.id = UCLASS_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,
+ .of_to_plat = omap_serial_of_to_plat,
.plat_auto = sizeof(struct ns16550_platdata),
#endif
.priv_auto = sizeof(struct NS16550),
return 0;
}
-static int owl_serial_ofdata_to_platdata(struct udevice *dev)
+static int owl_serial_of_to_plat(struct udevice *dev)
{
struct owl_serial_priv *priv = dev_get_priv(dev);
.name = "serial_owl",
.id = UCLASS_SERIAL,
.of_match = owl_serial_ids,
- .ofdata_to_platdata = owl_serial_ofdata_to_platdata,
+ .of_to_plat = owl_serial_of_to_plat,
.priv_auto = sizeof(struct owl_serial_priv),
.probe = owl_serial_probe,
.ops = &owl_serial_ops,
#define CONFIG_PL011_CLOCK 0
#endif
-int pl01x_serial_ofdata_to_platdata(struct udevice *dev)
+int pl01x_serial_of_to_plat(struct udevice *dev)
{
struct pl01x_serial_platdata *plat = dev_get_plat(dev);
struct clk clk;
.name = "serial_pl01x",
.id = UCLASS_SERIAL,
.of_match = of_match_ptr(pl01x_serial_id),
- .ofdata_to_platdata = of_match_ptr(pl01x_serial_ofdata_to_platdata),
+ .of_to_plat = of_match_ptr(pl01x_serial_of_to_plat),
.plat_auto = sizeof(struct pl01x_serial_platdata),
.probe = pl01x_serial_probe,
.ops = &pl01x_serial_ops,
#ifdef CONFIG_DM_SERIAL
-int pl01x_serial_ofdata_to_platdata(struct udevice *dev);
+int pl01x_serial_of_to_plat(struct udevice *dev);
int pl01x_serial_probe(struct udevice *dev);
/* Needed for external pl01x_serial_ops drivers */
return (ufstat & TX_FIFO_COUNT_MASK) >> TX_FIFO_COUNT_SHIFT;
}
-static int s5p_serial_ofdata_to_platdata(struct udevice *dev)
+static int s5p_serial_of_to_plat(struct udevice *dev)
{
struct s5p_serial_platdata *plat = dev->plat;
fdt_addr_t addr;
.name = "serial_s5p",
.id = UCLASS_SERIAL,
.of_match = s5p_serial_ids,
- .ofdata_to_platdata = s5p_serial_ofdata_to_platdata,
+ .of_to_plat = s5p_serial_of_to_plat,
.plat_auto = sizeof(struct s5p_serial_platdata),
.probe = s5p_serial_probe,
.ops = &s5p_serial_ops,
{}
};
-static int sh_serial_ofdata_to_platdata(struct udevice *dev)
+static int sh_serial_of_to_plat(struct udevice *dev)
{
struct sh_serial_platdata *plat = dev_get_plat(dev);
struct clk sh_serial_clk;
.name = "serial_sh",
.id = UCLASS_SERIAL,
.of_match = of_match_ptr(sh_serial_id),
- .ofdata_to_platdata = of_match_ptr(sh_serial_ofdata_to_platdata),
+ .of_to_plat = of_match_ptr(sh_serial_of_to_plat),
.plat_auto = sizeof(struct sh_serial_platdata),
.probe = sh_serial_probe,
.ops = &sh_serial_ops,
return !!(readl(®s->txfifo) & UART_TXFIFO_FULL);
}
-static int sifive_serial_ofdata_to_platdata(struct udevice *dev)
+static int sifive_serial_of_to_plat(struct udevice *dev)
{
struct sifive_uart_platdata *plat = dev_get_plat(dev);
.name = "serial_sifive",
.id = UCLASS_SERIAL,
.of_match = sifive_serial_ids,
- .ofdata_to_platdata = sifive_serial_ofdata_to_platdata,
+ .of_to_plat = sifive_serial_of_to_plat,
.plat_auto = sizeof(struct sifive_uart_platdata),
.probe = sifive_serial_probe,
.ops = &sifive_serial_ops,
{}
};
-static int stm32_serial_ofdata_to_platdata(struct udevice *dev)
+static int stm32_serial_of_to_plat(struct udevice *dev)
{
struct stm32x7_serial_platdata *plat = dev_get_plat(dev);
.name = "serial_stm32",
.id = UCLASS_SERIAL,
.of_match = of_match_ptr(stm32_serial_id),
- .ofdata_to_platdata = of_match_ptr(stm32_serial_ofdata_to_platdata),
+ .of_to_plat = of_match_ptr(stm32_serial_of_to_plat),
.plat_auto = sizeof(struct stm32x7_serial_platdata),
.ops = &stm32_serial_ops,
.probe = stm32_serial_probe,
return 0;
}
-static int uartlite_serial_ofdata_to_platdata(struct udevice *dev)
+static int uartlite_serial_of_to_plat(struct udevice *dev)
{
struct uartlite_platdata *plat = dev_get_plat(dev);
.name = "serial_uartlite",
.id = UCLASS_SERIAL,
.of_match = uartlite_serial_ids,
- .ofdata_to_platdata = uartlite_serial_ofdata_to_platdata,
+ .of_to_plat = uartlite_serial_of_to_plat,
.plat_auto = sizeof(struct uartlite_platdata),
.probe = uartlite_serial_probe,
.ops = &uartlite_serial_ops,
return !!(readl(®s->channel_sts) & ZYNQ_UART_SR_TXACTIVE);
}
-static int zynq_serial_ofdata_to_platdata(struct udevice *dev)
+static int zynq_serial_of_to_plat(struct udevice *dev)
{
struct zynq_uart_platdata *plat = dev_get_plat(dev);
.name = "serial_zynq",
.id = UCLASS_SERIAL,
.of_match = zynq_serial_ids,
- .ofdata_to_platdata = zynq_serial_ofdata_to_platdata,
+ .of_to_plat = zynq_serial_of_to_plat,
.plat_auto = sizeof(struct zynq_uart_platdata),
.probe = zynq_serial_probe,
.ops = &zynq_serial_ops,
struct gpio_desc sdmode_gpio;
};
-static int max98357a_ofdata_to_platdata(struct udevice *dev)
+static int max98357a_of_to_plat(struct udevice *dev)
{
struct max98357a_priv *priv = dev_get_priv(dev);
int ret;
.name = "max98357a",
.id = UCLASS_AUDIO_CODEC,
.of_match = max98357a_ids,
- .ofdata_to_platdata = max98357a_ofdata_to_platdata,
+ .of_to_plat = max98357a_of_to_plat,
.ops = &max98357a_ops,
ACPI_OPS_PTR(&max98357a_acpi_ops)
};
return i2s_tx_init(priv);
}
-static int samsung_i2s_ofdata_to_platdata(struct udevice *dev)
+static int samsung_i2s_of_to_plat(struct udevice *dev)
{
struct i2s_uc_priv *priv = dev_get_uclass_priv(dev);
ulong base;
.id = UCLASS_I2S,
.of_match = samsung_i2s_ids,
.probe = samsung_i2s_probe,
- .ofdata_to_platdata = samsung_i2s_ofdata_to_platdata,
+ .of_to_plat = samsung_i2s_of_to_plat,
.ops = &samsung_i2s_ops,
};
return 0;
}
-static int altera_spi_ofdata_to_platdata(struct udevice *bus)
+static int altera_spi_of_to_plat(struct udevice *bus)
{
struct altera_spi_platdata *plat = dev_get_plat(bus);
.id = UCLASS_SPI,
.of_match = altera_spi_ids,
.ops = &altera_spi_ops,
- .ofdata_to_platdata = altera_spi_ofdata_to_platdata,
+ .of_to_plat = altera_spi_of_to_plat,
.plat_auto = sizeof(struct altera_spi_platdata),
.priv_auto = sizeof(struct altera_spi_priv),
.probe = altera_spi_probe,
.id = UCLASS_SPI,
.of_match = atcspi200_spi_ids,
.ops = &atcspi200_spi_ops,
- .ofdata_to_platdata = atcspi200_ofdata_to_platadata,
+ .of_to_plat = atcspi200_ofdata_to_platadata,
.priv_auto = sizeof(struct nds_spi_slave),
.probe = atcspi200_spi_probe,
};
void *saved_din_addr;
};
-static int bcmstb_spi_ofdata_to_platdata(struct udevice *bus)
+static int bcmstb_spi_of_to_plat(struct udevice *bus)
{
struct bcmstb_spi_platdata *plat = dev_get_plat(bus);
const void *fdt = gd->fdt_blob;
.id = UCLASS_SPI,
.of_match = bcmstb_spi_id,
.ops = &bcmstb_spi_ops,
- .ofdata_to_platdata = bcmstb_spi_ofdata_to_platdata,
+ .of_to_plat = bcmstb_spi_of_to_plat,
.probe = bcmstb_spi_probe,
.plat_auto = sizeof(struct bcmstb_spi_platdata),
.priv_auto = sizeof(struct bcmstb_spi_priv),
return err;
}
-static int cadence_spi_ofdata_to_platdata(struct udevice *bus)
+static int cadence_spi_of_to_plat(struct udevice *bus)
{
struct cadence_spi_platdata *plat = bus->plat;
ofnode subnode;
.id = UCLASS_SPI,
.of_match = cadence_spi_ids,
.ops = &cadence_spi_ops,
- .ofdata_to_platdata = cadence_spi_ofdata_to_platdata,
+ .of_to_plat = cadence_spi_of_to_plat,
.plat_auto = sizeof(struct cadence_spi_platdata),
.priv_auto = sizeof(struct cadence_spi_priv),
.probe = cadence_spi_probe,
}
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
-static int coldfire_dspi_ofdata_to_platdata(struct udevice *bus)
+static int coldfire_dspi_of_to_plat(struct udevice *bus)
{
fdt_addr_t addr;
struct coldfire_spi_platdata *plat = bus->plat;
.id = UCLASS_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,
+ .of_to_plat = coldfire_dspi_of_to_plat,
.plat_auto = sizeof(struct coldfire_spi_platdata),
#endif
.probe = coldfire_spi_probe,
.id = UCLASS_SPI,
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
.of_match = davinci_spi_ids,
- .ofdata_to_platdata = davinci_ofdata_to_platadata,
+ .of_to_plat = davinci_ofdata_to_platadata,
.plat_auto = sizeof(struct davinci_spi_platdata),
#endif
.probe = davinci_spi_probe,
return 0;
}
-static int dw_spi_ofdata_to_platdata(struct udevice *bus)
+static int dw_spi_of_to_plat(struct udevice *bus)
{
struct dw_spi_platdata *plat = bus->plat;
.id = UCLASS_SPI,
.of_match = dw_spi_ids,
.ops = &dw_spi_ops,
- .ofdata_to_platdata = dw_spi_ofdata_to_platdata,
+ .of_to_plat = dw_spi_of_to_plat,
.plat_auto = sizeof(struct dw_spi_platdata),
.priv_auto = sizeof(struct dw_spi_priv),
.probe = dw_spi_probe,
debug("Deactivate CS, bus '%s'\n", bus->name);
}
-static int exynos_spi_ofdata_to_platdata(struct udevice *bus)
+static int exynos_spi_of_to_plat(struct udevice *bus)
{
struct exynos_spi_platdata *plat = bus->plat;
const void *blob = gd->fdt_blob;
.id = UCLASS_SPI,
.of_match = exynos_spi_ids,
.ops = &exynos_spi_ops,
- .ofdata_to_platdata = exynos_spi_ofdata_to_platdata,
+ .of_to_plat = exynos_spi_of_to_plat,
.plat_auto = sizeof(struct exynos_spi_platdata),
.priv_auto = sizeof(struct exynos_spi_priv),
.probe = exynos_spi_probe,
return 0;
}
-static int fsl_dspi_ofdata_to_platdata(struct udevice *bus)
+static int fsl_dspi_of_to_plat(struct udevice *bus)
{
fdt_addr_t addr;
struct fsl_dspi_platdata *plat = bus->plat;
.id = UCLASS_SPI,
.of_match = fsl_dspi_ids,
.ops = &fsl_dspi_ops,
- .ofdata_to_platdata = fsl_dspi_ofdata_to_platdata,
+ .of_to_plat = fsl_dspi_of_to_plat,
.plat_auto = sizeof(struct fsl_dspi_platdata),
.priv_auto = sizeof(struct fsl_dspi_priv),
.probe = fsl_dspi_probe,
};
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
-static int fsl_espi_ofdata_to_platdata(struct udevice *bus)
+static int fsl_espi_of_to_plat(struct udevice *bus)
{
fdt_addr_t addr;
struct fsl_espi_platdata *plat = bus->plat;
.id = UCLASS_SPI,
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
.of_match = fsl_espi_ids,
- .ofdata_to_platdata = fsl_espi_ofdata_to_platdata,
+ .of_to_plat = fsl_espi_of_to_plat,
#endif
.ops = &fsl_espi_ops,
.plat_auto = sizeof(struct fsl_espi_platdata),
return 0;
}
-static int ich_spi_ofdata_to_platdata(struct udevice *dev)
+static int ich_spi_of_to_plat(struct udevice *dev)
{
struct ich_spi_platdata *plat = dev_get_plat(dev);
.id = UCLASS_SPI,
.of_match = ich_spi_ids,
.ops = &ich_spi_ops,
- .ofdata_to_platdata = ich_spi_ofdata_to_platdata,
+ .of_to_plat = ich_spi_of_to_plat,
.plat_auto = sizeof(struct ich_spi_platdata),
.priv_auto = sizeof(struct ich_spi_priv),
.child_pre_probe = ich_spi_child_pre_probe,
return 0;
}
-static int mvebu_spi_ofdata_to_platdata(struct udevice *bus)
+static int mvebu_spi_of_to_plat(struct udevice *bus)
{
struct mvebu_spi_platdata *plat = dev_get_plat(bus);
const struct mvebu_spi_dev *drvdata =
.id = UCLASS_SPI,
.of_match = mvebu_spi_ids,
.ops = &mvebu_spi_ops,
- .ofdata_to_platdata = mvebu_spi_ofdata_to_platdata,
+ .of_to_plat = mvebu_spi_of_to_plat,
.plat_auto = sizeof(struct mvebu_spi_platdata),
.priv_auto = sizeof(struct mvebu_spi_priv),
.probe = mvebu_spi_probe,
#define SPI_TIMEOUT 1000
-static int mpc8xxx_spi_ofdata_to_platdata(struct udevice *dev)
+static int mpc8xxx_spi_of_to_plat(struct udevice *dev)
{
struct mpc8xxx_priv *priv = dev_get_priv(dev);
struct clk clk;
.id = UCLASS_SPI,
.of_match = mpc8xxx_spi_ids,
.ops = &mpc8xxx_spi_ops,
- .ofdata_to_platdata = mpc8xxx_spi_ofdata_to_platdata,
+ .of_to_plat = mpc8xxx_spi_of_to_plat,
.probe = mpc8xxx_spi_probe,
.priv_auto = sizeof(struct mpc8xxx_priv),
};
return 0;
}
-static int mvebu_spi_ofdata_to_platdata(struct udevice *bus)
+static int mvebu_spi_of_to_plat(struct udevice *bus)
{
struct mvebu_spi_platdata *plat = dev_get_plat(bus);
int ret;
.id = UCLASS_SPI,
.of_match = mvebu_spi_ids,
.ops = &mvebu_spi_ops,
- .ofdata_to_platdata = mvebu_spi_ofdata_to_platdata,
+ .of_to_plat = mvebu_spi_of_to_plat,
.plat_auto = sizeof(struct mvebu_spi_platdata),
.probe = mvebu_spi_probe,
.remove = mvebu_spi_remove,
};
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
-static int mxs_ofdata_to_platdata(struct udevice *bus)
+static int mxs_of_to_plat(struct udevice *bus)
{
struct mxs_spi_platdata *plat = bus->plat;
u32 prop[2];
.id = UCLASS_SPI,
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
.of_match = mxs_spi_ids,
- .ofdata_to_platdata = mxs_ofdata_to_platdata,
+ .of_to_plat = mxs_of_to_plat,
#endif
.plat_auto = sizeof(struct mxs_spi_platdata),
.ops = &mxs_spi_ops,
return 0;
}
-static int nxp_fspi_ofdata_to_platdata(struct udevice *bus)
+static int nxp_fspi_of_to_plat(struct udevice *bus)
{
struct nxp_fspi *f = dev_get_priv(bus);
#if CONFIG_IS_ENABLED(CLK)
.id = UCLASS_SPI,
.of_match = nxp_fspi_ids,
.ops = &nxp_fspi_ops,
- .ofdata_to_platdata = nxp_fspi_ofdata_to_platdata,
+ .of_to_plat = nxp_fspi_of_to_plat,
.priv_auto = sizeof(struct nxp_fspi),
.probe = nxp_fspi_probe,
};
.regs_offset = OMAP4_MCSPI_REG_OFFSET,
};
-static int omap3_spi_ofdata_to_platdata(struct udevice *dev)
+static int omap3_spi_of_to_plat(struct udevice *dev)
{
struct omap2_mcspi_platform_config *data =
(struct omap2_mcspi_platform_config *)dev_get_driver_data(dev);
.flags = DM_FLAG_PRE_RELOC,
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
.of_match = omap3_spi_ids,
- .ofdata_to_platdata = omap3_spi_ofdata_to_platdata,
+ .of_to_plat = omap3_spi_of_to_plat,
.plat_auto = sizeof(struct omap3_spi_plat),
#endif
.probe = omap3_spi_probe,
};
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
-static int pl022_spi_ofdata_to_platdata(struct udevice *bus)
+static int pl022_spi_of_to_plat(struct udevice *bus)
{
struct pl022_spi_pdata *plat = bus->plat;
const void *fdt = gd->fdt_blob;
.id = UCLASS_SPI,
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
.of_match = pl022_spi_ids,
- .ofdata_to_platdata = pl022_spi_ofdata_to_platdata,
+ .of_to_plat = pl022_spi_of_to_plat,
#endif
.ops = &pl022_spi_ops,
.plat_auto = sizeof(struct pl022_spi_pdata),
return 0;
}
-static int rpc_spi_ofdata_to_platdata(struct udevice *bus)
+static int rpc_spi_of_to_plat(struct udevice *bus)
{
struct rpc_spi_platdata *plat = dev_get_plat(bus);
.id = UCLASS_SPI,
.of_match = rpc_spi_ids,
.ops = &rpc_spi_ops,
- .ofdata_to_platdata = rpc_spi_ofdata_to_platdata,
+ .of_to_plat = rpc_spi_of_to_plat,
.plat_auto = sizeof(struct rpc_spi_platdata),
.priv_auto = sizeof(struct rpc_spi_priv),
.bind = rpc_spi_bind,
}
#endif
-static int rockchip_spi_ofdata_to_platdata(struct udevice *bus)
+static int rockchip_spi_of_to_plat(struct udevice *bus)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct rockchip_spi_platdata *plat = dev_get_plat(bus);
.id = UCLASS_SPI,
.of_match = rockchip_spi_ids,
.ops = &rockchip_spi_ops,
- .ofdata_to_platdata = rockchip_spi_ofdata_to_platdata,
+ .of_to_plat = rockchip_spi_of_to_plat,
.plat_auto = sizeof(struct rockchip_spi_platdata),
.priv_auto = sizeof(struct rockchip_spi_priv),
.probe = rockchip_spi_probe,
return 0;
}
-static int sh_qspi_ofdata_to_platdata(struct udevice *dev)
+static int sh_qspi_of_to_plat(struct udevice *dev)
{
struct sh_qspi_slave *plat = dev_get_plat(dev);
.id = UCLASS_SPI,
.of_match = sh_qspi_ids,
.ops = &sh_qspi_ops,
- .ofdata_to_platdata = sh_qspi_ofdata_to_platdata,
+ .of_to_plat = sh_qspi_of_to_plat,
.plat_auto = sizeof(struct sh_qspi_slave),
.probe = sh_qspi_probe,
};
.set_mode = soft_spi_set_mode,
};
-static int soft_spi_ofdata_to_platdata(struct udevice *dev)
+static int soft_spi_of_to_plat(struct udevice *dev)
{
struct soft_spi_platdata *plat = dev->plat;
const void *blob = gd->fdt_blob;
.id = UCLASS_SPI,
.of_match = soft_spi_ids,
.ops = &soft_spi_ops,
- .ofdata_to_platdata = soft_spi_ofdata_to_platdata,
+ .of_to_plat = soft_spi_of_to_plat,
.plat_auto = sizeof(struct soft_spi_platdata),
.priv_auto = sizeof(struct soft_spi_priv),
.probe = soft_spi_probe,
return 0;
}
-static int sun4i_spi_ofdata_to_platdata(struct udevice *bus)
+static int sun4i_spi_of_to_plat(struct udevice *bus)
{
struct sun4i_spi_platdata *plat = dev_get_plat(bus);
int node = dev_of_offset(bus);
.id = UCLASS_SPI,
.of_match = sun4i_spi_ids,
.ops = &sun4i_spi_ops,
- .ofdata_to_platdata = sun4i_spi_ofdata_to_platdata,
+ .of_to_plat = sun4i_spi_of_to_plat,
.plat_auto = sizeof(struct sun4i_spi_platdata),
.priv_auto = sizeof(struct sun4i_spi_priv),
.probe = sun4i_spi_probe,
if (!dev_of_valid(dev))
return 0;
- return spi_slave_ofdata_to_platdata(dev, plat);
+ return spi_slave_of_to_plat(dev, plat);
}
#endif
slave->dev = NULL;
}
-int spi_slave_ofdata_to_platdata(struct udevice *dev,
- struct dm_spi_slave_platdata *plat)
+int spi_slave_of_to_plat(struct udevice *dev,
+ struct dm_spi_slave_platdata *plat)
{
int mode = 0;
int value;
int last_transaction_us;
};
-static int tegra114_spi_ofdata_to_platdata(struct udevice *bus)
+static int tegra114_spi_of_to_plat(struct udevice *bus)
{
struct tegra_spi_platdata *plat = bus->plat;
.id = UCLASS_SPI,
.of_match = tegra114_spi_ids,
.ops = &tegra114_spi_ops,
- .ofdata_to_platdata = tegra114_spi_ofdata_to_platdata,
+ .of_to_plat = tegra114_spi_of_to_plat,
.plat_auto = sizeof(struct tegra_spi_platdata),
.priv_auto = sizeof(struct tegra114_spi_priv),
.probe = tegra114_spi_probe,
return 0;
}
-static int tegra20_sflash_ofdata_to_platdata(struct udevice *bus)
+static int tegra20_sflash_of_to_plat(struct udevice *bus)
{
struct tegra_spi_platdata *plat = bus->plat;
const void *blob = gd->fdt_blob;
.id = UCLASS_SPI,
.of_match = tegra20_sflash_ids,
.ops = &tegra20_sflash_ops,
- .ofdata_to_platdata = tegra20_sflash_ofdata_to_platdata,
+ .of_to_plat = tegra20_sflash_of_to_plat,
.plat_auto = sizeof(struct tegra_spi_platdata),
.priv_auto = sizeof(struct tegra20_sflash_priv),
.probe = tegra20_sflash_probe,
struct tegra30_spi_priv *ctrl;
};
-static int tegra30_spi_ofdata_to_platdata(struct udevice *bus)
+static int tegra30_spi_of_to_plat(struct udevice *bus)
{
struct tegra_spi_platdata *plat = bus->plat;
const void *blob = gd->fdt_blob;
.id = UCLASS_SPI,
.of_match = tegra30_spi_ids,
.ops = &tegra30_spi_ops,
- .ofdata_to_platdata = tegra30_spi_ofdata_to_platdata,
+ .of_to_plat = tegra30_spi_of_to_plat,
.plat_auto = sizeof(struct tegra_spi_platdata),
.priv_auto = sizeof(struct tegra30_spi_priv),
.probe = tegra30_spi_probe,
int last_transaction_us;
};
-static int tegra210_qspi_ofdata_to_platdata(struct udevice *bus)
+static int tegra210_qspi_of_to_plat(struct udevice *bus)
{
struct tegra_spi_platdata *plat = bus->plat;
.id = UCLASS_SPI,
.of_match = tegra210_qspi_ids,
.ops = &tegra210_qspi_ops,
- .ofdata_to_platdata = tegra210_qspi_ofdata_to_platdata,
+ .of_to_plat = tegra210_qspi_of_to_plat,
.plat_auto = sizeof(struct tegra_spi_platdata),
.priv_auto = sizeof(struct tegra210_qspi_priv),
.per_child_auto = sizeof(struct spi_slave),
#endif
}
-static int ti_qspi_ofdata_to_platdata(struct udevice *bus)
+static int ti_qspi_of_to_plat(struct udevice *bus)
{
struct ti_qspi_priv *priv = dev_get_priv(bus);
const void *blob = gd->fdt_blob;
.id = UCLASS_SPI,
.of_match = ti_qspi_ids,
.ops = &ti_qspi_ops,
- .ofdata_to_platdata = ti_qspi_ofdata_to_platdata,
+ .of_to_plat = ti_qspi_of_to_plat,
.priv_auto = sizeof(struct ti_qspi_priv),
.probe = ti_qspi_probe,
};
return 0;
}
-static int uniphier_spi_ofdata_to_platdata(struct udevice *bus)
+static int uniphier_spi_of_to_plat(struct udevice *bus)
{
struct uniphier_spi_platdata *plat = bus->plat;
const void *blob = gd->fdt_blob;
.id = UCLASS_SPI,
.of_match = uniphier_spi_ids,
.ops = &uniphier_spi_ops,
- .ofdata_to_platdata = uniphier_spi_ofdata_to_platdata,
+ .of_to_plat = uniphier_spi_of_to_plat,
.plat_auto = sizeof(struct uniphier_spi_platdata),
.priv_auto = sizeof(struct uniphier_spi_priv),
.probe = uniphier_spi_probe,
unsigned cs_change:1;
};
-static int zynq_qspi_ofdata_to_platdata(struct udevice *bus)
+static int zynq_qspi_of_to_plat(struct udevice *bus)
{
struct zynq_qspi_platdata *plat = bus->plat;
const void *blob = gd->fdt_blob;
.id = UCLASS_SPI,
.of_match = zynq_qspi_ids,
.ops = &zynq_qspi_ops,
- .ofdata_to_platdata = zynq_qspi_ofdata_to_platdata,
+ .of_to_plat = zynq_qspi_of_to_plat,
.plat_auto = sizeof(struct zynq_qspi_platdata),
.priv_auto = sizeof(struct zynq_qspi_priv),
.probe = zynq_qspi_probe,
u32 freq; /* required frequency */
};
-static int zynq_spi_ofdata_to_platdata(struct udevice *bus)
+static int zynq_spi_of_to_plat(struct udevice *bus)
{
struct zynq_spi_platdata *plat = bus->plat;
const void *blob = gd->fdt_blob;
.id = UCLASS_SPI,
.of_match = zynq_spi_ids,
.ops = &zynq_spi_ops,
- .ofdata_to_platdata = zynq_spi_ofdata_to_platdata,
+ .of_to_plat = zynq_spi_of_to_plat,
.plat_auto = sizeof(struct zynq_spi_platdata),
.priv_auto = sizeof(struct zynq_spi_priv),
.probe = zynq_spi_probe,
unsigned int cs_change:1;
};
-static int zynqmp_qspi_ofdata_to_platdata(struct udevice *bus)
+static int zynqmp_qspi_of_to_plat(struct udevice *bus)
{
struct zynqmp_qspi_platdata *plat = bus->plat;
.id = UCLASS_SPI,
.of_match = zynqmp_qspi_ids,
.ops = &zynqmp_qspi_ops,
- .ofdata_to_platdata = zynqmp_qspi_ofdata_to_platdata,
+ .of_to_plat = zynqmp_qspi_of_to_plat,
.plat_auto = sizeof(struct zynqmp_qspi_platdata),
.priv_auto = sizeof(struct zynqmp_qspi_priv),
.probe = zynqmp_qspi_probe,
return ERR_PTR(-EINVAL);
}
-static int optee_ofdata_to_platdata(struct udevice *dev)
+static int optee_of_to_plat(struct udevice *dev)
{
struct optee_pdata *pdata = dev_get_plat(dev);
.name = "optee",
.id = UCLASS_TEE,
.of_match = optee_match,
- .ofdata_to_platdata = optee_ofdata_to_platdata,
+ .of_to_plat = optee_of_to_plat,
.probe = optee_probe,
.ops = &optee_ops,
.plat_auto = sizeof(struct optee_pdata),
return 0;
}
-static int imx_sc_thermal_ofdata_to_platdata(struct udevice *dev)
+static int imx_sc_thermal_of_to_plat(struct udevice *dev)
{
struct imx_sc_thermal_plat *pdata = dev_get_plat(dev);
struct fdtdec_phandle_args args;
.of_match = imx_sc_thermal_ids,
.bind = imx_sc_thermal_bind,
.probe = imx_sc_thermal_probe,
- .ofdata_to_platdata = imx_sc_thermal_ofdata_to_platdata,
+ .of_to_plat = imx_sc_thermal_of_to_plat,
.plat_auto = sizeof(struct imx_sc_thermal_plat),
.flags = DM_FLAG_PRE_RELOC,
};
return 0;
}
-static int atftme_timer_ofdata_to_platdata(struct udevice *dev)
+static int atftme_timer_of_to_plat(struct udevice *dev)
{
struct atftmr_timer_platdata *plat = dev_get_plat(dev);
plat->regs = map_physmem(dev_read_addr(dev),
.name = "ag101p_timer",
.id = UCLASS_TIMER,
.of_match = ag101p_timer_ids,
- .ofdata_to_platdata = atftme_timer_ofdata_to_platdata,
+ .of_to_plat = atftme_timer_of_to_plat,
.plat_auto = sizeof(struct atftmr_timer_platdata),
.probe = atftmr_timer_probe,
.ops = &ag101p_timer_ops,
return 0;
}
-static int altera_timer_ofdata_to_platdata(struct udevice *dev)
+static int altera_timer_of_to_plat(struct udevice *dev)
{
struct altera_timer_platdata *plat = dev_get_plat(dev);
.name = "altera_timer",
.id = UCLASS_TIMER,
.of_match = altera_timer_ids,
- .ofdata_to_platdata = altera_timer_ofdata_to_platdata,
+ .of_to_plat = altera_timer_of_to_plat,
.plat_auto = sizeof(struct altera_timer_platdata),
.probe = altera_timer_probe,
.ops = &altera_timer_ops,
return AST_TMC_RELOAD_VAL - readl(&priv->tmc->status);
}
-static int ast_timer_ofdata_to_platdata(struct udevice *dev)
+static int ast_timer_of_to_plat(struct udevice *dev)
{
struct ast_timer_priv *priv = dev_get_priv(dev);
.of_match = ast_timer_ids,
.probe = ast_timer_probe,
.priv_auto = sizeof(struct ast_timer_priv),
- .ofdata_to_platdata = ast_timer_ofdata_to_platdata,
+ .of_to_plat = ast_timer_of_to_plat,
.ops = &ast_timer_ops,
};
return 0;
}
-static int atcpit_timer_ofdata_to_platdata(struct udevice *dev)
+static int atcpit_timer_of_to_plat(struct udevice *dev)
{
struct atcpit_timer_platdata *plat = dev_get_plat(dev);
plat->regs = map_physmem(dev_read_addr(dev), 0x100 , MAP_NOCACHE);
.name = "atcpit100_timer",
.id = UCLASS_TIMER,
.of_match = atcpit_timer_ids,
- .ofdata_to_platdata = atcpit_timer_ofdata_to_platdata,
+ .of_to_plat = atcpit_timer_of_to_plat,
.plat_auto = sizeof(struct atcpit_timer_platdata),
.probe = atcpit_timer_probe,
.ops = &atcpit_timer_ops,
return 0;
}
-static int atmel_pit_ofdata_to_platdata(struct udevice *dev)
+static int atmel_pit_of_to_plat(struct udevice *dev)
{
struct atmel_pit_platdata *plat = dev_get_plat(dev);
.name = "atmel_pit",
.id = UCLASS_TIMER,
.of_match = atmel_pit_ids,
- .ofdata_to_platdata = atmel_pit_ofdata_to_platdata,
+ .of_to_plat = atmel_pit_of_to_plat,
.plat_auto = sizeof(struct atmel_pit_platdata),
.probe = atmel_pit_probe,
.ops = &atmel_pit_ops,
return 0;
}
-static int cadence_ttc_ofdata_to_platdata(struct udevice *dev)
+static int cadence_ttc_of_to_plat(struct udevice *dev)
{
struct cadence_ttc_priv *priv = dev_get_priv(dev);
.name = "cadence_ttc",
.id = UCLASS_TIMER,
.of_match = cadence_ttc_ids,
- .ofdata_to_platdata = cadence_ttc_ofdata_to_platdata,
+ .of_to_plat = cadence_ttc_of_to_plat,
.priv_auto = sizeof(struct cadence_ttc_priv),
.probe = cadence_ttc_probe,
.ops = &cadence_ttc_ops,
return 0;
}
-static int dw_apb_timer_ofdata_to_platdata(struct udevice *dev)
+static int dw_apb_timer_of_to_plat(struct udevice *dev)
{
struct dw_apb_timer_priv *priv = dev_get_priv(dev);
.ops = &dw_apb_timer_ops,
.probe = dw_apb_timer_probe,
.of_match = dw_apb_timer_ids,
- .ofdata_to_platdata = dw_apb_timer_ofdata_to_platdata,
+ .of_to_plat = dw_apb_timer_of_to_plat,
.remove = dw_apb_timer_remove,
.priv_auto = sizeof(struct dw_apb_timer_priv),
};
return 0;
}
-static int omap_timer_ofdata_to_platdata(struct udevice *dev)
+static int omap_timer_of_to_plat(struct udevice *dev)
{
struct omap_timer_priv *priv = dev_get_priv(dev);
.name = "omap_timer",
.id = UCLASS_TIMER,
.of_match = omap_timer_ids,
- .ofdata_to_platdata = omap_timer_ofdata_to_platdata,
+ .of_to_plat = omap_timer_of_to_plat,
.priv_auto = sizeof(struct omap_timer_priv),
.probe = omap_timer_probe,
.ops = &omap_timer_ops,
return 0;
}
-static int ostm_ofdata_to_platdata(struct udevice *dev)
+static int ostm_of_to_plat(struct udevice *dev)
{
struct ostm_priv *priv = dev_get_priv(dev);
.ops = &ostm_ops,
.probe = ostm_probe,
.of_match = ostm_ids,
- .ofdata_to_platdata = ostm_ofdata_to_platdata,
+ .of_to_plat = ostm_of_to_plat,
.priv_auto = sizeof(struct ostm_priv),
};
return ~0ull - cntr;
}
-static int rockchip_clk_ofdata_to_platdata(struct udevice *dev)
+static int rockchip_clk_of_to_plat(struct udevice *dev)
{
#if !CONFIG_IS_ENABLED(OF_PLATDATA)
struct rockchip_timer_priv *priv = dev_get_priv(dev);
#if CONFIG_IS_ENABLED(OF_PLATDATA)
.plat_auto = sizeof(struct rockchip_timer_plat),
#endif
- .ofdata_to_platdata = rockchip_clk_ofdata_to_platdata,
+ .of_to_plat = rockchip_clk_of_to_plat,
};
LONG_TIMEOUT_MS = 2000,
};
-static int cr50_i2c_ofdata_to_platdata(struct udevice *dev)
+static int cr50_i2c_of_to_plat(struct udevice *dev)
{
struct tpm_chip_priv *upriv = dev_get_uclass_priv(dev);
struct cr50_priv *priv = dev_get_priv(dev);
.id = UCLASS_TPM,
.of_match = cr50_i2c_ids,
.ops = &cr50_i2c_ops,
- .ofdata_to_platdata = cr50_i2c_ofdata_to_platdata,
+ .of_to_plat = cr50_i2c_of_to_plat,
.probe = cr50_i2c_probe,
.remove = cr50_i2c_cleanup,
.priv_auto = sizeof(struct cr50_priv),
return 0;
}
-static int dwc3_generic_ofdata_to_platdata(struct udevice *dev)
+static int dwc3_generic_of_to_plat(struct udevice *dev)
{
struct dwc3_generic_plat *plat = dev_get_plat(dev);
ofnode node = dev->node;
U_BOOT_DRIVER(dwc3_generic_peripheral) = {
.name = "dwc3-generic-peripheral",
.id = UCLASS_USB_GADGET_GENERIC,
- .ofdata_to_platdata = dwc3_generic_ofdata_to_platdata,
+ .of_to_plat = dwc3_generic_of_to_plat,
.probe = dwc3_generic_peripheral_probe,
.remove = dwc3_generic_peripheral_remove,
.priv_auto = sizeof(struct dwc3_generic_priv),
U_BOOT_DRIVER(dwc3_generic_host) = {
.name = "dwc3-generic-host",
.id = UCLASS_USB,
- .ofdata_to_platdata = dwc3_generic_ofdata_to_platdata,
+ .of_to_plat = dwc3_generic_of_to_plat,
.probe = dwc3_generic_host_probe,
.remove = dwc3_generic_host_remove,
.priv_auto = sizeof(struct dwc3_generic_host_priv),
return 0;
}
-static int sandbox_flash_ofdata_to_platdata(struct udevice *dev)
+static int sandbox_flash_of_to_plat(struct udevice *dev)
{
struct sandbox_flash_plat *plat = dev_get_plat(dev);
.of_match = sandbox_usb_flash_ids,
.bind = sandbox_flash_bind,
.probe = sandbox_flash_probe,
- .ofdata_to_platdata = sandbox_flash_ofdata_to_platdata,
+ .of_to_plat = sandbox_flash_of_to_plat,
.ops = &sandbox_usb_flash_ops,
.priv_auto = sizeof(struct sandbox_flash_priv),
.plat_auto = sizeof(struct sandbox_flash_plat),
generic_phy_exit_bulk(phys);
}
-static int dwc2_udc_otg_ofdata_to_platdata(struct udevice *dev)
+static int dwc2_udc_otg_of_to_plat(struct udevice *dev)
{
struct dwc2_plat_otg_data *plat = dev_get_plat(dev);
ulong drvdata;
.name = "dwc2-udc-otg",
.id = UCLASS_USB_GADGET_GENERIC,
.of_match = dwc2_udc_otg_ids,
- .ofdata_to_platdata = dwc2_udc_otg_ofdata_to_platdata,
+ .of_to_plat = dwc2_udc_otg_of_to_plat,
.probe = dwc2_udc_otg_probe,
.remove = dwc2_udc_otg_remove,
.plat_auto = sizeof(struct dwc2_plat_otg_data),
nonblock);
}
-static int dwc2_usb_ofdata_to_platdata(struct udevice *dev)
+static int dwc2_usb_of_to_plat(struct udevice *dev)
{
struct dwc2_priv *priv = dev_get_priv(dev);
.name = "dwc2_usb",
.id = UCLASS_USB,
.of_match = dwc2_usb_ids,
- .ofdata_to_platdata = dwc2_usb_ofdata_to_platdata,
+ .of_to_plat = dwc2_usb_of_to_plat,
.probe = dwc2_usb_probe,
.remove = dwc2_usb_remove,
.ops = &dwc2_usb_ops,
setbits_le32(plat->glue_base + CLKRST_CTRL, SW_PIPEW_RESET_N);
}
-static int sti_dwc3_glue_ofdata_to_platdata(struct udevice *dev)
+static int sti_dwc3_glue_of_to_plat(struct udevice *dev)
{
struct sti_dwc3_glue_platdata *plat = dev_get_plat(dev);
struct udevice *syscon;
.name = "dwc3_sti_glue",
.id = UCLASS_NOP,
.of_match = sti_dwc3_glue_ids,
- .ofdata_to_platdata = sti_dwc3_glue_ofdata_to_platdata,
+ .of_to_plat = sti_dwc3_glue_of_to_plat,
.probe = sti_dwc3_glue_probe,
.remove = sti_dwc3_glue_remove,
.bind = sti_dwc3_glue_bind,
struct ehci_hccr *hcd;
};
-static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
+static int ehci_usb_of_to_plat(struct udevice *dev)
{
struct exynos_ehci_platdata *plat = dev_get_plat(dev);
const void *blob = gd->fdt_blob;
.name = "ehci_exynos",
.id = UCLASS_USB,
.of_match = ehci_usb_ids,
- .ofdata_to_platdata = ehci_usb_ofdata_to_platdata,
+ .of_to_plat = ehci_usb_of_to_plat,
.probe = ehci_usb_probe,
.remove = ehci_usb_remove,
.ops = &ehci_usb_ops,
}
#if CONFIG_IS_ENABLED(DM_USB)
-static int ehci_fsl_ofdata_to_platdata(struct udevice *dev)
+static int ehci_fsl_of_to_plat(struct udevice *dev)
{
struct ehci_fsl_priv *priv = dev_get_priv(dev);
const void *prop;
.name = "ehci_fsl",
.id = UCLASS_USB,
.of_match = ehci_usb_ids,
- .ofdata_to_platdata = ehci_fsl_ofdata_to_platdata,
+ .of_to_plat = ehci_fsl_of_to_plat,
.probe = ehci_fsl_probe,
.remove = ehci_deregister,
.ops = &ehci_usb_ops,
return 0;
}
-static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
+static int ehci_usb_of_to_plat(struct udevice *dev)
{
struct msm_ehci_priv *priv = dev_get_priv(dev);
.name = "ehci_msm",
.id = UCLASS_USB,
.of_match = ehci_usb_ids,
- .ofdata_to_platdata = ehci_usb_ofdata_to_platdata,
+ .of_to_plat = ehci_usb_of_to_plat,
.probe = ehci_usb_probe,
.remove = ehci_usb_remove,
.ops = &ehci_usb_ops,
.powerup_fixup = mx5_ehci_powerup_fixup,
};
-static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
+static int ehci_usb_of_to_plat(struct udevice *dev)
{
struct usb_platdata *plat = dev_get_plat(dev);
const char *mode;
.name = "ehci_mx5",
.id = UCLASS_USB,
.of_match = mx5_usb_ids,
- .ofdata_to_platdata = ehci_usb_ofdata_to_platdata,
+ .of_to_plat = ehci_usb_of_to_plat,
.probe = ehci_usb_probe,
.remove = ehci_deregister,
.ops = &ehci_usb_ops,
return 0;
}
-static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
+static int ehci_usb_of_to_plat(struct udevice *dev)
{
struct usb_platdata *plat = dev_get_plat(dev);
enum usb_dr_mode dr_mode;
.name = "ehci_mx6",
.id = UCLASS_USB,
.of_match = mx6_usb_ids,
- .ofdata_to_platdata = ehci_usb_ofdata_to_platdata,
+ .of_to_plat = ehci_usb_of_to_plat,
.bind = ehci_usb_bind,
.probe = ehci_usb_probe,
.remove = ehci_deregister,
int nports;
};
-static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
+static int ehci_usb_of_to_plat(struct udevice *dev)
{
struct usb_platdata *plat = dev_get_plat(dev);
.id = UCLASS_USB,
.of_match = omap_ehci_dt_ids,
.probe = omap_ehci_probe,
- .ofdata_to_platdata = ehci_usb_ofdata_to_platdata,
+ .of_to_plat = ehci_usb_of_to_plat,
.plat_auto = sizeof(struct usb_platdata),
.priv_auto = sizeof(struct ehci_omap_priv_data),
.remove = ehci_deregister,
.powerup_fixup = tegra_ehci_powerup_fixup,
};
-static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
+static int ehci_usb_of_to_plat(struct udevice *dev)
{
struct fdt_usb *priv = dev_get_priv(dev);
int ret;
.name = "ehci_tegra",
.id = UCLASS_USB,
.of_match = ehci_usb_ids,
- .ofdata_to_platdata = ehci_usb_ofdata_to_platdata,
+ .of_to_plat = ehci_usb_of_to_plat,
.probe = ehci_usb_probe,
.remove = ehci_deregister,
.ops = &ehci_usb_ops,
u32 portnr;
};
-static int vf_usb_ofdata_to_platdata(struct udevice *dev)
+static int vf_usb_of_to_plat(struct udevice *dev)
{
struct ehci_vf_priv_data *priv = dev_get_priv(dev);
const void *dt_blob = gd->fdt_blob;
.probe = ehci_usb_probe,
.remove = ehci_deregister,
.ops = &ehci_usb_ops,
- .ofdata_to_platdata = vf_usb_ofdata_to_platdata,
+ .of_to_plat = vf_usb_of_to_plat,
.plat_auto = sizeof(struct usb_platdata),
.priv_auto = sizeof(struct ehci_vf_priv_data),
.flags = DM_FLAG_ALLOC_PRIV_DMA,
struct usb_ehci *ehci;
};
-static int ehci_zynq_ofdata_to_platdata(struct udevice *dev)
+static int ehci_zynq_of_to_plat(struct udevice *dev)
{
struct zynq_ehci_priv *priv = dev_get_priv(dev);
.name = "ehci_zynq",
.id = UCLASS_USB,
.of_match = ehci_zynq_ids,
- .ofdata_to_platdata = ehci_zynq_ofdata_to_platdata,
+ .of_to_plat = ehci_zynq_of_to_plat,
.probe = ehci_zynq_probe,
.remove = ehci_deregister,
.ops = &ehci_usb_ops,
return ret;
}
-static int r8a66597_usb_ofdata_to_platdata(struct udevice *dev)
+static int r8a66597_usb_of_to_plat(struct udevice *dev)
{
struct r8a66597 *priv = dev_get_priv(dev);
fdt_addr_t addr;
.name = "r8a66597_usb",
.id = UCLASS_USB,
.of_match = r8a66597_usb_ids,
- .ofdata_to_platdata = r8a66597_usb_ofdata_to_platdata,
+ .of_to_plat = r8a66597_usb_of_to_plat,
.probe = r8a66597_usb_probe,
.remove = r8a66597_usb_remove,
.ops = &r8a66597_usb_ops,
struct dwc3 *dwc3_reg;
};
-static int xhci_usb_ofdata_to_platdata(struct udevice *dev)
+static int xhci_usb_of_to_plat(struct udevice *dev)
{
struct exynos_xhci_platdata *plat = dev_get_plat(dev);
const void *blob = gd->fdt_blob;
.name = "xhci_exynos",
.id = UCLASS_USB,
.of_match = xhci_usb_ids,
- .ofdata_to_platdata = xhci_usb_ofdata_to_platdata,
+ .of_to_plat = xhci_usb_of_to_plat,
.probe = xhci_usb_probe,
.remove = xhci_usb_remove,
.ops = &xhci_usb_ops,
return xhci_register(dev, ctx->hcd, hcor);
}
-static int xhci_usb_ofdata_to_platdata(struct udevice *dev)
+static int xhci_usb_of_to_plat(struct udevice *dev)
{
struct mvebu_xhci_platdata *plat = dev_get_plat(dev);
.name = "xhci_mvebu",
.id = UCLASS_USB,
.of_match = xhci_usb_ids,
- .ofdata_to_platdata = xhci_usb_ofdata_to_platdata,
+ .of_to_plat = xhci_usb_of_to_plat,
.probe = xhci_usb_probe,
.remove = xhci_deregister,
.ops = &xhci_usb_ops,
return ret;
}
-static int xhci_rcar_ofdata_to_platdata(struct udevice *dev)
+static int xhci_rcar_of_to_plat(struct udevice *dev)
{
struct rcar_xhci_platdata *plat = dev_get_plat(dev);
.remove = xhci_rcar_deregister,
.ops = &xhci_usb_ops,
.of_match = xhci_rcar_ids,
- .ofdata_to_platdata = xhci_rcar_ofdata_to_platdata,
+ .of_to_plat = xhci_rcar_of_to_plat,
.plat_auto = sizeof(struct rcar_xhci_platdata),
.priv_auto = sizeof(struct rcar_xhci),
.flags = DM_FLAG_ALLOC_PRIV_DMA,
struct phy phy;
};
-static int da8xx_musb_ofdata_to_platdata(struct udevice *dev)
+static int da8xx_musb_of_to_plat(struct udevice *dev)
{
struct da8xx_musb_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
.name = "da8xx-musb",
.id = UCLASS_USB,
.of_match = da8xx_musb_ids,
- .ofdata_to_platdata = da8xx_musb_ofdata_to_platdata,
+ .of_to_plat = da8xx_musb_of_to_plat,
.probe = da8xx_musb_probe,
.remove = da8xx_musb_remove,
.ops = &musb_usb_ops,
struct omap_musb_board_data otg_board_data;
};
-static int omap2430_musb_ofdata_to_platdata(struct udevice *dev)
+static int omap2430_musb_of_to_plat(struct udevice *dev)
{
struct omap2430_musb_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
.id = UCLASS_USB_GADGET_GENERIC,
#endif
.of_match = omap2430_musb_ids,
- .ofdata_to_platdata = omap2430_musb_ofdata_to_platdata,
+ .of_to_plat = omap2430_musb_of_to_plat,
.probe = omap2430_musb_probe,
.remove = omap2430_musb_remove,
#ifdef CONFIG_USB_MUSB_HOST
return -ENOENT;
}
-static int ti_musb_ofdata_to_platdata(struct udevice *dev)
+static int ti_musb_of_to_plat(struct udevice *dev)
{
struct ti_musb_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
}
#if CONFIG_IS_ENABLED(OF_CONTROL)
-static int ti_musb_host_ofdata_to_platdata(struct udevice *dev)
+static int ti_musb_host_of_to_plat(struct udevice *dev)
{
struct ti_musb_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
int node = dev_of_offset(dev);
int ret;
- ret = ti_musb_ofdata_to_platdata(dev);
+ ret = ti_musb_of_to_plat(dev);
if (ret) {
pr_err("plat dt parse error\n");
return ret;
.name = "ti-musb-host",
.id = UCLASS_USB,
#if CONFIG_IS_ENABLED(OF_CONTROL)
- .ofdata_to_platdata = ti_musb_host_ofdata_to_platdata,
+ .of_to_plat = ti_musb_host_of_to_plat,
#endif
.probe = ti_musb_host_probe,
.remove = ti_musb_host_remove,
};
#if CONFIG_IS_ENABLED(OF_CONTROL)
-static int ti_musb_peripheral_ofdata_to_platdata(struct udevice *dev)
+static int ti_musb_peripheral_of_to_plat(struct udevice *dev)
{
struct ti_musb_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
int node = dev_of_offset(dev);
int ret;
- ret = ti_musb_ofdata_to_platdata(dev);
+ ret = ti_musb_of_to_plat(dev);
if (ret) {
pr_err("plat dt parse error\n");
return ret;
.name = "ti-musb-peripheral",
.id = UCLASS_USB_GADGET_GENERIC,
#if CONFIG_IS_ENABLED(OF_CONTROL)
- .ofdata_to_platdata = ti_musb_peripheral_ofdata_to_platdata,
+ .of_to_plat = ti_musb_peripheral_of_to_plat,
#endif
.probe = ti_musb_peripheral_probe,
.remove = ti_musb_peripheral_remove,
return 0;
}
-static int am335x_fb_ofdata_to_platdata(struct udevice *dev)
+static int am335x_fb_of_to_plat(struct udevice *dev)
{
struct am335x_fb_priv *priv = dev_get_priv(dev);
struct tilcdc_panel_info *panel = &priv->panel;
.id = UCLASS_VIDEO,
.of_match = am335x_fb_ids,
.bind = am335x_fb_bind,
- .ofdata_to_platdata = am335x_fb_ofdata_to_platdata,
+ .of_to_plat = am335x_fb_of_to_plat,
.probe = am335x_fb_probe,
.remove = am335x_fb_remove,
.priv_auto = sizeof(struct am335x_fb_priv),
return 0;
}
-static int atmel_hlcdc_ofdata_to_platdata(struct udevice *dev)
+static int atmel_hlcdc_of_to_plat(struct udevice *dev)
{
struct atmel_hlcdc_priv *priv = dev_get_priv(dev);
const void *blob = gd->fdt_blob;
.of_match = atmel_hlcdc_ids,
.bind = atmel_hlcdc_bind,
.probe = atmel_hlcdc_probe,
- .ofdata_to_platdata = atmel_hlcdc_ofdata_to_platdata,
+ .of_to_plat = atmel_hlcdc_of_to_plat,
.priv_auto = sizeof(struct atmel_hlcdc_priv),
};
return 0;
}
-static int atmel_fb_ofdata_to_platdata(struct udevice *dev)
+static int atmel_fb_of_to_plat(struct udevice *dev)
{
struct atmel_lcd_platdata *plat = dev_get_plat(dev);
struct atmel_fb_priv *priv = dev_get_priv(dev);
.id = UCLASS_VIDEO,
.of_match = atmel_fb_lcd_ids,
.bind = atmel_fb_lcd_bind,
- .ofdata_to_platdata = atmel_fb_ofdata_to_platdata,
+ .of_to_plat = atmel_fb_of_to_plat,
.probe = atmel_fb_lcd_probe,
.plat_auto = sizeof(struct atmel_lcd_platdata),
.priv_auto = sizeof(struct atmel_fb_priv),
return 0;
}
-static int gpio_backlight_ofdata_to_platdata(struct udevice *dev)
+static int gpio_backlight_of_to_plat(struct udevice *dev)
{
struct gpio_backlight_priv *priv = dev_get_priv(dev);
int ret;
.id = UCLASS_PANEL_BACKLIGHT,
.of_match = gpio_backlight_ids,
.ops = &gpio_backlight_ops,
- .ofdata_to_platdata = gpio_backlight_ofdata_to_platdata,
+ .of_to_plat = gpio_backlight_of_to_plat,
.probe = gpio_backlight_probe,
.priv_auto = sizeof(struct gpio_backlight_priv),
};
return 0;
}
-static int broadwell_igd_ofdata_to_platdata(struct udevice *dev)
+static int broadwell_igd_of_to_plat(struct udevice *dev)
{
struct broadwell_igd_plat *plat = dev_get_plat(dev);
struct broadwell_igd_priv *priv = dev_get_priv(dev);
.id = UCLASS_VIDEO,
.of_match = broadwell_igd_ids,
.ops = &broadwell_igd_ops,
- .ofdata_to_platdata = broadwell_igd_ofdata_to_platdata,
+ .of_to_plat = broadwell_igd_of_to_plat,
.bind = broadwell_igd_bind,
.probe = broadwell_igd_probe,
.priv_auto = sizeof(struct broadwell_igd_priv),
return ret;
}
-static int exynos_dp_ofdata_to_platdata(struct udevice *dev)
+static int exynos_dp_of_to_plat(struct udevice *dev)
{
struct exynos_dp_priv *priv = dev_get_priv(dev);
const void *blob = gd->fdt_blob;
.id = UCLASS_DISPLAY,
.of_match = exynos_dp_ids,
.ops = &exynos_dp_ops,
- .ofdata_to_platdata = exynos_dp_ofdata_to_platdata,
+ .of_to_plat = exynos_dp_of_to_plat,
.priv_auto = sizeof(struct exynos_dp_priv),
};
return priv->vl_col * priv->vl_row * (VNBITS(priv->vl_bpix) / 8);
}
-int exynos_fb_ofdata_to_platdata(struct udevice *dev)
+int exynos_fb_of_to_plat(struct udevice *dev)
{
struct exynos_fb_priv *priv = dev_get_priv(dev);
unsigned int node = dev_of_offset(dev);
.ops = &exynos_fb_ops,
.bind = exynos_fb_bind,
.probe = exynos_fb_probe,
- .ofdata_to_platdata = exynos_fb_ofdata_to_platdata,
+ .of_to_plat = exynos_fb_of_to_plat,
.priv_auto = sizeof(struct exynos_fb_priv),
};
.enable = lg4573_lcd_enable,
};
-static int lg4573_ofdata_to_platdata(struct udevice *dev)
+static int lg4573_of_to_plat(struct udevice *dev)
{
struct lg4573_lcd_priv *priv = dev_get_priv(dev);
int ret;
.name = "lg4573",
.id = UCLASS_DISPLAY,
.ops = &lg4573_lcd_ops,
- .ofdata_to_platdata = lg4573_ofdata_to_platdata,
+ .of_to_plat = lg4573_of_to_plat,
.of_match = lg4573_ids,
.bind = lg4573_bind,
.probe = lg4573_probe,
return 0;
}
-static int otm8009a_panel_ofdata_to_platdata(struct udevice *dev)
+static int otm8009a_panel_of_to_plat(struct udevice *dev)
{
struct otm8009a_panel_priv *priv = dev_get_priv(dev);
int ret;
.id = UCLASS_PANEL,
.of_match = otm8009a_panel_ids,
.ops = &otm8009a_panel_ops,
- .ofdata_to_platdata = otm8009a_panel_ofdata_to_platdata,
+ .of_to_plat = otm8009a_panel_of_to_plat,
.probe = otm8009a_panel_probe,
.plat_auto = sizeof(struct mipi_dsi_panel_plat),
.priv_auto = sizeof(struct otm8009a_panel_priv),
return 0;
}
-static int pwm_backlight_ofdata_to_platdata(struct udevice *dev)
+static int pwm_backlight_of_to_plat(struct udevice *dev)
{
struct pwm_backlight_priv *priv = dev_get_priv(dev);
struct ofnode_phandle_args args;
.id = UCLASS_PANEL_BACKLIGHT,
.of_match = pwm_backlight_ids,
.ops = &pwm_backlight_ops,
- .ofdata_to_platdata = pwm_backlight_ofdata_to_platdata,
+ .of_to_plat = pwm_backlight_of_to_plat,
.probe = pwm_backlight_probe,
.priv_auto = sizeof(struct pwm_backlight_priv),
};
return 0;
}
-static int rm68200_panel_ofdata_to_platdata(struct udevice *dev)
+static int rm68200_panel_of_to_plat(struct udevice *dev)
{
struct rm68200_panel_priv *priv = dev_get_priv(dev);
int ret;
.id = UCLASS_PANEL,
.of_match = rm68200_panel_ids,
.ops = &rm68200_panel_ops,
- .ofdata_to_platdata = rm68200_panel_ofdata_to_platdata,
+ .of_to_plat = rm68200_panel_of_to_plat,
.probe = rm68200_panel_probe,
.plat_auto = sizeof(struct mipi_dsi_panel_plat),
.priv_auto = sizeof(struct rm68200_panel_priv),
return dw_hdmi_enable(&priv->hdmi, edid);
}
-static int rk3288_hdmi_ofdata_to_platdata(struct udevice *dev)
+static int rk3288_hdmi_of_to_plat(struct udevice *dev)
{
struct rk_hdmi_priv *priv = dev_get_priv(dev);
struct dw_hdmi *hdmi = &priv->hdmi;
hdmi->i2c_clk_high = 0x0d;
hdmi->i2c_clk_low = 0x0d;
- return rk_hdmi_ofdata_to_platdata(dev);
+ return rk_hdmi_of_to_plat(dev);
}
static int rk3288_clk_config(struct udevice *dev)
.id = UCLASS_DISPLAY,
.of_match = rk3288_hdmi_ids,
.ops = &rk3288_hdmi_ops,
- .ofdata_to_platdata = rk3288_hdmi_ofdata_to_platdata,
+ .of_to_plat = rk3288_hdmi_of_to_plat,
.probe = rk3288_hdmi_probe,
.priv_auto = sizeof(struct rk_hdmi_priv),
};
return 0;
}
-static int rk_mipi_ofdata_to_platdata(struct udevice *dev)
+static int rk_mipi_of_to_plat(struct udevice *dev)
{
struct rk_mipi_priv *priv = dev_get_priv(dev);
.name = "rk_mipi_dsi",
.id = UCLASS_DISPLAY,
.of_match = rk_mipi_dsi_ids,
- .ofdata_to_platdata = rk_mipi_ofdata_to_platdata,
+ .of_to_plat = rk_mipi_of_to_plat,
.probe = rk_mipi_probe,
.ops = &rk_mipi_dsi_ops,
.priv_auto = sizeof(struct rk_mipi_priv),
return dw_hdmi_enable(&priv->hdmi, edid);
}
-static int rk3399_hdmi_ofdata_to_platdata(struct udevice *dev)
+static int rk3399_hdmi_of_to_plat(struct udevice *dev)
{
struct rk_hdmi_priv *priv = dev_get_priv(dev);
struct dw_hdmi *hdmi = &priv->hdmi;
hdmi->i2c_clk_high = 0x7a;
hdmi->i2c_clk_low = 0x8d;
- return rk_hdmi_ofdata_to_platdata(dev);
+ return rk_hdmi_of_to_plat(dev);
}
static const char * const rk3399_regulator_names[] = {
.id = UCLASS_DISPLAY,
.of_match = rk3399_hdmi_ids,
.ops = &rk3399_hdmi_ops,
- .ofdata_to_platdata = rk3399_hdmi_ofdata_to_platdata,
+ .of_to_plat = rk3399_hdmi_of_to_plat,
.probe = rk3399_hdmi_probe,
.priv_auto = sizeof(struct rk_hdmi_priv),
};
return 0;
}
-static int rk_mipi_ofdata_to_platdata(struct udevice *dev)
+static int rk_mipi_of_to_plat(struct udevice *dev)
{
struct rk_mipi_priv *priv = dev_get_priv(dev);
.name = "rk_mipi_dsi",
.id = UCLASS_DISPLAY,
.of_match = rk_mipi_dsi_ids,
- .ofdata_to_platdata = rk_mipi_ofdata_to_platdata,
+ .of_to_plat = rk_mipi_of_to_plat,
.probe = rk_mipi_probe,
.ops = &rk_mipi_dsi_ops,
.priv_auto = sizeof(struct rk_mipi_priv),
return edid_size;
}
-static int rk_edp_ofdata_to_platdata(struct udevice *dev)
+static int rk_edp_of_to_plat(struct udevice *dev)
{
struct rk_edp_priv *priv = dev_get_priv(dev);
.id = UCLASS_DISPLAY,
.of_match = rockchip_dp_ids,
.ops = &dp_rockchip_ops,
- .ofdata_to_platdata = rk_edp_ofdata_to_platdata,
+ .of_to_plat = rk_edp_of_to_plat,
.probe = rk_edp_probe,
.remove = rk_edp_remove,
.priv_auto = sizeof(struct rk_edp_priv),
return dw_hdmi_read_edid(&priv->hdmi, buf, buf_size);
}
-int rk_hdmi_ofdata_to_platdata(struct udevice *dev)
+int rk_hdmi_of_to_plat(struct udevice *dev)
{
struct rk_hdmi_priv *priv = dev_get_priv(dev);
struct dw_hdmi *hdmi = &priv->hdmi;
void rk_hdmi_probe_regulators(struct udevice *dev,
const char * const *names, int cnt);
/**
- * rk_hdmi_ofdata_to_platdata() - common ofdata_to_platdata implementation
+ * rk_hdmi_of_to_plat() - common of_to_plat implementation
*
* @dev: device
* @return 0 if OK, -ve if something went wrong
*/
-int rk_hdmi_ofdata_to_platdata(struct udevice *dev);
+int rk_hdmi_of_to_plat(struct udevice *dev);
/**
* rk_hdmi_probe() - common probe implementation
return 0;
}
-static int rk_lvds_ofdata_to_platdata(struct udevice *dev)
+static int rk_lvds_of_to_plat(struct udevice *dev)
{
struct rk_lvds_priv *priv = dev_get_priv(dev);
int ret;
.id = UCLASS_DISPLAY,
.of_match = rockchip_lvds_ids,
.ops = &lvds_rockchip_ops,
- .ofdata_to_platdata = rk_lvds_ofdata_to_platdata,
+ .of_to_plat = rk_lvds_of_to_plat,
.probe = rk_lvds_probe,
.priv_auto = sizeof(struct rk_lvds_priv),
};
return 0;
}
-static int simple_panel_ofdata_to_platdata(struct udevice *dev)
+static int simple_panel_of_to_plat(struct udevice *dev)
{
struct simple_panel_priv *priv = dev_get_priv(dev);
int ret;
.id = UCLASS_PANEL,
.of_match = simple_panel_ids,
.ops = &simple_panel_ops,
- .ofdata_to_platdata = simple_panel_ofdata_to_platdata,
+ .of_to_plat = simple_panel_of_to_plat,
.probe = simple_panel_probe,
.priv_auto = sizeof(struct simple_panel_priv),
};
return 0;
}
-static int tegra_lcd_ofdata_to_platdata(struct udevice *dev)
+static int tegra_lcd_of_to_plat(struct udevice *dev)
{
struct tegra_lcd_priv *priv = dev_get_priv(dev);
const void *blob = gd->fdt_blob;
.ops = &tegra_lcd_ops,
.bind = tegra_lcd_bind,
.probe = tegra_lcd_probe,
- .ofdata_to_platdata = tegra_lcd_ofdata_to_platdata,
+ .of_to_plat = tegra_lcd_of_to_plat,
.priv_auto = sizeof(struct tegra_lcd_priv),
};
return 0;
}
-static int tegra_dp_ofdata_to_platdata(struct udevice *dev)
+static int tegra_dp_of_to_plat(struct udevice *dev)
{
struct tegra_dp_plat *plat = dev_get_plat(dev);
.name = "dpaux_tegra",
.id = UCLASS_DISPLAY,
.of_match = tegra_dp_ids,
- .ofdata_to_platdata = tegra_dp_ofdata_to_platdata,
+ .of_to_plat = tegra_dp_of_to_plat,
.probe = dp_tegra_probe,
.ops = &dp_tegra_ops,
.priv_auto = sizeof(struct tegra_dp_priv),
return 0;
}
-static int tegra_sor_ofdata_to_platdata(struct udevice *dev)
+static int tegra_sor_of_to_plat(struct udevice *dev)
{
struct tegra_dc_sor_data *priv = dev_get_priv(dev);
int ret;
.name = "sor_tegra",
.id = UCLASS_VIDEO_BRIDGE,
.of_match = tegra_sor_ids,
- .ofdata_to_platdata = tegra_sor_ofdata_to_platdata,
+ .of_to_plat = tegra_sor_of_to_plat,
.ops = &tegra_sor_ops,
.priv_auto = sizeof(struct tegra_dc_sor_data),
};
return 0;
}
-static int virtio_mmio_ofdata_to_platdata(struct udevice *udev)
+static int virtio_mmio_of_to_plat(struct udevice *udev)
{
struct virtio_mmio_priv *priv = dev_get_priv(udev);
.of_match = virtio_mmio_ids,
.ops = &virtio_mmio_ops,
.probe = virtio_mmio_probe,
- .ofdata_to_platdata = virtio_mmio_ofdata_to_platdata,
+ .of_to_plat = virtio_mmio_of_to_plat,
.priv_auto = sizeof(struct virtio_mmio_priv),
};
return retval;
}
-static int mxc_w1_ofdata_to_platdata(struct udevice *dev)
+static int mxc_w1_of_to_plat(struct udevice *dev)
{
struct mxc_w1_pdata *pdata = dev_get_plat(dev);
fdt_addr_t addr;
.id = UCLASS_W1,
.name = "mxc_w1_drv",
.of_match = mxc_w1_id,
- .ofdata_to_platdata = mxc_w1_ofdata_to_platdata,
+ .of_to_plat = mxc_w1_of_to_plat,
.ops = &mxc_w1_ops,
.plat_auto = sizeof(struct mxc_w1_pdata),
.probe = mxc_w1_probe,
.write_byte = w1_gpio_write_byte,
};
-static int w1_gpio_ofdata_to_platdata(struct udevice *dev)
+static int w1_gpio_of_to_plat(struct udevice *dev)
{
struct w1_gpio_pdata *pdata = dev_get_plat(dev);
int ret;
.id = UCLASS_W1,
.name = "w1_gpio_drv",
.of_match = w1_gpio_id,
- .ofdata_to_platdata = w1_gpio_ofdata_to_platdata,
+ .of_to_plat = w1_gpio_of_to_plat,
.ops = &w1_gpio_ops,
.plat_auto = sizeof(struct w1_gpio_pdata),
};
return ast_wdt_stop(dev);
}
-static int ast_wdt_ofdata_to_platdata(struct udevice *dev)
+static int ast_wdt_of_to_plat(struct udevice *dev)
{
struct ast_wdt_priv *priv = dev_get_priv(dev);
.of_match = ast_wdt_ids,
.probe = ast_wdt_probe,
.priv_auto = sizeof(struct ast_wdt_priv),
- .ofdata_to_platdata = ast_wdt_ofdata_to_platdata,
+ .of_to_plat = ast_wdt_of_to_plat,
.ops = &ast_wdt_ops,
};
return 0;
}
-static int cdns_wdt_ofdata_to_platdata(struct udevice *dev)
+static int cdns_wdt_of_to_plat(struct udevice *dev)
{
struct cdns_wdt_priv *priv = dev_get_priv(dev);
.of_match = cdns_wdt_ids,
.probe = cdns_wdt_probe,
.priv_auto = sizeof(struct cdns_wdt_priv),
- .ofdata_to_platdata = cdns_wdt_ofdata_to_platdata,
+ .of_to_plat = cdns_wdt_of_to_plat,
.ops = &cdns_wdt_ops,
};
return true;
}
-static int orion_wdt_ofdata_to_platdata(struct udevice *dev)
+static int orion_wdt_of_to_plat(struct udevice *dev)
{
struct orion_wdt_priv *priv = dev_get_priv(dev);
.of_match = orion_wdt_ids,
.probe = orion_wdt_probe,
.priv_auto = sizeof(struct orion_wdt_priv),
- .ofdata_to_platdata = orion_wdt_ofdata_to_platdata,
+ .of_to_plat = orion_wdt_of_to_plat,
.ops = &orion_wdt_ops,
};
return 0;
}
-static int sbsa_gwdt_ofdata_to_platdata(struct udevice *dev)
+static int sbsa_gwdt_of_to_plat(struct udevice *dev)
{
struct sbsa_gwdt_priv *priv = dev_get_priv(dev);
.of_match = sbsa_gwdt_ids,
.probe = sbsa_gwdt_probe,
.priv_auto = sizeof(struct sbsa_gwdt_priv),
- .ofdata_to_platdata = sbsa_gwdt_ofdata_to_platdata,
+ .of_to_plat = sbsa_gwdt_of_to_plat,
.ops = &sbsa_gwdt_ops,
};
return 0;
}
-static int sp805_wdt_ofdata_to_platdata(struct udevice *dev)
+static int sp805_wdt_of_to_plat(struct udevice *dev)
{
struct sp805_wdt_priv *priv = dev_get_priv(dev);
struct clk clk;
.of_match = sp805_wdt_ids,
.probe = sp805_wdt_probe,
.priv_auto = sizeof(struct sp805_wdt_priv),
- .ofdata_to_platdata = sp805_wdt_ofdata_to_platdata,
+ .of_to_plat = sp805_wdt_of_to_plat,
.ops = &sp805_wdt_ops,
};
return 0;
}
-static int xlnx_wdt_ofdata_to_platdata(struct udevice *dev)
+static int xlnx_wdt_of_to_plat(struct udevice *dev)
{
struct xlnx_wdt_platdata *plat = dev_get_plat(dev);
.of_match = xlnx_wdt_ids,
.probe = xlnx_wdt_probe,
.plat_auto = sizeof(struct xlnx_wdt_platdata),
- .ofdata_to_platdata = xlnx_wdt_ofdata_to_platdata,
+ .of_to_plat = xlnx_wdt_of_to_plat,
.ops = &xlnx_wdt_ops,
};
return ret;
}
-static int xlnx_wwdt_ofdata_to_platdata(struct udevice *dev)
+static int xlnx_wwdt_of_to_plat(struct udevice *dev)
{
struct xlnx_wwdt_platdata *plat = dev_get_plat(dev);
.probe = xlnx_wwdt_probe,
.priv_auto = sizeof(struct xlnx_wwdt_priv),
.plat_auto = sizeof(struct xlnx_wwdt_platdata),
- .ofdata_to_platdata = xlnx_wwdt_ofdata_to_platdata,
+ .of_to_plat = xlnx_wwdt_of_to_plat,
.ops = &xlnx_wwdt_ops,
};
int device_reparent(struct udevice *dev, struct udevice *new_parent);
/**
- * device_ofdata_to_platdata() - Read platform data for a device
+ * device_of_to_plat() - Read platform data for a device
*
* Read platform data for a device (typically from the device tree) so that
* the information needed to probe the device is present.
* @dev: Pointer to device to process
* @return 0 if OK, -ve on error
*/
-int device_ofdata_to_platdata(struct udevice *dev);
+int device_of_to_plat(struct udevice *dev);
/**
* device_probe() - Probe a device, activating it
* 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 plat in a function
- * implemented by the driver ofdata_to_platdata method (called just before the
+ * implemented by the driver of_to_plat method (called just before the
* probe method if the device has a device tree node.
*
* All three of plat, priv and uclass_priv can be allocated by the
* @probe: Called to probe a device, i.e. activate it
* @remove: Called to remove a device, i.e. de-activate it
* @unbind: Called to unbind a device from its driver
- * @ofdata_to_platdata: Called before probe to decode device tree data
+ * @of_to_plat: Called before probe to decode device tree data
* @child_post_bind: Called after a new child has been bound
* @child_pre_probe: Called before a child device is probed. The device has
* memory allocated but it has not yet been probed.
int (*probe)(struct udevice *dev);
int (*remove)(struct udevice *dev);
int (*unbind)(struct udevice *dev);
- int (*ofdata_to_platdata)(struct udevice *dev);
+ int (*of_to_plat)(struct udevice *dev);
int (*child_post_bind)(struct udevice *dev);
int (*child_pre_probe)(struct udevice *dev);
int (*child_post_remove)(struct udevice *dev);
/**
* 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,
+ * The of_to_plat() method is called on the child before it is returned,
* but the child is not probed.
*
* @parent: Parent to check
/*
* 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,
+ * The of_to_plat() method is called on the child before it is returned,
* but the child is not probed.
*
* @devp: On entry, points to the previous child; on exit returns the child that
list_for_each_entry(pos, &parent->child_head, sibling_node)
/**
- * device_foreach_child_ofdata_to_platdata() - iterate through children
+ * device_foreach_child_of_to_plat() - iterate through children
*
* This stops when it gets an error, with @pos set to the device that failed to
* read ofdata.
* This creates a for() loop which works through the available children of
* a device in order from start to end. Device ofdata is read by calling
- * device_ofdata_to_platdata() on each one. The devices are not probed.
+ * device_of_to_plat() on each one. The devices are not probed.
*
* @pos: struct udevice * for the current device
* @parent: parent device to scan
*/
-#define device_foreach_child_ofdata_to_platdata(pos, parent) \
+#define device_foreach_child_of_to_plat(pos, parent) \
for (int _ret = device_first_child_ofdata_err(parent, &dev); !_ret; \
_ret = device_next_child_ofdata_err(&dev))
* Quentin Schulz, Bootlin, quentin.schulz@bootlin.com
*
* Structure for use with U_BOOT_DEVICE for pl022 SPI devices or to use
- * in ofdata_to_platdata.
+ * in of_to_plat.
*/
#ifndef __spi_pl022_h
struct udevice **devp);
/**
- * i2c_chip_ofdata_to_platdata() - Decode standard I2C platform data
+ * i2c_chip_of_to_plat() - Decode standard I2C platform data
*
* This decodes the chip address from a device tree node and puts it into
* its dm_i2c_chip structure. This should be called in your driver's
- * ofdata_to_platdata() method.
+ * of_to_plat() method.
*
* @blob: Device tree blob
* @node: Node offset to read from
* @spi: Place to put the decoded information
*/
-int i2c_chip_ofdata_to_platdata(struct udevice *dev, struct dm_i2c_chip *chip);
+int i2c_chip_of_to_plat(struct udevice *dev, struct dm_i2c_chip *chip);
/**
* i2c_dump_msgs() - Dump a list of I2C messages
extern struct acpi_ops i2c_acpi_ops;
/**
- * acpi_i2c_ofdata_to_platdata() - Read properties intended for ACPI
+ * acpi_i2c_of_to_plat() - Read properties intended for ACPI
*
* This reads the generic I2C properties from the device tree, so that these
* can be used to create ACPI information for the device.
* @dev: I2C device to process
* @return 0 if OK, -EINVAL if acpi,hid is not present
*/
-int acpi_i2c_ofdata_to_platdata(struct udevice *dev);
+int acpi_i2c_of_to_plat(struct udevice *dev);
#ifndef CONFIG_DM_I2C
int ns16550_calc_divisor(NS16550_t port, int clock, int baudrate);
/**
- * ns16550_serial_ofdata_to_platdata() - convert DT to platform data
+ * ns16550_serial_of_to_plat() - convert DT to platform data
*
* Decode a device tree node for an ns16550 device. This includes the
* register base address and register shift properties. The caller must set
* @dev: dev to decode platform data for
* @return: 0 if OK, -EINVAL on error
*/
-int ns16550_serial_ofdata_to_platdata(struct udevice *dev);
+int ns16550_serial_of_to_plat(struct udevice *dev);
/**
* ns16550_serial_probe() - probe a serial port
int spi_find_chip_select(struct udevice *bus, int cs, struct udevice **devp);
/**
- * spi_slave_ofdata_to_platdata() - decode standard SPI platform data
+ * spi_slave_of_to_plat() - decode standard SPI platform data
*
* This decodes the speed and mode for a slave from a device tree node
*
* @node: Node offset to read from
* @plat: Place to put the decoded information
*/
-int spi_slave_ofdata_to_platdata(struct udevice *dev,
- struct dm_spi_slave_platdata *plat);
+int spi_slave_of_to_plat(struct udevice *dev,
+ struct dm_spi_slave_platdata *plat);
/**
* spi_cs_info() - Check information on a chip select
ut_asserteq(TEST_DEVRES_SIZE, stats.total_size);
/* Getting plat should add one allocation */
- ut_assertok(device_ofdata_to_platdata(dev));
+ ut_assertok(device_of_to_plat(dev));
devres_get_stats(dev, &stats);
ut_asserteq(2, stats.allocs);
ut_asserteq(TEST_DEVRES_SIZE + TEST_DEVRES_SIZE3, stats.total_size);
.ping = testfdt_drv_ping,
};
-static int testfdt_ofdata_to_platdata(struct udevice *dev)
+static int testfdt_of_to_plat(struct udevice *dev)
{
struct dm_test_pdata *pdata = dev_get_plat(dev);
.name = "testfdt_drv",
.of_match = testfdt_ids,
.id = UCLASS_TEST_FDT,
- .ofdata_to_platdata = testfdt_ofdata_to_platdata,
+ .of_to_plat = testfdt_of_to_plat,
.probe = testfdt_drv_probe,
.ops = &test_ops,
.priv_auto = sizeof(struct dm_test_priv),
.name = "testfdt1_drv",
.of_match = testfdt1_ids,
.id = UCLASS_TEST_FDT,
- .ofdata_to_platdata = testfdt_ofdata_to_platdata,
+ .of_to_plat = testfdt_of_to_plat,
.probe = testfdt_drv_probe,
.ops = &test_ops,
.priv_auto = sizeof(struct dm_test_priv),
return 0;
}
-static int testdevres_drv_ofdata_to_platdata(struct udevice *dev)
+static int testdevres_drv_of_to_plat(struct udevice *dev)
{
struct dm_testdevres_priv *priv = dev_get_priv(dev);
.of_match = testdevres_ids,
.id = UCLASS_TEST_DEVRES,
.bind = testdevres_drv_bind,
- .ofdata_to_platdata = testdevres_drv_ofdata_to_platdata,
+ .of_to_plat = testdevres_drv_of_to_plat,
.probe = testdevres_drv_probe,
.plat_auto = sizeof(struct dm_testdevres_pdata),
.priv_auto = sizeof(struct dm_testdevres_priv),
ut_assertok(uclass_first_device_err(UCLASS_TEST_BUS, &bus));
count = 0;
- device_foreach_child_ofdata_to_platdata(dev, bus) {
+ device_foreach_child_of_to_plat(dev, bus) {
ut_assert(dev->flags & DM_FLAG_PLATDATA_VALID);
ut_assert(!(dev->flags & DM_FLAG_ACTIVATED));
count++;
ut_assert(!(dev->flags & DM_FLAG_PLATDATA_VALID));
/* read the child's ofdata which should cause the parent's to be read */
- ut_assertok(device_ofdata_to_platdata(dev));
+ ut_assertok(device_of_to_plat(dev));
ut_assert(dev->flags & DM_FLAG_PLATDATA_VALID);
ut_assert(bus->flags & DM_FLAG_PLATDATA_VALID);