aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/sh-sci.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/sh-sci.h')
-rw-r--r--drivers/serial/sh-sci.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h
index eb7ef4951e07..d2352ac437c5 100644
--- a/drivers/serial/sh-sci.h
+++ b/drivers/serial/sh-sci.h
@@ -330,7 +330,7 @@
330#define CPU_SCIx_FNS(name, sci_offset, sci_size, scif_offset, scif_size)\ 330#define CPU_SCIx_FNS(name, sci_offset, sci_size, scif_offset, scif_size)\
331 static inline unsigned int sci_##name##_in(struct uart_port *port) \ 331 static inline unsigned int sci_##name##_in(struct uart_port *port) \
332 { \ 332 { \
333 if (port->type == PORT_SCIF) { \ 333 if (port->type == PORT_SCIF || port->type == PORT_SCIFB) { \
334 SCI_IN(scif_size, scif_offset) \ 334 SCI_IN(scif_size, scif_offset) \
335 } else { /* PORT_SCI or PORT_SCIFA */ \ 335 } else { /* PORT_SCI or PORT_SCIFA */ \
336 SCI_IN(sci_size, sci_offset); \ 336 SCI_IN(sci_size, sci_offset); \
@@ -338,7 +338,7 @@
338 } \ 338 } \
339 static inline void sci_##name##_out(struct uart_port *port, unsigned int value) \ 339 static inline void sci_##name##_out(struct uart_port *port, unsigned int value) \
340 { \ 340 { \
341 if (port->type == PORT_SCIF) { \ 341 if (port->type == PORT_SCIF || port->type == PORT_SCIFB) { \
342 SCI_OUT(scif_size, scif_offset, value) \ 342 SCI_OUT(scif_size, scif_offset, value) \
343 } else { /* PORT_SCI or PORT_SCIFA */ \ 343 } else { /* PORT_SCI or PORT_SCIFA */ \
344 SCI_OUT(sci_size, sci_offset, value); \ 344 SCI_OUT(sci_size, sci_offset, value); \
@@ -392,8 +392,12 @@
392 defined(CONFIG_CPU_SUBTYPE_SH7720) || \ 392 defined(CONFIG_CPU_SUBTYPE_SH7720) || \
393 defined(CONFIG_CPU_SUBTYPE_SH7721) || \ 393 defined(CONFIG_CPU_SUBTYPE_SH7721) || \
394 defined(CONFIG_ARCH_SH7367) || \ 394 defined(CONFIG_ARCH_SH7367) || \
395 defined(CONFIG_ARCH_SH7377) || \ 395 defined(CONFIG_ARCH_SH7377)
396 defined(CONFIG_ARCH_SH7372) 396#define SCIF_FNS(name, scif_offset, scif_size) \
397 CPU_SCIF_FNS(name, scif_offset, scif_size)
398#elif defined(CONFIG_ARCH_SH7372)
399#define SCIx_FNS(name, sh4_scifa_offset, sh4_scifa_size, sh4_scifb_offset, sh4_scifb_size) \
400 CPU_SCIx_FNS(name, sh4_scifa_offset, sh4_scifa_size, sh4_scifb_offset, sh4_scifb_size)
397#define SCIF_FNS(name, scif_offset, scif_size) \ 401#define SCIF_FNS(name, scif_offset, scif_size) \
398 CPU_SCIF_FNS(name, scif_offset, scif_size) 402 CPU_SCIF_FNS(name, scif_offset, scif_size)
399#else 403#else
@@ -430,8 +434,7 @@
430 defined(CONFIG_CPU_SUBTYPE_SH7720) || \ 434 defined(CONFIG_CPU_SUBTYPE_SH7720) || \
431 defined(CONFIG_CPU_SUBTYPE_SH7721) || \ 435 defined(CONFIG_CPU_SUBTYPE_SH7721) || \
432 defined(CONFIG_ARCH_SH7367) || \ 436 defined(CONFIG_ARCH_SH7367) || \
433 defined(CONFIG_ARCH_SH7377) || \ 437 defined(CONFIG_ARCH_SH7377)
434 defined(CONFIG_ARCH_SH7372)
435 438
436SCIF_FNS(SCSMR, 0x00, 16) 439SCIF_FNS(SCSMR, 0x00, 16)
437SCIF_FNS(SCBRR, 0x04, 8) 440SCIF_FNS(SCBRR, 0x04, 8)
@@ -444,6 +447,20 @@ SCIF_FNS(SCFDR, 0x1c, 16)
444SCIF_FNS(SCxTDR, 0x20, 8) 447SCIF_FNS(SCxTDR, 0x20, 8)
445SCIF_FNS(SCxRDR, 0x24, 8) 448SCIF_FNS(SCxRDR, 0x24, 8)
446SCIF_FNS(SCLSR, 0x00, 0) 449SCIF_FNS(SCLSR, 0x00, 0)
450#elif defined(CONFIG_ARCH_SH7372)
451SCIF_FNS(SCSMR, 0x00, 16)
452SCIF_FNS(SCBRR, 0x04, 8)
453SCIF_FNS(SCSCR, 0x08, 16)
454SCIF_FNS(SCTDSR, 0x0c, 16)
455SCIF_FNS(SCFER, 0x10, 16)
456SCIF_FNS(SCxSR, 0x14, 16)
457SCIF_FNS(SCFCR, 0x18, 16)
458SCIF_FNS(SCFDR, 0x1c, 16)
459SCIF_FNS(SCTFDR, 0x38, 16)
460SCIF_FNS(SCRFDR, 0x3c, 16)
461SCIx_FNS(SCxTDR, 0x20, 8, 0x40, 8)
462SCIx_FNS(SCxRDR, 0x24, 8, 0x60, 8)
463SCIF_FNS(SCLSR, 0x00, 0)
447#elif defined(CONFIG_CPU_SUBTYPE_SH7723) ||\ 464#elif defined(CONFIG_CPU_SUBTYPE_SH7723) ||\
448 defined(CONFIG_CPU_SUBTYPE_SH7724) 465 defined(CONFIG_CPU_SUBTYPE_SH7724)
449SCIx_FNS(SCSMR, 0x00, 16, 0x00, 16) 466SCIx_FNS(SCSMR, 0x00, 16, 0x00, 16)