This is the mail archive of the ecos-patches@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]

No address munging for platforms don't need to


As discussed in
http://sources.redhat.com/ml/ecos-discuss/2003-10/msg00182.html
I have defined a flag called HAL_IO_MACROS_NO_ADDRESS_MUNGING
for platforms like snds, which don't need address munging in
the IO macros.

I have also added the flag to the e7t platform, because it
uses the same processor (S3C4510 from Samsung).

Best regards,
Roland
-- 

___________________________________________________

VS Vision Systems GmbH, Industrial Image Processing
Dipl.-Ing. Roland Caßebohm
Aspelohe 27A, D-22848 Norderstedt, Germany
http://www.visionsystems.de
___________________________________________________
Index: hal/arm/arch/current/ChangeLog
===================================================================
RCS file: /home/cassebohm/net/USERS/CVSROOT/VSprojects/ecos/packages/hal/arm/arch/current/ChangeLog,v
retrieving revision 1.1.1.1
diff -u -5 -p -r1.1.1.1 ChangeLog
--- hal/arm/arch/current/ChangeLog	29 Sep 2003 15:16:28 -0000	1.1.1.1
+++ hal/arm/arch/current/ChangeLog	5 Nov 2003 14:45:18 -0000
@@ -1,5 +1,12 @@
+2003-11-05  Roland Caßebohm  <roland.cassebohm@visionsystems.de>
+
+        * include/hal_io.h: If defined HAL_IO_MACROS_NO_ADDRESS_MUNGING
+        use macros which don't mung the addresses even if the platform
+        is big-endian. Platforms which don't need address munging can
+        just define HAL_IO_MACROS_NO_ADDRESS_MUNGING in plf_io.h .
+
 2003-06-30  Mark Salter  <msalter@redhat.com>
 
 	* src/vectors.S: Fix CYGOPT_HAL_ARM_PRESERVE_SVC_SPSR handling.
 
 2003-06-24  Jonathan Larmour  <jifl@eCosCentric.com>
Index: hal/arm/arch/current/include/hal_io.h
===================================================================
RCS file: /home/cassebohm/net/USERS/CVSROOT/VSprojects/ecos/packages/hal/arm/arch/current/include/hal_io.h,v
retrieving revision 1.1.1.1
diff -u -5 -p -r1.1.1.1 hal_io.h
--- hal/arm/arch/current/include/hal_io.h	29 Sep 2003 15:16:28 -0000	1.1.1.1
+++ hal/arm/arch/current/include/hal_io.h	24 Oct 2003 10:38:03 -0000
@@ -85,12 +85,12 @@ typedef volatile CYG_ADDRWORD HAL_IO_REG
 
 //-----------------------------------------------------------------------------
 // BYTE Register access.
 // Individual and vectorized access to 8 bit registers.
 
-// Little-endian version
-#if (CYG_BYTEORDER == CYG_LSBFIRST)
+// Little-endian version or big-endian version that doesn't need address munging
+#if (CYG_BYTEORDER == CYG_LSBFIRST) || defined(HAL_IO_MACROS_NO_ADDRESS_MUNGING)
 
 #define HAL_READ_UINT8( _register_, _value_ ) \
         ((_value_) = *((volatile CYG_BYTE *)(_register_)))
 
 #define HAL_WRITE_UINT8( _register_, _value_ ) \
@@ -168,12 +168,12 @@ typedef volatile CYG_ADDRWORD HAL_IO_REG
 
 //-----------------------------------------------------------------------------
 // 16 bit access.
 // Individual and vectorized access to 16 bit registers.
     
-// Little-endian version
-#if (CYG_BYTEORDER == CYG_LSBFIRST)
+// Little-endian version or big-endian version that doesn't need address munging
+#if (CYG_BYTEORDER == CYG_LSBFIRST) || defined(HAL_IO_MACROS_NO_ADDRESS_MUNGING)
 
 #define HAL_READ_UINT16( _register_, _value_ ) \
         ((_value_) = *((volatile CYG_WORD16 *)(_register_)))
 
 #define HAL_WRITE_UINT16( _register_, _value_ ) \
