Sorry, previous version was missing some __init[data] attributes which
were dropped in an intermediate stage. Here comes an updated patch:
<---snip--->
This major refactoring of the quite complex kgdb8250 configuration does
the following:
- ensures that static configurations according to SERIAL_PORT_DFNS are
always loaded first
- tries to pull more accurate configuration via serial8250_get_port_def
if simple-config is used
- detects empty/invalid simple-configs
- enforces KGDB_PORT_NUM <= SERIAL_8250_NR_UARTS at kconfig level
- removes kgdb8250_add_port and its hook in serial_core (calling
serial8250_get_port_def in demand should provide us the same
information)
Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxx>
Index: b/drivers/serial/serial_core.c[...]
===================================================================
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -2370,12 +2369,6 @@ int uart_add_one_port(struct uart_driver
*/
port->flags &= ~UPF_DEAD;
-#if defined(CONFIG_KGDB_8250)
- /* Add any 8250-like ports we find later. */
- if (port->type <= PORT_MAX_8250)
- kgdb8250_add_port(port->line, port);
-#endif
-