mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
Cleanup serial console baudrate calculation on AT91RM9200
This commit is contained in:
@@ -55,11 +55,8 @@ void serial_setbrg (void)
|
||||
|
||||
if ((baudrate = gd->baudrate) <= 0)
|
||||
baudrate = CONFIG_BAUDRATE;
|
||||
if (baudrate == 0 || baudrate == CONFIG_BAUDRATE)
|
||||
us->US_BRGR = CFG_AT91C_BRGR_DIVISOR; /* hardcode so no __divsi3 */
|
||||
else
|
||||
/* MASTER_CLOCK/(16 * baudrate) */
|
||||
us->US_BRGR = (AT91C_MASTER_CLOCK >> 4)/baudrate;
|
||||
/* MASTER_CLOCK/(16 * baudrate) */
|
||||
us->US_BRGR = (AT91C_MASTER_CLOCK >> 4)/baudrate;
|
||||
}
|
||||
|
||||
int serial_init (void)
|
||||
|
||||
Reference in New Issue
Block a user