Changeset 9c96ea7 in rtems


Ignore:
Timestamp:
Oct 20, 2015, 9:16:12 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11
Children:
13e705c
Parents:
edf7732
git-author:
Sebastian Huber <sebastian.huber@…> (10/20/15 09:16:12)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/20/15 09:31:02)
Message:

bsp/leon3: Fix Termios context usage

Only the context of the console device was used and this is wrong in
case more than one APBUART device is available.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/leon3/console/console.c

    redf7732 r9c96ea7  
    4545static int uarts = 0;
    4646
    47 static rtems_termios_device_context *leon3_console_get_context(int minor)
     47static rtems_termios_device_context *leon3_console_get_context(int index)
    4848{
    49   struct apbuart_context *uart;
    50 
    51   if (minor == 0)
    52     uart = &apbuarts[syscon_uart_index];
    53   else
    54     uart = &apbuarts[minor - 1];
     49  struct apbuart_context *uart = &apbuarts[index];
    5550
    5651  rtems_termios_device_context_initialize(&uart->base, "APBUART");
     
    160155      handler,
    161156      NULL,
    162       leon3_console_get_context(syscon_uart_index)
     157      leon3_console_get_context(i)
    163158    );
    164159  }
Note: See TracChangeset for help on using the changeset viewer.