[PATCH] Force set console baudrate

Alexey Galakhov agalakhov at gmail.com
Wed Jul 10 05:36:18 EDT 2013


On 07/10/2013 03:01 PM, Sascha Hauer wrote:

> Anyway, maybe Jean-Christophe is right and we should do this in
> console_std_set by adding:
> 
> 	if(flag && cdev->setbrg)
> 		cdev->setbrg(cdev, cdev->baudrate);
> 
> This makes sure the hardware is only ever touched when the console is
> actually used.
> 
> Sascha
> 

Hi,

Agree. The only reason not do to so was that I saw the existing code,
especially the else clause in console_baudrate_set().

I just made v2 of the patch. I'm testing it right now. If it's Ok, I'll
submit it.

I did almost exactly this. The difference is that I do not call setbrg()
again if the device is already active. I also removed setbrg() call for
inactive devices from console_baudrate_set() as this would be duplicate
call now.

Regards,
Alex



More information about the barebox mailing list