From 0557f615e1972506ee8ef2977475402db094bea6 Mon Sep 17 00:00:00 2001 From: Marcel Telka Date: Tue, 10 Jun 2003 14:57:20 +0000 Subject: [PATCH] 2003-06-10 Marcel Telka * brux/flash.h (flash_driver_t): Added new type. git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@481 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- include/ChangeLog | 4 ++++ include/brux/flash.h | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/ChangeLog b/include/ChangeLog index 3fc52be4..19956210 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2003-06-10 Marcel Telka + + * brux/flash.h (flash_driver_t): Added new type. + 2003-06-10 Marcel Telka * brux/bus.h (bus_t): Changed return type from int to unsigned int for width(). diff --git a/include/brux/flash.h b/include/brux/flash.h index 16246ef1..55f00b1d 100644 --- a/include/brux/flash.h +++ b/include/brux/flash.h @@ -38,6 +38,19 @@ #include #include +#include + +typedef struct { + unsigned int bus_width; /* 1 for 8 bits, 2 for 16 bits, 4 for 32 bits, etc. */ + const char *name; + const char *description; + int (*autodetect)( cfi_array_t *cfi_array ); + void (*print_info)( cfi_array_t *cfi_array ); + int (*erase_block)( cfi_array_t *cfi_array, uint32_t adr ); + int (*unlock_block)( cfi_array_t *cfi_array, uint32_t adr ); + int (*program)( cfi_array_t *cfi_array, uint32_t adr, uint32_t data ); + void (*flash_readarray)( cfi_array_t *cfi_array ); +} flash_driver_t; void detectflash( bus_t *bus );