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]

V2 flash - legacy stubs don't need to go into .2ram


For some reason the stub functions that interface between the V2
driver code and legacy drivers were being placed in .2ram. These
functions do not manipulate the flash hardware directly so they do not
need any special treatment. Putting them into .2ram just wastes memory
in ROM startup configurations.

Bart

Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/flash/current/ChangeLog,v
retrieving revision 1.38.2.20
diff -u -r1.38.2.20 ChangeLog
--- ChangeLog	22 Nov 2004 20:06:38 -0000	1.38.2.20
+++ ChangeLog	22 Nov 2004 21:24:00 -0000
@@ -1,5 +1,8 @@
 2004-11-22  Bart Veer  <bartv@ecoscentric.com>
 
+	* src/legacy_dev.c: remove .2ram attributes. These functions do
+	not manipulate the hardware, there is no need for them to live in
+	ram rather than flash
 	* include/flash_priv.h, src/legacy_dev.c: clean up the interface
 	between the generic flash code and the device drivers
 	* include/flash_priv, src/flash_legacy.h, src/flash.c,
Index: src/legacy_dev.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/flash/current/src/Attic/legacy_dev.c,v
retrieving revision 1.1.2.8
diff -u -r1.1.2.8 legacy_dev.c
--- src/legacy_dev.c	22 Nov 2004 20:06:35 -0000	1.1.2.8
+++ src/legacy_dev.c	22 Nov 2004 21:25:56 -0000
@@ -113,13 +113,7 @@
 static size_t 
 legacy_flash_query (struct cyg_flash_dev *dev, 
                     void * data, 
-                    const size_t len)
-     __attribute__ ((section (".2ram.flash_program_buf")));
-
-static size_t 
-legacy_flash_query (struct cyg_flash_dev *dev, 
-                    void * data, 
-                    const size_t len)
+                    size_t len)
 {
   typedef void code_fun(void*);
   code_fun *_flash_query;
@@ -134,11 +128,6 @@
 static int 
 legacy_flash_erase_block (struct cyg_flash_dev *dev, 
                           cyg_flashaddr_t block_base)
-     __attribute__ ((section (".2ram.flash_program_buf")));
-
-static int 
-legacy_flash_erase_block (struct cyg_flash_dev *dev, 
-                          cyg_flashaddr_t block_base)
 {
   typedef int code_fun(cyg_flashaddr_t, unsigned int);
   code_fun *_flash_erase_block;
@@ -152,12 +141,6 @@
 static int
 legacy_flash_program(struct cyg_flash_dev *dev, 
                      cyg_flashaddr_t base, 
-                     const void* data, const size_t len)
-     __attribute__ ((section (".2ram.flash_program_buf")));
-
-static int
-legacy_flash_program(struct cyg_flash_dev *dev, 
-                     cyg_flashaddr_t base, 
                      const void* data, size_t len)
 {
   typedef int code_fun(cyg_flashaddr_t, const void *, int, unsigned long, int);
@@ -175,12 +158,6 @@
 legacy_flash_read (struct cyg_flash_dev *dev, 
                    const cyg_flashaddr_t base, 
                    void* data, size_t len)
-     __attribute__ ((section (".2ram.flash_program_buf")));
-     
-static int 
-legacy_flash_read (struct cyg_flash_dev *dev, 
-                   const cyg_flashaddr_t base, 
-                   void* data, size_t len)
 {
   typedef int code_fun(const cyg_flashaddr_t, void *, int, unsigned long, int);
   code_fun *_flash_read_buf;
@@ -202,11 +179,6 @@
 static int 
 legacy_flash_block_lock (struct cyg_flash_dev *dev, 
                          const cyg_flashaddr_t block_base)
-     __attribute__ ((section (".2ram.flash_program_buf")));
-
-static int 
-legacy_flash_block_lock (struct cyg_flash_dev *dev, 
-                         const cyg_flashaddr_t block_base)
 {
   typedef int code_fun(cyg_flashaddr_t);
   code_fun *_flash_lock_block;
@@ -219,11 +191,6 @@
 static int 
 legacy_flash_block_unlock (struct cyg_flash_dev *dev, 
                            const cyg_flashaddr_t block_base)
-     __attribute__ ((section (".2ram.flash_program_buf")));
-     
-static int 
-legacy_flash_block_unlock (struct cyg_flash_dev *dev, 
-                           const cyg_flashaddr_t block_base)
 {
   typedef int code_fun(cyg_flashaddr_t, int, int);
   code_fun *_flash_unlock_block;
@@ -239,10 +206,6 @@
 // Map a hardware status to a package error
 static int 
 legacy_flash_hwr_map_error (struct cyg_flash_dev *dev, int err)
-     __attribute__ ((section (".2ram.flash_program_buf")));
-
-static int 
-legacy_flash_hwr_map_error (struct cyg_flash_dev *dev, int err)
 {
   return flash_hwr_map_error(err);
 }


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