init: Initialize serial subsystem before init_earlyinitcalls()
Otherwise, the serial sybsystem isn't initialized before the serial drivers attempt to register themselves.
This commit is contained in:
parent
9d86813d8c
commit
8cb4100463
@ -33,8 +33,12 @@ struct serial_dev *serial_first_device() {
|
||||
return first_serial_dev;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize the serial sybsystem.
|
||||
* Note: this is called directly from the kernel initialization as opposed to
|
||||
* being an initcall because it has to be called before the serial drivers get
|
||||
* initialized in earlyinitcalls.
|
||||
*/
|
||||
void serial_init() {
|
||||
first_serial_dev = 0;
|
||||
}
|
||||
|
||||
driversubsys_initcall(serial_init);
|
||||
|
@ -64,6 +64,7 @@ void serial_console_init() {
|
||||
print_init(sdev->putc);
|
||||
}
|
||||
|
||||
void serial_init();
|
||||
void kmalloc_init();
|
||||
|
||||
int main(void) {
|
||||
@ -73,8 +74,13 @@ int main(void) {
|
||||
//setup MMU
|
||||
mmu_reinit();
|
||||
|
||||
/* Initialize the serial subsystem before
|
||||
* init_earlyinitcalls(), because console drivers get
|
||||
* initialized here so as to have an output console as
|
||||
* early as possible, and we don't want those
|
||||
* initializations to fail. */
|
||||
serial_init();
|
||||
init_earlyinitcalls();
|
||||
|
||||
serial_console_init();
|
||||
|
||||
//setup memory
|
||||
|
Loading…
Reference in New Issue
Block a user