Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=542c98c06712fdbbbfe6b9e92a8d0023cf45102a
Commit:     542c98c06712fdbbbfe6b9e92a8d0023cf45102a
Parent:     e3855fa5540617877907ca61c36d28e18d0f2473
Author:     Mark A. Greer <[EMAIL PROTECTED]>
AuthorDate: Thu Jun 7 10:38:00 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Mon Jun 25 17:02:09 2007 +1000

    [POWERPC] Call add_preferred_console when MPSC is console
    
    When a Marvell MPSC (serial controller) port is the specified
    /chosen/stdout-path device, call 'add_preferred_console()' so the user
    doesn't have to specify a 'console=ttyMMx' cmdline argument.
    
    Signed-off-by: Mark A. Greer <[EMAIL PROTECTED]>
    Acked-by: Dale Farnsworth <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/sysdev/mv64x60_dev.c |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/sysdev/mv64x60_dev.c 
b/arch/powerpc/sysdev/mv64x60_dev.c
index 4b0a9c8..b618fa6 100644
--- a/arch/powerpc/sysdev/mv64x60_dev.c
+++ b/arch/powerpc/sysdev/mv64x60_dev.c
@@ -12,6 +12,7 @@
 #include <linux/stddef.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/console.h>
 #include <linux/mv643xx.h>
 #include <linux/platform_device.h>
 
@@ -420,3 +421,30 @@ error:
        return err;
 }
 arch_initcall(mv64x60_device_setup);
+
+static int __init mv64x60_add_mpsc_console(void)
+{
+       struct device_node *np = NULL;
+       const char *prop;
+
+       prop = of_get_property(of_chosen, "linux,stdout-path", NULL);
+       if (prop == NULL)
+               goto not_mpsc;
+
+       np = of_find_node_by_path(prop);
+       if (!np)
+               goto not_mpsc;
+
+       if (!of_device_is_compatible(np, "marvell,mpsc"))
+               goto not_mpsc;
+
+       prop = of_get_property(np, "block-index", NULL);
+       if (!prop)
+               goto not_mpsc;
+
+       add_preferred_console("ttyMM", *(int *)prop, NULL);
+
+not_mpsc:
+       return 0;
+}
+console_initcall(mv64x60_add_mpsc_console);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to