X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fmips%2Fsni%2Fsniprom.c;h=eff4b89d7b75deb6a89ca0b69899d7cf67e11af4;hb=4b36673284f86c649b9d9ec5818b1912fde556b3;hp=643366eb854a6de81cfb9abd4a86cd2da5193fe2;hpb=e0cc09e295f346b7921e921f385fe5213472316a;p=linux-2.6-omap-h63xx.git diff --git a/arch/mips/sni/sniprom.c b/arch/mips/sni/sniprom.c index 643366eb854..eff4b89d7b7 100644 --- a/arch/mips/sni/sniprom.c +++ b/arch/mips/sni/sniprom.c @@ -19,6 +19,7 @@ #include #include #include +#include #include /* special SNI prom calls */ @@ -44,7 +45,7 @@ void prom_putchar(char c) static char *(*__prom_getenv)(char *) = (char *(*)(char *))PROM_ENTRY(PROM_GETENV); static void (*__prom_get_memconf)(void *) = (void (*)(void *))PROM_ENTRY(PROM_GET_MEMCONF); -char *prom_getenv (char *s) +char *prom_getenv(char *s) { return __prom_getenv(s); } @@ -71,7 +72,7 @@ const char *get_system_type(void) #define SNI_IDPROM_SIZE 0x1000 #ifdef DEBUG -static void sni_idprom_dump(void) +static void __init sni_idprom_dump(void) { int i; @@ -88,7 +89,7 @@ static void sni_idprom_dump(void) } #endif -static void sni_mem_init(void ) +static void __init sni_mem_init(void ) { int i, memsize; struct membank { @@ -130,9 +131,9 @@ static void __init sni_console_setup(void) int port; static char options[8]; - cdev = prom_getenv ("console_dev"); + cdev = prom_getenv("console_dev"); if (strncmp (cdev, "tty", 3) == 0) { - ctype = prom_getenv ("console"); + ctype = prom_getenv("console"); switch (*ctype) { default: case 'l': @@ -146,7 +147,10 @@ static void __init sni_console_setup(void) } if (baud) strcpy(options, baud); - add_preferred_console("ttyS", port, baud ? options : NULL); + if (strncmp (cdev, "tty552", 6) == 0) + add_preferred_console("ttyS", port, baud ? options : NULL); + else + add_preferred_console("ttySC", port, baud ? options : NULL); } } @@ -229,7 +233,7 @@ void __init prom_init(void) systype = "RM300-Exx"; break; } - pr_debug("Found SNI brdtype %02x name %s\n", sni_brd_type,systype); + pr_debug("Found SNI brdtype %02x name %s\n", sni_brd_type, systype); #ifdef DEBUG sni_idprom_dump();