# HG changeset patch # User asl # Date 1069672961 0 # Node ID 587b0b1c692766dcc341e5d4740bb62b9ef4e1a1 # Parent c52376a495169f150e5c1b9827b41ef1dd13a906 * src/flash.c: * src/flashiodev.c: * include/flash.h: Remove references to work_space and work_space_size since they are no longer used. diff --git a/packages/io/flash/current/ChangeLog b/packages/io/flash/current/ChangeLog --- a/packages/io/flash/current/ChangeLog +++ b/packages/io/flash/current/ChangeLog @@ -1,3 +1,10 @@ +2003-11-20 Jani Monoses + + * src/flash.c: + * src/flashiodev.c: + * include/flash.h: Remove references to work_space and work_space_size + since they are no longer used. + 2003-11-20 Jani Monoses * cdl/io_flash.cdl: diff --git a/packages/io/flash/current/include/flash.h b/packages/io/flash/current/include/flash.h --- a/packages/io/flash/current/include/flash.h +++ b/packages/io/flash/current/include/flash.h @@ -61,7 +61,7 @@ typedef int _printf(const char *fmt, ... #define FLASH_MIN_WORKSPACE CYGNUM_FLASH_WORKSPACE_SIZE // Space used by FLASH code -externC int flash_init(void *work_space, int work_space_length, _printf *pf); +externC int flash_init(_printf *pf); externC int flash_erase(void *base, int len, void **err_address); externC int flash_program(void *flash_base, void *ram_base, int len, void **err_address); externC int flash_read(void *flash_base, void *ram_base, int len, void **err_address); @@ -113,8 +113,6 @@ typedef struct { #ifdef _FLASH_PRIVATE_ struct flash_info { - void *work_space; - int work_space_size; int block_size; // Assuming fixed size "blocks" int blocks; // Number of blocks int buffer_size; // Size of write buffer (only defined for some devices) diff --git a/packages/io/flash/current/src/flash.c b/packages/io/flash/current/src/flash.c --- a/packages/io/flash/current/src/flash.c +++ b/packages/io/flash/current/src/flash.c @@ -73,14 +73,12 @@ struct flash_info flash_info; int -flash_init(void *work_space, int work_space_size, _printf *pf) +flash_init(_printf *pf) { int err; if (flash_info.init) return FLASH_ERR_OK; flash_info.pf = pf; // Do this before calling into the driver - flash_info.work_space = work_space; - flash_info.work_space_size = work_space_size; if ((err = flash_hwr_init()) != FLASH_ERR_OK) { return err; } diff --git a/packages/io/flash/current/src/flashiodev.c b/packages/io/flash/current/src/flashiodev.c --- a/packages/io/flash/current/src/flashiodev.c +++ b/packages/io/flash/current/src/flashiodev.c @@ -63,11 +63,7 @@ #define MIN(x,y) ((x)<(y) ? (x) : (y)) -// 1 per devtab entry, so only 1 for now -//static char flashiodev_workspaces[1][FLASH_MIN_WORKSPACE]; - struct flashiodev_priv_t{ - char workspace[FLASH_MIN_WORKSPACE]; char *start; char *end; }; @@ -80,8 +76,7 @@ static bool flashiodev_init( struct cyg_devtab_entry *tab ) { struct flashiodev_priv_t *dev = (struct flashiodev_priv_t *)tab->priv; - char *ws = dev->workspace; - int stat = flash_init( ws, FLASH_MIN_WORKSPACE, &dummy_printf ); + int stat = flash_init( &dummy_printf ); if ( stat == 0 ) { #ifdef CYGNUM_IO_FLASH_BLOCK_CFG_FIS_1 CYG_ADDRESS flash_base;