changeset 1758:400806bc9c4f flash_v2_20041123

Remove unnecessary .2ram section attributes. These functions do not manipulate the hardware directly so do not need special treatment
author bartv
date Mon, 22 Nov 2004 21:27:43 +0000
parents a8729175ad24
children 8739a20079c4
files packages/io/flash/current/ChangeLog packages/io/flash/current/src/legacy_dev.c
diffstat 2 files changed, 4 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/packages/io/flash/current/ChangeLog
+++ b/packages/io/flash/current/ChangeLog
@@ -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,
--- a/packages/io/flash/current/src/legacy_dev.c
+++ b/packages/io/flash/current/src/legacy_dev.c
@@ -113,13 +113,7 @@ static void* __anonymizer(void* p)
 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 @@ legacy_flash_query (struct cyg_flash_dev
 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 @@ legacy_flash_erase_block (struct cyg_fla
 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 @@ static int
 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 @@ legacy_flash_read (struct cyg_flash_dev 
 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 @@ legacy_flash_block_lock (struct cyg_flas
 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 @@ legacy_flash_block_unlock (struct cyg_fl
 // 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);
 }