summaryrefslogtreecommitdiff
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-01-05 22:34:43 -0500
committerTom Rini <trini@konsulko.com>2021-01-05 22:34:43 -0500
commitb11f634b1c1be6ab419758c6596c673445e5ac70 (patch)
tree2329e1ff53c6c543e01d84b7901c53621ad8b7f9 /drivers/usb/host
parent720620e6916ba40b9a173bb07706d2c73f3c23e7 (diff)
parent970349a96dac3ad46c33851b1a773bfe3f1d4b33 (diff)
Merge tag 'dm-pull-5jan21' of git://git.denx.de/u-boot-dm into next
Driver model: make some udevice fields private Driver model: Rename U_BOOT_DEVICE et al. dtoc: Tidy up and add more tests ns16550 code clean-up x86 and sandbox minor fixes for of-platdata dtoc prepration for adding build-time instantiation
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/dwc3-octeon-glue.c2
-rw-r--r--drivers/usb/host/dwc3-sti-glue.c5
-rw-r--r--drivers/usb/host/ehci-mx6.c2
-rw-r--r--drivers/usb/host/usb-uclass.c10
-rw-r--r--drivers/usb/host/xhci-dwc3.c2
5 files changed, 11 insertions, 10 deletions
diff --git a/drivers/usb/host/dwc3-octeon-glue.c b/drivers/usb/host/dwc3-octeon-glue.c
index c3cac9c5abd..742e156cbb9 100644
--- a/drivers/usb/host/dwc3-octeon-glue.c
+++ b/drivers/usb/host/dwc3-octeon-glue.c
@@ -366,7 +366,7 @@ static int octeon_dwc3_glue_bind(struct udevice *dev)
/* Find snps,dwc3 node from subnode */
dwc3_node = ofnode_null();
- ofnode_for_each_subnode(node, dev->node) {
+ ofnode_for_each_subnode(node, dev_ofnode(dev)) {
if (ofnode_device_is_compatible(node, "snps,dwc3"))
dwc3_node = node;
}
diff --git a/drivers/usb/host/dwc3-sti-glue.c b/drivers/usb/host/dwc3-sti-glue.c
index 80e543496d9..1234399f33b 100644
--- a/drivers/usb/host/dwc3-sti-glue.c
+++ b/drivers/usb/host/dwc3-sti-glue.c
@@ -108,7 +108,8 @@ static int sti_dwc3_glue_of_to_plat(struct udevice *dev)
int ret;
u32 reg[4];
- ret = ofnode_read_u32_array(dev->node, "reg", reg, ARRAY_SIZE(reg));
+ ret = ofnode_read_u32_array(dev_ofnode(dev), "reg", reg,
+ ARRAY_SIZE(reg));
if (ret) {
pr_err("unable to find st,stih407-dwc3 reg property(%d)\n", ret);
return ret;
@@ -154,7 +155,7 @@ static int sti_dwc3_glue_bind(struct udevice *dev)
ofnode node, dwc3_node;
/* Find snps,dwc3 node from subnode */
- ofnode_for_each_subnode(node, dev->node) {
+ ofnode_for_each_subnode(node, dev_ofnode(dev)) {
if (ofnode_device_is_compatible(node, "snps,dwc3"))
dwc3_node = node;
}
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index d2f49cf4690..ef3a63afa44 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -523,7 +523,7 @@ static int ehci_usb_of_to_plat(struct udevice *dev)
struct usb_plat *plat = dev_get_plat(dev);
enum usb_dr_mode dr_mode;
- dr_mode = usb_get_dr_mode(dev->node);
+ dr_mode = usb_get_dr_mode(dev_ofnode(dev));
switch (dr_mode) {
case USB_DR_MODE_HOST:
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index a2bd7436f42..e3b616c3266 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -60,7 +60,7 @@ int submit_control_msg(struct usb_device *udev, unsigned long pipe,
{
struct udevice *bus = udev->controller_dev;
struct dm_usb_ops *ops = usb_get_ops(bus);
- struct usb_uclass_priv *uc_priv = bus->uclass->priv;
+ struct usb_uclass_priv *uc_priv = uclass_get_priv(bus->uclass);
int err;
if (!ops->control)
@@ -184,7 +184,7 @@ int usb_stop(void)
if (ret)
return ret;
- uc_priv = uc->priv;
+ uc_priv = uclass_get_priv(uc);
uclass_foreach_dev(bus, uc) {
ret = device_remove(bus, DM_REMOVE_NORMAL);
@@ -263,7 +263,7 @@ int usb_init(void)
if (ret)
return ret;
- uc_priv = uc->priv;
+ uc_priv = uclass_get_priv(uc);
uclass_foreach_dev(bus, uc) {
/* init low_level USB */
@@ -517,7 +517,7 @@ static ofnode usb_get_ofnode(struct udevice *hub, int port)
ofnode node;
u32 reg;
- if (!dev_has_of_node(hub))
+ if (!dev_has_ofnode(hub))
return ofnode_null();
/*
@@ -773,7 +773,7 @@ static int usb_child_post_bind(struct udevice *dev)
struct usb_dev_plat *plat = dev_get_parent_plat(dev);
int val;
- if (!dev_of_valid(dev))
+ if (!dev_has_ofnode(dev))
return 0;
/* We only support matching a few things */
diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index 59408e4e50e..3e0ae80cece 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -155,7 +155,7 @@ static int xhci_dwc3_probe(struct udevice *dev)
writel(reg, &dwc3_reg->g_usb2phycfg[0]);
- dr_mode = usb_get_dr_mode(dev->node);
+ dr_mode = usb_get_dr_mode(dev_ofnode(dev));
if (dr_mode == USB_DR_MODE_UNKNOWN)
/* by default set dual role mode to HOST */
dr_mode = USB_DR_MODE_HOST;