mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
dm: treewide: Rename ofdata_to_platdata() to of_to_plat()
This name is far too long. Rename it to remove the 'data' bits. This makes it consistent with the platdata->plat rename. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
c69cda25c9
commit
d1998a9fde
362 changed files with 797 additions and 797 deletions
|
@ -473,7 +473,7 @@ static const struct misc_ops stm32mp_bsec_ops = {
|
|||
.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);
|
||||
|
||||
|
@ -512,7 +512,7 @@ U_BOOT_DRIVER(stm32mp_bsec) = {
|
|||
.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,
|
||||
|
|
|
@ -59,7 +59,7 @@ static int stm32mp_pwr_read(struct udevice *dev, uint reg, uint8_t *buff,
|
|||
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);
|
||||
|
||||
|
@ -103,7 +103,7 @@ U_BOOT_DRIVER(stm32mp_pwr_pmic) = {
|
|||
.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),
|
||||
};
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ static int acpi_gpe_read_and_clear(struct irq *irq)
|
|||
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);
|
||||
|
||||
|
@ -107,6 +107,6 @@ U_BOOT_DRIVER(acpi_gpe_drv) = {
|
|||
.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),
|
||||
};
|
||||
|
|
|
@ -221,7 +221,7 @@ static int apl_hostbridge_early_init(struct udevice *dev)
|
|||
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;
|
||||
|
@ -400,7 +400,7 @@ U_BOOT_DRIVER(intel_apl_hostbridge) = {
|
|||
.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),
|
||||
|
|
|
@ -221,7 +221,7 @@ U_BOOT_DRIVER(intel_apl_pmc) = {
|
|||
.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),
|
||||
|
|
|
@ -72,7 +72,7 @@ void apl_uart_init(pci_dev_t bdf, ulong base)
|
|||
*
|
||||
* 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)
|
||||
|
@ -85,7 +85,7 @@ 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);
|
||||
|
@ -109,7 +109,7 @@ static int apl_ns16550_ofdata_to_platdata(struct udevice *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 */
|
||||
|
@ -129,6 +129,6 @@ U_BOOT_DRIVER(intel_apl_ns16550) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -122,7 +122,7 @@ static int broadwell_adsp_probe(struct udevice *dev)
|
|||
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);
|
||||
|
||||
|
@ -142,7 +142,7 @@ static const struct udevice_id broadwell_adsp_ids[] = {
|
|||
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,
|
||||
|
|
|
@ -232,7 +232,7 @@ static int broadwell_sata_enable(struct udevice *dev)
|
|||
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;
|
||||
|
@ -264,7 +264,7 @@ U_BOOT_DRIVER(ahci_broadwell_drv) = {
|
|||
.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),
|
||||
};
|
||||
|
|
|
@ -178,7 +178,7 @@ static int itss_bind(struct udevice *dev)
|
|||
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;
|
||||
|
@ -241,7 +241,7 @@ U_BOOT_DRIVER(intel_itss) = {
|
|||
.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),
|
||||
};
|
||||
|
|
|
@ -90,7 +90,7 @@ static int p2sb_spl_init(struct udevice *dev)
|
|||
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);
|
||||
|
@ -196,7 +196,7 @@ U_BOOT_DRIVER(intel_p2sb) = {
|
|||
.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),
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* 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;
|
||||
|
@ -57,7 +57,7 @@ U_BOOT_DRIVER(serial_slimbootloader) = {
|
|||
.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,
|
||||
|
|
|
@ -162,16 +162,15 @@ extern const struct pinctrl_ops intel_pinctrl_ops;
|
|||
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
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* 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.
|
||||
*
|
||||
|
|
|
@ -46,7 +46,7 @@ to see errors. Common ones are:
|
|||
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.
|
||||
|
|
|
@ -333,11 +333,11 @@ Briefly, they are:
|
|||
|
||||
* bind - make the driver model aware of a device (bind it to its driver)
|
||||
* unbind - make the driver model forget the device
|
||||
* ofdata_to_platdata - convert device tree data to 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.
|
||||
|
||||
|
||||
|
@ -449,23 +449,23 @@ The easiest way to make this work it to add a few members to the driver:
|
|||
.. 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
|
||||
|
@ -690,7 +690,7 @@ Most devices have data in the device tree which they can read to find out 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:
|
||||
|
@ -719,7 +719,7 @@ 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
|
||||
|
@ -728,9 +728,9 @@ The steps are:
|
|||
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).
|
||||
|
@ -744,7 +744,7 @@ the device up.
|
|||
|
||||
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
|
||||
|
@ -755,18 +755,18 @@ even be possible to probe the device - e.g. an SD card which is not
|
|||
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
|
||||
|
@ -847,7 +847,7 @@ remove it. This performs the probe steps in reverse:
|
|||
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
|
||||
|
|
|
@ -25,7 +25,7 @@ the UCLASS_ETH .id field in the U-Boot driver struct:
|
|||
.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),
|
||||
|
|
|
@ -174,7 +174,7 @@ accessed using:
|
|||
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'
|
||||
|
@ -222,7 +222,7 @@ all the limitations metioned in caveats above.
|
|||
|
||||
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.
|
||||
|
||||
|
||||
|
@ -234,7 +234,7 @@ feature is intended as a add-on to existing drivers.
|
|||
|
||||
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:
|
||||
|
||||
|
@ -254,7 +254,7 @@ 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 */
|
||||
|
@ -291,7 +291,7 @@ For example:
|
|||
.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),
|
||||
|
@ -313,7 +313,7 @@ speaking it is a non-zero plat_size which triggers this).
|
|||
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
|
||||
|
|
|
@ -69,7 +69,7 @@ Put this code at the bottom of your existing driver file:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static int exynos_spi_ofdata_to_platdata(struct udevice *dev)
|
||||
static int exynos_spi_of_to_plat(struct udevice *dev)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ Put this code at the bottom of your existing driver file:
|
|||
.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,
|
||||
};
|
||||
|
@ -217,7 +217,7 @@ DM tells you. The name is not quite right. So in this case we would use:
|
|||
};
|
||||
|
||||
|
||||
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
|
||||
|
@ -239,7 +239,7 @@ fills in the fields from device tree.
|
|||
|
||||
.. 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;
|
||||
|
|
|
@ -39,7 +39,7 @@ as drivers in the USB uclass. For example:
|
|||
.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,
|
||||
|
@ -51,7 +51,7 @@ as drivers in the USB uclass. For example:
|
|||
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
|
||||
|
|
|
@ -101,7 +101,7 @@ int exynos_adc_probe(struct udevice *dev)
|
|||
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);
|
||||
|
@ -139,6 +139,6 @@ U_BOOT_DRIVER(exynos_adc) = {
|
|||
.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),
|
||||
};
|
||||
|
|
|
@ -675,7 +675,7 @@ static int meson_saradc_probe(struct udevice *dev)
|
|||
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);
|
||||
|
@ -720,6 +720,6 @@ U_BOOT_DRIVER(meson_saradc) = {
|
|||
.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),
|
||||
};
|
||||
|
|
|
@ -117,7 +117,7 @@ int rockchip_saradc_probe(struct udevice *dev)
|
|||
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);
|
||||
|
@ -179,6 +179,6 @@ U_BOOT_DRIVER(rockchip_saradc) = {
|
|||
.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),
|
||||
};
|
||||
|
|
|
@ -135,7 +135,7 @@ int sandbox_adc_probe(struct udevice *dev)
|
|||
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);
|
||||
|
||||
|
@ -168,6 +168,6 @@ U_BOOT_DRIVER(sandbox_adc) = {
|
|||
.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),
|
||||
};
|
||||
|
|
|
@ -29,7 +29,7 @@ static int dwc_ahci_bind(struct udevice *dev)
|
|||
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;
|
||||
|
@ -92,7 +92,7 @@ U_BOOT_DRIVER(dwc_ahci) = {
|
|||
.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),
|
||||
|
|
|
@ -903,7 +903,7 @@ U_BOOT_DRIVER(sata_fsl_driver) = {
|
|||
.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);
|
||||
|
||||
|
@ -1026,7 +1026,7 @@ U_BOOT_DRIVER(fsl_ahci) = {
|
|||
.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),
|
||||
|
|
|
@ -40,7 +40,7 @@ static int mtk_ahci_bind(struct udevice *dev)
|
|||
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);
|
||||
|
||||
|
@ -121,7 +121,7 @@ U_BOOT_DRIVER(mtk_ahci) = {
|
|||
.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),
|
||||
|
|
|
@ -199,7 +199,7 @@ static const struct udevice_id sata_ceva_ids[] = {
|
|||
{ }
|
||||
};
|
||||
|
||||
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;
|
||||
|
@ -235,5 +235,5 @@ U_BOOT_DRIVER(ceva_host_blk) = {
|
|||
.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,
|
||||
};
|
||||
|
|
4
drivers/cache/cache-v5l2.c
vendored
4
drivers/cache/cache-v5l2.c
vendored
|
@ -104,7 +104,7 @@ static int v5l2_disable(struct udevice *dev)
|
|||
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;
|
||||
|
@ -180,7 +180,7 @@ U_BOOT_DRIVER(v5l2_cache) = {
|
|||
.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,
|
||||
|
|
|
@ -628,7 +628,7 @@ static int socfpga_clk_probe(struct udevice *dev)
|
|||
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;
|
||||
|
@ -657,6 +657,6 @@ U_BOOT_DRIVER(socfpga_agilex_clk) = {
|
|||
.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),
|
||||
};
|
||||
|
|
|
@ -319,7 +319,7 @@ static int socfpga_a10_clk_probe(struct udevice *dev)
|
|||
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];
|
||||
|
@ -357,7 +357,7 @@ U_BOOT_DRIVER(socfpga_a10_clk) = {
|
|||
.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),
|
||||
};
|
||||
|
|
|
@ -491,7 +491,7 @@ struct clk_ops ast2500_clk_ops = {
|
|||
.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);
|
||||
|
||||
|
@ -526,5 +526,5 @@ U_BOOT_DRIVER(aspeed_ast2500_scu) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -638,7 +638,7 @@ static struct clk_ops utmi_clk_ops = {
|
|||
.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;
|
||||
|
@ -667,7 +667,7 @@ U_BOOT_DRIVER(at91sam9x5_utmi_clk) = {
|
|||
.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,
|
||||
};
|
||||
|
@ -853,7 +853,7 @@ static struct clk_ops generic_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];
|
||||
|
@ -875,7 +875,7 @@ U_BOOT_DRIVER(generic_clk) = {
|
|||
.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,
|
||||
|
@ -977,7 +977,7 @@ static struct clk_ops at91_usb_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];
|
||||
|
@ -1011,7 +1011,7 @@ U_BOOT_DRIVER(at91_usb_clk) = {
|
|||
.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,
|
||||
|
|
|
@ -58,7 +58,7 @@ const struct clk_ops clk_boston_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;
|
||||
|
@ -91,7 +91,7 @@ U_BOOT_DRIVER(clk_boston) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -38,7 +38,7 @@ const struct clk_ops clk_fixed_factor_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;
|
||||
|
@ -66,7 +66,7 @@ U_BOOT_DRIVER(clk_fixed_factor) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -24,7 +24,7 @@ const struct clk_ops clk_fixed_rate_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)
|
||||
|
@ -50,7 +50,7 @@ U_BOOT_DRIVER(fixed_clock) = {
|
|||
.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,
|
||||
|
|
|
@ -1432,7 +1432,7 @@ static int px30_clk_probe(struct udevice *dev)
|
|||
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);
|
||||
|
||||
|
@ -1481,7 +1481,7 @@ U_BOOT_DRIVER(rockchip_px30_cru) = {
|
|||
.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,
|
||||
|
@ -1609,7 +1609,7 @@ static int px30_pmuclk_probe(struct udevice *dev)
|
|||
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);
|
||||
|
||||
|
@ -1628,7 +1628,7 @@ U_BOOT_DRIVER(rockchip_px30_pmucru) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -318,7 +318,7 @@ static struct clk_ops rk3036_clk_ops = {
|
|||
.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);
|
||||
|
||||
|
@ -376,7 +376,7 @@ U_BOOT_DRIVER(rockchip_rk3036_cru) = {
|
|||
.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,
|
||||
|
|
|
@ -546,7 +546,7 @@ static struct clk_ops rk3128_clk_ops = {
|
|||
.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);
|
||||
|
||||
|
@ -598,7 +598,7 @@ U_BOOT_DRIVER(rockchip_rk3128_cru) = {
|
|||
.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,
|
||||
|
|
|
@ -538,7 +538,7 @@ static struct clk_ops rk3188_clk_ops = {
|
|||
.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);
|
||||
|
@ -620,6 +620,6 @@ U_BOOT_DRIVER(rockchip_rk3188_cru) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -475,7 +475,7 @@ static struct clk_ops rk322x_clk_ops = {
|
|||
.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);
|
||||
|
||||
|
@ -533,7 +533,7 @@ U_BOOT_DRIVER(rockchip_rk322x_cru) = {
|
|||
.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,
|
||||
|
|
|
@ -954,7 +954,7 @@ static struct clk_ops rk3288_clk_ops = {
|
|||
#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);
|
||||
|
@ -1044,6 +1044,6 @@ U_BOOT_DRIVER(rockchip_rk3288_cru) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -1019,7 +1019,7 @@ static int rk3308_clk_probe(struct udevice *dev)
|
|||
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);
|
||||
|
||||
|
@ -1068,7 +1068,7 @@ U_BOOT_DRIVER(rockchip_rk3308_cru) = {
|
|||
.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,
|
||||
|
|
|
@ -797,7 +797,7 @@ static int rk3328_clk_probe(struct udevice *dev)
|
|||
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);
|
||||
|
||||
|
@ -846,7 +846,7 @@ U_BOOT_DRIVER(rockchip_rk3328_cru) = {
|
|||
.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,
|
||||
|
|
|
@ -593,7 +593,7 @@ static int rk3368_clk_probe(struct udevice *dev)
|
|||
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);
|
||||
|
@ -647,7 +647,7 @@ U_BOOT_DRIVER(rockchip_rk3368_cru) = {
|
|||
#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,
|
||||
|
|
|
@ -1398,7 +1398,7 @@ static int rk3399_clk_probe(struct udevice *dev)
|
|||
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);
|
||||
|
@ -1448,7 +1448,7 @@ U_BOOT_DRIVER(clk_rk3399) = {
|
|||
.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,
|
||||
|
@ -1610,7 +1610,7 @@ static int rk3399_pmuclk_probe(struct udevice *dev)
|
|||
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);
|
||||
|
@ -1643,7 +1643,7 @@ U_BOOT_DRIVER(rockchip_rk3399_pmuclk) = {
|
|||
.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,
|
||||
|
|
|
@ -662,7 +662,7 @@ static void rkclk_init(struct rv1108_cru *cru)
|
|||
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);
|
||||
|
||||
|
@ -722,6 +722,6 @@ U_BOOT_DRIVER(clk_rv1108) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -269,7 +269,7 @@ int acpi_recurse_method(struct acpi_ctx *ctx, struct udevice *parent,
|
|||
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);
|
||||
|
|
|
@ -326,7 +326,7 @@ static void *alloc_priv(int size, uint flags)
|
|||
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;
|
||||
|
@ -340,7 +340,7 @@ int device_ofdata_to_platdata(struct udevice *dev)
|
|||
|
||||
/* 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;
|
||||
|
||||
|
@ -391,9 +391,9 @@ int device_ofdata_to_platdata(struct udevice *dev)
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -422,7 +422,7 @@ int device_probe(struct udevice *dev)
|
|||
drv = dev->driver;
|
||||
assert(drv);
|
||||
|
||||
ret = device_ofdata_to_platdata(dev);
|
||||
ret = device_of_to_plat(dev);
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
|
@ -881,7 +881,7 @@ int device_first_child_ofdata_err(struct udevice *parent, struct udevice **devp)
|
|||
if (!dev)
|
||||
return -ENODEV;
|
||||
|
||||
ret = device_ofdata_to_platdata(dev);
|
||||
ret = device_of_to_plat(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -899,7 +899,7 @@ int device_next_child_ofdata_err(struct udevice **devp)
|
|||
if (!dev)
|
||||
return -ENODEV;
|
||||
|
||||
ret = device_ofdata_to_platdata(dev);
|
||||
ret = device_of_to_plat(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
/** 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 {
|
||||
|
|
|
@ -69,8 +69,8 @@ void fix_drivers(void)
|
|||
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)
|
||||
|
|
|
@ -563,7 +563,7 @@ static unsigned long sdram_calculate_size(struct socfpga_sdr_ctrl *sdr_ctrl)
|
|||
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;
|
||||
|
||||
|
@ -646,7 +646,7 @@ U_BOOT_DRIVER(altera_gen5_sdram) = {
|
|||
.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),
|
||||
|
|
|
@ -230,7 +230,7 @@ phys_size_t sdram_calculate_size(struct altera_sdram_platdata *plat)
|
|||
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;
|
||||
|
@ -303,7 +303,7 @@ U_BOOT_DRIVER(altera_sdram) = {
|
|||
.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),
|
||||
|
|
|
@ -140,7 +140,7 @@ static const struct demo_ops shape_ops = {
|
|||
.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;
|
||||
|
@ -189,7 +189,7 @@ U_BOOT_DRIVER(demo_shape_drv) = {
|
|||
.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,
|
||||
|
|
|
@ -26,7 +26,7 @@ static const struct demo_ops simple_ops = {
|
|||
.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);
|
||||
|
@ -41,7 +41,7 @@ U_BOOT_DRIVER(demo_simple_drv) = {
|
|||
.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),
|
||||
};
|
||||
|
|
|
@ -542,7 +542,7 @@ static int ti_edma3_transfer(struct udevice *dev, int direction, void *dst,
|
|||
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);
|
||||
|
||||
|
@ -574,7 +574,7 @@ U_BOOT_DRIVER(ti_edma3) = {
|
|||
.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),
|
||||
};
|
||||
|
|
|
@ -84,7 +84,7 @@ static int altera_pio_probe(struct udevice *dev)
|
|||
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);
|
||||
|
||||
|
@ -116,7 +116,7 @@ U_BOOT_DRIVER(altera_pio) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -116,7 +116,7 @@ static int bcm2835_gpio_probe(struct udevice *dev)
|
|||
}
|
||||
|
||||
#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;
|
||||
|
@ -133,7 +133,7 @@ static int bcm2835_gpio_ofdata_to_platdata(struct udevice *dev)
|
|||
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,
|
||||
|
|
|
@ -540,7 +540,7 @@ static const struct udevice_id davinci_gpio_ids[] = {
|
|||
{ }
|
||||
};
|
||||
|
||||
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;
|
||||
|
@ -557,7 +557,7 @@ U_BOOT_DRIVER(ti_dm6441_gpio) = {
|
|||
.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),
|
||||
|
|
|
@ -239,7 +239,7 @@ struct gpio_hog_data {
|
|||
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;
|
||||
|
@ -338,7 +338,7 @@ int gpio_hog_lookup_name(const char *name, struct gpio_desc **desc)
|
|||
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),
|
||||
|
|
|
@ -139,7 +139,7 @@ static int broadwell_gpio_probe(struct udevice *dev)
|
|||
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;
|
||||
|
@ -182,7 +182,7 @@ U_BOOT_DRIVER(gpio_broadwell) = {
|
|||
.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),
|
||||
|
|
|
@ -164,7 +164,7 @@ static int intel_gpio_probe(struct udevice *dev)
|
|||
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);
|
||||
|
@ -198,6 +198,6 @@ U_BOOT_DRIVER(intel_gpio) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -93,7 +93,7 @@ static int _ich6_gpio_set_direction(uint16_t base, unsigned offset, int dir)
|
|||
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;
|
||||
|
@ -234,7 +234,7 @@ U_BOOT_DRIVER(gpio_ich6) = {
|
|||
.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),
|
||||
|
|
|
@ -218,7 +218,7 @@ static int iproc_gpio_get_function(struct udevice *dev, u32 gpio)
|
|||
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);
|
||||
|
@ -285,6 +285,6 @@ U_BOOT_DRIVER(iproc_gpio) = {
|
|||
.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),
|
||||
};
|
||||
|
|
|
@ -61,7 +61,7 @@ static int mpc83xx_spisel_boot_get_function(struct udevice *dev, uint gpio)
|
|||
}
|
||||
|
||||
#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;
|
||||
|
@ -140,7 +140,7 @@ U_BOOT_DRIVER(spisel_boot_mpc83xx) = {
|
|||
.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
|
||||
|
|
|
@ -183,7 +183,7 @@ static int mpc8xxx_gpio_get_function(struct udevice *dev, uint gpio)
|
|||
}
|
||||
|
||||
#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);
|
||||
|
@ -294,7 +294,7 @@ U_BOOT_DRIVER(gpio_mpc8xxx) = {
|
|||
.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
|
||||
|
|
|
@ -101,7 +101,7 @@ static int msm_gpio_probe(struct udevice *dev)
|
|||
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);
|
||||
|
||||
|
@ -126,7 +126,7 @@ U_BOOT_DRIVER(gpio_msm) = {
|
|||
.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),
|
||||
|
|
|
@ -307,7 +307,7 @@ static int mxc_gpio_probe(struct udevice *dev)
|
|||
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)) {
|
||||
|
@ -338,7 +338,7 @@ U_BOOT_DRIVER(gpio_mxc) = {
|
|||
.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,
|
||||
|
|
|
@ -262,7 +262,7 @@ static int mxs_gpio_probe(struct udevice *dev)
|
|||
}
|
||||
|
||||
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
|
||||
static int mxs_ofdata_to_platdata(struct udevice *dev)
|
||||
static int mxs_of_to_plat(struct udevice *dev)
|
||||
{
|
||||
struct mxs_gpio_platdata *plat = dev->plat;
|
||||
struct fdtdec_phandle_args args;
|
||||
|
@ -302,7 +302,7 @@ U_BOOT_DRIVER(fsl_imx23_gpio) = {
|
|||
.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
|
||||
};
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ static int nx_gpio_probe(struct udevice *dev)
|
|||
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);
|
||||
|
||||
|
@ -244,7 +244,7 @@ U_BOOT_DRIVER(nx_gpio) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -342,7 +342,7 @@ static const struct udevice_id omap_gpio_ids[] = {
|
|||
{ }
|
||||
};
|
||||
|
||||
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;
|
||||
|
@ -362,7 +362,7 @@ U_BOOT_DRIVER(gpio_omap) = {
|
|||
#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
|
||||
|
|
|
@ -175,7 +175,7 @@ U_BOOT_DRIVER(gpio_pcf8575) = {
|
|||
.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),
|
||||
};
|
||||
|
|
|
@ -187,7 +187,7 @@ static int pm8916_gpio_probe(struct udevice *dev)
|
|||
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);
|
||||
|
||||
|
@ -209,7 +209,7 @@ U_BOOT_DRIVER(gpio_pm8916) = {
|
|||
.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),
|
||||
|
@ -272,7 +272,7 @@ static int pm8941_pwrkey_probe(struct udevice *dev)
|
|||
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);
|
||||
|
||||
|
@ -294,7 +294,7 @@ U_BOOT_DRIVER(pwrkey_pm8941) = {
|
|||
.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),
|
||||
|
|
|
@ -278,7 +278,7 @@ static const struct dm_gpio_ops gpio_sandbox_ops = {
|
|||
#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);
|
||||
|
||||
|
@ -318,7 +318,7 @@ U_BOOT_DRIVER(sandbox_gpio) = {
|
|||
.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,
|
||||
|
|
|
@ -154,7 +154,7 @@ static const struct dm_gpio_ops sifive_gpio_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;
|
||||
|
@ -171,7 +171,7 @@ U_BOOT_DRIVER(gpio_sifive) = {
|
|||
.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,
|
||||
|
|
|
@ -130,7 +130,7 @@ U_BOOT_DRIVER(gpio_vybrid) = {
|
|||
.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),
|
||||
|
|
|
@ -263,7 +263,7 @@ static int xilinx_gpio_probe(struct udevice *dev)
|
|||
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;
|
||||
|
@ -301,7 +301,7 @@ U_BOOT_DRIVER(xilinx_gpio) = {
|
|||
.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),
|
||||
|
|
|
@ -388,7 +388,7 @@ static int zynq_gpio_probe(struct udevice *dev)
|
|||
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);
|
||||
|
||||
|
@ -405,7 +405,7 @@ U_BOOT_DRIVER(gpio_zynq) = {
|
|||
.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),
|
||||
};
|
||||
|
|
|
@ -174,7 +174,7 @@ int acpi_i2c_fill_ssdt(const struct udevice *dev, struct acpi_ctx *ctx)
|
|||
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);
|
||||
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
|
||||
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
|
||||
|
|
|
@ -87,7 +87,7 @@ static void ast_i2c_init_bus(struct udevice *dev)
|
|||
| 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;
|
||||
|
@ -351,7 +351,7 @@ U_BOOT_DRIVER(ast_i2c) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -219,7 +219,7 @@ int at91_i2c_get_bus_speed(struct udevice *dev)
|
|||
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);
|
||||
|
@ -317,7 +317,7 @@ U_BOOT_DRIVER(i2c_at91) = {
|
|||
.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,
|
||||
|
|
|
@ -29,7 +29,7 @@ static int cros_ec_i2c_xfer(struct udevice *dev, struct i2c_msg *msg,
|
|||
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;
|
||||
|
@ -55,7 +55,7 @@ U_BOOT_DRIVER(cros_ec_tunnel) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -762,7 +762,7 @@ static int designware_i2c_probe_chip(struct udevice *bus, uint chip_addr,
|
|||
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;
|
||||
|
@ -842,7 +842,7 @@ U_BOOT_DRIVER(i2c_designware) = {
|
|||
.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,
|
||||
|
|
|
@ -212,7 +212,7 @@ extern const struct dm_i2c_ops designware_i2c_ops;
|
|||
|
||||
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
|
||||
|
|
|
@ -34,7 +34,7 @@ static struct dw_scl_sda_cfg byt_config = {
|
|||
/* 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);
|
||||
|
||||
|
@ -71,7 +71,7 @@ static int designware_i2c_pci_ofdata_to_platdata(struct udevice *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)
|
||||
|
@ -211,7 +211,7 @@ U_BOOT_DRIVER(i2c_designware_pci) = {
|
|||
.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,
|
||||
|
|
|
@ -517,7 +517,7 @@ static int s3c24x0_i2c_probe(struct udevice *dev, uint chip, uint chip_flags)
|
|||
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);
|
||||
|
@ -557,7 +557,7 @@ U_BOOT_DRIVER(hs_i2c) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -573,7 +573,7 @@ static int fsl_i2c_set_bus_speed(struct udevice *bus, uint speed)
|
|||
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;
|
||||
|
@ -649,7 +649,7 @@ U_BOOT_DRIVER(i2c_fsl) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -460,7 +460,7 @@ static int cdns_i2c_xfer(struct udevice *dev, struct i2c_msg *msg,
|
|||
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 =
|
||||
|
@ -503,7 +503,7 @@ U_BOOT_DRIVER(cdns_i2c) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -322,7 +322,7 @@ static int ca_i2c_probe(struct udevice *bus)
|
|||
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);
|
||||
|
||||
|
@ -339,7 +339,7 @@ U_BOOT_DRIVER(i2c_cortina) = {
|
|||
.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,
|
||||
|
|
|
@ -329,7 +329,7 @@ static int i2c_gpio_drv_probe(struct udevice *dev)
|
|||
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;
|
||||
|
@ -371,7 +371,7 @@ U_BOOT_DRIVER(i2c_gpio) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -617,7 +617,7 @@ int i2c_deblock(struct udevice *bus)
|
|||
}
|
||||
|
||||
#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;
|
||||
|
||||
|
@ -680,7 +680,7 @@ static int i2c_child_post_bind(struct udevice *dev)
|
|||
|
||||
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
|
||||
|
@ -765,7 +765,7 @@ U_BOOT_DRIVER(i2c_generic_chip_drv) = {
|
|||
.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)
|
||||
|
|
|
@ -672,7 +672,7 @@ static int iproc_i2c_probe(struct udevice *bus)
|
|||
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);
|
||||
|
@ -705,7 +705,7 @@ U_BOOT_DRIVER(iproc_i2c) = {
|
|||
.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,
|
||||
|
|
|
@ -108,7 +108,7 @@ static const struct udevice_id pca954x_ids[] = {
|
|||
{ }
|
||||
};
|
||||
|
||||
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)];
|
||||
|
@ -171,6 +171,6 @@ U_BOOT_DRIVER(pca954x) = {
|
|||
.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),
|
||||
};
|
||||
|
|
|
@ -794,7 +794,7 @@ static int mvtwsi_i2c_set_bus_speed(struct udevice *bus, uint speed)
|
|||
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);
|
||||
|
||||
|
@ -888,7 +888,7 @@ U_BOOT_DRIVER(i2c_mvtwsi) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -1063,7 +1063,7 @@ static int omap_i2c_probe(struct udevice *bus)
|
|||
}
|
||||
|
||||
#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);
|
||||
|
||||
|
@ -1093,7 +1093,7 @@ U_BOOT_DRIVER(i2c_omap) = {
|
|||
.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,
|
||||
|
|
|
@ -375,7 +375,7 @@ int rockchip_i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
|
|||
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;
|
||||
|
@ -489,7 +489,7 @@ U_BOOT_DRIVER(rockchip_rk3066_i2c) = {
|
|||
.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,
|
||||
|
|
|
@ -302,7 +302,7 @@ static int s3c24x0_i2c_xfer(struct udevice *dev, struct i2c_msg *msg,
|
|||
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);
|
||||
|
@ -342,7 +342,7 @@ U_BOOT_DRIVER(i2c_s3c) = {
|
|||
.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,
|
||||
};
|
||||
|
|
|
@ -901,7 +901,7 @@ clk_free:
|
|||
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;
|
||||
|
@ -953,7 +953,7 @@ U_BOOT_DRIVER(stm32f7_i2c) = {
|
|||
.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,
|
||||
|
|
|
@ -130,7 +130,7 @@ static const struct led_ops cortina_led_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);
|
||||
|
||||
|
@ -289,7 +289,7 @@ U_BOOT_DRIVER(cortina_led) = {
|
|||
.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),
|
||||
|
|
|
@ -69,7 +69,7 @@ static int altera_sysid_read(struct udevice *dev,
|
|||
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);
|
||||
|
||||
|
@ -93,7 +93,7 @@ U_BOOT_DRIVER(altera_sysid) = {
|
|||
.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,
|
||||
};
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue