Changeset e1f446d3 in rtems


Ignore:
Timestamp:
07/09/14 13:53:31 (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
76ad756c
Parents:
93726e5
git-author:
Sebastian Huber <sebastian.huber@…> (07/09/14 13:53:31)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/09/14 13:56:43)
Message:

bsps/sparc: Set best baud in APBUART driver

This prevents failures of all tests using rtems_shell_wait_for_input(),
e.g. capture, termios, pppd, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/shared/uart/apbuart_termios.c

    r93726e5 re1f446d3  
    161161}
    162162
     163static void apbuart_set_best_baud(
     164  rtems_termios_tty *tty,
     165  const struct apbuart_context *uart
     166)
     167{
     168  uint32_t baud = (uart->freq_hz * 10) / ((uart->regs->scaler * 10 + 5) * 8);
     169
     170  rtems_termios_set_best_baud(tty, baud);
     171}
     172
    163173static bool apbuart_first_open_polled(
    164174  rtems_termios_tty *tty,
     
    167177{
    168178  struct apbuart_context *uart = rtems_termios_get_device_context(tty);
     179
     180  apbuart_set_best_baud(tty, uart);
    169181
    170182  /* Initialize UART on opening */
     
    182194  struct apbuart_context *uart = rtems_termios_get_device_context(tty);
    183195  rtems_status_code sc;
     196
     197  apbuart_set_best_baud(tty, uart);
    184198
    185199  /* Register Interrupt handler */
Note: See TracChangeset for help on using the changeset viewer.