Update of /cvsroot/blob/blob/include/blob
In directory usw-pr-cvs1:/tmp/cvs-serv10721
Modified Files:
flash.h
Log Message:
- Add new functions for Ipaq flash
- Completely remove the old flash interface
Index: flash.h
===================================================================
RCS file: /cvsroot/blob/blob/include/blob/flash.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- flash.h 2001/10/25 09:59:23 1.6
+++ flash.h 2001/10/31 16:38:20 1.7
@@ -45,12 +45,24 @@
typedef int (*flash_erase_func_t)(u32 *);
typedef int (*flash_write_func_t)(u32 *, const u32 *);
+typedef int (*flash_lock_func_t)(u32 *);
+typedef int (*flash_unlock_func_t)(u32 *);
+typedef int (*flash_enable_vpp_func_t)(void);
+typedef int (*flash_disable_vpp_func_t)(void);
+
typedef struct {
flash_erase_func_t erase;
flash_write_func_t write;
+
+ flash_lock_func_t lock;
+ flash_unlock_func_t unlock;
+
+ flash_enable_vpp_func_t enable_vpp;
+ flash_disable_vpp_func_t disable_vpp;
} flash_driver_t;
+
/* implemented flash drivers */
extern flash_driver_t amd32_flash_driver;
extern flash_driver_t intel16_flash_driver;
@@ -71,58 +83,6 @@
/* exported functions */
int flash_erase_region(u32 *start, u32 nwords);
int flash_write_region(u32 *dst, const u32 *src, u32 nwords);
-
-
-/* -------- OLD ---------------------------------------------------- */
-
-typedef enum {
- blBlob,
- blParam,
- blKernel,
- blRamdisk
-} tBlockType;
-
-#define MAIN_BLOCK_SIZE (32768 * 4)
-
-#define INT_FLASH_BASE 0x00000000
-
-#ifdef ASSABET // Assabet settings come from linux/drivers/block/flash_mem.h
-#define BLOB_START 0x00000
-#define BLOB_LEN 0x10000
-#define NUM_BLOB_BLOCKS (BLOB_LEN / MAIN_BLOCK_SIZE)
-#define KERNEL_START 0x10000
-#define KERNEL_LEN 0xc0000
-#define NUM_KERNEL_BLOCKS (KERNEL_LEN / MAIN_BLOCK_SIZE)
-#define INITRD_START (KERNEL_START + KERNEL_LEN)
-#define INITRD_LEN 0x280000
-#define NUM_INITRD_BLOCKS (INITRD_LEN / MAIN_BLOCK_SIZE)
-#elif defined SHANNON
-#define BLOB_START (INT_FLASH_BASE)
-#define NUM_BLOB_BLOCKS (1)
-#define BLOB_LEN (0x8000)
-
-/* FIXME: blob needs te deal with paramater blocks */
-#define PARAM_START (INT_FLASH_BASE + 0x10000)
-#define NUM_PARAM_BLOCKS (1)
-#define PARAM_LEN (0x10000)
-
-#define KERNEL_START (INT_FLASH_BASE + MAIN_BLOCK_SIZE)
-#define NUM_KERNEL_BLOCKS (7)
-#define KERNEL_LEN (NUM_KERNEL_BLOCKS * MAIN_BLOCK_SIZE)
-#define INITRD_START (KERNEL_START + KERNEL_LEN)
-#define NUM_INITRD_BLOCKS (24)
-#define INITRD_LEN (NUM_INITRD_BLOCKS * MAIN_BLOCK_SIZE)
-#else
-#define BLOB_START (INT_FLASH_BASE)
-#define NUM_BLOB_BLOCKS (1)
-#define BLOB_LEN (NUM_BLOB_BLOCKS * MAIN_BLOCK_SIZE)
-#define KERNEL_START (INT_FLASH_BASE + MAIN_BLOCK_SIZE)
-#define NUM_KERNEL_BLOCKS (7)
-#define KERNEL_LEN (NUM_KERNEL_BLOCKS * MAIN_BLOCK_SIZE)
-#define INITRD_START (KERNEL_START + KERNEL_LEN)
-#define NUM_INITRD_BLOCKS (24)
-#define INITRD_LEN (NUM_INITRD_BLOCKS * MAIN_BLOCK_SIZE)
-#endif
#endif
|