forked from Imagelibrary/rtems
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:
committed by
Sebastian Huber
parent
924cbd4f42
commit
cf4dfc1901
@@ -40,7 +40,7 @@
|
|||||||
*
|
*
|
||||||
* Definitions of all serial drivers
|
* 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"),
|
.base = RTEMS_TERMIOS_DEVICE_CONTEXT_INITIALIZER("TMS570 SCI1"),
|
||||||
.device_name = "/dev/console",
|
.device_name = "/dev/console",
|
||||||
@@ -91,7 +91,7 @@ rtems_device_driver console_initialize(
|
|||||||
minor < RTEMS_ARRAY_SIZE(driver_context_table);
|
minor < RTEMS_ARRAY_SIZE(driver_context_table);
|
||||||
++minor
|
++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
|
* Install this device in the file system and Termios. In order
|
||||||
@@ -105,7 +105,7 @@ rtems_device_driver console_initialize(
|
|||||||
minor,
|
minor,
|
||||||
handler,
|
handler,
|
||||||
NULL,
|
NULL,
|
||||||
RTEMS_DECONST(rtems_termios_device_context *, &ctx->base)
|
&ctx->base
|
||||||
);
|
);
|
||||||
if ( sc != RTEMS_SUCCESSFUL ) {
|
if ( sc != RTEMS_SUCCESSFUL ) {
|
||||||
bsp_fatal(BSP_FATAL_CONSOLE_NO_DEV);
|
bsp_fatal(BSP_FATAL_CONSOLE_NO_DEV);
|
||||||
|
|||||||
@@ -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 rtems_termios_device_handler tms570_sci_handler_interrupt;
|
||||||
|
|
||||||
extern const tms570_sci_context driver_context_table[];
|
extern tms570_sci_context driver_context_table[];
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user