This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] xxx_channels[]


Hi all;

Many platforms have qualifier "const" before struct xxx_channles[].
I think that the xxx_channels[] must be put in ram 
even if CYG_HAL_STARTUP == "ROM". 
Otherwise, cyg_hal_plf_control_serial() will fail in the 
case of __COMMCTL_SET_TIMEOUT as __func by trying to write 
chan->msec_timeout, for example.

The attached patch is only for the mips tree. Other architectures 
will also need to be fixed.

Thanks,
Motoya Kurotsu
Allied Telesis K.K.



 
diff -r -u5 -p -N mips.orig/atlas/current/src/ser16c550c.c mips/atlas/current/src/ser16c550c.c
--- mips.orig/atlas/current/src/ser16c550c.c	Fri May 24 12:04:02 2002
+++ mips/atlas/current/src/ser16c550c.c	Tue Aug  6 18:14:54 2002
@@ -213,11 +213,11 @@ typedef struct {
     cyg_uint8* base;
     cyg_int32 msec_timeout;
     int isr_vector;
 } channel_data_t;
 
-static const channel_data_t channels[1] = {
+static channel_data_t channels[1] = {
     { (cyg_uint8*)ATLAS_SER_16550_BASE, 1000, CYGNUM_HAL_INTERRUPT_DEBUG_UART}
 };
 
 //-----------------------------------------------------------------------------
 // Set the baud rate
diff -r -u5 -p -N mips.orig/malta/current/src/ser16c550c.c mips/malta/current/src/ser16c550c.c
--- mips.orig/malta/current/src/ser16c550c.c	Fri May 24 12:04:04 2002
+++ mips/malta/current/src/ser16c550c.c	Tue Aug  6 18:16:23 2002
@@ -177,11 +177,11 @@ typedef struct {
     cyg_uint8* base;
     cyg_int32 msec_timeout;
     int isr_vector;
 } channel_data_t;
 
-static const channel_data_t channels[2] = {
+static channel_data_t channels[2] = {
     { (cyg_uint8*)MALTA_SER_16550_BASE_A, 1000, CYGNUM_HAL_INTERRUPT_TTY0},
     { (cyg_uint8*)MALTA_SER_16550_BASE_B, 1000, CYGNUM_HAL_INTERRUPT_TTY1}
 };
 
 //-----------------------------------------------------------------------------
diff -r -u5 -p -N mips.orig/ref4955/current/src/pc87338.c mips/ref4955/current/src/pc87338.c
--- mips.orig/ref4955/current/src/pc87338.c	Fri May 24 12:04:08 2002
+++ mips/ref4955/current/src/pc87338.c	Tue Aug  6 18:16:57 2002
@@ -224,11 +224,11 @@ cyg_hal_plf_serial_getc(void* __ch_data)
 
     CYGARC_HAL_RESTORE_GP();
     return ch;
 }
 
-static const channel_data_t channels[2] = {
+static channel_data_t channels[2] = {
     { (cyg_uint8*)CYG_DEVICE_SERIAL_SCC1, 1000, CYGNUM_HAL_INTERRUPT_DEBUG_UART},
     { (cyg_uint8*)CYG_DEVICE_SERIAL_SCC2, 1000, CYGNUM_HAL_INTERRUPT_USER_UART}
 };
 
 static void
diff -r -u5 -p -N mips.orig/vrc437x/current/src/plf_serial.c mips/vrc437x/current/src/plf_serial.c
--- mips.orig/vrc437x/current/src/plf_serial.c	Fri May 24 12:04:19 2002
+++ mips/vrc437x/current/src/plf_serial.c	Tue Aug  6 18:17:45 2002
@@ -93,11 +93,11 @@ typedef struct {
     cyg_uint32 base;
     cyg_uint32 msec_timeout;
     int isr_vector;
 } channel_data_t;
 
-static const channel_data_t channels[2] = {
+static channel_data_t channels[2] = {
     { DUART_A, 1000, CYGNUM_HAL_INTERRUPT_DUART},
     { DUART_B, 1000, CYGNUM_HAL_INTERRUPT_DUART}
 };
 
 //-----------------------------------------------------------------------------

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]