*/
#include <common.h>
+#include <serial.h>
#if defined(CONFIG_CPU_V6)
/*
#define TIMEOUT_COUNT 0x4000000
-int arm_dcc_init(void)
+static int arm_dcc_init(void)
{
return 0;
}
-int arm_dcc_getc(void)
+static int arm_dcc_getc(void)
{
int ch;
register unsigned int reg;
return ch;
}
-void arm_dcc_putc(char ch)
+static void arm_dcc_putc(char ch)
{
register unsigned int reg;
unsigned int timeout_count = TIMEOUT_COUNT;
write_dcc(ch);
}
-void arm_dcc_puts(const char *s)
+static void arm_dcc_puts(const char *s)
{
while (*s)
arm_dcc_putc(*s++);
}
-int arm_dcc_tstc(void)
+static int arm_dcc_tstc(void)
{
register unsigned int reg;
return reg;
}
+static void arm_dcc_setbrg(void)
+{
+}
+
+static struct serial_device arm_dcc_drv = {
+ .name = "arm_dcc",
+ .start = arm_dcc_init,
+ .stop = NULL,
+ .setbrg = arm_dcc_setbrg,
+ .putc = arm_dcc_putc,
+ .puts = arm_dcc_puts,
+ .getc = arm_dcc_getc,
+ .tstc = arm_dcc_tstc,
+};
+
+void arm_dcc_initialize(void)
+{
+ serial_register(&arm_dcc_drv);
+}
+
__weak struct serial_device *default_serial_console(void)
{
- return NULL;
+ return &arm_dcc_drv;
}
serial_initfunc(s3c44b0_serial_initialize);
serial_initfunc(sa1100_serial_initialize);
serial_initfunc(sh_serial_initialize);
+serial_initfunc(arm_dcc_initialize);
/**
* serial_register() - Register serial driver with serial driver core
s3c44b0_serial_initialize();
sa1100_serial_initialize();
sh_serial_initialize();
+ arm_dcc_initialize();
serial_assign(default_serial_console()->name);
}