]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mpl: printing current stdio devices cleanup
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Sat, 16 May 2009 10:14:56 +0000 (12:14 +0200)
committerWolfgang Denk <wd@denx.de>
Sat, 18 Jul 2009 23:05:51 +0000 (01:05 +0200)
Currently the mpl boards duplicate the code to print the current
devices from common/console.c; use stdio_print_current_devices()
instead

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Edited commit message.

Signed-off-by: Wolfgang Denk <wd@denx.de>
board/mpl/common/common_util.c
board/mpl/common/common_util.h
board/mpl/mip405/mip405.c
board/mpl/pip405/pip405.c
board/mpl/vcma9/vcma9.c

index f3632c266eb56559e44bc07d562f083a9ddc2da1..61af4aea1ac01ae8826dd63732518603b3b99514 100644 (file)
@@ -29,7 +29,6 @@
 #include <asm/processor.h>
 #include <asm/byteorder.h>
 #include <i2c.h>
-#include <stdio_dev.h>
 #include <pci.h>
 #include <malloc.h>
 #include <bzlib.h>
@@ -428,35 +427,6 @@ void check_env(void)
        }
 }
 
-
-extern struct stdio_dev *stdio_devices[];
-extern char *stdio_names[];
-
-void show_stdio_dev(void)
-{
-       /* Print information */
-       puts("In:    ");
-       if (stdio_devices[stdin] == NULL) {
-               puts("No input devices available!\n");
-       } else {
-               printf ("%s\n", stdio_devices[stdin]->name);
-       }
-
-       puts("Out:   ");
-       if (stdio_devices[stdout] == NULL) {
-               puts("No output devices available!\n");
-       } else {
-               printf ("%s\n", stdio_devices[stdout]->name);
-       }
-
-       puts("Err:   ");
-       if (stdio_devices[stderr] == NULL) {
-               puts("No error devices available!\n");
-       } else {
-               printf ("%s\n", stdio_devices[stderr]->name);
-       }
-}
-
 #endif /* #if !defined(CONFIG_PATI) */
 
 int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
index 46573da1f5747efef391b7dac388d2ca7567181b..29cd14fa6cbdacfa72324c9bef8b2183c696e87e 100644 (file)
@@ -37,7 +37,6 @@ void get_backup_values(backup_t *buf);
 #define BOOT_PCI       0x02
 #endif
 
-void show_stdio_dev(void);
 void check_env(void);
 #if defined(CONFIG_CMD_DOC)
 void doc_init (void);
index 5eb90e5903aeeddaafc4246e672405b240b1ec41..24caa4686c37a74e2675d5e86a5a973fde7d548b 100644 (file)
@@ -68,6 +68,7 @@
 #include <4xx_i2c.h>
 #include <miiphy.h>
 #include "../common/common_util.h"
+#include <stdio_dev.h>
 #include <i2c.h>
 #include <rtc.h>
 
@@ -735,7 +736,7 @@ int last_stage_init (void)
                printf ("Error writing to the PHY\n");
        }
        print_mip405_rev ();
-       show_stdio_dev ();
+       stdio_print_current_devices ();
        check_env ();
        /* check if RTC time is valid */
        stop=get_timer(start);
index 8724e27af2ec124c32a83209e799fd4c8bd4635f..f31a5e8f87ff8c40e1258da7568754fd4155ce84 100644 (file)
@@ -28,6 +28,7 @@
 #include "pip405.h"
 #include <asm/processor.h>
 #include <i2c.h>
+#include <stdio_dev.h>
 #include "../common/isa.h"
 #include "../common/common_util.h"
 
@@ -705,7 +706,7 @@ int last_stage_init (void)
 {
        print_pip405_rev ();
        isa_init ();
-       show_stdio_dev ();
+       stdio_print_current_devices ();
        check_env();
        return 0;
 }
index a4c463a31444d9030dd09e611c22774a8e89991c..2b3fad2513e16b8ac5e1322214072fada39219ce 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <common.h>
 #include <s3c2410.h>
+#include <stdio_dev.h>
 #include <i2c.h>
 
 #include "vcma9.h"
@@ -316,7 +317,7 @@ int last_stage_init(void)
 {
        mem_test_reloc();
        checkboard();
-       show_stdio_dev();
+       stdio_print_current_devices();
        check_env();
        return 0;
 }