diff options
author | Michael Brown | 2007-07-04 00:09:56 +0200 |
---|---|---|
committer | Michael Brown | 2007-07-04 00:09:56 +0200 |
commit | 89349d7fad252f0b36be4a764369e6dd40a2e692 (patch) | |
tree | 72b112d6152fadee77673994f1e92b82a9c506e8 /src/core/serial.c | |
parent | Added missing line to set return status code. (diff) | |
download | ipxe-89349d7fad252f0b36be4a764369e6dd40a2e692.tar.gz ipxe-89349d7fad252f0b36be4a764369e6dd40a2e692.tar.xz ipxe-89349d7fad252f0b36be4a764369e6dd40a2e692.zip |
Separated out initialisation functions from startup/shutdown functions.
Diffstat (limited to 'src/core/serial.c')
-rw-r--r-- | src/core/serial.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/core/serial.c b/src/core/serial.c index 3e4543bb..f325bc45 100644 --- a/src/core/serial.c +++ b/src/core/serial.c @@ -225,7 +225,7 @@ static void serial_init ( void ) { /* * void serial_fini(void); * Cleanup our use of the serial port, in particular flush the - * output buffer so we don't accidentially loose characters. + * output buffer so we don't accidentially lose characters. */ static void serial_fini ( void ) { int i, status; @@ -250,5 +250,19 @@ struct console_driver serial_console __console_driver = { .disabled = 1, }; -INIT_FN ( INIT_CONSOLE, serial_init, serial_fini ); +/** Serial console startup function */ +struct startup_fn serial_startup_fn __startup_fn ( STARTUP_NORMAL ) = { + .startup = serial_init, + .shutdown = serial_fini, +}; +/** + * Serial console initialisation function + * + * Initialise console early on so that it is available to capture + * early debug messages. It is safe to call serial_init() multiple + * times. + */ +struct init_fn serial_init_fn __init_fn ( INIT_EARLY ) = { + .initialise = serial_init, +}; |