mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 06:31:31 +00:00
sh: serial: coding style cleanup
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
This commit is contained in:
parent
c9935c9925
commit
9e1fa628bd
1 changed files with 18 additions and 17 deletions
|
@ -106,12 +106,12 @@
|
|||
|
||||
/* SCBRR register value setting */
|
||||
#if defined(CONFIG_CPU_SH7720)
|
||||
# define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1)
|
||||
# define SCBRR_VALUE(bps, clk) (((clk * 2) + 16 * bps) / (32 * bps) - 1)
|
||||
#elif defined(CONFIG_CPU_SH7723) && defined(CONFIG_SCIF_A)
|
||||
/* SH7723 SCIFA use bus clock. So clock *2 */
|
||||
# define SCBRR_VALUE(bps, clk) (((clk*2*2)+16*bps)/(32*bps)-1)
|
||||
# define SCBRR_VALUE(bps, clk) (((clk * 2 * 2) + 16 * bps) / (32 * bps) - 1)
|
||||
#else /* Generic SuperH */
|
||||
# define SCBRR_VALUE(bps, clk) ((clk+16*bps)/(32*bps)-1)
|
||||
# define SCBRR_VALUE(bps, clk) ((clk + 16 * bps) / (32 * bps) - 1)
|
||||
#endif
|
||||
|
||||
#define SCR_RE (1 << 4)
|
||||
|
@ -131,6 +131,7 @@
|
|||
void serial_setbrg(void)
|
||||
{
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
*SCBRR = SCBRR_VALUE(gd->baudrate, CONFIG_SYS_CLK_FREQ);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue