Ignore:
Timestamp:
10/20/15 09:16:12 (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
7b07ac2
Parents:
e29f1f5
git-author:
Sebastian Huber <sebastian.huber@…> (10/20/15 09:16:12)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/20/15 09:29:57)
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

    re29f1f5 rc07481c7  
    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.