summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2015-02-04 18:20:27 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-02-04 19:36:22 +0100
commitcf4dfc1901f4ac6f62c9f7b590ed2a14ac93e6f2 (patch)
tree385de730f352e972ca1314b2bbfc268074ff6bde
parent924cbd4f42c8284899523903934d5db785919fdc (diff)
downloadrtems-cf4dfc1901f4ac6f62c9f7b590ed2a14ac93e6f2.tar.bz2
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>
-rw-r--r--c/src/lib/libbsp/arm/tms570/console/tms570-sci.c6
-rw-r--r--c/src/lib/libbsp/arm/tms570/include/tms570-sci-driver.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c b/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c
index 3f103004b8..d78cf20a84 100644
--- a/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c
+++ b/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c
@@ -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);
diff --git a/c/src/lib/libbsp/arm/tms570/include/tms570-sci-driver.h b/c/src/lib/libbsp/arm/tms570/include/tms570-sci-driver.h
index f32eaea875..1d9eaa74b9 100644
--- a/c/src/lib/libbsp/arm/tms570/include/tms570-sci-driver.h
+++ b/c/src/lib/libbsp/arm/tms570/include/tms570-sci-driver.h
@@ -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[];
/** @} */