3 * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24 U-Boot console handling
25 ========================
27 HOW THE CONSOLE WORKS?
28 ----------------------
30 At system startup U-Boot initializes a serial console. When U-Boot
31 relocates itself to RAM, all console drivers are initialized (they
32 will register all detected console devices to the system for further
35 If not defined in the environment, the first input device is assigned
36 to the 'stdin' file, the first output one to 'stdout' and 'stderr'.
38 You can use the command "coninfo" to see all registered console
39 devices and their flags. You can assign a standard file (stdin,
40 stdout or stderr) to any device you see in that list simply by
41 assigning its name to the corresponding environment variable. For
44 setenv stdin wl_kbd <- To use the wireless keyboard
45 setenv stdout video <- To use the video console
47 Do a simple "saveenv" to save the console settings in the environment
48 and get them working on the next startup, too.
50 HOW CAN I USE STANDARD FILE INTO THE SOURCES?
51 ---------------------------------------------
53 You can use the following functions to access the console:
56 putc (to put a char to stdout)
57 puts (to put a string to stdout)
58 printf (to format and put a string to stdout)
61 tstc (to test for the presence of a char in stdin)
62 getc (to get a char from stdin)
65 eputc (to put a char to stderr)
66 eputs (to put a string to stderr)
67 eprintf (to format and put a string to stderr)
69 * FILE (can be 'stdin', 'stdout', 'stderr'):
70 fputc (like putc but redirected to a file)
71 fputs (like puts but redirected to a file)
72 fprintf (like printf but redirected to a file)
73 ftstc (like tstc but redirected to a file)
74 fgetc (like getc but redirected to a file)
76 Remember that all FILE-related functions CANNOT be used before
77 U-Boot relocation (done in 'board_init_r' in arch/*/lib/board.c).
79 HOW CAN I USE STANDARD FILE INTO APPLICATIONS?
80 ----------------------------------------------
82 Use the 'bd_mon_fnc' field of the bd_t structure passed to the
83 application to do everything you want with the console.
85 But REMEMBER that that will work only if you have not overwritten any
86 U-Boot code while loading (or uncompressing) the image of your
89 For example, you won't get the console stuff running in the Linux
90 kernel because the kernel overwrites U-Boot before running. Only
91 some parameters like the framebuffer descriptors are passed to the
92 kernel in the high memory area to let the applications (the kernel)
93 use the framebuffers initialized by U-Boot.
100 serial (architecture dependent serial stuff)
101 video (mpc8xx video controller)
105 wl_kbd (Wireless 4PPM keyboard)
107 Waiting for volounteers:
109 lcd (mpc8xx lcd controller; to )
111 TESTED CONFIGURATIONS
112 ---------------------
114 The driver has been tested with the following configurations (see
115 CREDITS for other contact informations):
117 - MPC823FADS with AD7176 on a PAL TV (YCbYCr) - arsenio@tin.it
118 - GENIETV with AD7177 on a PAL TV (YCbYCr) - arsenio@tin.it