Commit 0fbde950 authored by Magnus Damm's avatar Magnus Damm Committed by Paul Mundt

sh: sh-sci - fix SH7708 support

This patch makes sure the sci serial port driver compiles for sh7708.
The approach taken is to treat the sh7708 as a subset of sh7706, sh7707,
sh7709. sh7708 is very similar to sh7706, sh7707, sh7709, but only
equipped with a single sci port. The platform data in setup-sh770x.c
already limits the number of serial ports for sh7708 to a single one,
so the non-existing scif ports pointed out in sh-sci.h will remain
unused in case of sh7708.
Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent ac79fd58
...@@ -23,13 +23,10 @@ ...@@ -23,13 +23,10 @@
#endif #endif
#endif #endif
#if defined(CONFIG_CPU_SUBTYPE_SH7708) #if defined(CONFIG_CPU_SUBTYPE_SH7706) || \
# define SCSPTR 0xffffff7c /* 8 bit */ defined(CONFIG_CPU_SUBTYPE_SH7707) || \
# define SCSCR_INIT(port) 0x30 /* TIE=0,RIE=0,TE=1,RE=1 */ defined(CONFIG_CPU_SUBTYPE_SH7708) || \
# define SCI_ONLY defined(CONFIG_CPU_SUBTYPE_SH7709)
#elif defined(CONFIG_CPU_SUBTYPE_SH7707) || \
defined(CONFIG_CPU_SUBTYPE_SH7709) || \
defined(CONFIG_CPU_SUBTYPE_SH7706)
# define SCPCR 0xA4000116 /* 16 bit SCI and SCIF */ # define SCPCR 0xA4000116 /* 16 bit SCI and SCIF */
# define SCPDR 0xA4000136 /* 8 bit SCI and SCIF */ # define SCPDR 0xA4000136 /* 8 bit SCI and SCIF */
# define SCSCR_INIT(port) 0x30 /* TIE=0,RIE=0,TE=1,RE=1 */ # define SCSCR_INIT(port) 0x30 /* TIE=0,RIE=0,TE=1,RE=1 */
...@@ -479,16 +476,10 @@ static const struct __attribute__((packed)) { ...@@ -479,16 +476,10 @@ static const struct __attribute__((packed)) {
}; };
#endif #endif
#if defined(CONFIG_CPU_SUBTYPE_SH7708) #if defined(CONFIG_CPU_SUBTYPE_SH7706) || \
static inline int sci_rxd_in(struct uart_port *port) defined(CONFIG_CPU_SUBTYPE_SH7707) || \
{ defined(CONFIG_CPU_SUBTYPE_SH7708) || \
if (port->mapbase == 0xfffffe80) defined(CONFIG_CPU_SUBTYPE_SH7709)
return ctrl_inb(SCSPTR)&0x01 ? 1 : 0; /* SCI */
return 1;
}
#elif defined(CONFIG_CPU_SUBTYPE_SH7707) || \
defined(CONFIG_CPU_SUBTYPE_SH7709) || \
defined(CONFIG_CPU_SUBTYPE_SH7706)
static inline int sci_rxd_in(struct uart_port *port) static inline int sci_rxd_in(struct uart_port *port)
{ {
if (port->mapbase == 0xfffffe80) if (port->mapbase == 0xfffffe80)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment