
actually the console API use the following naming convention
======Extract====== typedef struct device_t;
int device_register (device_t * dev); int devices_init (void); int device_deregister(char *devname); struct list_head* device_get_list(void); device_t* device_get_by_name(char* name); device_t* device_clone(device_t *dev); =======
which is not console dependent and is confusing
instead of using device_XX and device_t we now switch to stdio_XX and stdio_device_t
this will also allow to add later a generic device mecanism in order to have multi generic device support and driver instance
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagnioj@jcrosoft.com --- v2: use stdio_ instead of console_ check all ubifs update
Best Regards, J. board/MAI/AmigaOneG3SE/ps2kbd.c | 6 +- board/MAI/AmigaOneG3SE/video.c | 6 +- board/ads5121/ads5121_diu.c | 2 +- board/bf527-ezkit/video.c | 6 +- board/bf533-stamp/video.c | 6 +- board/bf548-ezkit/video.c | 6 +- board/bmw/bmw.c | 2 +- board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c | 2 +- board/linkstation/avr.c | 2 +- board/mpl/common/isa.c | 2 +- board/mpl/common/kbd.c | 6 +- board/mpl/mip405/mip405.c | 2 +- board/mpl/pati/pati.c | 6 +- board/mpl/pip405/pip405.c | 2 +- board/mpl/vcma9/vcma9.c | 2 +- board/netphone/phone_console.c | 6 +- board/rbc823/kbd.c | 8 ++-- board/trab/vfd.c | 2 +- common/Makefile | 2 +- common/cmd_console.c | 8 ++-- common/cmd_log.c | 6 +- common/cmd_terminal.c | 6 +- common/console.c | 36 ++++++++-------- common/iomux.c | 14 +++--- common/lcd.c | 6 +- common/serial.c | 8 ++-- common/{devices.c => stdio.c} | 58 ++++++++++++------------ common/usb_kbd.c | 14 +++--- cpu/blackfin/jtag-console.c | 6 +- cpu/mpc8xx/lcd.c | 2 +- cpu/mpc8xx/video.c | 6 +- cpu/pxa/pxafb.c | 2 +- doc/README.silent | 2 +- drivers/input/keyboard.c | 6 +- drivers/net/netconsole.c | 6 +- drivers/serial/arm_dcc.c | 6 +- drivers/serial/usbtty.c | 6 +- drivers/usb/musb/musb_hcd.c | 4 +- drivers/usb/musb/musb_hcd.h | 2 +- drivers/video/cfb_console.c | 8 ++-- include/configs/APC405.h | 2 +- include/configs/AR405.h | 2 +- include/configs/ASH405.h | 2 +- include/configs/AmigaOneG3SE.h | 2 +- include/configs/CATcenter.h | 2 +- include/configs/CMS700.h | 2 +- include/configs/CPCI2DP.h | 2 +- include/configs/CPCI405.h | 2 +- include/configs/CPCI4052.h | 2 +- include/configs/CPCI405AB.h | 2 +- include/configs/CPCI405DT.h | 2 +- include/configs/DP405.h | 2 +- include/configs/G2000.h | 2 +- include/configs/HH405.h | 2 +- include/configs/HUB405.h | 2 +- include/configs/M5249EVB.h | 2 +- include/configs/MIP405.h | 2 +- include/configs/MPC8610HPCD.h | 2 +- include/configs/MPC8641HPCN.h | 2 +- include/configs/PCI405.h | 2 +- include/configs/PIP405.h | 2 +- include/configs/PLU405.h | 2 +- include/configs/PMC405.h | 2 +- include/configs/PPChameleonEVB.h | 2 +- include/configs/QS823.h | 2 +- include/configs/QS850.h | 2 +- include/configs/QS860T.h | 2 +- include/configs/R360MPI.h | 2 +- include/configs/TASREG.h | 2 +- include/configs/TQM5200.h | 2 +- include/configs/VCMA9.h | 2 +- include/configs/VOH405.h | 2 +- include/configs/VOM405.h | 2 +- include/configs/WUH405.h | 2 +- include/configs/cerf250.h | 2 +- include/configs/delta.h | 2 +- include/configs/gr_ep2s60.h | 2 +- include/configs/lubbock.h | 2 +- include/configs/mimc200.h | 2 +- include/configs/mp2usb.h | 4 +- include/configs/pleb2.h | 2 +- include/configs/pxa255_idp.h | 2 +- include/configs/sc3.h | 2 +- include/configs/trab.h | 2 +- include/configs/trizepsiv.h | 2 +- include/configs/xaeniax.h | 2 +- include/configs/zylonite.h | 2 +- include/console.h | 38 ---------------- include/iomux.h | 6 +- include/serial.h | 2 +- include/{devices.h => stdio.h} | 33 +++++++------- lib_arm/board.c | 4 +- lib_avr32/board.c | 4 +- lib_blackfin/board.c | 6 +- lib_blackfin/post.c | 2 +- lib_i386/board.c | 4 +- lib_i386/video.c | 10 ++-- lib_m68k/board.c | 6 +- lib_mips/board.c | 6 +- lib_nios/board.c | 4 +- lib_nios2/board.c | 4 +- lib_ppc/board.c | 6 +- lib_sh/board.c | 4 +- lib_sparc/board.c | 6 +- post/post.c | 2 +- 105 files changed, 247 insertions(+), 284 deletions(-) rename common/{devices.c => stdio.c} (82%) delete mode 100644 include/console.h rename include/{devices.h => stdio.h} (84%)
diff --git a/board/MAI/AmigaOneG3SE/ps2kbd.c b/board/MAI/AmigaOneG3SE/ps2kbd.c index a297005..0e0157c 100644 --- a/board/MAI/AmigaOneG3SE/ps2kbd.c +++ b/board/MAI/AmigaOneG3SE/ps2kbd.c @@ -34,7 +34,7 @@ */ #include <common.h> #include <asm/processor.h> -#include <devices.h> +#include <stdio.h> #include "ps2kbd.h"
@@ -226,7 +226,7 @@ int overwrite_console (void) int drv_isa_kbd_init (void) { int error; - device_t kbddev ; + stdio_device_t kbddev ; char *stdinname = getenv ("stdin");
if(isa_kbd_init() == -1) @@ -239,7 +239,7 @@ int drv_isa_kbd_init (void) kbddev.getc = kbd_getc ; kbddev.tstc = kbd_testc ;
- error = device_register (&kbddev); + error = stdio_register (&kbddev); if(error==0) { /* check if this is the standard input device */ if(strcmp(stdinname,DEVNAME)==0) { diff --git a/board/MAI/AmigaOneG3SE/video.c b/board/MAI/AmigaOneG3SE/video.c index fc27c68..7041075 100644 --- a/board/MAI/AmigaOneG3SE/video.c +++ b/board/MAI/AmigaOneG3SE/video.c @@ -22,7 +22,7 @@ */
#include <common.h> -#include <devices.h> +#include <stdio.h> #include "memio.h" #include <part.h>
@@ -98,7 +98,7 @@ int video_inited = 0; int drv_video_init(void) { int error, devices = 1 ; - device_t vgadev ; + stdio_device_t vgadev ; if (video_inited) return 1; video_inited = 1; video_init(); @@ -112,7 +112,7 @@ int drv_video_init(void) vgadev.tstc = NULL; vgadev.start = video_start;
- error = device_register (&vgadev); + error = stdio_register (&vgadev);
if (error == 0) { diff --git a/board/ads5121/ads5121_diu.c b/board/ads5121/ads5121_diu.c index 41a1353..f0c50aa 100644 --- a/board/ads5121/ads5121_diu.c +++ b/board/ads5121/ads5121_diu.c @@ -33,7 +33,7 @@ #include "../freescale/common/fsl_diu_fb.h"
#if defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE) -#include <devices.h> +#include <stdio.h> #include <video_fb.h> #endif
diff --git a/board/bf527-ezkit/video.c b/board/bf527-ezkit/video.c index 2df6717..5887ac8 100644 --- a/board/bf527-ezkit/video.c +++ b/board/bf527-ezkit/video.c @@ -14,7 +14,7 @@ #include <asm/mach-common/bits/dma.h> #include <i2c.h> #include <linux/types.h> -#include <devices.h> +#include <stdio.h>
int gunzip(void *, int, unsigned char *, unsigned long *);
@@ -272,7 +272,7 @@ void video_puts(const char *s) int drv_video_init(void) { int error, devices = 1; - device_t videodev; + stdio_device_t videodev;
u8 *dst; u32 fbmem_size = LCD_X_RES * LCD_Y_RES * LCD_PIXEL_SIZE + ACTIVE_VIDEO_MEM_OFFSET; @@ -311,7 +311,7 @@ int drv_video_init(void) videodev.putc = video_putc; /* 'putc' function */ videodev.puts = video_puts; /* 'puts' function */
- error = device_register(&videodev); + error = stdio_register(&videodev);
return (error == 0) ? devices : error; } diff --git a/board/bf533-stamp/video.c b/board/bf533-stamp/video.c index 3c15eaa..5be498d 100644 --- a/board/bf533-stamp/video.c +++ b/board/bf533-stamp/video.c @@ -18,7 +18,7 @@ #include <asm/mach-common/bits/dma.h> #include <i2c.h> #include <linux/types.h> -#include <devices.h> +#include <stdio.h>
int gunzip(void *, int, unsigned char *, unsigned long *);
@@ -154,7 +154,7 @@ static void video_init(char *NTSCFrame)
int drv_video_init(void) { - device_t videodev; + stdio_device_t videodev;
video_init((void *)NTSC_FRAME_ADDR);
@@ -163,5 +163,5 @@ int drv_video_init(void) videodev.ext = DEV_EXT_VIDEO; videodev.flags = DEV_FLAGS_SYSTEM;
- return device_register(&videodev); + return stdio_register(&videodev); } diff --git a/board/bf548-ezkit/video.c b/board/bf548-ezkit/video.c index a6f52bd..bbfb7ac 100644 --- a/board/bf548-ezkit/video.c +++ b/board/bf548-ezkit/video.c @@ -14,7 +14,7 @@ #include <asm/mach-common/bits/dma.h> #include <i2c.h> #include <linux/types.h> -#include <devices.h> +#include <stdio.h>
int gunzip(void *, int, unsigned char *, unsigned long *);
@@ -282,7 +282,7 @@ void video_puts(const char *s) int drv_video_init(void) { int error, devices = 1; - device_t videodev; + stdio_device_t videodev;
u8 *dst; u32 fbmem_size = LCD_X_RES * LCD_Y_RES * LCD_PIXEL_SIZE + ACTIVE_VIDEO_MEM_OFFSET; @@ -321,7 +321,7 @@ int drv_video_init(void) videodev.putc = video_putc; /* 'putc' function */ videodev.puts = video_puts; /* 'puts' function */
- error = device_register(&videodev); + error = stdio_register(&videodev);
return (error == 0) ? devices : error; } diff --git a/board/bmw/bmw.c b/board/bmw/bmw.c index 41ce14f..21b1263 100644 --- a/board/bmw/bmw.c +++ b/board/bmw/bmw.c @@ -26,7 +26,7 @@ #include <watchdog.h> #include <command.h> #include <malloc.h> -#include <devices.h> +#include <stdio.h> #include <net.h> #include <timestamp.h> #include <dtt.h> diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c index 2b2d5d7..361de8f 100644 --- a/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c +++ b/board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c @@ -33,7 +33,7 @@ #include "../common/fsl_diu_fb.h"
#if defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE) -#include <devices.h> +#include <stdio.h> #include <video_fb.h> #endif
diff --git a/board/linkstation/avr.c b/board/linkstation/avr.c index 782b24a..666b833 100644 --- a/board/linkstation/avr.c +++ b/board/linkstation/avr.c @@ -22,7 +22,7 @@ */ #include <common.h> #include <ns16550.h> -#include <console.h> +#include <stdio.h>
/* Button codes from the AVR */ #define PWRR 0x20 /* Power button release */ diff --git a/board/mpl/common/isa.c b/board/mpl/common/isa.c index 91829d4..465b047 100644 --- a/board/mpl/common/isa.c +++ b/board/mpl/common/isa.c @@ -26,7 +26,7 @@
#include <common.h> #include <asm/processor.h> -#include <devices.h> +#include <stdio.h> #include "isa.h" #include "piix4_pci.h" #include "kbd.h" diff --git a/board/mpl/common/kbd.c b/board/mpl/common/kbd.c index a457635..829dc5f 100644 --- a/board/mpl/common/kbd.c +++ b/board/mpl/common/kbd.c @@ -28,7 +28,7 @@ */ #include <common.h> #include <asm/processor.h> -#include <devices.h> +#include <stdio.h> #include "isa.h" #include "kbd.h"
@@ -215,7 +215,7 @@ int overwrite_console (void) int drv_isa_kbd_init (void) { int error; - device_t kbddev ; + stdio_device_t kbddev ; char *stdinname = getenv ("stdin");
if(isa_kbd_init()==-1) @@ -228,7 +228,7 @@ int drv_isa_kbd_init (void) kbddev.getc = kbd_getc ; kbddev.tstc = kbd_testc ;
- error = device_register (&kbddev); + error = stdio_register (&kbddev); if(error==0) { /* check if this is the standard input device */ if(strcmp(stdinname,DEVNAME)==0) { diff --git a/board/mpl/mip405/mip405.c b/board/mpl/mip405/mip405.c index 732a97e..e184ca6 100644 --- a/board/mpl/mip405/mip405.c +++ b/board/mpl/mip405/mip405.c @@ -68,7 +68,7 @@ #include <4xx_i2c.h> #include <miiphy.h> #include "../common/common_util.h" -#include <console.h> +#include <stdio.h> #include <i2c.h> #include <rtc.h>
diff --git a/board/mpl/pati/pati.c b/board/mpl/pati/pati.c index 85c5af9..0401f80 100644 --- a/board/mpl/pati/pati.c +++ b/board/mpl/pati/pati.c @@ -46,7 +46,7 @@
#include <common.h> #include <mpc5xx.h> -#include <devices.h> +#include <stdio.h> #include <pci_ids.h> #define PLX9056_LOC #include "plx9056.h" @@ -447,7 +447,7 @@ int checkboard (void) int recbuf[REC_BUFFER_SIZE]; static int r_ptr = 0; int w_ptr; -device_t pci_con_dev; +stdio_device_t pci_con_dev; int conn=0; int buff_full=0;
@@ -584,7 +584,7 @@ void pci_con_connect(void) pci_con_dev.puts = pci_con_puts; pci_con_dev.getc = pci_con_getc; pci_con_dev.tstc = pci_con_tstc; - device_register (&pci_con_dev); + stdio_register (&pci_con_dev); printf("PATI ready for PCI connection, type ctrl-c for exit\n"); do { udelay(10); diff --git a/board/mpl/pip405/pip405.c b/board/mpl/pip405/pip405.c index c740f9d..4b9d54c 100644 --- a/board/mpl/pip405/pip405.c +++ b/board/mpl/pip405/pip405.c @@ -28,7 +28,7 @@ #include "pip405.h" #include <asm/processor.h> #include <i2c.h> -#include <console.h> +#include <stdio.h> #include "../common/isa.h" #include "../common/common_util.h"
diff --git a/board/mpl/vcma9/vcma9.c b/board/mpl/vcma9/vcma9.c index 21656e2..68b71fc 100644 --- a/board/mpl/vcma9/vcma9.c +++ b/board/mpl/vcma9/vcma9.c @@ -27,7 +27,7 @@
#include <common.h> #include <s3c2410.h> -#include <console.h> +#include <stdio.h> #include <i2c.h>
#include "vcma9.h" diff --git a/board/netphone/phone_console.c b/board/netphone/phone_console.c index d9b0ad3..5e98018 100644 --- a/board/netphone/phone_console.c +++ b/board/netphone/phone_console.c @@ -37,7 +37,7 @@
#include <version.h> #include <linux/types.h> -#include <devices.h> +#include <stdio.h>
#include <sed156x.h>
@@ -325,7 +325,7 @@ int phone_getc(void)
int drv_phone_init(void) { - device_t console_dev; + stdio_device_t console_dev;
console_init();
@@ -340,7 +340,7 @@ int drv_phone_init(void) console_dev.tstc = phone_tstc; /* 'tstc' function */ console_dev.getc = phone_getc; /* 'getc' function */
- if (device_register(&console_dev) == 0) + if (stdio_register(&console_dev) == 0) return 1;
return 0; diff --git a/board/rbc823/kbd.c b/board/rbc823/kbd.c index 1d48f6d..969d7c2 100644 --- a/board/rbc823/kbd.c +++ b/board/rbc823/kbd.c @@ -30,7 +30,7 @@ #include <common.h> #include <watchdog.h> #include <commproc.h> -#include <devices.h> +#include <stdio.h> #include <lcd.h>
DECLARE_GLOBAL_DATA_PTR; @@ -249,18 +249,18 @@ int smc1_tstc(void) int drv_keyboard_init(void) { int error = 0; - device_t kbd_dev; + stdio_device_t kbd_dev;
if (0) { /* register the keyboard */ - memset (&kbd_dev, 0, sizeof(device_t)); + memset (&kbd_dev, 0, sizeof(stdio_device_t)); strcpy(kbd_dev.name, "kbd"); kbd_dev.flags = DEV_FLAGS_INPUT | DEV_FLAGS_SYSTEM; kbd_dev.putc = NULL; kbd_dev.puts = NULL; kbd_dev.getc = smc1_getc; kbd_dev.tstc = smc1_tstc; - error = device_register (&kbd_dev); + error = stdio_register (&kbd_dev); } else { lcd_is_enabled = 0; lcd_disable(); diff --git a/board/trab/vfd.c b/board/trab/vfd.c index 37d3aa4..719606d 100644 --- a/board/trab/vfd.c +++ b/board/trab/vfd.c @@ -36,7 +36,7 @@ #include <version.h> #include <stdarg.h> #include <linux/types.h> -#include <devices.h> +#include <stdio.h> #include <s3c2400.h>
DECLARE_GLOBAL_DATA_PTR; diff --git a/common/Makefile b/common/Makefile index b9f4ca7..f47e2ed 100644 --- a/common/Makefile +++ b/common/Makefile @@ -32,7 +32,6 @@ COBJS-y += main.o COBJS-y += circbuf.o COBJS-y += console.o COBJS-y += command.o -COBJS-y += devices.o COBJS-y += dlmalloc.o COBJS-y += exports.o COBJS-$(CONFIG_SYS_HUSH_PARSER) += hush.o @@ -40,6 +39,7 @@ COBJS-y += image.o COBJS-y += memsize.o COBJS-y += s_record.o COBJS-$(CONFIG_SERIAL_MULTI) += serial.o +COBJS-y += stdio.o COBJS-y += xyzModem.o
# core command diff --git a/common/cmd_console.c b/common/cmd_console.c index f861f83..aab6ee6 100644 --- a/common/cmd_console.c +++ b/common/cmd_console.c @@ -26,22 +26,22 @@ */ #include <common.h> #include <command.h> -#include <devices.h> +#include <stdio.h>
extern void _do_coninfo (void); int do_coninfo (cmd_tbl_t * cmd, int flag, int argc, char *argv[]) { int l; - struct list_head *list = device_get_list(); + struct list_head *list = stdio_get_list(); struct list_head *pos; - device_t *dev; + stdio_device_t *dev;
/* Scan for valid output and input devices */
puts ("List of available devices:\n");
list_for_each(pos, list) { - dev = list_entry(pos, device_t, list); + dev = list_entry(pos, stdio_device_t, list);
printf ("%-8s %08x %c%c%c ", dev->name, diff --git a/common/cmd_log.c b/common/cmd_log.c index a03835d..46f1100 100644 --- a/common/cmd_log.c +++ b/common/cmd_log.c @@ -42,7 +42,7 @@
#include <common.h> #include <command.h> -#include <devices.h> +#include <stdio.h> #include <post.h> #include <logbuff.h>
@@ -142,7 +142,7 @@ void logbuff_reset (void)
int drv_logbuff_init (void) { - device_t logdev; + stdio_device_t logdev; int rc;
/* Device initialization */ @@ -154,7 +154,7 @@ int drv_logbuff_init (void) logdev.putc = logbuff_putc; /* 'putc' function */ logdev.puts = logbuff_puts; /* 'puts' function */
- rc = device_register (&logdev); + rc = stdio_register (&logdev);
return (rc == 0) ? 1 : rc; } diff --git a/common/cmd_terminal.c b/common/cmd_terminal.c index fd3dd48..6d44cd3 100644 --- a/common/cmd_terminal.c +++ b/common/cmd_terminal.c @@ -26,19 +26,19 @@ */ #include <common.h> #include <command.h> -#include <devices.h> +#include <stdio.h> #include <serial.h>
int do_terminal(cmd_tbl_t * cmd, int flag, int argc, char *argv[]) { int last_tilde = 0; - device_t *dev = NULL; + stdio_device_t *dev = NULL;
if (argc < 1) return -1;
/* Scan for selected output/input device */ - dev = device_get_by_name(argv[1]); + dev = stdio_get_by_name(argv[1]); if (!dev) return -1;
diff --git a/common/console.c b/common/console.c index c1669d1..c6202e6 100644 --- a/common/console.c +++ b/common/console.c @@ -24,7 +24,7 @@ #include <common.h> #include <stdarg.h> #include <malloc.h> -#include <console.h> +#include <stdio.h> #include <exports.h>
DECLARE_GLOBAL_DATA_PTR; @@ -48,7 +48,7 @@ extern int overwrite_console(void);
#endif /* CONFIG_SYS_CONSOLE_IS_IN_ENV */
-static int console_setfile(int file, device_t * dev) +static int console_setfile(int file, stdio_device_t * dev) { int error = 0;
@@ -96,8 +96,8 @@ static int console_setfile(int file, device_t * dev) #if defined(CONFIG_CONSOLE_MUX) /** Console I/O multiplexing *******************************************/
-static device_t *tstcdev; -device_t **console_devices[MAX_FILES]; +static stdio_device_t *tstcdev; +stdio_device_t **console_devices[MAX_FILES]; int cd_count[MAX_FILES];
/* @@ -119,7 +119,7 @@ static int console_getc(int file) static int console_tstc(int file) { int i, ret; - device_t *dev; + stdio_device_t *dev;
disable_ctrlc(1); for (i = 0; i < cd_count[file]; i++) { @@ -141,7 +141,7 @@ static int console_tstc(int file) static void console_putc(int file, const char c) { int i; - device_t *dev; + stdio_device_t *dev;
for (i = 0; i < cd_count[file]; i++) { dev = console_devices[file][i]; @@ -153,7 +153,7 @@ static void console_putc(int file, const char c) static void console_puts(int file, const char *s) { int i; - device_t *dev; + stdio_device_t *dev;
for (i = 0; i < cd_count[file]; i++) { dev = console_devices[file][i]; @@ -167,7 +167,7 @@ static inline void console_printdevs(int file) iomux_printdevs(file); }
-static inline void console_doenv(int file, device_t *dev) +static inline void console_doenv(int file, stdio_device_t *dev) { iomux_doenv(file, dev->name); } @@ -197,7 +197,7 @@ static inline void console_printdevs(int file) printf("%s\n", stdio_devices[file]->name); }
-static inline void console_doenv(int file, device_t *dev) +static inline void console_doenv(int file, stdio_device_t *dev) { console_setfile(file, dev); } @@ -479,11 +479,11 @@ inline void dbg(const char *fmt, ...)
/** U-Boot INIT FUNCTIONS *************************************************/
-device_t *search_device(int flags, char *name) +stdio_device_t *search_device(int flags, char *name) { - device_t *dev; + stdio_device_t *dev;
- dev = device_get_by_name(name); + dev = stdio_get_by_name(name);
if (dev && (dev->flags & flags)) return dev; @@ -494,7 +494,7 @@ device_t *search_device(int flags, char *name) int console_assign(int file, char *devname) { int flag; - device_t *dev; + stdio_device_t *dev;
/* Check for valid file */ switch (file) { @@ -564,7 +564,7 @@ void stdio_print_current_devices(void) int console_init_r(void) { char *stdinname, *stdoutname, *stderrname; - device_t *inputdev = NULL, *outputdev = NULL, *errdev = NULL; + stdio_device_t *inputdev = NULL, *outputdev = NULL, *errdev = NULL; #ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE int i; #endif /* CONFIG_SYS_CONSOLE_ENV_OVERWRITE */ @@ -650,11 +650,11 @@ done: /* Called after the relocation - use desired console functions */ int console_init_r(void) { - device_t *inputdev = NULL, *outputdev = NULL; + stdio_device_t *inputdev = NULL, *outputdev = NULL; int i; - struct list_head *list = device_get_list(); + struct list_head *list = stdio_get_list(); struct list_head *pos; - device_t *dev; + stdio_device_t *dev;
#ifdef CONFIG_SPLASH_SCREEN /* @@ -667,7 +667,7 @@ int console_init_r(void)
/* Scan devices looking for input and output devices */ list_for_each(pos, list) { - dev = list_entry(pos, device_t, list); + dev = list_entry(pos, stdio_device_t, list);
if ((dev->flags & DEV_FLAGS_INPUT) && (inputdev == NULL)) { inputdev = dev; diff --git a/common/iomux.c b/common/iomux.c index bdcc853..1b9114e 100644 --- a/common/iomux.c +++ b/common/iomux.c @@ -29,7 +29,7 @@ void iomux_printdevs(const int console) { int i; - device_t *dev; + stdio_device_t *dev;
for (i = 0; i < cd_count[console]; i++) { dev = console_devices[console][i]; @@ -43,8 +43,8 @@ int iomux_doenv(const int console, const char *arg) { char *console_args, *temp, **start; int i, j, k, io_flag, cs_idx, repeat; - device_t *dev; - device_t **cons_set; + stdio_device_t *dev; + stdio_device_t **cons_set;
console_args = strdup(arg); if (console_args == NULL) @@ -85,7 +85,7 @@ int iomux_doenv(const int console, const char *arg) *temp = '\0'; start[i] = temp + 1; } - cons_set = (device_t **)calloc(i, sizeof(device_t *)); + cons_set = (stdio_device_t **)calloc(i, sizeof(stdio_device_t *)); if (cons_set == NULL) { free(start); free(console_args); @@ -158,14 +158,14 @@ int iomux_doenv(const int console, const char *arg) } else { /* Works even if console_devices[console] is NULL. */ console_devices[console] = - (device_t **)realloc(console_devices[console], - cs_idx * sizeof(device_t *)); + (stdio_device_t **)realloc(console_devices[console], + cs_idx * sizeof(stdio_device_t *)); if (console_devices[console] == NULL) { free(cons_set); return 1; } memcpy(console_devices[console], cons_set, cs_idx * - sizeof(device_t *)); + sizeof(stdio_device_t *));
cd_count[console] = cs_idx; } diff --git a/common/lcd.c b/common/lcd.c index 4155170..cac3654 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -34,7 +34,7 @@ #include <command.h> #include <stdarg.h> #include <linux/types.h> -#include <devices.h> +#include <stdio.h> #if defined(CONFIG_POST) #include <post.h> #endif @@ -355,7 +355,7 @@ static void test_pattern (void)
int drv_lcd_init (void) { - device_t lcddev; + stdio_device_t lcddev; int rc;
lcd_base = (void *)(gd->fb_base); @@ -373,7 +373,7 @@ int drv_lcd_init (void) lcddev.putc = lcd_putc; /* 'putc' function */ lcddev.puts = lcd_puts; /* 'puts' function */
- rc = device_register (&lcddev); + rc = stdio_register (&lcddev);
return (rc == 0) ? 1 : rc; } diff --git a/common/serial.c b/common/serial.c index 09385d0..1b38d3b 100644 --- a/common/serial.c +++ b/common/serial.c @@ -23,7 +23,7 @@
#include <common.h> #include <serial.h> -#include <devices.h> +#include <stdio.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -139,9 +139,9 @@ void serial_initialize (void) serial_assign (default_serial_console ()->name); }
-void serial_devices_init (void) +void serial_stdio_init (void) { - device_t dev; + stdio_device_t dev; struct serial_device *s = serial_devices;
while (s) { @@ -156,7 +156,7 @@ void serial_devices_init (void) dev.getc = s->getc; dev.tstc = s->tstc;
- device_register (&dev); + stdio_register (&dev);
s = s->next; } diff --git a/common/devices.c b/common/stdio.c similarity index 82% rename from common/devices.c rename to common/stdio.c index ba53c9b..5076499 100644 --- a/common/devices.c +++ b/common/stdio.c @@ -25,7 +25,7 @@ #include <common.h> #include <stdarg.h> #include <malloc.h> -#include <devices.h> +#include <stdio.h> #include <serial.h> #ifdef CONFIG_LOGBUFFER #include <logbuff.h> @@ -36,16 +36,16 @@
DECLARE_GLOBAL_DATA_PTR;
-static device_t devs; -device_t *stdio_devices[] = { NULL, NULL, NULL }; +static stdio_device_t devs; +stdio_device_t *stdio_devices[] = { NULL, NULL, NULL }; char *stdio_names[MAX_FILES] = { "stdin", "stdout", "stderr" };
-#if defined(CONFIG_SPLASH_SCREEN) && !defined(CONFIG_SYS_DEVICE_NULLDEV) -#define CONFIG_SYS_DEVICE_NULLDEV 1 +#if defined(CONFIG_SPLASH_SCREEN) && !defined(CONFIG_SYS_STDIO_NULLDEV) +#define CONFIG_SYS_STDIO_NULLDEV 1 #endif
-#ifdef CONFIG_SYS_DEVICE_NULLDEV +#ifdef CONFIG_SYS_STDIO_NULLDEV void nulldev_putc(const char c) { /* nulldev is empty! */ @@ -70,7 +70,7 @@ int nulldev_input(void)
static void drv_system_init (void) { - device_t dev; + stdio_device_t dev;
memset (&dev, 0, sizeof (dev));
@@ -88,9 +88,9 @@ static void drv_system_init (void) dev.tstc = serial_tstc; #endif
- device_register (&dev); + stdio_register (&dev);
-#ifdef CONFIG_SYS_DEVICE_NULLDEV +#ifdef CONFIG_SYS_STDIO_NULLDEV memset (&dev, 0, sizeof (dev));
strcpy (dev.name, "nulldev"); @@ -100,7 +100,7 @@ static void drv_system_init (void) dev.getc = nulldev_input; dev.tstc = nulldev_input;
- device_register (&dev); + stdio_register (&dev); #endif }
@@ -108,21 +108,21 @@ static void drv_system_init (void) * DEVICES ************************************************************************** */ -struct list_head* device_get_list(void) +struct list_head* stdio_get_list(void) { return &(devs.list); }
-device_t* device_get_by_name(char* name) +stdio_device_t* stdio_get_by_name(char* name) { struct list_head *pos; - device_t *dev; + stdio_device_t *dev;
if(!name) return NULL;
list_for_each(pos, &(devs.list)) { - dev = list_entry(pos, device_t, list); + dev = list_entry(pos, stdio_device_t, list); if(strcmp(dev->name, name) == 0) return dev; } @@ -130,29 +130,29 @@ device_t* device_get_by_name(char* name) return NULL; }
-device_t* device_clone(device_t *dev) +stdio_device_t* stdio_clone(stdio_device_t *dev) { - device_t *_dev; + stdio_device_t *_dev;
if(!dev) return NULL;
- _dev = calloc(1, sizeof(device_t)); + _dev = calloc(1, sizeof(stdio_device_t));
if(!_dev) return NULL;
- memcpy(_dev, dev, sizeof(device_t)); + memcpy(_dev, dev, sizeof(stdio_device_t)); strncpy(_dev->name, dev->name, 16);
return _dev; }
-int device_register (device_t * dev) +int stdio_register (stdio_device_t * dev) { - device_t *_dev; + stdio_device_t *_dev;
- _dev = device_clone(dev); + _dev = stdio_clone(dev); if(!_dev) return -1; list_add_tail(&(_dev->list), &(devs.list)); @@ -162,15 +162,15 @@ int device_register (device_t * dev) /* deregister the device "devname". * returns 0 if success, -1 if device is assigned and 1 if devname not found */ -#ifdef CONFIG_SYS_DEVICE_DEREGISTER -int device_deregister(char *devname) +#ifdef CONFIG_SYS_STDIO_DEREGISTER +int stdio_deregister(char *devname) { int l; struct list_head *pos; - device_t *dev; + stdio_device_t *dev; char temp_names[3][8];
- dev = device_get_by_name(devname); + dev = stdio_get_by_name(devname);
if(!dev) /* device not found */ return -1; @@ -189,7 +189,7 @@ int device_deregister(char *devname)
/* reassign Device list */ list_for_each(pos, &(devs.list)) { - dev = list_entry(pos, device_t, list); + dev = list_entry(pos, stdio_device_t, list); for (l=0 ; l< MAX_FILES; l++) { if(strcmp(dev->name, temp_names[l]) == 0) stdio_devices[l] = dev; @@ -197,9 +197,9 @@ int device_deregister(char *devname) } return 0; } -#endif /* CONFIG_SYS_DEVICE_DEREGISTER */ +#endif /* CONFIG_SYS_STDIO_DEREGISTER */
-int devices_init (void) +int stdio_init (void) { #ifndef CONFIG_ARM /* already relocated for current ARM implementation */ ulong relocation_offset = gd->reloc_off; @@ -235,7 +235,7 @@ int devices_init (void) #endif drv_system_init (); #ifdef CONFIG_SERIAL_MULTI - serial_devices_init (); + serial_stdio_init (); #endif #ifdef CONFIG_USB_TTY drv_usbtty_init (); diff --git a/common/usb_kbd.c b/common/usb_kbd.c index e0d006c..f8d6047 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -25,7 +25,7 @@ * */ #include <common.h> -#include <devices.h> +#include <stdio.h> #include <asm/byteorder.h>
#include <usb.h> @@ -153,7 +153,7 @@ static int usb_kbd_probe(struct usb_device *dev, unsigned int ifnum); int drv_usb_kbd_init(void) { int error,i; - device_t usb_kbd_dev,*old_dev; + stdio_device_t usb_kbd_dev,*old_dev; struct usb_device *dev; char *stdinname = getenv ("stdin");
@@ -168,7 +168,7 @@ int drv_usb_kbd_init(void) if(usb_kbd_probe(dev,0)==1) { /* Ok, we found a keyboard */ /* check, if it is already registered */ USB_KBD_PRINTF("USB KBD found set up device.\n"); - old_dev = device_get_by_name(DEVNAME); + old_dev = stdio_get_by_name(DEVNAME); if(old_dev) { /* ok, already registered, just return ok */ USB_KBD_PRINTF("USB KBD is already registered.\n"); @@ -176,7 +176,7 @@ int drv_usb_kbd_init(void) } /* register the keyboard */ USB_KBD_PRINTF("USB KBD register.\n"); - memset (&usb_kbd_dev, 0, sizeof(device_t)); + memset (&usb_kbd_dev, 0, sizeof(stdio_device_t)); strcpy(usb_kbd_dev.name, DEVNAME); usb_kbd_dev.flags = DEV_FLAGS_INPUT | DEV_FLAGS_SYSTEM; usb_kbd_dev.putc = NULL; @@ -184,7 +184,7 @@ int drv_usb_kbd_init(void) usb_kbd_dev.getc = usb_kbd_getc; usb_kbd_dev.tstc = usb_kbd_testc; usb_kbd_dev.priv = (void *)dev; - error = device_register (&usb_kbd_dev); + error = stdio_register (&usb_kbd_dev); if(error==0) { /* check if this is the standard input device */ if(strcmp(stdinname,DEVNAME)==0) { @@ -212,8 +212,8 @@ int drv_usb_kbd_init(void) /* deregistering the keyboard */ int usb_kbd_deregister(void) { -#ifdef CONFIG_SYS_DEVICE_DEREGISTER - return device_deregister(DEVNAME); +#ifdef CONFIG_SYS_STDIO_DEREGISTER + return stdio_deregister(DEVNAME); #else return 1; #endif diff --git a/cpu/blackfin/jtag-console.c b/cpu/blackfin/jtag-console.c index d58582f..17f8917 100644 --- a/cpu/blackfin/jtag-console.c +++ b/cpu/blackfin/jtag-console.c @@ -7,7 +7,7 @@ */
#include <common.h> -#include <devices.h> +#include <stdio.h> #include <asm/blackfin.h>
#ifndef CONFIG_JTAG_CONSOLE_TIMEOUT @@ -105,7 +105,7 @@ static int jtag_getc(void)
int drv_jtag_console_init(void) { - device_t dev; + stdio_device_t dev; int ret;
memset(&dev, 0x00, sizeof(dev)); @@ -116,7 +116,7 @@ int drv_jtag_console_init(void) dev.tstc = jtag_tstc; dev.getc = jtag_getc;
- ret = device_register(&dev); + ret = stdio_register(&dev); return (ret == 0 ? 1 : ret); }
diff --git a/cpu/mpc8xx/lcd.c b/cpu/mpc8xx/lcd.c index 4474e24..ce652db 100644 --- a/cpu/mpc8xx/lcd.c +++ b/cpu/mpc8xx/lcd.c @@ -35,7 +35,7 @@ #include <stdarg.h> #include <lcdvideo.h> #include <linux/types.h> -#include <devices.h> +#include <stdio.h> #if defined(CONFIG_POST) #include <post.h> #endif diff --git a/cpu/mpc8xx/video.c b/cpu/mpc8xx/video.c index 4a59927..dcb10c6 100644 --- a/cpu/mpc8xx/video.c +++ b/cpu/mpc8xx/video.c @@ -36,7 +36,7 @@ #include <timestamp.h> #include <i2c.h> #include <linux/types.h> -#include <devices.h> +#include <stdio.h>
#ifdef CONFIG_VIDEO
@@ -1287,7 +1287,7 @@ int drv_video_init (void) { int error, devices = 1;
- device_t videodev; + stdio_device_t videodev;
video_init ((void *)(gd->fb_base)); /* Video initialization */
@@ -1301,7 +1301,7 @@ int drv_video_init (void) videodev.putc = video_putc; /* 'putc' function */ videodev.puts = video_puts; /* 'puts' function */
- error = device_register (&videodev); + error = stdio_register (&videodev);
return (error == 0) ? devices : error; } diff --git a/cpu/pxa/pxafb.c b/cpu/pxa/pxafb.c index 97efcb6..e728544 100644 --- a/cpu/pxa/pxafb.c +++ b/cpu/pxa/pxafb.c @@ -32,7 +32,7 @@ #include <version.h> #include <stdarg.h> #include <linux/types.h> -#include <devices.h> +#include <stdio.h> #include <lcd.h> #include <asm/arch/pxa-regs.h>
diff --git a/doc/README.silent b/doc/README.silent index a26e3df..0c36086 100644 --- a/doc/README.silent +++ b/doc/README.silent @@ -13,7 +13,7 @@ The following actions are taken if "silent" is set at boot time: - When the console devices have been initialized, "stdout" and "stderr" are set to "nulldev", so subsequent messages are suppressed automatically. Make sure to enable "nulldev" by - #defining CONFIG_SYS_DEVICE_NULLDEV in your board config file. + #defining CONFIG_SYS_STDIO_NULLDEV in your board config file.
- When booting a linux kernel, the "bootargs" are fixed up so that the argument "console=" will be in the command line, no matter how diff --git a/drivers/input/keyboard.c b/drivers/input/keyboard.c index 512b9f2..069a6f0 100644 --- a/drivers/input/keyboard.c +++ b/drivers/input/keyboard.c @@ -11,7 +11,7 @@
#include <common.h>
-#include <devices.h> +#include <stdio.h> #include <keyboard.h>
#undef KBG_DEBUG @@ -268,7 +268,7 @@ extern int overwrite_console (void); int kbd_init (void) { int error; - device_t kbddev ; + stdio_device_t kbddev ; char *stdinname = getenv ("stdin");
if(kbd_init_hw()==-1) @@ -281,7 +281,7 @@ int kbd_init (void) kbddev.getc = kbd_getc ; kbddev.tstc = kbd_testc ;
- error = device_register (&kbddev); + error = stdio_register (&kbddev); if(error==0) { /* check if this is the standard input device */ if(strcmp(stdinname,DEVNAME)==0) { diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index b2ee5ea..5b06961 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -23,7 +23,7 @@
#include <common.h> #include <command.h> -#include <devices.h> +#include <stdio.h> #include <net.h>
DECLARE_GLOBAL_DATA_PTR; @@ -243,7 +243,7 @@ int nc_tstc (void)
int drv_nc_init (void) { - device_t dev; + stdio_device_t dev; int rc;
memset (&dev, 0, sizeof (dev)); @@ -256,7 +256,7 @@ int drv_nc_init (void) dev.getc = nc_getc; dev.tstc = nc_tstc;
- rc = device_register (&dev); + rc = stdio_register (&dev);
return (rc == 0) ? 1 : rc; } diff --git a/drivers/serial/arm_dcc.c b/drivers/serial/arm_dcc.c index dca73b9..83642ea 100644 --- a/drivers/serial/arm_dcc.c +++ b/drivers/serial/arm_dcc.c @@ -27,7 +27,7 @@ */
#include <common.h> -#include <devices.h> +#include <stdio.h>
#if defined(CONFIG_CPU_V6) /* @@ -148,7 +148,7 @@ int arm_dcc_tstc(void) }
#ifdef CONFIG_ARM_DCC_MULTI -static device_t arm_dcc_dev; +static stdio_device_t arm_dcc_dev;
int drv_arm_dcc_init(void) { @@ -165,6 +165,6 @@ int drv_arm_dcc_init(void) arm_dcc_dev.putc = arm_dcc_putc; /* 'putc' function */ arm_dcc_dev.puts = arm_dcc_puts; /* 'puts' function */
- return device_register(&arm_dcc_dev); + return stdio_register(&arm_dcc_dev); } #endif diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c index f711d0b..9be7f55 100644 --- a/drivers/serial/usbtty.c +++ b/drivers/serial/usbtty.c @@ -24,7 +24,7 @@ #include <common.h> #include <config.h> #include <circbuf.h> -#include <devices.h> +#include <stdio.h> #include "usbtty.h" #include "usb_cdc_acm.h" #include "usbdescriptors.h" @@ -70,7 +70,7 @@ static circbuf_t usbtty_output; /* * Instance variables */ -static device_t usbttydev; +static stdio_device_t usbttydev; static struct usb_device_instance device_instance[1]; static struct usb_bus_instance bus_instance[1]; static struct usb_configuration_instance config_instance[NUM_CONFIGS]; @@ -570,7 +570,7 @@ int drv_usbtty_init (void) usbttydev.putc = usbtty_putc; /* 'putc' function */ usbttydev.puts = usbtty_puts; /* 'puts' function */
- rc = device_register (&usbttydev); + rc = stdio_register (&usbttydev);
return (rc == 0) ? 1 : rc; } diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c index 352a0d4..4ac2a9e 100644 --- a/drivers/usb/musb/musb_hcd.c +++ b/drivers/usb/musb/musb_hcd.c @@ -770,7 +770,7 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe, */ void usb_event_poll() { - device_t *dev; + stdio_device_t *dev; struct usb_device *usb_kbd_dev; struct usb_interface_descriptor *iface; struct usb_endpoint_descriptor *ep; @@ -778,7 +778,7 @@ void usb_event_poll() int maxp;
/* Get the pointer to USB Keyboard device pointer */ - dev = device_get_by_name("usbkbd"); + dev = stdio_get_by_name("usbkbd"); usb_kbd_dev = (struct usb_device *)dev->priv; iface = &usb_kbd_dev->config.if_desc[0]; ep = &iface->ep_desc[0]; diff --git a/drivers/usb/musb/musb_hcd.h b/drivers/usb/musb/musb_hcd.h index bb83311..e5d23ff 100644 --- a/drivers/usb/musb/musb_hcd.h +++ b/drivers/usb/musb/musb_hcd.h @@ -26,7 +26,7 @@
#include "musb_core.h" #ifdef CONFIG_USB_KEYBOARD -#include <devices.h> +#include <stdio.h> extern unsigned char new[]; #endif
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 5ee2314..bb5d0e5 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -183,7 +183,7 @@ CONFIG_VIDEO_HW_CURSOR: - Uses the hardware cursor capability of the
#include <version.h> #include <linux/types.h> -#include <devices.h> +#include <stdio.h> #include <video_font.h>
#if defined(CONFIG_CMD_DATE) @@ -1333,7 +1333,7 @@ static int video_init (void) int drv_video_init (void) { int skip_dev_init; - device_t console_dev; + stdio_device_t console_dev;
skip_dev_init = 0;
@@ -1354,7 +1354,7 @@ int drv_video_init (void) console_dev.tstc = NULL; /* 'tstc' function */ console_dev.getc = NULL; /* 'getc' function */
- if (device_register (&console_dev) == 0) + if (stdio_register (&console_dev) == 0) return 1; } #else @@ -1373,7 +1373,7 @@ int drv_video_init (void) console_dev.tstc = VIDEO_TSTC_FCT; /* 'tstc' function */ console_dev.getc = VIDEO_GETC_FCT; /* 'getc' function */
- if (device_register (&console_dev) == 0) + if (stdio_register (&console_dev) == 0) return 1; } #endif /* CONFIG_VGA_AS_SINGLE_DEVICE */ diff --git a/include/configs/APC405.h b/include/configs/APC405.h index 41eaaab..2f893db 100644 --- a/include/configs/APC405.h +++ b/include/configs/APC405.h @@ -168,7 +168,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/AR405.h b/include/configs/AR405.h index 9f19269..5b3d386 100644 --- a/include/configs/AR405.h +++ b/include/configs/AR405.h @@ -114,7 +114,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/ASH405.h b/include/configs/ASH405.h index 2ee4f80..5aa9b0c 100644 --- a/include/configs/ASH405.h +++ b/include/configs/ASH405.h @@ -117,7 +117,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/AmigaOneG3SE.h b/include/configs/AmigaOneG3SE.h index fe04f27..0dfb23b 100644 --- a/include/configs/AmigaOneG3SE.h +++ b/include/configs/AmigaOneG3SE.h @@ -363,7 +363,7 @@ #define CONFIG_USB_UHCI 1 #define CONFIG_USB_STORAGE 1 #define CONFIG_USB_KEYBOARD 1 -#define CONFIG_SYS_DEVICE_DEREGISTER 1 /* needed by CONFIG_USB_KEYBOARD */ +#define CONFIG_SYS_STDIO_DEREGISTER 1 /* needed by CONFIG_USB_KEYBOARD */
/* * Autoboot stuff diff --git a/include/configs/CATcenter.h b/include/configs/CATcenter.h index 39f41e6..735cc84 100644 --- a/include/configs/CATcenter.h +++ b/include/configs/CATcenter.h @@ -176,7 +176,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/CMS700.h b/include/configs/CMS700.h index 40fef88..e1b21b6 100644 --- a/include/configs/CMS700.h +++ b/include/configs/CMS700.h @@ -117,7 +117,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/CPCI2DP.h b/include/configs/CPCI2DP.h index 5c88c47..89c29e6 100644 --- a/include/configs/CPCI2DP.h +++ b/include/configs/CPCI2DP.h @@ -102,7 +102,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/CPCI405.h b/include/configs/CPCI405.h index f032a8d..eab2354 100644 --- a/include/configs/CPCI405.h +++ b/include/configs/CPCI405.h @@ -117,7 +117,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/CPCI4052.h b/include/configs/CPCI4052.h index daa3c19..2d0af6c 100644 --- a/include/configs/CPCI4052.h +++ b/include/configs/CPCI4052.h @@ -124,7 +124,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/CPCI405AB.h b/include/configs/CPCI405AB.h index 41795a7..06fdd2e 100644 --- a/include/configs/CPCI405AB.h +++ b/include/configs/CPCI405AB.h @@ -125,7 +125,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/CPCI405DT.h b/include/configs/CPCI405DT.h index 2333208..e1fb044 100644 --- a/include/configs/CPCI405DT.h +++ b/include/configs/CPCI405DT.h @@ -125,7 +125,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/DP405.h b/include/configs/DP405.h index 187547d..8f717c5 100644 --- a/include/configs/DP405.h +++ b/include/configs/DP405.h @@ -109,7 +109,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/G2000.h b/include/configs/G2000.h index bf9fd82..80c842c 100644 --- a/include/configs/G2000.h +++ b/include/configs/G2000.h @@ -142,7 +142,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/HH405.h b/include/configs/HH405.h index 9233523..85241ff 100644 --- a/include/configs/HH405.h +++ b/include/configs/HH405.h @@ -167,7 +167,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#undef CONFIG_SYS_CONSOLE_INFO_QUIET /* print console @ startup */
diff --git a/include/configs/HUB405.h b/include/configs/HUB405.h index 0e7d2c0..9df335c 100644 --- a/include/configs/HUB405.h +++ b/include/configs/HUB405.h @@ -110,7 +110,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/M5249EVB.h b/include/configs/M5249EVB.h index e3830e5..c55b8ac 100644 --- a/include/configs/M5249EVB.h +++ b/include/configs/M5249EVB.h @@ -74,7 +74,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */ #define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup */ #define CONFIG_AUTO_COMPLETE 1 /* add autocompletion support */ #define CONFIG_LOOPW 1 /* enable loopw command */ diff --git a/include/configs/MIP405.h b/include/configs/MIP405.h index a3869c8..42c51d6 100644 --- a/include/configs/MIP405.h +++ b/include/configs/MIP405.h @@ -414,7 +414,7 @@ #define CONFIG_USB_STORAGE
/* Enable needed helper functions */ -#define CONFIG_SYS_DEVICE_DEREGISTER /* needs device_deregister */ +#define CONFIG_SYS_STDIO_DEREGISTER /* needs stdio_deregister */ #endif /************************************************************ * Debug support diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h index 1091043..c6e47cb 100644 --- a/include/configs/MPC8610HPCD.h +++ b/include/configs/MPC8610HPCD.h @@ -321,7 +321,7 @@ #define CONFIG_PCI_OHCI 1 #define CONFIG_USB_OHCI_NEW 1 #define CONFIG_USB_KEYBOARD 1 -#define CONFIG_SYS_DEVICE_DEREGISTER +#define CONFIG_SYS_STDIO_DEREGISTER #define CONFIG_SYS_USB_EVENT_POLL 1 #define CONFIG_SYS_USB_OHCI_SLOT_NAME "ohci_pci" #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15 diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h index d8042fb..c51f92a 100644 --- a/include/configs/MPC8641HPCN.h +++ b/include/configs/MPC8641HPCN.h @@ -395,7 +395,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); #define CONFIG_PCI_OHCI 1 #define CONFIG_USB_OHCI_NEW 1 #define CONFIG_USB_KEYBOARD 1 -#define CONFIG_SYS_DEVICE_DEREGISTER +#define CONFIG_SYS_STDIO_DEREGISTER #define CONFIG_SYS_USB_EVENT_POLL 1 #define CONFIG_SYS_USB_OHCI_SLOT_NAME "ohci_pci" #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15 diff --git a/include/configs/PCI405.h b/include/configs/PCI405.h index 4e39799..86a56d3 100644 --- a/include/configs/PCI405.h +++ b/include/configs/PCI405.h @@ -103,7 +103,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/PIP405.h b/include/configs/PIP405.h index 5c4d69b..c29cf6d 100644 --- a/include/configs/PIP405.h +++ b/include/configs/PIP405.h @@ -360,7 +360,7 @@ #define CONFIG_USB_STORAGE
/* Enable needed helper functions */ -#define CONFIG_SYS_DEVICE_DEREGISTER /* needs device_deregister */ +#define CONFIG_SYS_STDIO_DEREGISTER /* needs stdio_deregister */
/************************************************************ * Debug support diff --git a/include/configs/PLU405.h b/include/configs/PLU405.h index 7f2337b..5b5975f 100644 --- a/include/configs/PLU405.h +++ b/include/configs/PLU405.h @@ -128,7 +128,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/PMC405.h b/include/configs/PMC405.h index c598d00..9e9cfc8 100644 --- a/include/configs/PMC405.h +++ b/include/configs/PMC405.h @@ -121,7 +121,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Sz */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console info */
diff --git a/include/configs/PPChameleonEVB.h b/include/configs/PPChameleonEVB.h index 16baf8c..4511c91 100644 --- a/include/configs/PPChameleonEVB.h +++ b/include/configs/PPChameleonEVB.h @@ -184,7 +184,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/QS823.h b/include/configs/QS823.h index c1416cb..aaa7df2 100644 --- a/include/configs/QS823.h +++ b/include/configs/QS823.h @@ -35,7 +35,7 @@ #define __CONFIG_H
/* various debug settings */ -#undef CONFIG_SYS_DEVICE_NULLDEV /* null device */ +#undef CONFIG_SYS_STDIO_NULLDEV /* null device */ #undef CONFIG_SILENT_CONSOLE /* silent console */ #undef CONFIG_SYS_CONSOLE_INFO_QUIET /* silent console ? */ #undef DEBUG_FLASH /* debug flash code */ diff --git a/include/configs/QS850.h b/include/configs/QS850.h index de74fee..c4d8fd1 100644 --- a/include/configs/QS850.h +++ b/include/configs/QS850.h @@ -35,7 +35,7 @@ #define __CONFIG_H
/* various debug settings */ -#undef CONFIG_SYS_DEVICE_NULLDEV /* null device */ +#undef CONFIG_SYS_STDIO_NULLDEV /* null device */ #undef CONFIG_SILENT_CONSOLE /* silent console */ #undef CONFIG_SYS_CONSOLE_INFO_QUIET /* silent console ? */ #undef DEBUG_FLASH /* debug flash code */ diff --git a/include/configs/QS860T.h b/include/configs/QS860T.h index 705d375..b9301e2 100644 --- a/include/configs/QS860T.h +++ b/include/configs/QS860T.h @@ -35,7 +35,7 @@ #define __CONFIG_H
/* various debug settings */ -#undef CONFIG_SYS_DEVICE_NULLDEV /* null device */ +#undef CONFIG_SYS_STDIO_NULLDEV /* null device */ #undef CONFIG_SILENT_CONSOLE /* silent console */ #undef CONFIG_SYS_CONSOLE_INFO_QUIET /* silent console ? */ #undef DEBUG_FLASH /* debug flash code */ diff --git a/include/configs/R360MPI.h b/include/configs/R360MPI.h index 830f4bc..4750a42 100644 --- a/include/configs/R360MPI.h +++ b/include/configs/R360MPI.h @@ -139,7 +139,7 @@ /* * Miscellaneous configurable options */ -#define CONFIG_SYS_DEVICE_NULLDEV 1 /* we need the null device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* we need the null device */ #define CONFIG_SYS_CONSOLE_IS_IN_ENV 1 /* must set console from env */
#define CONFIG_SYS_LONGHELP /* undef to save memory */ diff --git a/include/configs/TASREG.h b/include/configs/TASREG.h index 25f3a26..b86ae8f 100644 --- a/include/configs/TASREG.h +++ b/include/configs/TASREG.h @@ -90,7 +90,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */ #define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/ #define CONFIG_AUTO_COMPLETE 1 /* add autocompletion support */ #define CONFIG_LOOPW 1 /* enable loopw command */ diff --git a/include/configs/TQM5200.h b/include/configs/TQM5200.h index fe1d102..7e987f4 100644 --- a/include/configs/TQM5200.h +++ b/include/configs/TQM5200.h @@ -58,7 +58,7 @@ #define CONFIG_BOOTCOUNT_LIMIT 1
#ifdef CONFIG_FO300 -#define CONFIG_SYS_DEVICE_NULLDEV 1 /* enable null device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* enable null device */ #define CONFIG_SILENT_CONSOLE 1 /* enable silent startup */ #define CONFIG_BOARD_EARLY_INIT_F 1 /* used to detect S1 switch position */ #define CONFIG_USB_BIN_FIXUP 1 /* for a buggy USB device */ diff --git a/include/configs/VCMA9.h b/include/configs/VCMA9.h index 547167f..57c3da5 100644 --- a/include/configs/VCMA9.h +++ b/include/configs/VCMA9.h @@ -130,7 +130,7 @@ #define CONFIG_DOS_PARTITION 1
/* Enable needed helper functions */ -#define CONFIG_SYS_DEVICE_DEREGISTER /* needs device_deregister */ +#define CONFIG_SYS_STDIO_DEREGISTER /* needs stdio_deregister */
/************************************************************ * RTC diff --git a/include/configs/VOH405.h b/include/configs/VOH405.h index 38a1d0d..4eb8752 100644 --- a/include/configs/VOH405.h +++ b/include/configs/VOH405.h @@ -124,7 +124,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/VOM405.h b/include/configs/VOM405.h index db00c65..862800e 100644 --- a/include/configs/VOM405.h +++ b/include/configs/VOM405.h @@ -113,7 +113,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/WUH405.h b/include/configs/WUH405.h index 99188bc..33f1e6e 100644 --- a/include/configs/WUH405.h +++ b/include/configs/WUH405.h @@ -114,7 +114,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 /* don't print console @ startup*/
diff --git a/include/configs/cerf250.h b/include/configs/cerf250.h index 82d1401..9448d54 100644 --- a/include/configs/cerf250.h +++ b/include/configs/cerf250.h @@ -111,7 +111,7 @@ /* Print Buffer Size */ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ -#define CONFIG_SYS_DEVICE_NULLDEV 1 +#define CONFIG_SYS_STDIO_NULLDEV 1
#define CONFIG_SYS_MEMTEST_START 0xa0400000 /* memtest works on */ #define CONFIG_SYS_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */ diff --git a/include/configs/delta.h b/include/configs/delta.h index bacbd90..11220e5 100644 --- a/include/configs/delta.h +++ b/include/configs/delta.h @@ -164,7 +164,7 @@ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ -#define CONFIG_SYS_DEVICE_NULLDEV 1 +#define CONFIG_SYS_STDIO_NULLDEV 1
#define CONFIG_SYS_MEMTEST_START 0x80400000 /* memtest works on */ #define CONFIG_SYS_MEMTEST_END 0x80800000 /* 4 ... 8 MB in DRAM */ diff --git a/include/configs/gr_ep2s60.h b/include/configs/gr_ep2s60.h index 6f58bac..7b0a08f 100644 --- a/include/configs/gr_ep2s60.h +++ b/include/configs/gr_ep2s60.h @@ -87,7 +87,7 @@ #define CONFIG_CMD_USB #define CONFIG_USB_STORAGE /* Enable needed helper functions */ -#define CONFIG_SYS_DEVICE_DEREGISTER /* needs device_deregister */ +#define CONFIG_SYS_STDIO_DEREGISTER /* needs stdio_deregister */ #endif
/* diff --git a/include/configs/lubbock.h b/include/configs/lubbock.h index 2cf9c02..d126811 100644 --- a/include/configs/lubbock.h +++ b/include/configs/lubbock.h @@ -120,7 +120,7 @@ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ -#define CONFIG_SYS_DEVICE_NULLDEV 1 +#define CONFIG_SYS_STDIO_NULLDEV 1
#define CONFIG_SYS_MEMTEST_START 0xa0400000 /* memtest works on */ #define CONFIG_SYS_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */ diff --git a/include/configs/mimc200.h b/include/configs/mimc200.h index 8ff2f8a..5b4a7bc 100644 --- a/include/configs/mimc200.h +++ b/include/configs/mimc200.h @@ -80,7 +80,7 @@
#define CONFIG_SILENT_CONSOLE 1 /* enable silent startup */ #define CONFIG_DISABLE_CONSOLE 1 /* disable console */ -#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
/* * Only interrupt autoboot if <space> is pressed. Otherwise, garbage diff --git a/include/configs/mp2usb.h b/include/configs/mp2usb.h index 3225ce7..bac852e 100644 --- a/include/configs/mp2usb.h +++ b/include/configs/mp2usb.h @@ -216,7 +216,7 @@ #define CONFIG_SYS_MAXARGS 32 /* max number of command args */ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define CONFIG_SYS_DEVICE_DEREGISTER /* needs device_deregister */ +#define CONFIG_SYS_STDIO_DEREGISTER /* needs stdio_deregister */
#define CONFIG_SYS_HZ 1000 #define CONFIG_SYS_HZ_CLOCK (AT91C_MASTER_CLOCK/2) /* AT91C_TC0_CMR is implicitly set to */ @@ -228,7 +228,7 @@ #error CONFIG_USE_IRQ not supported #endif
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* enble null device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* enble null device */ #undef CONFIG_SILENT_CONSOLE /* enable silent startup */
#define CONFIG_AUTOBOOT_KEYED diff --git a/include/configs/pleb2.h b/include/configs/pleb2.h index ed873fa..ee87740 100644 --- a/include/configs/pleb2.h +++ b/include/configs/pleb2.h @@ -120,7 +120,7 @@ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ -#define CONFIG_SYS_DEVICE_NULLDEV 1 +#define CONFIG_SYS_STDIO_NULLDEV 1
#define CONFIG_SYS_MEMTEST_START 0xa0400000 /* memtest works on */ #define CONFIG_SYS_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */ diff --git a/include/configs/pxa255_idp.h b/include/configs/pxa255_idp.h index 7485f72..e8753e4 100644 --- a/include/configs/pxa255_idp.h +++ b/include/configs/pxa255_idp.h @@ -234,7 +234,7 @@ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ -#define CONFIG_SYS_DEVICE_NULLDEV 1 +#define CONFIG_SYS_STDIO_NULLDEV 1
#define CONFIG_SYS_MEMTEST_START 0xa0400000 /* memtest works on */ #define CONFIG_SYS_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */ diff --git a/include/configs/sc3.h b/include/configs/sc3.h index 97e1da2..4a946de 100644 --- a/include/configs/sc3.h +++ b/include/configs/sc3.h @@ -128,7 +128,7 @@ #undef CONFIG_BOOTCOMMAND
#define CONFIG_SILENT_CONSOLE 1 /* enable silent startup */ -#define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* include nulldev device */
#if 1 /* feel free to disable for development */ #define CONFIG_AUTOBOOT_KEYED /* Enable password protection */ diff --git a/include/configs/trab.h b/include/configs/trab.h index 40f9959..7aa141c 100644 --- a/include/configs/trab.h +++ b/include/configs/trab.h @@ -58,7 +58,7 @@ #define CONFIG_SETUP_MEMORY_TAGS 1 #define CONFIG_INITRD_TAG 1
-#define CONFIG_SYS_DEVICE_NULLDEV 1 /* enble null device */ +#define CONFIG_SYS_STDIO_NULLDEV 1 /* enble null device */ #define CONFIG_SILENT_CONSOLE 1 /* enable silent startup */
#define CONFIG_VERSION_VARIABLE 1 /* include version env variable */ diff --git a/include/configs/trizepsiv.h b/include/configs/trizepsiv.h index 4917318..0ef1396 100644 --- a/include/configs/trizepsiv.h +++ b/include/configs/trizepsiv.h @@ -161,7 +161,7 @@ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ -#define CONFIG_SYS_DEVICE_NULLDEV 1 +#define CONFIG_SYS_STDIO_NULLDEV 1
#define CONFIG_SYS_MEMTEST_START 0xa0400000 /* memtest works on */ #define CONFIG_SYS_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */ diff --git a/include/configs/xaeniax.h b/include/configs/xaeniax.h index 1632d29..fdd5cfc 100644 --- a/include/configs/xaeniax.h +++ b/include/configs/xaeniax.h @@ -132,7 +132,7 @@ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ -#define CONFIG_SYS_DEVICE_NULLDEV 1 +#define CONFIG_SYS_STDIO_NULLDEV 1
#define CONFIG_SYS_MEMTEST_START 0xa0400000 /* memtest works on */ #define CONFIG_SYS_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */ diff --git a/include/configs/zylonite.h b/include/configs/zylonite.h index 217636a..b61f8ab 100644 --- a/include/configs/zylonite.h +++ b/include/configs/zylonite.h @@ -137,7 +137,7 @@ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ -#define CONFIG_SYS_DEVICE_NULLDEV 1 +#define CONFIG_SYS_STDIO_NULLDEV 1
#define CONFIG_SYS_MEMTEST_START 0x9c000000 /* memtest works on */ #define CONFIG_SYS_MEMTEST_END 0x9c400000 /* 4 ... 8 MB in DRAM */ diff --git a/include/console.h b/include/console.h deleted file mode 100644 index c58fd2b..0000000 --- a/include/console.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * (C) Copyright 2000 - * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -#ifndef _CONSOLE_H_ -#define _CONSOLE_H_ - -#include <devices.h> - -/* -** VARIABLES -*/ - -extern device_t *stdio_devices[] ; -extern char *stdio_names[MAX_FILES] ; - -void stdio_print_current_devices(void); - -#endif diff --git a/include/iomux.h b/include/iomux.h index 257c1f7..c095f75 100644 --- a/include/iomux.h +++ b/include/iomux.h @@ -24,7 +24,7 @@ #ifndef _IO_MUX_H #define _IO_MUX_H
-#include <devices.h> +#include <stdio.h>
/* * Stuff required to support console multiplexing. @@ -34,7 +34,7 @@ * Pointers to devices used for each file type. Defined in console.c * but storage is allocated in iomux.c. */ -extern device_t **console_devices[MAX_FILES]; +extern stdio_device_t **console_devices[MAX_FILES]; /* * The count of devices assigned to each FILE. Defined in console.c * and populated in iomux.c. @@ -43,6 +43,6 @@ extern int cd_count[MAX_FILES];
int iomux_doenv(const int, const char *); void iomux_printdevs(const int); -device_t *search_device(int, char *); +stdio_device_t *search_device(int, char *);
#endif /* _IO_MUX_H */ diff --git a/include/serial.h b/include/serial.h index e3d8b36..295d4ce 100644 --- a/include/serial.h +++ b/include/serial.h @@ -47,7 +47,7 @@ extern struct serial_device serial_btuart_device; extern struct serial_device serial_stuart_device;
extern void serial_initialize(void); -extern void serial_devices_init(void); +extern void serial_stdio_init(void); extern int serial_assign(char * name); extern void serial_reinit_all(void);
diff --git a/include/devices.h b/include/stdio.h similarity index 84% rename from include/devices.h rename to include/stdio.h index 3a9881b..9bccd6e 100644 --- a/include/devices.h +++ b/include/stdio.h @@ -12,7 +12,7 @@ * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License @@ -21,13 +21,13 @@ * MA 02111-1307 USA */
-#include <linux/list.h> +#ifndef _STDIO_H_ +#define _STDIO_H_
-#ifndef _DEVICES_H_ -#define _DEVICES_H_ +#include <linux/list.h>
/* - * CONSOLE DEVICES + * STDIO DEVICES */
#define DEV_FLAGS_INPUT 0x00000001 /* Device can be used as input console */ @@ -36,7 +36,7 @@ #define DEV_EXT_VIDEO 0x00000001 /* Video extensions supported */
/* Device information */ -typedef struct { +typedef struct stdio_device { int flags; /* Device flags: input/output/system */ int ext; /* Supported extensions */ char name[16]; /* Device name */ @@ -60,7 +60,7 @@ typedef struct {
void *priv; /* Private extensions */ struct list_head list; -} device_t; +} stdio_device_t;
/* * VIDEO EXTENSIONS @@ -83,20 +83,21 @@ typedef struct { /* * VARIABLES */ -extern device_t *stdio_devices[]; +extern stdio_device_t *stdio_devices[]; extern char *stdio_names[MAX_FILES];
/* * PROTOTYPES */ -int device_register (device_t * dev); -int devices_init (void); -#ifdef CONFIG_SYS_DEVICE_DEREGISTER -int device_deregister(char *devname); +int stdio_register (stdio_device_t * dev); +int stdio_init (void); +void stdio_print_current_devices(void); +#ifdef CONFIG_SYS_STDIO_DEREGISTER +int stdio_deregister(char *devname); #endif -struct list_head* device_get_list(void); -device_t* device_get_by_name(char* name); -device_t* device_clone(device_t *dev); +struct list_head* stdio_get_list(void); +stdio_device_t* stdio_get_by_name(char* name); +stdio_device_t* stdio_clone(stdio_device_t *dev);
#ifdef CONFIG_ARM_DCC_MULTI int drv_arm_dcc_init(void); @@ -123,4 +124,4 @@ int drv_nc_init (void); int drv_jtag_console_init (void); #endif
-#endif /* _DEVICES_H_ */ +#endif diff --git a/lib_arm/board.c b/lib_arm/board.c index 9fbb4bf..2db1b16 100644 --- a/lib_arm/board.c +++ b/lib_arm/board.c @@ -41,7 +41,7 @@ #include <common.h> #include <command.h> #include <malloc.h> -#include <devices.h> +#include <stdio.h> #include <timestamp.h> #include <version.h> #include <net.h> @@ -388,7 +388,7 @@ void start_armboot (void) /* IP Address */ gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
- devices_init (); /* get the devices list going. */ + stdio_init (); /* get the devices list going. */
jumptable_init ();
diff --git a/lib_avr32/board.c b/lib_avr32/board.c index 57115df..e608829 100644 --- a/lib_avr32/board.c +++ b/lib_avr32/board.c @@ -22,7 +22,7 @@ #include <common.h> #include <command.h> #include <malloc.h> -#include <devices.h> +#include <stdio.h> #include <timestamp.h> #include <version.h> #include <net.h> @@ -350,7 +350,7 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
- devices_init(); + stdio_init(); jumptable_init(); console_init_r();
diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c index 49465d2..d23ade4 100644 --- a/lib_blackfin/board.c +++ b/lib_blackfin/board.c @@ -11,7 +11,7 @@
#include <common.h> #include <command.h> -#include <devices.h> +#include <stdio.h> #include <environment.h> #include <malloc.h> #include <net.h> @@ -353,8 +353,8 @@ void board_init_r(gd_t * id, ulong dest_addr) /* relocate environment function pointers etc. */ env_relocate();
- /* Initialize devices */ - devices_init(); + /* Initialize stdio devices */ + stdio_init(); jumptable_init();
/* Initialize the console (after the relocation and devices init) */ diff --git a/lib_blackfin/post.c b/lib_blackfin/post.c index 35ccd3c..057ca01 100644 --- a/lib_blackfin/post.c +++ b/lib_blackfin/post.c @@ -22,7 +22,7 @@ */
#include <common.h> -#include <console.h> +#include <stdio.h> #include <watchdog.h> #include <post.h>
diff --git a/lib_i386/board.c b/lib_i386/board.c index e18dfa5..639cfc8 100644 --- a/lib_i386/board.c +++ b/lib_i386/board.c @@ -31,7 +31,7 @@ #include <common.h> #include <watchdog.h> #include <command.h> -#include <devices.h> +#include <stdio.h> #include <timestamp.h> #include <version.h> #include <malloc.h> @@ -299,7 +299,7 @@ void start_i386boot (void) show_boot_progress(0x27);
- devices_init (); + stdio_init ();
jumptable_init ();
diff --git a/lib_i386/video.c b/lib_i386/video.c index cd89457..60c8683 100644 --- a/lib_i386/video.c +++ b/lib_i386/video.c @@ -23,7 +23,7 @@
#include <common.h> #include <pci.h> -#include <devices.h> +#include <stdio.h> #include <i8042.h> #include <asm/ptrace.h> #include <asm/realmode.h> @@ -168,8 +168,8 @@ int video_init(void) { u16 pos;
- static device_t vga_dev; - static device_t kbd_dev; + static stdio_device_t vga_dev; + static stdio_device_t kbd_dev;
vidmem = (char *) 0xb8000; vidport = 0x3d4; @@ -203,7 +203,7 @@ int video_init(void) vga_dev.tstc = NULL; /* 'tstc' function */ vga_dev.getc = NULL; /* 'getc' function */
- if (device_register(&vga_dev) == 0) { + if (stdio_register(&vga_dev) == 0) { return 1; }
@@ -220,7 +220,7 @@ int video_init(void) kbd_dev.tstc = i8042_tstc; /* 'tstc' function */ kbd_dev.getc = i8042_getc; /* 'getc' function */
- if (device_register(&kbd_dev) == 0) { + if (stdio_register(&kbd_dev) == 0) { return 1; } return 0; diff --git a/lib_m68k/board.c b/lib_m68k/board.c index db45b00..f306a1f 100644 --- a/lib_m68k/board.c +++ b/lib_m68k/board.c @@ -28,7 +28,7 @@ #include <watchdog.h> #include <command.h> #include <malloc.h> -#include <devices.h> +#include <stdio.h>
#include <asm/immap.h>
@@ -596,8 +596,8 @@ void board_init_r (gd_t *id, ulong dest_addr) #endif
/** leave this here (after malloc(), environment and PCI are working) **/ - /* Initialize devices */ - devices_init (); + /* Initialize stdio devices */ + stdio_init ();
/* Initialize the jump table for applications */ jumptable_init (); diff --git a/lib_mips/board.c b/lib_mips/board.c index 6fc4845..e3ce981 100644 --- a/lib_mips/board.c +++ b/lib_mips/board.c @@ -24,7 +24,7 @@ #include <common.h> #include <command.h> #include <malloc.h> -#include <devices.h> +#include <stdio.h> #include <timestamp.h> #include <version.h> #include <net.h> @@ -412,8 +412,8 @@ void board_init_r (gd_t *id, ulong dest_addr) #endif
/** leave this here (after malloc(), environment and PCI are working) **/ - /* Initialize devices */ - devices_init (); + /* Initialize stdio devices */ + stdio_init ();
jumptable_init ();
diff --git a/lib_nios/board.c b/lib_nios/board.c index 63e79ae..c0e11a0 100644 --- a/lib_nios/board.c +++ b/lib_nios/board.c @@ -25,7 +25,7 @@ */
#include <common.h> -#include <devices.h> +#include <stdio.h> #include <watchdog.h> #include <net.h> #ifdef CONFIG_STATUS_LED @@ -153,7 +153,7 @@ void board_init (void) bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
WATCHDOG_RESET (); - devices_init(); + stdio_init(); jumptable_init(); console_init_r(); /* diff --git a/lib_nios2/board.c b/lib_nios2/board.c index 70fad1b..e6c6e69 100644 --- a/lib_nios2/board.c +++ b/lib_nios2/board.c @@ -25,7 +25,7 @@ */
#include <common.h> -#include <devices.h> +#include <stdio.h> #include <watchdog.h> #include <net.h> #ifdef CONFIG_STATUS_LED @@ -159,7 +159,7 @@ void board_init (void) bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
WATCHDOG_RESET (); - devices_init(); + stdio_init(); jumptable_init(); console_init_r();
diff --git a/lib_ppc/board.c b/lib_ppc/board.c index 9e944fa..dffa37c 100644 --- a/lib_ppc/board.c +++ b/lib_ppc/board.c @@ -25,7 +25,7 @@ #include <watchdog.h> #include <command.h> #include <malloc.h> -#include <devices.h> +#include <stdio.h> #ifdef CONFIG_8xx #include <mpc8xx.h> #endif @@ -932,8 +932,8 @@ void board_init_r (gd_t *id, ulong dest_addr) #endif
/** leave this here (after malloc(), environment and PCI are working) **/ - /* Initialize devices */ - devices_init (); + /* Initialize stdio devices */ + stdio_init ();
/* Initialize the jump table for applications */ jumptable_init (); diff --git a/lib_sh/board.c b/lib_sh/board.c index 2fd213b..8cb9c1d 100644 --- a/lib_sh/board.c +++ b/lib_sh/board.c @@ -21,7 +21,7 @@ #include <common.h> #include <command.h> #include <malloc.h> -#include <devices.h> +#include <stdio.h> #include <timestamp.h> #include <version.h> #include <watchdog.h> @@ -150,7 +150,7 @@ init_fnc_t *init_sequence[] = sh_mem_env_init, INIT_FUNC_NAND_INIT/* Flash memory (NAND) init */ INIT_FUNC_PCI_INIT /* PCI init */ - devices_init, + stdio_init, console_init_r, interrupt_init, #ifdef BOARD_LATE_INIT diff --git a/lib_sparc/board.c b/lib_sparc/board.c index 2f3e673..4041441 100644 --- a/lib_sparc/board.c +++ b/lib_sparc/board.c @@ -28,7 +28,7 @@ #include <common.h> #include <command.h> #include <malloc.h> -#include <devices.h> +#include <stdio.h> #include <config.h> #if defined(CONFIG_CMD_IDE) #include <ide.h> @@ -403,8 +403,8 @@ void board_init_f(ulong bootflag) pci_init(); #endif
- /* Initialize devices */ - devices_init(); + /* Initialize stdio devices */ + stdio_init();
/* Initialize the jump table for applications */ jumptable_init(); diff --git a/post/post.c b/post/post.c index c982e27..a8d08e6 100644 --- a/post/post.c +++ b/post/post.c @@ -22,7 +22,7 @@ */
#include <common.h> -#include <console.h> +#include <stdio.h> #include <watchdog.h> #include <post.h>