2 #include <linux/errno.h>
12 static void cfe_console_write(
struct console *
cons,
const char *
str,
17 for (i=0, last=0; i<
count; i++) {
23 written =
cfe_write(cfe_cons_handle, &str[last], i-last);
28 while (
cfe_write(cfe_cons_handle,
"\r", 1) <= 0)
34 written =
cfe_write(cfe_cons_handle, &str[last], count-last);
38 }
while (last < count);
43 static int cfe_console_setup(
struct console *cons,
char *str)
48 if (
cfe_getenv(
"BOOT_CONSOLE", consdev, 32) >= 0) {
49 #ifdef CONFIG_SERIAL_SB1250_DUART
50 if (!
strcmp(consdev,
"uart0")) {
52 }
else if (!
strcmp(consdev,
"uart1")) {
56 #ifdef CONFIG_VGA_CONSOLE
57 if (!
strcmp(consdev,
"pcconsole0")) {
66 static struct console sb1250_cfe_cons = {
68 .write = cfe_console_write,
69 .setup = cfe_console_setup,
74 static int __init sb1250_cfe_console_init(
void)