serial_puts_dev(port, s); \
}
-#define INIT_PSC_SERIAL_STRUCTURE(port, name) { \
- name, \
- serial##port##_init, \
- serial##port##_uninit, \
- serial##port##_setbrg, \
- serial##port##_getc, \
- serial##port##_tstc, \
- serial##port##_putc, \
- serial##port##_puts, \
+#define INIT_PSC_SERIAL_STRUCTURE(port, __name) { \
+ .name = __name, \
+ .start = serial##port##_init, \
+ .stop = serial##port##_uninit, \
+ .setbrg = serial##port##_setbrg, \
+ .getc = serial##port##_getc, \
+ .tstc = serial##port##_tstc, \
+ .putc = serial##port##_putc, \
+ .puts = serial##port##_puts, \
}
#if defined(CONFIG_SYS_PSC1)
struct serial_device serial0_device =
{
- "serial0",
- serial0_init,
- NULL,
- serial0_setbrg,
- serial0_getc,
- serial0_tstc,
- serial0_putc,
- serial0_puts,
+ .name = "serial0",
+ .start = serial0_init,
+ .stop = NULL,
+ .setbrg = serial0_setbrg,
+ .getc = serial0_getc,
+ .tstc = serial0_tstc,
+ .putc = serial0_putc,
+ .puts = serial0_puts,
};
__weak struct serial_device *default_serial_console(void)
struct serial_device serial1_device =
{
- "serial1",
- serial1_init,
- NULL,
- serial1_setbrg,
- serial1_getc,
- serial1_tstc,
- serial1_putc,
- serial1_puts,
+ .name = "serial1",
+ .start = serial1_init,
+ .stop = NULL,
+ .setbrg = serial1_setbrg,
+ .getc = serial1_getc,
+ .tstc = serial1_tstc,
+ .putc = serial1_putc,
+ .puts = serial1_puts,
};
#endif /* CONFIG_SERIAL_MULTI */
struct serial_device serial_smc_device =
{
- "serial_smc",
- smc_init,
- NULL,
- smc_setbrg,
- smc_getc,
- smc_tstc,
- smc_putc,
- smc_puts,
+ .name = "serial_smc",
+ .start = smc_init,
+ .stop = NULL,
+ .setbrg = smc_setbrg,
+ .getc = smc_getc,
+ .tstc = smc_tstc,
+ .putc = smc_putc,
+ .puts = smc_puts,
};
#endif /* CONFIG_8xx_CONS_SMC1 || CONFIG_8xx_CONS_SMC2 */
struct serial_device serial_scc_device =
{
- "serial_scc",
- scc_init,
- NULL,
- scc_setbrg,
- scc_getc,
- scc_tstc,
- scc_putc,
- scc_puts,
+ .name = "serial_scc",
+ .start = scc_init,
+ .stop = NULL,
+ .setbrg = scc_setbrg,
+ .getc = scc_getc,
+ .tstc = scc_tstc,
+ .putc = scc_putc,
+ .puts = scc_puts,
};
#endif /* CONFIG_8xx_CONS_SCCx */
} \
struct serial_device zoom2_serial_device##n = \
{ \
- __stringify(n), \
- quad_init_##n, \
- NULL, \
- quad_setbrg_##n, \
- quad_getc_##n, \
- quad_tstc_##n, \
- quad_putc_##n, \
- quad_puts_##n, \
+ .name = __stringify(n), \
+ .start = quad_init_##n, \
+ .stop = NULL, \
+ .setbrg = quad_setbrg_##n, \
+ .getc = quad_getc_##n, \
+ .tstc = quad_tstc_##n, \
+ .putc = quad_putc_##n, \
+ .puts = quad_puts_##n, \
};
#endif /* ZOOM2_SERIAL_H */
serial_puts_dev(port, s);}
/* Serial device descriptor */
-#define INIT_ESERIAL_STRUCTURE(port, name) {\
- name,\
- eserial##port##_init,\
- NULL,\
- eserial##port##_setbrg,\
- eserial##port##_getc,\
- eserial##port##_tstc,\
- eserial##port##_putc,\
- eserial##port##_puts, }
+#define INIT_ESERIAL_STRUCTURE(port, __name) { \
+ .name = __name, \
+ .start = eserial##port##_init, \
+ .stop = NULL, \
+ .setbrg = eserial##port##_setbrg, \
+ .getc = eserial##port##_getc, \
+ .tstc = eserial##port##_tstc, \
+ .putc = eserial##port##_putc, \
+ .puts = eserial##port##_puts, \
+}
#endif /* CONFIG_SERIAL_MULTI */
#define pxa_uart_desc(uart) \
struct serial_device serial_##uart##_device = \
{ \
- "serial_"#uart, \
- uart##_init, \
- NULL, \
- uart##_setbrg, \
- uart##_getc, \
- uart##_tstc, \
- uart##_putc, \
- uart##_puts, \
+ .name = "serial_"#uart, \
+ .start = uart##_init, \
+ .stop = NULL, \
+ .setbrg = uart##_setbrg, \
+ .getc = uart##_getc, \
+ .tstc = uart##_tstc, \
+ .putc = uart##_putc, \
+ .puts = uart##_puts, \
};
#define pxa_uart_multi(uart, UART) \
serial_puts_dev(port, s); \
}
-#define INIT_S3C_SERIAL_STRUCTURE(port, name) { \
- name, \
- s3serial##port##_init, \
- NULL,\
- s3serial##port##_setbrg, \
- s3serial##port##_getc, \
- s3serial##port##_tstc, \
- s3serial##port##_putc, \
- s3serial##port##_puts, \
+#define INIT_S3C_SERIAL_STRUCTURE(port, __name) { \
+ .name = __name, \
+ .start = s3serial##port##_init, \
+ .stop = NULL, \
+ .setbrg = s3serial##port##_setbrg, \
+ .getc = s3serial##port##_getc, \
+ .tstc = s3serial##port##_tstc, \
+ .putc = s3serial##port##_putc, \
+ .puts = s3serial##port##_puts, \
}
#endif /* CONFIG_SERIAL_MULTI */
void s5p_serial##port##_putc(const char c) { serial_putc_dev(c, port); } \
void s5p_serial##port##_puts(const char *s) { serial_puts_dev(s, port); }
-#define INIT_S5P_SERIAL_STRUCTURE(port, name) { \
- name, \
- s5p_serial##port##_init, \
- NULL, \
- s5p_serial##port##_setbrg, \
- s5p_serial##port##_getc, \
- s5p_serial##port##_tstc, \
- s5p_serial##port##_putc, \
- s5p_serial##port##_puts, }
+#define INIT_S5P_SERIAL_STRUCTURE(port, __name) { \
+ .name = __name, \
+ .start = s5p_serial##port##_init, \
+ .stop = NULL, \
+ .setbrg = s5p_serial##port##_setbrg, \
+ .getc = s5p_serial##port##_getc, \
+ .tstc = s5p_serial##port##_tstc, \
+ .putc = s5p_serial##port##_putc, \
+ .puts = s5p_serial##port##_puts, \
+}
DECLARE_S5P_SERIAL_FUNCTIONS(0);
struct serial_device s5p_serial0_device =
{ uartlite_serial_puts(s, port); }
/* Serial device descriptor */
-#define INIT_ESERIAL_STRUCTURE(port, name) {\
- name,\
- userial##port##_init,\
- NULL,\
- userial##port##_setbrg,\
- userial##port##_getc,\
- userial##port##_tstc,\
- userial##port##_putc,\
- userial##port##_puts, }
+#define INIT_ESERIAL_STRUCTURE(port, __name) { \
+ .name = __name, \
+ .start = userial##port##_init, \
+ .stop = NULL, \
+ .setbrg = userial##port##_setbrg, \
+ .getc = userial##port##_getc, \
+ .tstc = userial##port##_tstc, \
+ .putc = userial##port##_putc, \
+ .puts = userial##port##_puts, \
+}
DECLARE_ESERIAL_FUNCTIONS(0);
struct serial_device uartlite_serial0_device =