# HG changeset patch # User asl # Date 1097060343 0 # Node ID e308039f4579dd18b19532cba2b9aa46e47ccfc0 # Parent 6aedf0a683e408a563c9eed29209a70659ca8371 * src/legacy_dev.c (legacy_flash_init): The end is the size plus the start. 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,8 @@ +2004-10-06 Andrew Lunn + + * src/legacy_dev.c (legacy_flash_init): The end is the size plus + the start. + 2004-09-30 Savin Zlobec * src/flash.c: Offset into the block is not calculated correctly diff --git a/packages/io/flash/current/src/legacy_dev.c b/packages/io/flash/current/src/legacy_dev.c --- a/packages/io/flash/current/src/legacy_dev.c +++ b/packages/io/flash/current/src/legacy_dev.c @@ -92,7 +92,7 @@ legacy_flash_init (struct cyg_flash_dev if (!err) { dev->start = (cyg_flashaddr_t)flash_info.start; - dev->end = flash_info.block_size * flash_info.blocks - 1; + dev->end = dev->start + flash_info.block_size * flash_info.blocks - 1; dev->num_block_infos = 1; dev->block_info = block_info; block_info[0].block_size = flash_info.block_size;