]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sh: serial_sh: Fix build in serial_sh
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Wed, 24 Nov 2010 04:42:13 +0000 (13:42 +0900)
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Tue, 11 Jan 2011 12:03:25 +0000 (21:03 +0900)
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>
drivers/serial/serial_sh.h

index 54e94e5bf1134783beaf0299ec95ecf7c956b5ca..e19593c66e90afc52bffe28cf1184be0ed42b606 100644 (file)
@@ -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 */