diff options
author | Yoshinori Sato <ysato@users.sourceforge.jp> | 2009-04-28 00:40:15 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-05-08 10:54:47 -0400 |
commit | 168f36237b16e2b3159e24c7d3b658e3c912d149 (patch) | |
tree | 35b0adbdb4c30128c8c62ad1ec43c31bbe13dbf7 | |
parent | 54507f6ee99778a727ff1b38a1f4050fe6479835 (diff) |
serial: sh-sci: Fix up h8300 support.
- Dummy SCIF functions define.
- h8300 specific header include.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | drivers/serial/sh-sci.c | 4 | ||||
-rw-r--r-- | drivers/serial/sh-sci.h | 17 |
2 files changed, 19 insertions, 2 deletions
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 686e4a456e32..4e3248d58602 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -54,6 +54,10 @@ | |||
54 | #include <asm/sh_bios.h> | 54 | #include <asm/sh_bios.h> |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | #ifdef CONFIG_H8300 | ||
58 | #include <asm/gpio.h> | ||
59 | #endif | ||
60 | |||
57 | #include "sh-sci.h" | 61 | #include "sh-sci.h" |
58 | 62 | ||
59 | struct sci_port { | 63 | struct sci_port { |
diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h index 84cc6512f081..e3eae4eaaddf 100644 --- a/drivers/serial/sh-sci.h +++ b/drivers/serial/sh-sci.h | |||
@@ -317,7 +317,18 @@ | |||
317 | } \ | 317 | } \ |
318 | } | 318 | } |
319 | 319 | ||
320 | #define CPU_SCIF_FNS(name, scif_offset, scif_size) \ | 320 | #ifdef CONFIG_H8300 |
321 | /* h8300 don't have SCIF */ | ||
322 | #define CPU_SCIF_FNS(name) \ | ||
323 | static inline unsigned int sci_##name##_in(struct uart_port *port) \ | ||
324 | { \ | ||
325 | return 0; \ | ||
326 | } \ | ||
327 | static inline void sci_##name##_out(struct uart_port *port, unsigned int value) \ | ||
328 | { \ | ||
329 | } | ||
330 | #else | ||
331 | #define CPU_SCIF_FNS(name, scif_offset, scif_size) \ | ||
321 | static inline unsigned int sci_##name##_in(struct uart_port *port) \ | 332 | static inline unsigned int sci_##name##_in(struct uart_port *port) \ |
322 | { \ | 333 | { \ |
323 | SCI_IN(scif_size, scif_offset); \ | 334 | SCI_IN(scif_size, scif_offset); \ |
@@ -326,6 +337,7 @@ | |||
326 | { \ | 337 | { \ |
327 | SCI_OUT(scif_size, scif_offset, value); \ | 338 | SCI_OUT(scif_size, scif_offset, value); \ |
328 | } | 339 | } |
340 | #endif | ||
329 | 341 | ||
330 | #define CPU_SCI_FNS(name, sci_offset, sci_size) \ | 342 | #define CPU_SCI_FNS(name, sci_offset, sci_size) \ |
331 | static inline unsigned int sci_##name##_in(struct uart_port* port) \ | 343 | static inline unsigned int sci_##name##_in(struct uart_port* port) \ |
@@ -363,7 +375,8 @@ | |||
363 | sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size, \ | 375 | sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size, \ |
364 | h8_sci_offset, h8_sci_size) \ | 376 | h8_sci_offset, h8_sci_size) \ |
365 | CPU_SCI_FNS(name, h8_sci_offset, h8_sci_size) | 377 | CPU_SCI_FNS(name, h8_sci_offset, h8_sci_size) |
366 | #define SCIF_FNS(name, sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size) | 378 | #define SCIF_FNS(name, sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size) \ |
379 | CPU_SCIF_FNS(name) | ||
367 | #elif defined(CONFIG_CPU_SUBTYPE_SH7723) ||\ | 380 | #elif defined(CONFIG_CPU_SUBTYPE_SH7723) ||\ |
368 | defined(CONFIG_CPU_SUBTYPE_SH7724) | 381 | defined(CONFIG_CPU_SUBTYPE_SH7724) |
369 | #define SCIx_FNS(name, sh4_scifa_offset, sh4_scifa_size, sh4_scif_offset, sh4_scif_size) \ | 382 | #define SCIx_FNS(name, sh4_scifa_offset, sh4_scifa_size, sh4_scif_offset, sh4_scif_size) \ |