From 3e30dc23758f176a2c7294ddff38563a46abf6f9 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Thu, 7 Jun 2007 10:38:00 +1000 Subject: [PATCH] --- yaml --- r: 60558 b: refs/heads/master c: 542c98c06712fdbbbfe6b9e92a8d0023cf45102a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/powerpc/sysdev/mv64x60_dev.c | 28 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 496cb181f9f8..90d6554e011d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e3855fa5540617877907ca61c36d28e18d0f2473 +refs/heads/master: 542c98c06712fdbbbfe6b9e92a8d0023cf45102a diff --git a/trunk/arch/powerpc/sysdev/mv64x60_dev.c b/trunk/arch/powerpc/sysdev/mv64x60_dev.c index 4b0a9c88eeb3..b618fa60aef3 100644 --- a/trunk/arch/powerpc/sysdev/mv64x60_dev.c +++ b/trunk/arch/powerpc/sysdev/mv64x60_dev.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -420,3 +421,30 @@ static int __init mv64x60_device_setup(void) 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);