[U-Boot] [PATCH] usb: dwc2: Rename CONFIG_DWC2_UTMI_PHY_WIDTH to CONFIG_DWC2_UTMI_WIDTH
Marek Vasut
marex at denx.de
Mon Feb 5 18:57:06 UTC 2018
On 02/05/2018 07:09 PM, Alexey Brodkin wrote:
> Hi Marek,
>
>> -----Original Message-----
>> From: Marek Vasut [mailto:marex at denx.de]
>> Sent: Monday, February 5, 2018 4:18 PM
>> To: Alexey Brodkin <Alexey.Brodkin at synopsys.com>
>> Cc: u-boot at lists.denx.de
>> Subject: Re: [PATCH] usb: dwc2: Rename CONFIG_DWC2_UTMI_PHY_WIDTH to CONFIG_DWC2_UTMI_WIDTH
>>
>> On 02/01/2018 03:53 PM, Alexey Brodkin wrote:
>>> Hi Marek,
>>>
>>> On Wed, 2018-01-31 at 16:13 +0100, Marek Vasut wrote:
>>>> On 01/31/2018 03:56 PM, Alexey Brodkin wrote:
>>>>> For some reason from day one we used to have both CONFIG_DWC2_UTMI_WIDTH
>>>>> mentioned in dwc2.h and in scripts/config_whitelist.txt but never really used
>>>>> and CONFIG_DWC2_UTMI_PHY_WIDTH used in real code in dwc2.c (but never
>>>>> defined).
>>>>>
>>>>> Moreover even though CONFIG_DWC2_UTMI_WIDTH might be either 8 or 16
>>>>> depending on hardware (and the same is said in a comment for it in
>>>>> dwc2.h) but then 8 is hardcoded in the header leaving no ability to
>>>>> override this value in board's configuration.
>>>>>
>>>>> Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
>>>>> Cc: Marek Vasut <marex at denx.de>
>>>>
>>>> Applied, thanks.
>>>>
>>>> btw How the heck did that code ever even compile ?
>>>
>>> Well my change doesn't really fix anything in existing code
>>> except makes once check meaningful compared to dummy always negative
>>> as it was before :)
>>
>> Ha, now I see it.
>>
>>> I'd say it means the driver was not very widely used on different hardwares.
>>> Still it does work [at least] to some extent which is really nice.
>>
>> Probably. All this info should be pulled from DT anyway.
>
> That's so true... but now when there're real users of this driver moving stuff to
> Device tree is not that trivial:
> 1) We need to move there those options that are now "configured" via defines
> 2) We need to keep compatibility with Linux DT options for the same controller otherwise we'll
> lose ability to use the same .dtb-s in both Linux and U-Boot.
>
> I'm not saying it's not doable but it is not a one-liner unfortunately.
It should be done, soon. I'm not saying it's gonna be easy, but I don't
see it being hard either.
btw same should be done for the Linux driver.
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list