mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-08 19:47:12 -04:00
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>
This commit is contained in:
parent
7e3be7cf3b
commit
28c345042e
@ -29,7 +29,6 @@
|
|||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <asm/byteorder.h>
|
#include <asm/byteorder.h>
|
||||||
#include <i2c.h>
|
#include <i2c.h>
|
||||||
#include <stdio_dev.h>
|
|
||||||
#include <pci.h>
|
#include <pci.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <bzlib.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) */
|
#endif /* #if !defined(CONFIG_PATI) */
|
||||||
|
|
||||||
int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||||
|
@ -37,7 +37,6 @@ void get_backup_values(backup_t *buf);
|
|||||||
#define BOOT_PCI 0x02
|
#define BOOT_PCI 0x02
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void show_stdio_dev(void);
|
|
||||||
void check_env(void);
|
void check_env(void);
|
||||||
#if defined(CONFIG_CMD_DOC)
|
#if defined(CONFIG_CMD_DOC)
|
||||||
void doc_init (void);
|
void doc_init (void);
|
||||||
|
@ -68,6 +68,7 @@
|
|||||||
#include <4xx_i2c.h>
|
#include <4xx_i2c.h>
|
||||||
#include <miiphy.h>
|
#include <miiphy.h>
|
||||||
#include "../common/common_util.h"
|
#include "../common/common_util.h"
|
||||||
|
#include <stdio_dev.h>
|
||||||
#include <i2c.h>
|
#include <i2c.h>
|
||||||
#include <rtc.h>
|
#include <rtc.h>
|
||||||
|
|
||||||
@ -735,7 +736,7 @@ int last_stage_init (void)
|
|||||||
printf ("Error writing to the PHY\n");
|
printf ("Error writing to the PHY\n");
|
||||||
}
|
}
|
||||||
print_mip405_rev ();
|
print_mip405_rev ();
|
||||||
show_stdio_dev ();
|
stdio_print_current_devices ();
|
||||||
check_env ();
|
check_env ();
|
||||||
/* check if RTC time is valid */
|
/* check if RTC time is valid */
|
||||||
stop=get_timer(start);
|
stop=get_timer(start);
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "pip405.h"
|
#include "pip405.h"
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <i2c.h>
|
#include <i2c.h>
|
||||||
|
#include <stdio_dev.h>
|
||||||
#include "../common/isa.h"
|
#include "../common/isa.h"
|
||||||
#include "../common/common_util.h"
|
#include "../common/common_util.h"
|
||||||
|
|
||||||
@ -705,7 +706,7 @@ int last_stage_init (void)
|
|||||||
{
|
{
|
||||||
print_pip405_rev ();
|
print_pip405_rev ();
|
||||||
isa_init ();
|
isa_init ();
|
||||||
show_stdio_dev ();
|
stdio_print_current_devices ();
|
||||||
check_env();
|
check_env();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <s3c2410.h>
|
#include <s3c2410.h>
|
||||||
|
#include <stdio_dev.h>
|
||||||
#include <i2c.h>
|
#include <i2c.h>
|
||||||
|
|
||||||
#include "vcma9.h"
|
#include "vcma9.h"
|
||||||
@ -316,7 +317,7 @@ int last_stage_init(void)
|
|||||||
{
|
{
|
||||||
mem_test_reloc();
|
mem_test_reloc();
|
||||||
checkboard();
|
checkboard();
|
||||||
show_stdio_dev();
|
stdio_print_current_devices();
|
||||||
check_env();
|
check_env();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user