diff options
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | 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 4b0a9c88eeb3..b618fa60aef3 100644 --- a/arch/powerpc/sysdev/mv64x60_dev.c +++ b/arch/powerpc/sysdev/mv64x60_dev.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/stddef.h> | 12 | #include <linux/stddef.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/console.h> | ||
15 | #include <linux/mv643xx.h> | 16 | #include <linux/mv643xx.h> |
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
17 | 18 | ||
@@ -420,3 +421,30 @@ error: | |||
420 | return err; | 421 | return err; |
421 | } | 422 | } |
422 | arch_initcall(mv64x60_device_setup); | 423 | arch_initcall(mv64x60_device_setup); |
424 | |||
425 | static int __init mv64x60_add_mpsc_console(void) | ||
426 | { | ||
427 | struct device_node *np = NULL; | ||
428 | const char *prop; | ||
429 | |||
430 | prop = of_get_property(of_chosen, "linux,stdout-path", NULL); | ||
431 | if (prop == NULL) | ||
432 | goto not_mpsc; | ||
433 | |||
434 | np = of_find_node_by_path(prop); | ||
435 | if (!np) | ||
436 | goto not_mpsc; | ||
437 | |||
438 | if (!of_device_is_compatible(np, "marvell,mpsc")) | ||
439 | goto not_mpsc; | ||
440 | |||
441 | prop = of_get_property(np, "block-index", NULL); | ||
442 | if (!prop) | ||
443 | goto not_mpsc; | ||
444 | |||
445 | add_preferred_console("ttyMM", *(int *)prop, NULL); | ||
446 | |||
447 | not_mpsc: | ||
448 | return 0; | ||
449 | } | ||
450 | console_initcall(mv64x60_add_mpsc_console); | ||