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: flashv2 tweaks


Andrew Lunn wrote:
+    cdl_interface CYGHWR_IO_FLASH_DEVICE_NEEDS_CACHE_HANDLED {
+	display	    "Device driver needs cache handled centrally"
+	flavor	    booldata
+	description "
+            Managing flash often requires interacting with the flash.
+            Some device drivers do not require the generic flash code to
+            manipulate the flash, either because they do it themselves or
+            because the hardware does the right thing. Other drivers
+            require the generic code to disable/enable the flash before
+            calling into the driver."
+    }

I think some of those flash should be cache!

Oops, yes. And I just remembered I forgot to provide the tweaks in the three v2 drivers which for anoncvs have to implement this interface. Attached.


     cdl_interface CYGHWR_IO_FLASH_DEVICE_LEGACY {
         display     "Hardware driver uses the legacy interface"
         flavor      booldata
         compile     -library=libextras.a legacy_dev.c
         description "
             The generic flash code can work with either a legacy device
             driver or with V2 drivers. If a legacy driver is used on the
             current platform then this option will be implemented."
 	requires    { CYGHWR_IO_FLASH_DEVICE_LEGACY <= 1 }
+
+	# For now assume all legacy devices need the cache handled by
+	# the central code
+	implements CYGHWR_IO_FLASH_DEVICE_NEEDS_CACHE_HANDLED
     }

The indentation looks wrong here, or has some tabs crept in?

Well spotted, fixed.


Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
------["The best things in life aren't things."]------      Opinions==mine
Index: devs/flash/amd/am29xxxxxv2/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/flash/amd/am29xxxxxv2/current/Attic/ChangeLog,v
retrieving revision 1.1.2.10
diff -u -5 -p -r1.1.2.10 ChangeLog
--- devs/flash/amd/am29xxxxxv2/current/ChangeLog	23 Feb 2005 23:11:04 -0000	1.1.2.10
+++ devs/flash/amd/am29xxxxxv2/current/ChangeLog	27 Sep 2006 14:51:05 -0000
@@ -1,5 +1,10 @@
+2006-09-27  Jonathan Larmour  <jifl@eCosCentric.com>
+
+	* cdl/flash_am29xxxxx_v2.cdl: Needs to indicate to io/flash
+	that cache needs handling.
+
 2005-02-23  Bart Veer  <bartv@ecoscentric.com>
 
 	* doc/am29xxxxx.sgml: bring up to date.
 
 2005-01-19  Jonathan Larmour  <jifl@eCosCentric.com>
