dm: treewide: Rename dev_get_platdata() to dev_get_plat()
Rename this to be consistent with the change from 'platdata'.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c
index 75f40e1..7b205c5 100644
--- a/drivers/usb/cdns3/cdns3-ti.c
+++ b/drivers/usb/cdns3/cdns3-ti.c
@@ -87,7 +87,7 @@
static int cdns_ti_probe(struct udevice *dev)
{
- struct cdns_ti *data = dev_get_platdata(dev);
+ struct cdns_ti *data = dev_get_plat(dev);
struct clk usb2_refclk;
int modestrap_mode;
unsigned long rate;
@@ -167,7 +167,7 @@
static int cdns_ti_remove(struct udevice *dev)
{
- struct cdns_ti *data = dev_get_platdata(dev);
+ struct cdns_ti *data = dev_get_plat(dev);
u32 reg;
/* put device back to RESET*/
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index 1755289..0bfdaa0 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -53,9 +53,9 @@
struct dwc3_generic_priv *priv)
{
int rc;
- struct dwc3_generic_plat *plat = dev_get_platdata(dev);
+ struct dwc3_generic_plat *plat = dev_get_plat(dev);
struct dwc3 *dwc3 = &priv->dwc3;
- struct dwc3_glue_data *glue = dev_get_platdata(dev->parent);
+ struct dwc3_glue_data *glue = dev_get_plat(dev->parent);
dwc3->dev = dev;
dwc3->maximum_speed = plat->maximum_speed;
@@ -107,7 +107,7 @@
static int dwc3_generic_ofdata_to_platdata(struct udevice *dev)
{
- struct dwc3_generic_plat *plat = dev_get_platdata(dev);
+ struct dwc3_generic_plat *plat = dev_get_plat(dev);
ofnode node = dev->node;
plat->base = dev_read_addr(dev);
@@ -238,7 +238,7 @@
u32 utmi_mode;
u32 utmi_status_offset = USBOTGSS_UTMI_OTG_STATUS;
- struct dwc3_glue_data *glue = dev_get_platdata(dev);
+ struct dwc3_glue_data *glue = dev_get_plat(dev);
void *base = map_physmem(glue->regs, 0x10000, MAP_NOCACHE);
if (device_is_compatible(dev, "ti,am437x-dwc3"))
@@ -390,7 +390,7 @@
static int dwc3_glue_probe(struct udevice *dev)
{
struct dwc3_glue_ops *ops = (struct dwc3_glue_ops *)dev_get_driver_data(dev);
- struct dwc3_glue_data *glue = dev_get_platdata(dev);
+ struct dwc3_glue_data *glue = dev_get_plat(dev);
struct udevice *child = NULL;
int index = 0;
int ret;
@@ -430,7 +430,7 @@
static int dwc3_glue_remove(struct udevice *dev)
{
- struct dwc3_glue_data *glue = dev_get_platdata(dev);
+ struct dwc3_glue_data *glue = dev_get_plat(dev);
reset_release_bulk(&glue->resets);
diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
index 5be8bc8..acc7866 100644
--- a/drivers/usb/dwc3/dwc3-meson-g12a.c
+++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
@@ -258,7 +258,7 @@
int dwc3_meson_g12a_force_mode(struct udevice *dev, enum usb_dr_mode mode)
{
- struct dwc3_meson_g12a *priv = dev_get_platdata(dev);
+ struct dwc3_meson_g12a *priv = dev_get_plat(dev);
if (!priv)
return -EINVAL;
@@ -359,7 +359,7 @@
static int dwc3_meson_g12a_probe(struct udevice *dev)
{
- struct dwc3_meson_g12a *priv = dev_get_platdata(dev);
+ struct dwc3_meson_g12a *priv = dev_get_plat(dev);
int ret, i;
priv->dev = dev;
@@ -434,7 +434,7 @@
static int dwc3_meson_g12a_remove(struct udevice *dev)
{
- struct dwc3_meson_g12a *priv = dev_get_platdata(dev);
+ struct dwc3_meson_g12a *priv = dev_get_plat(dev);
int i;
reset_release_all(&priv->reset, 1);
diff --git a/drivers/usb/dwc3/dwc3-meson-gxl.c b/drivers/usb/dwc3/dwc3-meson-gxl.c
index 1c7bfe8..b63cc23 100644
--- a/drivers/usb/dwc3/dwc3-meson-gxl.c
+++ b/drivers/usb/dwc3/dwc3-meson-gxl.c
@@ -196,7 +196,7 @@
int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode)
{
- struct dwc3_meson_gxl *priv = dev_get_platdata(dev);
+ struct dwc3_meson_gxl *priv = dev_get_plat(dev);
if (!priv)
return -EINVAL;
@@ -295,7 +295,7 @@
static int dwc3_meson_gxl_probe(struct udevice *dev)
{
- struct dwc3_meson_gxl *priv = dev_get_platdata(dev);
+ struct dwc3_meson_gxl *priv = dev_get_plat(dev);
int ret, i;
priv->dev = dev;
@@ -384,7 +384,7 @@
static int dwc3_meson_gxl_remove(struct udevice *dev)
{
- struct dwc3_meson_gxl *priv = dev_get_platdata(dev);
+ struct dwc3_meson_gxl *priv = dev_get_plat(dev);
int i;
reset_release_all(&priv->reset, 1);
diff --git a/drivers/usb/emul/sandbox_flash.c b/drivers/usb/emul/sandbox_flash.c
index 62c8166..67c2320 100644
--- a/drivers/usb/emul/sandbox_flash.c
+++ b/drivers/usb/emul/sandbox_flash.c
@@ -297,7 +297,7 @@
static int sandbox_flash_bulk(struct udevice *dev, struct usb_device *udev,
unsigned long pipe, void *buff, int len)
{
- struct sandbox_flash_plat *plat = dev_get_platdata(dev);
+ struct sandbox_flash_plat *plat = dev_get_plat(dev);
struct sandbox_flash_priv *priv = dev_get_priv(dev);
int ep = usb_pipeendpoint(pipe);
struct umass_bbb_cbw *cbw = buff;
@@ -368,7 +368,7 @@
static int sandbox_flash_ofdata_to_platdata(struct udevice *dev)
{
- struct sandbox_flash_plat *plat = dev_get_platdata(dev);
+ struct sandbox_flash_plat *plat = dev_get_plat(dev);
plat->pathname = dev_read_string(dev, "sandbox,filepath");
@@ -377,7 +377,7 @@
static int sandbox_flash_bind(struct udevice *dev)
{
- struct sandbox_flash_plat *plat = dev_get_platdata(dev);
+ struct sandbox_flash_plat *plat = dev_get_plat(dev);
struct usb_string *fs;
fs = plat->flash_strings;
@@ -393,7 +393,7 @@
static int sandbox_flash_probe(struct udevice *dev)
{
- struct sandbox_flash_plat *plat = dev_get_platdata(dev);
+ struct sandbox_flash_plat *plat = dev_get_plat(dev);
struct sandbox_flash_priv *priv = dev_get_priv(dev);
priv->fd = os_open(plat->pathname, OS_O_RDONLY);
diff --git a/drivers/usb/emul/sandbox_keyb.c b/drivers/usb/emul/sandbox_keyb.c
index 16c5945..5ec1e98 100644
--- a/drivers/usb/emul/sandbox_keyb.c
+++ b/drivers/usb/emul/sandbox_keyb.c
@@ -202,7 +202,7 @@
static int sandbox_keyb_bind(struct udevice *dev)
{
- struct sandbox_keyb_plat *plat = dev_get_platdata(dev);
+ struct sandbox_keyb_plat *plat = dev_get_plat(dev);
struct usb_string *fs;
fs = plat->keyb_strings;
diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c
index be69952..674f78e 100644
--- a/drivers/usb/eth/asix.c
+++ b/drivers/usb/eth/asix.c
@@ -743,7 +743,7 @@
#ifdef CONFIG_DM_ETH
static int asix_eth_start(struct udevice *dev)
{
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
struct asix_private *priv = dev_get_priv(dev);
return asix_init_common(&priv->ueth, pdata->enetaddr);
@@ -825,7 +825,7 @@
int asix_write_hwaddr(struct udevice *dev)
{
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
struct asix_private *priv = dev_get_priv(dev);
if (priv->flags & FLAG_TYPE_AX88172)
@@ -836,7 +836,7 @@
static int asix_eth_probe(struct udevice *dev)
{
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
struct asix_private *priv = dev_get_priv(dev);
struct ueth_data *ss = &priv->ueth;
int ret;
diff --git a/drivers/usb/eth/asix88179.c b/drivers/usb/eth/asix88179.c
index 8abcf13..4742a95 100644
--- a/drivers/usb/eth/asix88179.c
+++ b/drivers/usb/eth/asix88179.c
@@ -857,7 +857,7 @@
int ax88179_write_hwaddr(struct udevice *dev)
{
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
struct asix_private *priv = dev_get_priv(dev);
struct ueth_data *ueth = &priv->ueth;
@@ -866,7 +866,7 @@
static int ax88179_eth_probe(struct udevice *dev)
{
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
struct asix_private *priv = dev_get_priv(dev);
struct usb_device *usb_dev;
int ret;
diff --git a/drivers/usb/eth/lan75xx.c b/drivers/usb/eth/lan75xx.c
index d5e4c6a..4effbc5 100644
--- a/drivers/usb/eth/lan75xx.c
+++ b/drivers/usb/eth/lan75xx.c
@@ -133,7 +133,7 @@
int lan75xx_write_hwaddr(struct udevice *dev)
{
struct usb_device *udev = dev_get_parent_priv(dev);
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
unsigned char *enetaddr = pdata->enetaddr;
u32 addr_lo = get_unaligned_le32(&enetaddr[0]);
u32 addr_hi = (u32)get_unaligned_le16(&enetaddr[4]);
@@ -242,7 +242,7 @@
int lan75xx_read_rom_hwaddr(struct udevice *dev)
{
struct usb_device *udev = dev_get_parent_priv(dev);
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
int ret;
/*
@@ -261,7 +261,7 @@
struct usb_device *udev = dev_get_parent_priv(dev);
struct lan7x_private *priv = dev_get_priv(dev);
struct ueth_data *ueth = &priv->ueth;
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
int ret;
/* Do a reset in order to get the MAC address from HW */
diff --git a/drivers/usb/eth/lan78xx.c b/drivers/usb/eth/lan78xx.c
index cc02e4d..37912a1 100644
--- a/drivers/usb/eth/lan78xx.c
+++ b/drivers/usb/eth/lan78xx.c
@@ -306,7 +306,7 @@
int lan78xx_write_hwaddr(struct udevice *dev)
{
struct usb_device *udev = dev_get_parent_priv(dev);
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
unsigned char *enetaddr = pdata->enetaddr;
u32 addr_lo = get_unaligned_le32(&enetaddr[0]);
u32 addr_hi = (u32)get_unaligned_le16(&enetaddr[4]);
@@ -410,7 +410,7 @@
int lan78xx_read_rom_hwaddr(struct udevice *dev)
{
struct usb_device *udev = dev_get_parent_priv(dev);
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
struct lan7x_private *priv = dev_get_priv(dev);
int ret;
@@ -426,7 +426,7 @@
struct usb_device *udev = dev_get_parent_priv(dev);
struct lan7x_private *priv = dev_get_priv(dev);
struct ueth_data *ueth = &priv->ueth;
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
int ret;
/* Do a reset in order to get the MAC address from HW */
diff --git a/drivers/usb/eth/mcs7830.c b/drivers/usb/eth/mcs7830.c
index d835170..783ab62 100644
--- a/drivers/usb/eth/mcs7830.c
+++ b/drivers/usb/eth/mcs7830.c
@@ -893,7 +893,7 @@
int mcs7830_write_hwaddr(struct udevice *dev)
{
struct usb_device *udev = dev_get_parent_priv(dev);
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
return mcs7830_write_mac_common(udev, pdata->enetaddr);
}
@@ -902,7 +902,7 @@
{
struct usb_device *udev = dev_get_parent_priv(dev);
struct mcs7830_private *priv = dev_get_priv(dev);
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
struct ueth_data *ueth = &priv->ueth;
if (mcs7830_basic_reset(udev, priv))
diff --git a/drivers/usb/eth/r8152.c b/drivers/usb/eth/r8152.c
index 600e9f5..e20cf69 100644
--- a/drivers/usb/eth/r8152.c
+++ b/drivers/usb/eth/r8152.c
@@ -1774,7 +1774,7 @@
static int r8152_write_hwaddr(struct udevice *dev)
{
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
struct r8152 *tp = dev_get_priv(dev);
unsigned char enetaddr[8] = { 0 };
@@ -1792,7 +1792,7 @@
int r8152_read_rom_hwaddr(struct udevice *dev)
{
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
struct r8152 *tp = dev_get_priv(dev);
debug("** %s (%d)\n", __func__, __LINE__);
@@ -1803,7 +1803,7 @@
static int r8152_eth_probe(struct udevice *dev)
{
struct usb_device *udev = dev_get_parent_priv(dev);
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
struct r8152 *tp = dev_get_priv(dev);
struct ueth_data *ueth = &tp->ueth;
int ret;
diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index 836b534..283c52c 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -937,7 +937,7 @@
{
struct usb_device *udev = dev_get_parent_priv(dev);
struct smsc95xx_private *priv = dev_get_priv(dev);
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
/* Driver-model Ethernet ensures we have this */
priv->have_hwaddr = 1;
@@ -1020,7 +1020,7 @@
int smsc95xx_write_hwaddr(struct udevice *dev)
{
struct usb_device *udev = dev_get_parent_priv(dev);
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
struct smsc95xx_private *priv = dev_get_priv(dev);
return smsc95xx_write_hwaddr_common(udev, priv, pdata->enetaddr);
@@ -1029,7 +1029,7 @@
int smsc95xx_read_rom_hwaddr(struct udevice *dev)
{
struct usb_device *udev = dev_get_parent_priv(dev);
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
int ret;
ret = smsc95xx_init_mac_address(pdata->enetaddr, udev);
diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c
index 93b1c60..2d5b7dc 100644
--- a/drivers/usb/gadget/dwc2_udc_otg.c
+++ b/drivers/usb/gadget/dwc2_udc_otg.c
@@ -982,7 +982,7 @@
static int dwc2_udc_otg_ofdata_to_platdata(struct udevice *dev)
{
- struct dwc2_plat_otg_data *plat = dev_get_platdata(dev);
+ struct dwc2_plat_otg_data *plat = dev_get_plat(dev);
ulong drvdata;
void (*set_params)(struct dwc2_plat_otg_data *data);
int ret;
@@ -1090,7 +1090,7 @@
static int dwc2_udc_otg_probe(struct udevice *dev)
{
- struct dwc2_plat_otg_data *plat = dev_get_platdata(dev);
+ struct dwc2_plat_otg_data *plat = dev_get_plat(dev);
struct dwc2_priv_data *priv = dev_get_priv(dev);
struct dwc2_usbotg_reg *usbotg_reg =
(struct dwc2_usbotg_reg *)plat->regs_otg;
@@ -1194,7 +1194,7 @@
int dwc2_udc_B_session_valid(struct udevice *dev)
{
- struct dwc2_plat_otg_data *plat = dev_get_platdata(dev);
+ struct dwc2_plat_otg_data *plat = dev_get_plat(dev);
struct dwc2_usbotg_reg *usbotg_reg =
(struct dwc2_usbotg_reg *)plat->regs_otg;
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 9d4bb9d..7830a4a 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -2009,7 +2009,7 @@
int gcnum;
u8 tmp[7];
#ifdef CONFIG_DM_ETH
- struct eth_pdata *pdata = dev_get_platdata(l_priv->netdev);
+ struct eth_pdata *pdata = dev_get_plat(l_priv->netdev);
#endif
/* these flags are only ever cleared; compiler take note */
@@ -2646,7 +2646,7 @@
static int usb_eth_probe(struct udevice *dev)
{
struct ether_priv *priv = dev_get_priv(dev);
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
priv->netdev = dev;
l_priv = priv;
diff --git a/drivers/usb/host/dwc3-of-simple.c b/drivers/usb/host/dwc3-of-simple.c
index 9b1edcd..66b3e96 100644
--- a/drivers/usb/host/dwc3-of-simple.c
+++ b/drivers/usb/host/dwc3-of-simple.c
@@ -64,7 +64,7 @@
static int dwc3_of_simple_probe(struct udevice *dev)
{
- struct dwc3_of_simple *simple = dev_get_platdata(dev);
+ struct dwc3_of_simple *simple = dev_get_plat(dev);
int ret;
ret = dwc3_of_simple_clk_init(dev, simple);
@@ -80,7 +80,7 @@
static int dwc3_of_simple_remove(struct udevice *dev)
{
- struct dwc3_of_simple *simple = dev_get_platdata(dev);
+ struct dwc3_of_simple *simple = dev_get_plat(dev);
reset_release_bulk(&simple->resets);
diff --git a/drivers/usb/host/dwc3-sti-glue.c b/drivers/usb/host/dwc3-sti-glue.c
index e9ebe2e..90266c7 100644
--- a/drivers/usb/host/dwc3-sti-glue.c
+++ b/drivers/usb/host/dwc3-sti-glue.c
@@ -102,7 +102,7 @@
static int sti_dwc3_glue_ofdata_to_platdata(struct udevice *dev)
{
- struct sti_dwc3_glue_platdata *plat = dev_get_platdata(dev);
+ struct sti_dwc3_glue_platdata *plat = dev_get_plat(dev);
struct udevice *syscon;
struct regmap *regmap;
int ret;
@@ -150,7 +150,7 @@
static int sti_dwc3_glue_bind(struct udevice *dev)
{
- struct sti_dwc3_glue_platdata *plat = dev_get_platdata(dev);
+ struct sti_dwc3_glue_platdata *plat = dev_get_plat(dev);
ofnode node, dwc3_node;
/* Find snps,dwc3 node from subnode */
@@ -175,7 +175,7 @@
static int sti_dwc3_glue_probe(struct udevice *dev)
{
- struct sti_dwc3_glue_platdata *plat = dev_get_platdata(dev);
+ struct sti_dwc3_glue_platdata *plat = dev_get_plat(dev);
int ret;
/* deassert both powerdown and softreset */
@@ -216,7 +216,7 @@
static int sti_dwc3_glue_remove(struct udevice *dev)
{
- struct sti_dwc3_glue_platdata *plat = dev_get_platdata(dev);
+ struct sti_dwc3_glue_platdata *plat = dev_get_plat(dev);
int ret;
/* assert both powerdown and softreset */
diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c
index d1ff3f4..0a3983b 100644
--- a/drivers/usb/host/ehci-exynos.c
+++ b/drivers/usb/host/ehci-exynos.c
@@ -45,7 +45,7 @@
static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
{
- struct exynos_ehci_platdata *plat = dev_get_platdata(dev);
+ struct exynos_ehci_platdata *plat = dev_get_plat(dev);
const void *blob = gd->fdt_blob;
unsigned int node;
int depth;
@@ -214,7 +214,7 @@
static int ehci_usb_probe(struct udevice *dev)
{
- struct exynos_ehci_platdata *plat = dev_get_platdata(dev);
+ struct exynos_ehci_platdata *plat = dev_get_plat(dev);
struct exynos_ehci *ctx = dev_get_priv(dev);
struct ehci_hcor *hcor;
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 13ee268..6143de2 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -47,7 +47,7 @@
{
struct msm_ehci_priv *p = dev_get_priv(dev);
struct usb_ehci *ehci = p->ehci;
- struct usb_platdata *plat = dev_get_platdata(dev);
+ struct usb_platdata *plat = dev_get_plat(dev);
struct ehci_hccr *hccr;
struct ehci_hcor *hcor;
int ret;
diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c
index df54431..717ef68 100644
--- a/drivers/usb/host/ehci-mx5.c
+++ b/drivers/usb/host/ehci-mx5.c
@@ -287,7 +287,7 @@
static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
{
- struct usb_platdata *plat = dev_get_platdata(dev);
+ struct usb_platdata *plat = dev_get_plat(dev);
const char *mode;
mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "dr_mode", NULL);
@@ -305,7 +305,7 @@
static int ehci_usb_probe(struct udevice *dev)
{
- struct usb_platdata *plat = dev_get_platdata(dev);
+ struct usb_platdata *plat = dev_get_plat(dev);
struct usb_ehci *ehci = dev_read_addr_ptr(dev);
struct ehci_mx5_priv_data *priv = dev_get_priv(dev);
enum usb_init_type type = plat->init_type;
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 981bf81..53f0e49 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -472,7 +472,7 @@
static int ehci_usb_phy_mode(struct udevice *dev)
{
- struct usb_platdata *plat = dev_get_platdata(dev);
+ struct usb_platdata *plat = dev_get_plat(dev);
void *__iomem addr = dev_read_addr_ptr(dev);
void *__iomem phy_ctrl, *__iomem phy_status;
const void *blob = gd->fdt_blob;
@@ -520,7 +520,7 @@
static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
{
- struct usb_platdata *plat = dev_get_platdata(dev);
+ struct usb_platdata *plat = dev_get_plat(dev);
enum usb_dr_mode dr_mode;
dr_mode = usb_get_dr_mode(dev->node);
@@ -579,7 +579,7 @@
static int ehci_usb_probe(struct udevice *dev)
{
- struct usb_platdata *plat = dev_get_platdata(dev);
+ struct usb_platdata *plat = dev_get_plat(dev);
struct usb_ehci *ehci = dev_read_addr_ptr(dev);
struct ehci_mx6_priv_data *priv = dev_get_priv(dev);
enum usb_init_type type = plat->init_type;
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 51c5029..0ca20a9 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -368,7 +368,7 @@
static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
{
- struct usb_platdata *plat = dev_get_platdata(dev);
+ struct usb_platdata *plat = dev_get_plat(dev);
plat->init_type = USB_INIT_HOST;
@@ -377,7 +377,7 @@
static int omap_ehci_probe(struct udevice *dev)
{
- struct usb_platdata *plat = dev_get_platdata(dev);
+ struct usb_platdata *plat = dev_get_plat(dev);
struct ehci_omap_priv_data *priv = dev_get_priv(dev);
struct ehci_hccr *hccr;
struct ehci_hcor *hcor;
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index c76e9c3..68a4904 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -828,7 +828,7 @@
static int ehci_usb_probe(struct udevice *dev)
{
- struct usb_platdata *plat = dev_get_platdata(dev);
+ struct usb_platdata *plat = dev_get_plat(dev);
struct fdt_usb *priv = dev_get_priv(dev);
struct ehci_hccr *hccr;
struct ehci_hcor *hcor;
diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c
index c0500e3..e311282 100644
--- a/drivers/usb/host/ehci-vf.c
+++ b/drivers/usb/host/ehci-vf.c
@@ -312,7 +312,7 @@
static int ehci_usb_probe(struct udevice *dev)
{
- struct usb_platdata *plat = dev_get_platdata(dev);
+ struct usb_platdata *plat = dev_get_plat(dev);
struct ehci_vf_priv_data *priv = dev_get_priv(dev);
struct usb_ehci *ehci = priv->ehci;
struct ehci_hccr *hccr;
diff --git a/drivers/usb/host/ehci-zynq.c b/drivers/usb/host/ehci-zynq.c
index df7ea0a..7a7cfaa 100644
--- a/drivers/usb/host/ehci-zynq.c
+++ b/drivers/usb/host/ehci-zynq.c
@@ -34,7 +34,7 @@
static int ehci_zynq_probe(struct udevice *dev)
{
- struct usb_platdata *plat = dev_get_platdata(dev);
+ struct usb_platdata *plat = dev_get_plat(dev);
struct zynq_ehci_priv *priv = dev_get_priv(dev);
struct ehci_hccr *hccr;
struct ehci_hcor *hcor;
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index 8e4e9e8..94ce9a6 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -401,7 +401,7 @@
if (ret)
return ret;
- plat = dev_get_platdata(dev);
+ plat = dev_get_plat(dev);
plat->init_type = USB_INIT_DEVICE;
ret = device_probe(dev);
if (ret)
diff --git a/drivers/usb/host/xhci-brcm.c b/drivers/usb/host/xhci-brcm.c
index cc20cf0..31e4265 100644
--- a/drivers/usb/host/xhci-brcm.c
+++ b/drivers/usb/host/xhci-brcm.c
@@ -30,7 +30,7 @@
static int xhci_brcm_probe(struct udevice *dev)
{
- struct brcm_xhci_platdata *plat = dev_get_platdata(dev);
+ struct brcm_xhci_platdata *plat = dev_get_plat(dev);
struct xhci_hcor *hcor;
struct xhci_hccr *hcd;
int len, ret = 0;
@@ -71,7 +71,7 @@
static int xhci_brcm_deregister(struct udevice *dev)
{
- struct brcm_xhci_platdata *plat = dev_get_platdata(dev);
+ struct brcm_xhci_platdata *plat = dev_get_plat(dev);
/* Restore the default values for AXI read and write attributes */
writel(plat->awcache, plat->hc_base + DRD2U3H_XHC_REGS_AXIWRA);
diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index a57762f..f6534a2 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -117,7 +117,7 @@
struct xhci_hccr *hccr;
struct dwc3 *dwc3_reg;
enum usb_dr_mode dr_mode;
- struct xhci_dwc3_platdata *plat = dev_get_platdata(dev);
+ struct xhci_dwc3_platdata *plat = dev_get_plat(dev);
const char *phy;
u32 reg;
int ret;
@@ -167,7 +167,7 @@
static int xhci_dwc3_remove(struct udevice *dev)
{
- struct xhci_dwc3_platdata *plat = dev_get_platdata(dev);
+ struct xhci_dwc3_platdata *plat = dev_get_plat(dev);
dwc3_shutdown_phy(dev, &plat->phys);
diff --git a/drivers/usb/host/xhci-exynos5.c b/drivers/usb/host/xhci-exynos5.c
index 39e651e..4d3dd36 100644
--- a/drivers/usb/host/xhci-exynos5.c
+++ b/drivers/usb/host/xhci-exynos5.c
@@ -54,7 +54,7 @@
static int xhci_usb_ofdata_to_platdata(struct udevice *dev)
{
- struct exynos_xhci_platdata *plat = dev_get_platdata(dev);
+ struct exynos_xhci_platdata *plat = dev_get_plat(dev);
const void *blob = gd->fdt_blob;
unsigned int node;
int depth;
@@ -205,7 +205,7 @@
static int xhci_usb_probe(struct udevice *dev)
{
- struct exynos_xhci_platdata *plat = dev_get_platdata(dev);
+ struct exynos_xhci_platdata *plat = dev_get_plat(dev);
struct exynos_xhci *ctx = dev_get_priv(dev);
struct xhci_hcor *hcor;
int ret;
diff --git a/drivers/usb/host/xhci-mvebu.c b/drivers/usb/host/xhci-mvebu.c
index 1762bbb..ffecfc2 100644
--- a/drivers/usb/host/xhci-mvebu.c
+++ b/drivers/usb/host/xhci-mvebu.c
@@ -40,7 +40,7 @@
static int xhci_usb_probe(struct udevice *dev)
{
- struct mvebu_xhci_platdata *plat = dev_get_platdata(dev);
+ struct mvebu_xhci_platdata *plat = dev_get_plat(dev);
struct mvebu_xhci *ctx = dev_get_priv(dev);
struct xhci_hcor *hcor;
int len, ret;
@@ -67,7 +67,7 @@
static int xhci_usb_ofdata_to_platdata(struct udevice *dev)
{
- struct mvebu_xhci_platdata *plat = dev_get_platdata(dev);
+ struct mvebu_xhci_platdata *plat = dev_get_plat(dev);
/*
* Get the base address for XHCI controller from the device node
diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c
index 2ef072b..22dfaf4 100644
--- a/drivers/usb/host/xhci-rcar.c
+++ b/drivers/usb/host/xhci-rcar.c
@@ -76,7 +76,7 @@
static int xhci_rcar_probe(struct udevice *dev)
{
- struct rcar_xhci_platdata *plat = dev_get_platdata(dev);
+ struct rcar_xhci_platdata *plat = dev_get_plat(dev);
struct rcar_xhci *ctx = dev_get_priv(dev);
struct xhci_hcor *hcor;
int len, ret;
@@ -122,7 +122,7 @@
static int xhci_rcar_deregister(struct udevice *dev)
{
int ret;
- struct rcar_xhci_platdata *plat = dev_get_platdata(dev);
+ struct rcar_xhci_platdata *plat = dev_get_plat(dev);
ret = xhci_deregister(dev);
@@ -134,7 +134,7 @@
static int xhci_rcar_ofdata_to_platdata(struct udevice *dev)
{
- struct rcar_xhci_platdata *plat = dev_get_platdata(dev);
+ struct rcar_xhci_platdata *plat = dev_get_plat(dev);
plat->hcd_base = dev_read_addr(dev);
if (plat->hcd_base == FDT_ADDR_T_NONE) {
diff --git a/drivers/usb/musb-new/da8xx.c b/drivers/usb/musb-new/da8xx.c
index 2889e85..d9591b9 100644
--- a/drivers/usb/musb-new/da8xx.c
+++ b/drivers/usb/musb-new/da8xx.c
@@ -258,7 +258,7 @@
static int da8xx_musb_ofdata_to_platdata(struct udevice *dev)
{
- struct da8xx_musb_platdata *plat = dev_get_platdata(dev);
+ struct da8xx_musb_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
int node = dev_of_offset(dev);
@@ -282,7 +282,7 @@
static int da8xx_musb_probe(struct udevice *dev)
{
struct musb_host_data *host = dev_get_priv(dev);
- struct da8xx_musb_platdata *plat = dev_get_platdata(dev);
+ struct da8xx_musb_platdata *plat = dev_get_plat(dev);
struct usb_bus_priv *priv = dev_get_uclass_priv(dev);
struct omap_musb_board_data *otg_board_data;
int ret;
diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c
index 9150c4d..b09f0d4 100644
--- a/drivers/usb/musb-new/omap2430.c
+++ b/drivers/usb/musb-new/omap2430.c
@@ -151,7 +151,7 @@
static int omap2430_musb_ofdata_to_platdata(struct udevice *dev)
{
- struct omap2430_musb_platdata *plat = dev_get_platdata(dev);
+ struct omap2430_musb_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
int node = dev_of_offset(dev);
@@ -218,7 +218,7 @@
#else
struct musb *musbp;
#endif
- struct omap2430_musb_platdata *plat = dev_get_platdata(dev);
+ struct omap2430_musb_platdata *plat = dev_get_plat(dev);
struct usb_bus_priv *priv = dev_get_uclass_priv(dev);
struct omap_musb_board_data *otg_board_data;
int ret = 0;
diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
index 29a0632..716e820 100644
--- a/drivers/usb/musb-new/ti-musb.c
+++ b/drivers/usb/musb-new/ti-musb.c
@@ -33,7 +33,7 @@
static void ti_musb_set_phy_power(struct udevice *dev, u8 on)
{
- struct ti_musb_platdata *plat = dev_get_platdata(dev);
+ struct ti_musb_platdata *plat = dev_get_plat(dev);
if (!plat->ctrl_mod_base)
return;
@@ -79,7 +79,7 @@
static int ti_musb_ofdata_to_platdata(struct udevice *dev)
{
- struct ti_musb_platdata *plat = dev_get_platdata(dev);
+ struct ti_musb_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
int node = dev_of_offset(dev);
int phys;
@@ -147,7 +147,7 @@
static int ti_musb_host_probe(struct udevice *dev)
{
struct musb_host_data *host = dev_get_priv(dev);
- struct ti_musb_platdata *plat = dev_get_platdata(dev);
+ struct ti_musb_platdata *plat = dev_get_plat(dev);
struct usb_bus_priv *priv = dev_get_uclass_priv(dev);
int ret;
@@ -178,7 +178,7 @@
#if CONFIG_IS_ENABLED(OF_CONTROL)
static int ti_musb_host_ofdata_to_platdata(struct udevice *dev)
{
- struct ti_musb_platdata *plat = dev_get_platdata(dev);
+ struct ti_musb_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
int node = dev_of_offset(dev);
int ret;
@@ -216,7 +216,7 @@
#if CONFIG_IS_ENABLED(OF_CONTROL)
static int ti_musb_peripheral_ofdata_to_platdata(struct udevice *dev)
{
- struct ti_musb_platdata *plat = dev_get_platdata(dev);
+ struct ti_musb_platdata *plat = dev_get_plat(dev);
const void *fdt = gd->fdt_blob;
int node = dev_of_offset(dev);
int ret;
@@ -244,7 +244,7 @@
static int ti_musb_peripheral_probe(struct udevice *dev)
{
struct ti_musb_peripheral *priv = dev_get_priv(dev);
- struct ti_musb_platdata *plat = dev_get_platdata(dev);
+ struct ti_musb_platdata *plat = dev_get_plat(dev);
int ret;
priv->periph = musb_init_controller(&plat->plat,