summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2009-05-16 12:14:56 +0200
committerWolfgang Denk <wd@denx.de>2009-07-19 01:05:51 +0200
commit28c345042eafc550a34b9f52431bd4a22af6ac25 (patch)
treee9a15fdec851b9d01b53d41c239c531976403d82
parent7e3be7cf3bb344f717b6ec3d47a081269ea67ead (diff)
downloadtalos-obmc-uboot-28c345042eafc550a34b9f52431bd4a22af6ac25.tar.gz
talos-obmc-uboot-28c345042eafc550a34b9f52431bd4a22af6ac25.zip
mpl: printing current stdio devices cleanup
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>
-rw-r--r--board/mpl/common/common_util.c30
-rw-r--r--board/mpl/common/common_util.h1
-rw-r--r--board/mpl/mip405/mip405.c3
-rw-r--r--board/mpl/pip405/pip405.c3
-rw-r--r--board/mpl/vcma9/vcma9.c3
5 files changed, 6 insertions, 34 deletions
diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c
index f3632c266e..61af4aea1a 100644
--- a/board/mpl/common/common_util.c
+++ b/board/mpl/common/common_util.c
@@ -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[])
diff --git a/board/mpl/common/common_util.h b/board/mpl/common/common_util.h
index 46573da1f5..29cd14fa6c 100644
--- a/board/mpl/common/common_util.h
+++ b/board/mpl/common/common_util.h
@@ -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);
diff --git a/board/mpl/mip405/mip405.c b/board/mpl/mip405/mip405.c
index 5eb90e5903..24caa4686c 100644
--- a/board/mpl/mip405/mip405.c
+++ b/board/mpl/mip405/mip405.c
@@ -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);
diff --git a/board/mpl/pip405/pip405.c b/board/mpl/pip405/pip405.c
index 8724e27af2..f31a5e8f87 100644
--- a/board/mpl/pip405/pip405.c
+++ b/board/mpl/pip405/pip405.c
@@ -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;
}
diff --git a/board/mpl/vcma9/vcma9.c b/board/mpl/vcma9/vcma9.c
index a4c463a314..2b3fad2513 100644
--- a/board/mpl/vcma9/vcma9.c
+++ b/board/mpl/vcma9/vcma9.c
@@ -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;
}
OpenPOWER on IntegriCloud