Index: hal/arm/snds/current/ChangeLog
===================================================================
RCS file: /home/cassebohm/net/USERS/CVSROOT/VSprojects/ecos/packages/hal/arm/snds/current/ChangeLog,v
retrieving revision 1.1.1.2
diff -u -5 -p -r1.1.1.2 ChangeLog
--- hal/arm/snds/current/ChangeLog	13 Oct 2003 16:04:52 -0000	1.1.1.2
+++ hal/arm/snds/current/ChangeLog	5 Nov 2003 14:37:57 -0000
@@ -1,5 +1,11 @@
+2003-11-05  Roland Caßebohm  <roland.cassebohm@visionsystems.de>
+
+        * include/plf_io.h: Define HAL_IO_MACROS_NO_ADDRESS_MUNGING to
+        force the IO macros not to mung the addresses. This platform
+        don't need this.
+
 2003-10-08  Roland Caßebohm  <roland.cassebohm@visionsystems.de>
 
         * include/plf_io.h: Correct (unused) defines for
         KS32C_ROMCON_BASE_MASK, KS32C_ROMCON_NEXT_MASK, 
         KS32C_DRAMCON_BASE_MASK and KS32C_DRAMCON_NEXT_MASK.
Index: hal/arm/snds/current/include/plf_io.h
===================================================================
RCS file: /home/cassebohm/net/USERS/CVSROOT/VSprojects/ecos/packages/hal/arm/snds/current/include/plf_io.h,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.1.2.2
diff -u -5 -p -r1.1.1.2 -r1.1.1.1.2.2
--- hal/arm/snds/current/include/plf_io.h	13 Oct 2003 16:04:52 -0000	1.1.1.2
+++ hal/arm/snds/current/include/plf_io.h	17 Oct 2003 14:59:04 -0000	1.1.1.1.2.2
@@ -51,10 +51,14 @@
 //
 //####DESCRIPTIONEND####
 //
 //=============================================================================
 
+// Platform doesn't need address munging even if configures as big-endian
+
+#define HAL_IO_MACROS_NO_ADDRESS_MUNGING
+
 // non-caching by accessing addr|0x04000000
 
 #define KS32C_REG_BASE              0x07ff0000
 
 // -----------------------------------------------------------------------------
Index: hal/arm/e7t/current/ChangeLog
===================================================================
RCS file: /home/cassebohm/net/USERS/CVSROOT/VSprojects/ecos/packages/hal/arm/e7t/current/ChangeLog,v
retrieving revision 1.1.1.2
diff -u -5 -p -r1.1.1.2 ChangeLog
--- hal/arm/e7t/current/ChangeLog	13 Oct 2003 16:05:14 -0000	1.1.1.2
+++ hal/arm/e7t/current/ChangeLog	5 Nov 2003 14:44:06 -0000
@@ -1,5 +1,11 @@
+2003-11-05  Roland Caßebohm  <roland.cassebohm@visionsystems.de>
+
+        * include/plf_io.h: Define HAL_IO_MACROS_NO_ADDRESS_MUNGING to
+        force the IO macros not to mung the addresses. This platform
+        don't need this.
+
 2003-10-06  Chris Garry  <cgarry@sweeneydesign.co.uk>
 
         * include/plf_io.h: Correct (unused) defines for
         E7T_ROMCON_BASE_MASK and E7T_ROMCON_NEXT_MASK.
 
Index: hal/arm/e7t/current/include/plf_io.h
===================================================================
RCS file: /home/cassebohm/net/USERS/CVSROOT/VSprojects/ecos/packages/hal/arm/e7t/current/include/plf_io.h,v
retrieving revision 1.1.1.2
diff -u -5 -p -r1.1.1.2 plf_io.h
--- hal/arm/e7t/current/include/plf_io.h	13 Oct 2003 16:05:14 -0000	1.1.1.2
+++ hal/arm/e7t/current/include/plf_io.h	5 Nov 2003 14:45:06 -0000
@@ -51,10 +51,14 @@
 //
 //####DESCRIPTIONEND####
 //
 //=============================================================================
 
+// Platform doesn't need address munging even if configures as big-endian
+
+#define HAL_IO_MACROS_NO_ADDRESS_MUNGING
+
 // non-caching by accessing addr|0x04000000
 
 #define E7T_REG_BASE              0x07ff0000
 
 // -----------------------------------------------------------------------------

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