diff mbox series

[02/10] usb: ehci-msm: Use dev interface to get device address

Message ID 20200219015447.19392-3-kever.yang@rock-chips.com
State Superseded
Headers show
Series usb: Covert to support Live DT | expand

Commit Message

Kever Yang Feb. 19, 2020, 1:54 a.m. UTC
Use dev_read_addr_ptr() instead of devfdt_get_addr() so that we can support
live DT.

Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
---

 drivers/usb/host/ehci-msm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Ramon Fried Feb. 19, 2020, 6:31 p.m. UTC | #1
On Wed, Feb 19, 2020 at 3:55 AM Kever Yang <kever.yang at rock-chips.com> wrote:
>
> Use dev_read_addr_ptr() instead of devfdt_get_addr() so that we can support
> live DT.
>
> Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
> ---
>
>  drivers/usb/host/ehci-msm.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
> index 5c257ccf4d..dd92808ff7 100644
> --- a/drivers/usb/host/ehci-msm.c
> +++ b/drivers/usb/host/ehci-msm.c
> @@ -10,8 +10,6 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <errno.h>
> -#include <fdtdec.h>
> -#include <linux/libfdt.h>
>  #include <usb.h>
>  #include <usb/ehci-ci.h>
>  #include <usb/ulpi.h>
> @@ -108,7 +106,7 @@ static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
>         struct msm_ehci_priv *priv = dev_get_priv(dev);
>
>         priv->ulpi_vp.port_num = 0;
> -       priv->ehci = (void *)devfdt_get_addr(dev);
> +       priv->ehci = dev_read_addr_ptr(dev);
>
>         if (priv->ehci == (void *)FDT_ADDR_T_NONE)
>                 return -EINVAL;
> --
> 2.17.1
>
Reviewed-By: Ramon Fried <rfried.dev at gmail.com>
diff mbox series

Patch

diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 5c257ccf4d..dd92808ff7 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -10,8 +10,6 @@ 
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
-#include <fdtdec.h>
-#include <linux/libfdt.h>
 #include <usb.h>
 #include <usb/ehci-ci.h>
 #include <usb/ulpi.h>
@@ -108,7 +106,7 @@  static int ehci_usb_ofdata_to_platdata(struct udevice *dev)
 	struct msm_ehci_priv *priv = dev_get_priv(dev);
 
 	priv->ulpi_vp.port_num = 0;
-	priv->ehci = (void *)devfdt_get_addr(dev);
+	priv->ehci = dev_read_addr_ptr(dev);
 
 	if (priv->ehci == (void *)FDT_ADDR_T_NONE)
 		return -EINVAL;