]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/tty/serial/st-asc.c
serial: st-asc: Change default baudrate from 9600 to 115200
[karo-tx-linux.git] / drivers / tty / serial / st-asc.c
index bcf1d33e6ffe0b3cb9952e88046658df1358543b..3e99bcc4eba08382ad04a8546031d4fbda30258c 100644 (file)
@@ -575,12 +575,13 @@ static void asc_set_termios(struct uart_port *port, struct ktermios *termios,
                        pinctrl_select_state(ascport->pinctrl,
                                             ascport->states[NO_HW_FLOWCTRL]);
 
-                       gpiod = devm_get_gpiod_from_child(port->dev, "rts",
-                                                         &np->fwnode);
-                       if (!IS_ERR(gpiod)) {
-                               gpiod_direction_output(gpiod, 0);
+                       gpiod = devm_fwnode_get_gpiod_from_child(port->dev,
+                                                                "rts",
+                                                                &np->fwnode,
+                                                                GPIOD_OUT_LOW,
+                                                                np->name);
+                       if (!IS_ERR(gpiod))
                                ascport->rts = gpiod;
-                       }
                }
        }
 
@@ -886,13 +887,12 @@ static void asc_console_write(struct console *co, const char *s, unsigned count)
        int locked = 1;
        u32 intenable;
 
-       local_irq_save(flags);
        if (port->sysrq)
                locked = 0; /* asc_interrupt has already claimed the lock */
        else if (oops_in_progress)
-               locked = spin_trylock(&port->lock);
+               locked = spin_trylock_irqsave(&port->lock, flags);
        else
-               spin_lock(&port->lock);
+               spin_lock_irqsave(&port->lock, flags);
 
        /*
         * Disable interrupts so we don't get the IRQ line bouncing
@@ -910,14 +910,13 @@ static void asc_console_write(struct console *co, const char *s, unsigned count)
        asc_out(port, ASC_INTEN, intenable);
 
        if (locked)
-               spin_unlock(&port->lock);
-       local_irq_restore(flags);
+               spin_unlock_irqrestore(&port->lock, flags);
 }
 
 static int asc_console_setup(struct console *co, char *options)
 {
        struct asc_port *ascport;
-       int baud = 9600;
+       int baud = 115200;
        int bits = 8;
        int parity = 'n';
        int flow = 'n';