serial_puts_dev(port, s); \
}
-#define INIT_PSC_SERIAL_STRUCTURE(port, name, bus) { \
+#define INIT_PSC_SERIAL_STRUCTURE(port, name) { \
name, \
- bus, \
serial##port##_init, \
serial##port##_uninit, \
serial##port##_setbrg, \
#if defined(CONFIG_SYS_PSC1)
DECLARE_PSC_SERIAL_FUNCTIONS(1);
struct serial_device serial1_device =
-INIT_PSC_SERIAL_STRUCTURE(1, "psc1", "UART1");
+INIT_PSC_SERIAL_STRUCTURE(1, "psc1");
#endif
#if defined(CONFIG_SYS_PSC3)
DECLARE_PSC_SERIAL_FUNCTIONS(3);
struct serial_device serial3_device =
-INIT_PSC_SERIAL_STRUCTURE(3, "psc3", "UART3");
+INIT_PSC_SERIAL_STRUCTURE(3, "psc3");
#endif
#if defined(CONFIG_SYS_PSC4)
DECLARE_PSC_SERIAL_FUNCTIONS(4);
struct serial_device serial4_device =
-INIT_PSC_SERIAL_STRUCTURE(4, "psc4", "UART4");
+INIT_PSC_SERIAL_STRUCTURE(4, "psc4");
#endif
#if defined(CONFIG_SYS_PSC6)
DECLARE_PSC_SERIAL_FUNCTIONS(6);
struct serial_device serial6_device =
-INIT_PSC_SERIAL_STRUCTURE(6, "psc6", "UART6");
+INIT_PSC_SERIAL_STRUCTURE(6, "psc6");
#endif
__weak struct serial_device *default_serial_console(void)
struct serial_device serial0_device =
{
"serial0",
- "UART0",
serial0_init,
NULL,
serial0_setbrg,
struct serial_device serial1_device =
{
"serial1",
- "UART1",
serial1_init,
NULL,
serial1_setbrg,
struct serial_device serial_smc_device =
{
"serial_smc",
- "SMC",
smc_init,
NULL,
smc_setbrg,
struct serial_device serial_scc_device =
{
"serial_scc",
- "SCC",
scc_init,
NULL,
scc_setbrg,
{
int i = -1;
- if (strcmp(default_serial_console()->ctlr, "SMC") == 0)
+ if (strcmp(default_serial_console()->name, "serial_smc") == 0)
{
#if defined(CONFIG_8xx_CONS_SMC1)
i = 1;
i = 2;
#endif
}
- else if (strcmp(default_serial_console()->ctlr, "SMC") == 0)
+ else if (strcmp(default_serial_console()->name, "serial_scc") == 0)
{
#if defined(CONFIG_8xx_CONS_SCC1)
i = 1;
if (i >= 0)
{
- serial_printf("[on %s%d] ", default_serial_console()->ctlr, i);
+ serial_printf("[on %s%d] ", default_serial_console()->name, i);
}
}
#define S(a) #a
#define N(a) S(quad##a)
-#define U(a) S(UART##a)
#define QUAD_INIT(n) \
int quad_init_##n(void) \
struct serial_device zoom2_serial_device##n = \
{ \
N(n), \
- U(n), \
quad_init_##n, \
NULL, \
quad_setbrg_##n, \
serial_puts_dev(port, s);}
/* Serial device descriptor */
-#define INIT_ESERIAL_STRUCTURE(port,name,bus) {\
+#define INIT_ESERIAL_STRUCTURE(port, name) {\
name,\
- bus,\
eserial##port##_init,\
NULL,\
eserial##port##_setbrg,\
DECLARE_ESERIAL_FUNCTIONS(1);
struct serial_device eserial1_device =
- INIT_ESERIAL_STRUCTURE(1,"eserial0","EUART1");
+ INIT_ESERIAL_STRUCTURE(1, "eserial0");
DECLARE_ESERIAL_FUNCTIONS(2);
struct serial_device eserial2_device =
- INIT_ESERIAL_STRUCTURE(2,"eserial1","EUART2");
+ INIT_ESERIAL_STRUCTURE(2, "eserial1");
DECLARE_ESERIAL_FUNCTIONS(3);
struct serial_device eserial3_device =
- INIT_ESERIAL_STRUCTURE(3,"eserial2","EUART3");
+ INIT_ESERIAL_STRUCTURE(3, "eserial2");
DECLARE_ESERIAL_FUNCTIONS(4);
struct serial_device eserial4_device =
- INIT_ESERIAL_STRUCTURE(4,"eserial3","EUART4");
+ INIT_ESERIAL_STRUCTURE(4, "eserial3");
__weak struct serial_device *default_serial_console(void)
{
struct serial_device serial_ffuart_device =
{
"serial_ffuart",
- "PXA",
ffuart_init,
NULL,
ffuart_setbrg,
struct serial_device serial_btuart_device =
{
"serial_btuart",
- "PXA",
btuart_init,
NULL,
btuart_setbrg,
struct serial_device serial_stuart_device =
{
"serial_stuart",
- "PXA",
stuart_init,
NULL,
stuart_setbrg,
serial_puts_dev(port, s); \
}
-#define INIT_S3C_SERIAL_STRUCTURE(port, name, bus) { \
+#define INIT_S3C_SERIAL_STRUCTURE(port, name) { \
name, \
- bus, \
s3serial##port##_init, \
NULL,\
s3serial##port##_setbrg, \
#if defined(CONFIG_SERIAL_MULTI)
DECLARE_S3C_SERIAL_FUNCTIONS(0);
struct serial_device s3c24xx_serial0_device =
-INIT_S3C_SERIAL_STRUCTURE(0, "s3ser0", "S3UART1");
+INIT_S3C_SERIAL_STRUCTURE(0, "s3ser0");
DECLARE_S3C_SERIAL_FUNCTIONS(1);
struct serial_device s3c24xx_serial1_device =
-INIT_S3C_SERIAL_STRUCTURE(1, "s3ser1", "S3UART2");
+INIT_S3C_SERIAL_STRUCTURE(1, "s3ser1");
DECLARE_S3C_SERIAL_FUNCTIONS(2);
struct serial_device s3c24xx_serial2_device =
-INIT_S3C_SERIAL_STRUCTURE(2, "s3ser2", "S3UART3");
+INIT_S3C_SERIAL_STRUCTURE(2, "s3ser2");
__weak struct serial_device *default_serial_console(void)
{
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, bus) { \
+#define INIT_S5P_SERIAL_STRUCTURE(port, name) { \
name, \
- bus, \
s5p_serial##port##_init, \
NULL, \
s5p_serial##port##_setbrg, \
DECLARE_S5P_SERIAL_FUNCTIONS(0);
struct serial_device s5p_serial0_device =
- INIT_S5P_SERIAL_STRUCTURE(0, "s5pser0", "S5PUART0");
+ INIT_S5P_SERIAL_STRUCTURE(0, "s5pser0");
DECLARE_S5P_SERIAL_FUNCTIONS(1);
struct serial_device s5p_serial1_device =
- INIT_S5P_SERIAL_STRUCTURE(1, "s5pser1", "S5PUART1");
+ INIT_S5P_SERIAL_STRUCTURE(1, "s5pser1");
DECLARE_S5P_SERIAL_FUNCTIONS(2);
struct serial_device s5p_serial2_device =
- INIT_S5P_SERIAL_STRUCTURE(2, "s5pser2", "S5PUART2");
+ INIT_S5P_SERIAL_STRUCTURE(2, "s5pser2");
DECLARE_S5P_SERIAL_FUNCTIONS(3);
struct serial_device s5p_serial3_device =
- INIT_S5P_SERIAL_STRUCTURE(3, "s5pser3", "S5PUART3");
+ INIT_S5P_SERIAL_STRUCTURE(3, "s5pser3");
__weak struct serial_device *default_serial_console(void)
{
#define __SERIAL_H__
#define NAMESIZE 16
-#define CTLRSIZE 8
struct serial_device {
char name[NAMESIZE];
- char ctlr[CTLRSIZE];
int (*init) (void);
int (*uninit) (void);