[PATCH] loadb: only try to change the baudrate if the driver has this feature

Eric Bénard eric at eukrea.com
Wed Jan 4 12:04:23 EST 2012


Hi Sascha,

Le Wed, 4 Jan 2012 17:37:56 +0100,
Sascha Hauer <s.hauer at pengutronix.de> a écrit :

> On Wed, Jan 04, 2012 at 04:01:16PM +0100, Eric Bénard wrote:
> > this allows loadb to work over usbserial gadget
> 
> I like the original approach better. The baudrate setting has no meaning
> in hardware for the usb serial gadget. This means that we can happily
> support every baudrate requested by adding a fake setbrg function.
> 
> If we had some global console_setbrg function I would agree
> Jean-Christophe, this function should return cdev->setbrg or
> -ENOSYS if the driver does not have a setbrg function. Still the
> usb gadget serial driver should have a fake setbrg function for
> the reason explained above.
> 
> This command could be improved by doing all this baudrate stuff only
> when the -b option is given. This way we default to the current
> baudrate (which seems sane in the cases I can think of)
> 
OK so in conclusion, what do you prefer : 
- applying " u_serial: add setbrg to be able to use loadb & co"
- a fix for loadb to only handle baudrate change if -b option is given
- or maybe both options ? ;-)

?
Eric




More information about the barebox mailing list