--- zzzz-none-000/linux-4.1.52/drivers/tty/serial/serial_core.c 2018-05-28 02:26:45.000000000 +0000 +++ bcm63-7530ax-731/linux-4.1.52/drivers/tty/serial/serial_core.c 2022-03-02 11:37:13.000000000 +0000 @@ -505,6 +505,37 @@ uart_start(tty); } +#if defined(CONFIG_AVM_ENHANCED) +/*----------------------------------------------------------------------------*\ + * keine Ausgaben auf der Console + * avm_console_enabled=1 schaltet die Ausgaben auf der Console ueber n_tty_write + * wieder frei beim Kunden beachtet niemand die Ausgaben auf der Console +\*----------------------------------------------------------------------------*/ +unsigned int avm_console_enabled; +EXPORT_SYMBOL(avm_console_enabled); + +static int uart_avm_console_enabled(struct tty_struct *tty) +{ + struct uart_state *state = tty->driver_data; + struct uart_port *port = state->uart_port; + + if (port->cons) { + if (port->cons->flags & (CON_ENABLED | CON_CONSDEV)) { + return avm_console_enabled; + } + } + return 1; +} + +static int setup_debug_console(char *p) +{ + avm_console_enabled = 1; + return 0; +} + +__setup("debug_console", setup_debug_console); +#endif + static int uart_write(struct tty_struct *tty, const unsigned char *buf, int count) { @@ -1890,6 +1921,9 @@ }; static const struct baud_rates baud_rates[] = { +#if defined(CONFIG_BCM_KF_ARM_BCM963XX) && defined(CONFIG_BCM63138_SIM) + {3000000, B3000000}, +#endif { 921600, B921600 }, { 460800, B460800 }, { 230400, B230400 }, @@ -2364,6 +2398,9 @@ .poll_get_char = uart_poll_get_char, .poll_put_char = uart_poll_put_char, #endif +#if defined(CONFIG_AVM_ENHANCED) + .avm_console_enabled = uart_avm_console_enabled, +#endif }; static const struct tty_port_operations uart_port_ops = {