[U-Boot] [PATCH v5 10/14] usb: extend generic EHCI with PHY
Patrice CHOTARD
patrice.chotard at st.com
Thu May 11 07:19:33 UTC 2017
Hi Marek
On 05/10/2017 11:18 PM, Marek Vasut wrote:
> On 05/10/2017 06:09 PM, patrice.chotard at st.com wrote:
>> From: Patrice Chotard <patrice.chotard at st.com>
>
> Commit message missing.
ok i will fix it
>
> You should also break this patchset up into smaller pieces.
You mean, extract the update of generic OHCI and >EHCI driver from this
series ?
>
>> 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 ?
It allows to retrieve any present USB phys node and call the associated
init callback. see patch 4 of this series ([PATCH v5 04/14] usb: phy:
Add STi USB2 PHY)
FYI, in dm next branch, there is a new generic PHY framework implementation.
See 0ace7fe60d5c258324ef4b2caaa556616b96d1d9 drivers: phy: add generic
PHY framework
Thanks
Patrice
>
>> + }
>> +
>> hccr = map_physmem(dev_get_addr(dev), 0x100, MAP_NOCACHE);
>> hcor = (struct ehci_hcor *)((uintptr_t)hccr +
>> HC_LENGTH(ehci_readl(&hccr->cr_capbase)));
>>
>
>
More information about the U-Boot
mailing list