Some serial drivers receive their serial port device information via
the device model. This unfortunately means that the selected port
may not be available when the console subsystem initialises, so we
must keep trying to register the console after each port is added.
*/
tty_register_device(drv->tty_driver, port->line, port->dev);
+ /*
+ * If this driver supports console, and it hasn't been
+ * successfully registered yet, try to re-register it.
+ * It may be that the port was not available.
+ */
+ if (port->type != PORT_UNKNOWN &&
+ port->cons && !(port->cons->flags & CON_ENABLED))
+ register_console(port->cons);
+
out:
up(&port_sem);