3 * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it
5 * SPDX-License-Identifier: GPL-2.0+
8 U-Boot console handling
9 ========================
11 HOW THE CONSOLE WORKS?
12 ----------------------
14 At system startup U-Boot initializes a serial console. When U-Boot
15 relocates itself to RAM, all console drivers are initialized (they
16 will register all detected console devices to the system for further
19 If not defined in the environment, the first input device is assigned
20 to the 'stdin' file, the first output one to 'stdout' and 'stderr'.
22 You can use the command "coninfo" to see all registered console
23 devices and their flags. You can assign a standard file (stdin,
24 stdout or stderr) to any device you see in that list simply by
25 assigning its name to the corresponding environment variable. For
28 setenv stdin wl_kbd <- To use the wireless keyboard
29 setenv stdout video <- To use the video console
31 Do a simple "saveenv" to save the console settings in the environment
32 and get them working on the next startup, too.
34 HOW CAN I USE STANDARD FILE INTO THE SOURCES?
35 ---------------------------------------------
37 You can use the following functions to access the console:
40 putc (to put a char to stdout)
41 puts (to put a string to stdout)
42 printf (to format and put a string to stdout)
45 tstc (to test for the presence of a char in stdin)
46 getc (to get a char from stdin)
49 eputc (to put a char to stderr)
50 eputs (to put a string to stderr)
51 eprintf (to format and put a string to stderr)
53 * FILE (can be 'stdin', 'stdout', 'stderr'):
54 fputc (like putc but redirected to a file)
55 fputs (like puts but redirected to a file)
56 fprintf (like printf but redirected to a file)
57 ftstc (like tstc but redirected to a file)
58 fgetc (like getc but redirected to a file)
60 Remember that all FILE-related functions CANNOT be used before
61 U-Boot relocation (done in 'board_init_r' in arch/*/lib/board.c).
63 HOW CAN I USE STANDARD FILE INTO APPLICATIONS?
64 ----------------------------------------------
66 Use the 'bd_mon_fnc' field of the bd_t structure passed to the
67 application to do everything you want with the console.
69 But REMEMBER that that will work only if you have not overwritten any
70 U-Boot code while loading (or uncompressing) the image of your
73 For example, you won't get the console stuff running in the Linux
74 kernel because the kernel overwrites U-Boot before running. Only
75 some parameters like the framebuffer descriptors are passed to the
76 kernel in the high memory area to let the applications (the kernel)
77 use the framebuffers initialized by U-Boot.
84 serial (architecture dependent serial stuff)
85 video (mpc8xx video controller)
89 wl_kbd (Wireless 4PPM keyboard)
91 Waiting for volounteers:
93 lcd (mpc8xx lcd controller; to )
98 The driver has been tested with the following configurations (see
99 CREDITS for other contact informations):
101 - MPC823FADS with AD7176 on a PAL TV (YCbYCr) - arsenio@tin.it
102 - GENIETV with AD7177 on a PAL TV (YCbYCr) - arsenio@tin.it