diff options
Diffstat (limited to 'drivers/serial/sh-sci.h')
-rw-r--r-- | drivers/serial/sh-sci.h | 29 |
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 | ||
436 | SCIF_FNS(SCSMR, 0x00, 16) | 439 | SCIF_FNS(SCSMR, 0x00, 16) |
437 | SCIF_FNS(SCBRR, 0x04, 8) | 440 | SCIF_FNS(SCBRR, 0x04, 8) |
@@ -444,6 +447,20 @@ SCIF_FNS(SCFDR, 0x1c, 16) | |||
444 | SCIF_FNS(SCxTDR, 0x20, 8) | 447 | SCIF_FNS(SCxTDR, 0x20, 8) |
445 | SCIF_FNS(SCxRDR, 0x24, 8) | 448 | SCIF_FNS(SCxRDR, 0x24, 8) |
446 | SCIF_FNS(SCLSR, 0x00, 0) | 449 | SCIF_FNS(SCLSR, 0x00, 0) |
450 | #elif defined(CONFIG_ARCH_SH7372) | ||
451 | SCIF_FNS(SCSMR, 0x00, 16) | ||
452 | SCIF_FNS(SCBRR, 0x04, 8) | ||
453 | SCIF_FNS(SCSCR, 0x08, 16) | ||
454 | SCIF_FNS(SCTDSR, 0x0c, 16) | ||
455 | SCIF_FNS(SCFER, 0x10, 16) | ||
456 | SCIF_FNS(SCxSR, 0x14, 16) | ||
457 | SCIF_FNS(SCFCR, 0x18, 16) | ||
458 | SCIF_FNS(SCFDR, 0x1c, 16) | ||
459 | SCIF_FNS(SCTFDR, 0x38, 16) | ||
460 | SCIF_FNS(SCRFDR, 0x3c, 16) | ||
461 | SCIx_FNS(SCxTDR, 0x20, 8, 0x40, 8) | ||
462 | SCIx_FNS(SCxRDR, 0x24, 8, 0x60, 8) | ||
463 | SCIF_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) |
449 | SCIx_FNS(SCSMR, 0x00, 16, 0x00, 16) | 466 | SCIx_FNS(SCSMR, 0x00, 16, 0x00, 16) |