diff options
author | Tom Rini <trini@konsulko.com> | 2021-01-11 13:55:03 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-11 13:55:03 -0500 |
commit | d71be1990218957b9f05dbf13a72859a2abe06d7 (patch) | |
tree | 99858dc9988f7f7b4c0ab1d8d45738e3abdf38c8 /drivers/usb/dwc3/dwc3-generic.c | |
parent | c4fddedc48f336eabc4ce3f74940e6aa372de18c (diff) | |
parent | bc0b99bd8b19599f670f42401de655fa9b44cd94 (diff) |
Merge branch 'next'
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/usb/dwc3/dwc3-generic.c')
-rw-r--r-- | drivers/usb/dwc3/dwc3-generic.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c index 222358d395..30f835e1e3 100644 --- a/drivers/usb/dwc3/dwc3-generic.c +++ b/drivers/usb/dwc3/dwc3-generic.c @@ -53,9 +53,9 @@ static int dwc3_generic_probe(struct udevice *dev, 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; @@ -105,10 +105,10 @@ static int dwc3_generic_remove(struct udevice *dev, return 0; } -static int dwc3_generic_ofdata_to_platdata(struct udevice *dev) +static int dwc3_generic_of_to_plat(struct udevice *dev) { - struct dwc3_generic_plat *plat = dev_get_platdata(dev); - ofnode node = dev->node; + struct dwc3_generic_plat *plat = dev_get_plat(dev); + ofnode node = dev_ofnode(dev); plat->base = dev_read_addr(dev); @@ -155,11 +155,11 @@ static int dwc3_generic_peripheral_remove(struct udevice *dev) U_BOOT_DRIVER(dwc3_generic_peripheral) = { .name = "dwc3-generic-peripheral", .id = UCLASS_USB_GADGET_GENERIC, - .ofdata_to_platdata = dwc3_generic_ofdata_to_platdata, + .of_to_plat = dwc3_generic_of_to_plat, .probe = dwc3_generic_peripheral_probe, .remove = dwc3_generic_peripheral_remove, - .priv_auto_alloc_size = sizeof(struct dwc3_generic_priv), - .platdata_auto_alloc_size = sizeof(struct dwc3_generic_plat), + .priv_auto = sizeof(struct dwc3_generic_priv), + .plat_auto = sizeof(struct dwc3_generic_plat), }; #endif @@ -197,11 +197,11 @@ static int dwc3_generic_host_remove(struct udevice *dev) U_BOOT_DRIVER(dwc3_generic_host) = { .name = "dwc3-generic-host", .id = UCLASS_USB, - .ofdata_to_platdata = dwc3_generic_ofdata_to_platdata, + .of_to_plat = dwc3_generic_of_to_plat, .probe = dwc3_generic_host_probe, .remove = dwc3_generic_host_remove, - .priv_auto_alloc_size = sizeof(struct dwc3_generic_host_priv), - .platdata_auto_alloc_size = sizeof(struct dwc3_generic_plat), + .priv_auto = sizeof(struct dwc3_generic_host_priv), + .plat_auto = sizeof(struct dwc3_generic_plat), .ops = &xhci_usb_ops, .flags = DM_FLAG_ALLOC_PRIV_DMA, }; @@ -238,7 +238,7 @@ enum dwc3_omap_utmi_mode { 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")) @@ -301,7 +301,7 @@ static int dwc3_glue_bind(struct udevice *parent) ofnode node; int ret; - ofnode_for_each_subnode(node, parent->node) { + ofnode_for_each_subnode(node, dev_ofnode(parent)) { const char *name = ofnode_get_name(node); enum usb_dr_mode dr_mode; struct udevice *dev; @@ -390,7 +390,7 @@ static int dwc3_glue_clk_init(struct udevice *dev, 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; @@ -418,7 +418,7 @@ static int dwc3_glue_probe(struct udevice *dev) while (child) { enum usb_dr_mode dr_mode; - dr_mode = usb_get_dr_mode(child->node); + dr_mode = usb_get_dr_mode(dev_ofnode(child)); device_find_next_child(&child); if (ops && ops->select_dr_mode) ops->select_dr_mode(dev, index, dr_mode); @@ -430,7 +430,7 @@ static int dwc3_glue_probe(struct udevice *dev) 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); @@ -460,6 +460,6 @@ U_BOOT_DRIVER(dwc3_generic_wrapper) = { .bind = dwc3_glue_bind, .probe = dwc3_glue_probe, .remove = dwc3_glue_remove, - .platdata_auto_alloc_size = sizeof(struct dwc3_glue_data), + .plat_auto = sizeof(struct dwc3_glue_data), }; |