Skip to content
Snippets Groups Projects
Commit f3038cde authored by Nobuhiro Iwamatsu's avatar Nobuhiro Iwamatsu Committed by Nobuhiro Iwamatsu
Browse files

sh: serial_sh: Fix build in serial_sh


The serial of ap325rxa has it of two kinds, and the setting of
the clock is different.
Because there was a problem by function to judge serial kind,
this revised it.

Signed-off-by: default avatarNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
parent 99057064
No related branches found
No related tags found
No related merge requests found
...@@ -675,14 +675,14 @@ static inline int sci_rxd_in(struct uart_port *port) ...@@ -675,14 +675,14 @@ static inline int sci_rxd_in(struct uart_port *port)
#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) ||\ #elif defined(CONFIG_CPU_SH7723) ||\
defined(CONFIG_CPU_SH7724) defined(CONFIG_CPU_SH7724)
static inline int scbrr_calc(struct uart_port *port, int bps, int clk) static inline int scbrr_calc(struct uart_port port, int bps, int clk)
{ {
if (port->type == PORT_SCIF) if (port.type == PORT_SCIF)
return (clk+16*bps)/(32*bps)-1; return (clk+16*bps)/(32*bps)-1;
else else
return ((clk*2)+16*bps)/(16*bps)-1; return ((clk*2)+16*bps)/(16*bps)-1;
} }
#define SCBRR_VALUE(bps, clk) scbrr_calc(port, bps, clk) #define SCBRR_VALUE(bps, clk) scbrr_calc(sh_sci, bps, clk)
#elif defined(__H8300H__) || defined(__H8300S__) #elif defined(__H8300H__) || defined(__H8300S__)
#define SCBRR_VALUE(bps, clk) (((clk*1000/32)/bps)-1) #define SCBRR_VALUE(bps, clk) (((clk*1000/32)/bps)-1)
#else /* Generic SH */ #else /* Generic SH */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment