* [PATCH] serial: sh-sci: Add support SCIF of SH7723
@ 2008-10-03 8:37 Nobuhiro Iwamatsu
2008-10-20 4:12 ` Paul Mundt
0 siblings, 1 reply; 2+ messages in thread
From: Nobuhiro Iwamatsu @ 2008-10-03 8:37 UTC (permalink / raw)
To: linux-sh
SH7723 has two types of SCIF (SCIF and SCIFA).
The current sh-sci driver supports only SCIFA, and calculation methods of SCBRR
are different.
This patch support this methods.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
---
drivers/serial/sh-sci.h | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h
index 8a0749e..0dfd966 100644
--- a/drivers/serial/sh-sci.h
+++ b/drivers/serial/sh-sci.h
@@ -791,7 +791,14 @@ static inline int sci_rxd_in(struct uart_port *port)
defined(CONFIG_CPU_SUBTYPE_SH7721)
#define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1)
#elif defined(CONFIG_CPU_SUBTYPE_SH7723)
-#define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(16*bps)-1)
+static inline int scbrr_calc(struct uart_port *port, int bps, int clk)
+{
+ 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)
#elif defined(__H8300H__) || defined(__H8300S__)
#define SCBRR_VALUE(bps) (((CONFIG_CPU_CLOCK*1000/32)/bps)-1)
#elif defined(CONFIG_SUPERH64)
-- 1.5.6.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] serial: sh-sci: Add support SCIF of SH7723
2008-10-03 8:37 [PATCH] serial: sh-sci: Add support SCIF of SH7723 Nobuhiro Iwamatsu
@ 2008-10-20 4:12 ` Paul Mundt
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2008-10-20 4:12 UTC (permalink / raw)
To: linux-sh
On Fri, Oct 03, 2008 at 05:37:31PM +0900, Nobuhiro Iwamatsu wrote:
> SH7723 has two types of SCIF (SCIF and SCIFA).
> The current sh-sci driver supports only SCIFA, and calculation methods of SCBRR
> are different.
> This patch support this methods.
>
> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Ok, applied. I have a large rewrite of sh-sci pending, but there is no
harm in merging this for 2.6.28.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-20 4:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-03 8:37 [PATCH] serial: sh-sci: Add support SCIF of SH7723 Nobuhiro Iwamatsu
2008-10-20 4:12 ` Paul Mundt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox