[U-Boot] [PATCH v1 1/2] usb: dfu: add config option to use in dfu mode fullspeed only

Heiko Schocher hs at denx.de
Wed Sep 10 08:10:02 CEST 2014


Hello Bin Liu,

Am 09.09.2014 16:42, schrieb Bin Liu:
> Heiko,
>
> On 09/09/2014 09:37 AM, Heiko Schocher wrote:
>> Hello Bin Liu,
>>
>> Am 09.09.2014 16:09, schrieb Bin Liu:
>>> Heiko,
>>>
>>> On 09/09/2014 07:37 AM, Heiko Schocher wrote:
>>>> add the new config option CONFIG_DFU_FULLSPEED. With this
>>>> option enabled, DFU uses fullspeed only.
>>>
>>> Can we not introduce the new config option but check the gadget driver
>>> speed in runtime as what the ether gadget driver does?
>>> I don't want two config options (CONFIG_USB_GADGET_DUALSPEED and
>>> CONFIG_DFU_FULLSPEED) to control one feature, as in your patch 2/2.
>>
>> Hmm.. I am not sure, if I understand you correct. I could use
>> CONFIG_USB_GADGET_DUALSPEED instead the new config option
>> for setting "config->fullspeed = 1;" in g_dnl_config_register()
>>
>> If you mean this, yes, thats would be a good change...
>
> No, I did not mean this build time macro, but was thinking you can check g->speed at the same place in runtime.
>
> I think you can refer to ether.c, which supports full-speed but does not use any macro.

Yep, you are right, I can get rid completely of this new define!
The speed selection is done in drivers/usb/gadget/composite.c

I removed it, do some tests, and send a v2. Thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list