forked from Imagelibrary/rtems
2008-11-03 Till Straumann <strauman@slac.stanford.edu>
PR 1332: call BSP_uart_termios_set()/BSP_uart_intr_ctrl() only from 'firstOpen' and only if this is a serial console.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2008-11-03 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR 1332: call BSP_uart_termios_set()/BSP_uart_intr_ctrl()
|
||||
only from 'firstOpen' and only if this is a serial console.
|
||||
|
||||
2008-11-03 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
* shared/startup/pretaskinghook.c, shared/startup/sbrk.c:
|
||||
|
||||
@@ -167,6 +167,15 @@ static int console_first_open(int major, int minor, void *arg)
|
||||
ttyS[minor].name);
|
||||
rtems_fatal_error_occurred(status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Pass data area info down to driver
|
||||
*/
|
||||
BSP_uart_termios_set(minor, ((rtems_libio_open_close_args_t *)arg)->iop->data1);
|
||||
|
||||
/* Enable interrupts on channel */
|
||||
BSP_uart_intr_ctrl(minor, BSP_UART_INTR_CTRL_TERMIOS);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -222,14 +231,6 @@ rtems_device_driver console_open(
|
||||
return status;
|
||||
}
|
||||
|
||||
/*
|
||||
* Pass data area info down to driver
|
||||
*/
|
||||
BSP_uart_termios_set(minor,
|
||||
((rtems_libio_open_close_args_t *)arg)->iop->data1);
|
||||
/* Enable interrupts on channel */
|
||||
BSP_uart_intr_ctrl(minor, BSP_UART_INTR_CTRL_TERMIOS);
|
||||
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user