summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>2010-11-24 13:42:13 +0900
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>2011-01-11 21:03:25 +0900
commitf3038cde9fc9d7a2c5e3465a2aa497beb1fa199a (patch)
treefb4bd8cce8d825fef605b3ea58ab72776dc7c62e
parent99057064b375a9ec6f328452ec5f8bc60bd0b118 (diff)
downloadu-boot-imx-f3038cde9fc9d7a2c5e3465a2aa497beb1fa199a.zip
u-boot-imx-f3038cde9fc9d7a2c5e3465a2aa497beb1fa199a.tar.gz
u-boot-imx-f3038cde9fc9d7a2c5e3465a2aa497beb1fa199a.tar.bz2
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: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
-rw-r--r--drivers/serial/serial_sh.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/serial/serial_sh.h b/drivers/serial/serial_sh.h
index 54e94e5..e19593c 100644
--- a/drivers/serial/serial_sh.h
+++ b/drivers/serial/serial_sh.h
@@ -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)
#elif defined(CONFIG_CPU_SH7723) ||\
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;
else
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__)
#define SCBRR_VALUE(bps, clk) (((clk*1000/32)/bps)-1)
#else /* Generic SH */