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

Re: flash_olpcx2294_v2 package


Sergei Gavrikov wrote:
> On Tue, Dec 02, 2008 at 08:29:43AM +0100, Andrew Lunn wrote:
> > > ..Hm, and this morning it seemed for me that the best place would be
> > > var_arch.h. lpc2xxx's var_io.h has a lot of defines and those in mainly
> > > are I/O macros. IMHO, memory access is something another, isn't it? If
> > > my morning opinion is right, a patch is provided.
> > 
> > You are using these macros for memory mapped IO. So var_io.h seems
> > correct to me. However, as the find(1) showed, there is no 100%
> > correct answer.
> 
> Thank you for a feedback. I fully trust your experience. As you suggest
> it placed in a right place and there are ifdef there.

I'm sorry, quick patching break things. There was 1 #ifndef without
argument :-( Fixed.

Sergei
Index: hal/arm/lpc2xxx/var/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/var/current/ChangeLog,v
retrieving revision 1.9
diff -u -5 -r1.9 ChangeLog
--- hal/arm/lpc2xxx/var/current/ChangeLog	22 Jul 2008 18:52:16 -0000	1.9
+++ hal/arm/lpc2xxx/var/current/ChangeLog	2 Dec 2008 07:52:38 -0000
@@ -1,5 +1,10 @@
+2008-12-02  Sergei Gavrikov  <sergei.gavrikov@gmail.com>
+            Andrew Lunn      <andrew@lunn.ch>
+
+	* include/var_io.h: Memory access macros added.
+
 2008-07-21  Uwe Kindler <uwe_kindler@web.de>
 
 	* cdl/hal_arm_lpc2xxx.cdl: Added option
 	CYGHWR_HAL_ARM_LPC2XXX_VARIANT_VERSION to identify the variant version 
 	because some on-chip peripherals changed slightly in newer veriants.
Index: hal/arm/lpc2xxx/var/current/include/var_io.h
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/var/current/include/var_io.h,v
retrieving revision 1.2
diff -u -5 -r1.2 var_io.h
--- hal/arm/lpc2xxx/var/current/include/var_io.h	7 May 2006 18:36:18 -0000	1.2
+++ hal/arm/lpc2xxx/var/current/include/var_io.h	2 Dec 2008 07:52:38 -0000
@@ -52,10 +52,26 @@
 
 #include <pkgconf/hal_arm_lpc2xxx.h>  // variant chip model selection.
 #include <cyg/hal/plf_io.h>
 
 //=============================================================================
+// Memory access macros
+
+#ifndef CYGARC_CACHED_ADDRESS
+#  define CYGARC_CACHED_ADDRESS(x)                      (x)
+#endif
+#ifndef CYGARC_UNCACHED_ADDRESS
+#  define CYGARC_UNCACHED_ADDRESS(x)                    (x)
+#endif
+#ifndef CYGARC_PHYSICAL_ADDRESS
+#  define CYGARC_PHYSICAL_ADDRESS(x)                    (x)
+#endif
+#ifndef CYGARC_VIRTUAL_ADDRESS
+#  define CYGARC_VIRTUAL_ADDRESS(x)                     (x)
+#endif
+
+//=============================================================================
 // Watchdog (WD)
 
 #define CYGARC_HAL_LPC2XXX_REG_WD_BASE                   0xE0000000
 
 // Registers are offsets from base of this subsystem

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