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:
Till Straumann
2008-11-03 21:10:25 +00:00
parent abf3845f9f
commit 1f8ac4aa09
2 changed files with 14 additions and 8 deletions

View File

@@ -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:

View File

@@ -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;
}