This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Create and use CYGBLD_HAL_ARM_HARDWARE_ENDIAN_ASSIST
- From: "Stephen Goadhouse" <stephen dot goadhouse at adiengineering dot com>
- To: <ecos-patches at sources dot redhat dot com>
- Date: Tue, 24 Sep 2002 17:02:03 -0400
- Subject: Create and use CYGBLD_HAL_ARM_HARDWARE_ENDIAN_ASSIST
With the hardware platforms that I am currently porting (80200 XScale
based), the hardware handles the ARM Big Endian/Little Endian swapping.
Therefore, I define CYGBLD_HAL_ARM_HARDWARE_ENDIAN_ASSIST so that all of the
HAL_READ_xxx/HAL_WRITE_xxx macros perform no address modifications, no
matter whether code is being compiled for a Big Endian or Little Endian
target.
I am hoping that this is such a minor change that no copyright assignment is
required. Please let me know otherwise.
This is my first patch submission, so please be easy on me. ;)
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Stephen Goadhouse Work: (434) 978-2888 x6 _/
_/ Staff Engineer stephen.goadhouse@adiengineering.com _/
_/ ADI Engineering http://www.adiengineering.com _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Index: ecos/packages/hal/arm/arch/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/arch/current/ChangeLog,v
retrieving revision 1.77
diff -u -r1.77 ChangeLog
--- ecos/packages/hal/arm/arch/current/ChangeLog 29 Aug 2002
11:49:48 -0000 1.77
+++ ecos/packages/hal/arm/arch/current/ChangeLog 24 Sep 2002
20:05:43 -0000
@@ -1,3 +1,10 @@
+2002-09-24 Stephen Goadhouse <stephen.goadhouse@adiengineering.com>
+
+ * include/hal_io.h: Created define
+ CYGBLD_HAL_ARM_HARDWARE_ENDIAN_ASSIST that is to be set by
+ platforms that do not require software byte order "fixing" because
+ the hardware handles it.
+
2002-08-29 Mark Salter <msalter@redhat.com>
* src/vectors.S: Avoid entering thumb mode in exception handlers.
Index: ecos/packages/hal/arm/arch/current/include/hal_io.h
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/arch/current/include/hal_io.h,v
retrieving revision 1.11
diff -u -r1.11 hal_io.h
--- ecos/packages/hal/arm/arch/current/include/hal_io.h 23 May 2002
23:01:42 -0000 1.11
+++ ecos/packages/hal/arm/arch/current/include/hal_io.h 24 Sep 2002
20:05:46 -0000
@@ -85,7 +85,8 @@
// Individual and vectorized access to 8 bit registers.
// Little-endian version
-#if (CYG_BYTEORDER == CYG_LSBFIRST)
+#if (CYG_BYTEORDER == CYG_LSBFIRST) \
+ || defined(CYGBLD_HAL_ARM_HARDWARE_ENDIAN_ASSIST)
#define HAL_READ_UINT8( _register_, _value_ ) \
((_value_) = *((volatile CYG_BYTE *)(_register_)))
@@ -168,7 +169,8 @@
// Individual and vectorized access to 16 bit registers.
// Little-endian version
-#if (CYG_BYTEORDER == CYG_LSBFIRST)
+#if (CYG_BYTEORDER == CYG_LSBFIRST) \
+ || defined(CYGBLD_HAL_ARM_HARDWARE_ENDIAN_ASSIST)
#define HAL_READ_UINT16( _register_, _value_ ) \
((_value_) = *((volatile CYG_WORD16 *)(_register_)))