Index: devs/flash/amd/am29xxxxxv2/current/cdl/flash_am29xxxxx_v2.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/flash/amd/am29xxxxxv2/current/cdl/Attic/flash_am29xxxxx_v2.cdl,v
retrieving revision 1.1.2.2
diff -u -5 -p -r1.1.2.2 flash_am29xxxxx_v2.cdl
--- devs/flash/amd/am29xxxxxv2/current/cdl/flash_am29xxxxx_v2.cdl	21 Nov 2004 17:33:51 -0000	1.1.2.2
+++ devs/flash/amd/am29xxxxxv2/current/cdl/flash_am29xxxxx_v2.cdl	27 Sep 2006 14:51:05 -0000
@@ -47,10 +47,11 @@
 cdl_package CYGPKG_DEVS_FLASH_AMD_AM29XXXXX_V2 {
     display	"AMD am29xxxxx flash memory support"
     parent	CYGPKG_IO_FLASH
     active_if	CYGPKG_IO_FLASH
     implements	CYGHWR_IO_FLASH_DEVICE
+    implements  CYGHWR_IO_FLASH_DEVICE_NEEDS_CACHE_HANDLED
     include_dir	cyg/io
     compile	am29xxxxx.c
 
     description "
         Flash memory support for AMD AM29xxxxx devices and compatibles.
Index: devs/flash/intel/stratav2/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/flash/intel/stratav2/current/Attic/ChangeLog,v
retrieving revision 1.1.2.10
diff -u -5 -p -r1.1.2.10 ChangeLog
--- devs/flash/intel/stratav2/current/ChangeLog	29 Nov 2004 14:49:22 -0000	1.1.2.10
+++ devs/flash/intel/stratav2/current/ChangeLog	27 Sep 2006 14:51:06 -0000
@@ -1,5 +1,10 @@
+2006-09-27  Jonathan Larmour  <jifl@eCosCentric.com>
+
+	* cdl/flash_strata_v2.cdl: Needs to indicate to io/flash
+	that cache needs handling.
+
 2004-11-29  Bart Veer  <bartv@ecoscentric.com>
 
 	* include/flash_strata_v2.inl: hwr_map_error() is now internal to
 	the driver, not exported to the generic flash code.
 	
Index: devs/flash/intel/stratav2/current/cdl/flash_strata_v2.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/flash/intel/stratav2/current/cdl/Attic/flash_strata_v2.cdl,v
retrieving revision 1.1.2.4
diff -u -5 -p -r1.1.2.4 flash_strata_v2.cdl
--- devs/flash/intel/stratav2/current/cdl/flash_strata_v2.cdl	21 Nov 2004 17:33:50 -0000	1.1.2.4
+++ devs/flash/intel/stratav2/current/cdl/flash_strata_v2.cdl	27 Sep 2006 14:51:06 -0000
@@ -54,10 +54,11 @@ cdl_package CYGPKG_DEVS_FLASH_STRATA_V2 
 
     parent        CYGPKG_IO_FLASH
     active_if	  CYGPKG_IO_FLASH
 
     implements    CYGHWR_IO_FLASH_DEVICE
+    implements  CYGHWR_IO_FLASH_DEVICE_NEEDS_CACHE_HANDLED
 
     active_if     CYGINT_DEVS_FLASH_STRATA_V2_REQUIRED
 
     include_dir   cyg/io
 
Index: devs/flash/synthv2/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/flash/synthv2/current/Attic/ChangeLog,v
retrieving revision 1.1.2.10
diff -u -5 -p -r1.1.2.10 ChangeLog
--- devs/flash/synthv2/current/ChangeLog	22 Feb 2005 21:03:46 -0000	1.1.2.10
+++ devs/flash/synthv2/current/ChangeLog	27 Sep 2006 14:51:06 -0000
@@ -1,5 +1,10 @@
+2006-09-27  Jonathan Larmour  <jifl@eCosCentric.com>
+
+	* cdl/flash_synth.cdl: Needs to indicate to io/flash
+	that cache needs handling.
+
 2004-12-02  Bart Veer  <bartv@ecoscentric.com>
 
 	* include/synth.h, src/synth.c: explicitly include
 	<cyg/io/flash_dev.h> rather than just defining _FLASH_PRIVATE_
 
Index: devs/flash/synthv2/current/cdl/flash_synth.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/flash/synthv2/current/cdl/Attic/flash_synth.cdl,v
retrieving revision 1.1.2.3
diff -u -5 -p -r1.1.2.3 flash_synth.cdl
--- devs/flash/synthv2/current/cdl/flash_synth.cdl	21 Nov 2004 17:33:50 -0000	1.1.2.3
+++ devs/flash/synthv2/current/cdl/flash_synth.cdl	27 Sep 2006 14:51:06 -0000
@@ -54,11 +54,12 @@ cdl_package CYGPKG_DEVS_FLASH_SYNTH_V2 {
     parent        CYGPKG_IO_FLASH
     active_if	  CYGPKG_IO_FLASH
     requires      CYGINT_ISO_ERRNO_CODES
 
     implements    CYGHWR_IO_FLASH_DEVICE
-    
+    implements    CYGHWR_IO_FLASH_DEVICE_NEEDS_CACHE_HANDLED
+
     include_dir   cyg/flash
     description   "FLASH memory device support for Synthetic target"
     compile       -library=libextras.a synth.c 
 	
     cdl_option CYGMEM_FLASH_SYNTH_V2_BASE {
Index: io/flash/current/cdl/io_flash.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/flash/current/cdl/io_flash.cdl,v
retrieving revision 1.17.2.5
diff -u -5 -p -r1.17.2.5 io_flash.cdl
--- io/flash/current/cdl/io_flash.cdl	27 Sep 2006 14:24:46 -0000	1.17.2.5
+++ io/flash/current/cdl/io_flash.cdl	27 Sep 2006 14:51:06 -0000
@@ -96,15 +96,15 @@ cdl_package CYGPKG_IO_FLASH {
     
     cdl_interface CYGHWR_IO_FLASH_DEVICE_NEEDS_CACHE_HANDLED {
 	display	    "Device driver needs cache handled centrally"
 	flavor	    booldata
 	description "
-            Managing flash often requires interacting with the flash.
+            Managing flash often requires interacting with the cache.
             Some device drivers do not require the generic flash code to
-            manipulate the flash, either because they do it themselves or
+            manipulate the cache, either because they do it themselves or
             because the hardware does the right thing. Other drivers
-            require the generic code to disable/enable the flash before
+            require the generic code to disable/enable the cache before
             calling into the driver."
     }
     
     cdl_interface CYGHWR_IO_FLASH_DEVICE_LEGACY {
         display     "Hardware driver uses the legacy interface"
@@ -114,13 +114,13 @@ cdl_package CYGPKG_IO_FLASH {
             The generic flash code can work with either a legacy device
             driver or with V2 drivers. If a legacy driver is used on the
             current platform then this option will be implemented."
 	requires    { CYGHWR_IO_FLASH_DEVICE_LEGACY <= 1 }
 
-	# For now assume all legacy devices need the cache handled by
-	# the central code
-	implements CYGHWR_IO_FLASH_DEVICE_NEEDS_CACHE_HANDLED
+        # For now assume all legacy devices need the cache handled by
+        # the central code
+        implements CYGHWR_IO_FLASH_DEVICE_NEEDS_CACHE_HANDLED
     }
 
     cdl_option CYGSEM_IO_FLASH_READ_INDIRECT {
 	display         "Legacy device driver uses indirect reads."
 	active_if       CYGHWR_IO_FLASH_DEVICE_LEGACY

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