[U-Boot] [PATCH 5/8] usb: xhci-exynos5: Add support for multiple USB 3.0 controllers

Vivek Gautam gautamvivek1987 at gmail.com
Tue Jan 7 10:48:39 CET 2014


On Mon, Jan 6, 2014 at 9:21 PM, Marek Vasut <marex at denx.de> wrote:
> On Monday, January 06, 2014 at 10:29:40 AM, Vivek Gautam wrote:
>> Add required support to use multiple USB 3.0 controllers available
>> on exynos5420 SoC.
>>
>> Signed-off-by: Vivek Gautam <gautam.vivek at samsung.com>
>> ---
>>  arch/arm/cpu/armv7/exynos/power.c        |   18 ++++--
>>  arch/arm/include/asm/arch-exynos/cpu.h   |   10 ++++
>>  arch/arm/include/asm/arch-exynos/power.h |    2 +-
>>  drivers/usb/host/xhci-exynos5.c          |   91
>> +++++++++++++++++++++--------- drivers/usb/host/xhci.c                  |
>>   4 --
>>  drivers/usb/host/xhci.h                  |    4 ++
>>  6 files changed, 91 insertions(+), 38 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv7/exynos/power.c
>> b/arch/arm/cpu/armv7/exynos/power.c index 563abd7..0f8aa98 100644
>> --- a/arch/arm/cpu/armv7/exynos/power.c
>> +++ b/arch/arm/cpu/armv7/exynos/power.c
>> @@ -59,26 +59,34 @@ void set_usbhost_phy_ctrl(unsigned int enable)
>>               exynos5_set_usbhost_phy_ctrl(enable);
>>  }
>>
>> -static void exynos5_set_usbdrd_phy_ctrl(unsigned int enable)
>> +static void exynos5_set_usbdrd_phy_ctrl(unsigned int enable, int
>> dev_index) {
>>       struct exynos5_power *power =
>>               (struct exynos5_power *)samsung_get_base_power();
>>
>> +     /*
>> +      * Assuming here that the DRD_PHY_CONTROL registers
>> +      * are contiguous, so that :
>> +      * addressof(DRD_PHY1_CONTROL) = addressof(DRD_PHY_CONTROL) + 0x4;
>> +      * which is the case with exynos5420.
>> +      * For exynos5250 this should work out of box, since dev_index will
>> +      * always be '0' in that case
>> +      */
>
> Why don't you convert the entry for usbdrd_phy_control into an array in the
> 'struct exynos5_power' structure instead ? Then you could index it with
> dev_index.

Aah, i should have been more careful here. There's already a structure
available for exynos5420 "exynos5420_power",
which i can use. I just would need to use api "proid_is_exynos5420()"
or "proid_is_exynos5250()" to differentiate between
the two.

>
> [...]
>
> Do you think it'd be possible to split this patch into drivers/usb/ specific
> part and CPU-specific part ? I'd like to see that to prevent merge conflicts.

Ok, i'll separate out the two parts.

>
> [...]
>
> Best regards,
> Marek Vasut
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot



-- 
Best Regards
Vivek Gautam
Samsung R&D Institute, Bangalore
India


More information about the U-Boot mailing list