void _serial_puts(const char *s, const int dev_index) { while (*s) { _serial_putc(*s++, dev_index); } } #if defined(CONFIG_SERIAL_MULTI) static inline void serial_puts_dev(int dev_index, const char *s) { _serial_puts(s, dev_index); } #else void serial_puts(const char *s) { _serial_puts(s, UART_NR); } #endif #if defined(CONFIG_SERIAL_MULTI) DECLARE_S3C_SERIAL_FUNCTIONS(0); struct serial_device s3c24xx_serial0_device = INIT_S3C_SERIAL_STRUCTURE(0, "s3ser0", "S3UART1"); DECLARE_S3C_SERIAL_FUNCTIONS(1); struct serial_device s3c24xx_serial1_device = INIT_S3C_SERIAL_STRUCTURE(1, "s3ser1", "S3UART2"); DECLARE_S3C_SERIAL_FUNCTIONS(2); struct serial_device s3c24xx_serial2_device = INIT_S3C_SERIAL_STRUCTURE(2, "s3ser2", "S3UART3"); #endif /* CONFIG_SERIAL_MULTI */
static void _serial_puts(const char *s, const int dev_index) { while (*s) { _serial_putc(*s++, dev_index); } } static inline void serial_puts_dev(int dev_index, const char *s) { _serial_puts(s, dev_index); } DECLARE_S3C_SERIAL_FUNCTIONS(0); struct serial_device s3c64xx_serial0_device = INIT_S3C_SERIAL_STRUCTURE(0, "s3ser0"); __weak struct serial_device *default_serial_console(void) { #if defined(CONFIG_SERIAL0) return &s3c64xx_serial0_device; #else #error "CONFIG_SERIAL? missing." #endif } void s3c64xx_serial_initialize(void) { serial_register(&s3c64xx_serial0_device); }