From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Wed, 10 Sep 2014 08:10:02 +0200 Subject: [U-Boot] [PATCH v1 1/2] usb: dfu: add config option to use in dfu mode fullspeed only In-Reply-To: <540F11BE.7000202@ti.com> References: <1410266224-4051-1-git-send-email-hs@denx.de> <1410266224-4051-2-git-send-email-hs@denx.de> <540F0A1E.7060109@ti.com> <540F1097.4030901@denx.de> <540F11BE.7000202@ti.com> Message-ID: <540FEB3A.30600@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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