arm/tms570: sci context has to be writable because it holds state variable.

The structure tms570_sci_context holds state variable
tx_chars_in_hw which holds if and how many characters
(in the optional FIFO support for some Ti SCIs) are submitted
into hardware.

When field is not writable then code breaks when RTEMS
is build for Flash area.

The problem found and analyzed by Martin Galvan from tallertechnologies.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
This commit is contained in:
Pavel Pisa
2015-02-04 18:20:27 +01:00
committed by Sebastian Huber
parent 924cbd4f42
commit cf4dfc1901
2 changed files with 4 additions and 4 deletions

View File

@@ -40,7 +40,7 @@
*
* Definitions of all serial drivers
*/
const tms570_sci_context driver_context_table[] = {
tms570_sci_context driver_context_table[] = {
{
.base = RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER("TMS570 SCI1"),
.device_name = "/dev/console",
@@ -91,7 +91,7 @@ rtems_device_driver console_initialize(
minor < RTEMS_ARRAY_SIZE(driver_context_table);
++minor
) {
const tms570_sci_context *ctx = &driver_context_table[minor];
tms570_sci_context *ctx = &driver_context_table[minor];
/*
* Install this device in the file system and Termios. In order
@@ -105,7 +105,7 @@ rtems_device_driver console_initialize(
minor,
handler,
NULL,
RTEMS_DECONST(rtems_termios_device_context *, &ctx->base)
&ctx->base
);
if ( sc != RTEMS_SUCCESSFUL ) {
bsp_fatal(BSP_FATAL_CONSOLE_NO_DEV);

View File

@@ -47,7 +47,7 @@ extern const rtems_termios_device_handler tms570_sci_handler_polled;
extern const rtems_termios_device_handler tms570_sci_handler_interrupt;
extern const tms570_sci_context driver_context_table[];
extern tms570_sci_context driver_context_table[];
/** @} */