[U-Boot] [PATCH v5 10/14] usb: extend generic EHCI with PHY

Marek Vasut marex at denx.de
Wed May 10 21:18:03 UTC 2017


On 05/10/2017 06:09 PM, patrice.chotard at st.com wrote:
> From: Patrice Chotard <patrice.chotard at st.com>

Commit message missing.

You should also break this patchset up into smaller pieces.

> Signed-off-by: Patrice Chotard <patrice.chotard at st.com>
> ---
> 
> v5:   _ add support of new generic PHY UCLASS
> 
>  drivers/usb/host/ehci-generic.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c
> index 2190adb..3c2f5a7 100644
> --- a/drivers/usb/host/ehci-generic.c
> +++ b/drivers/usb/host/ehci-generic.c
> @@ -6,6 +6,8 @@
>  
>  #include <common.h>
>  #include <clk.h>
> +#include <fdtdec.h>
> +#include <generic-phy.h>
>  #include <reset.h>
>  #include <asm/io.h>
>  #include <dm.h>
> @@ -50,6 +52,17 @@ static int ehci_usb_probe(struct udevice *dev)
>  		reset_free(&reset);
>  	}
>  
> +	for (i = 0; ; i++) {
> +		struct phy usb_phy;
> +		int ret;
> +
> +		ret = generic_phy_get_by_index(dev, i, &usb_phy);
> +		if (ret < 0)
> +			break;
> +		if (generic_phy_init(&usb_phy))
> +			printf("failed to init usb phy %d\n", i);

How does this whole block work ? What is this about ?

> +	}
> +
>  	hccr = map_physmem(dev_get_addr(dev), 0x100, MAP_NOCACHE);
>  	hcor = (struct ehci_hcor *)((uintptr_t)hccr +
>  				    HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
> 


-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list