summaryrefslogtreecommitdiff
path: root/src/flash/flash.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-09-26 17:55:28 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-09-26 17:55:28 +0000
commite5408ce0b6b4805421fd81fe772b070367854c03 (patch)
treeecaca1797782257abf4a4f61d549f7d08e73591d /src/flash/flash.c
parentfb7189761d49bb177fd556f6603a0996a3f721a0 (diff)
downloadopenocd+libswd-e5408ce0b6b4805421fd81fe772b070367854c03.tar.gz
openocd+libswd-e5408ce0b6b4805421fd81fe772b070367854c03.tar.bz2
openocd+libswd-e5408ce0b6b4805421fd81fe772b070367854c03.tar.xz
openocd+libswd-e5408ce0b6b4805421fd81fe772b070367854c03.zip
Gheorghe Guran <roatlasro@yahoo.com> redone at91sam7 driver. Old driver source file renamed. The old driver is still invoked by default and the new driver is invoked by using at91sam7_new
git-svn-id: svn://svn.berlios.de/openocd/trunk@1007 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash/flash.c')
-rw-r--r--src/flash/flash.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/flash/flash.c b/src/flash/flash.c
index 3d450ac8..b2ebe0b7 100644
--- a/src/flash/flash.c
+++ b/src/flash/flash.c
@@ -67,6 +67,7 @@ flash_bank_t *get_flash_bank_by_addr(target_t *target, u32 addr);
extern flash_driver_t lpc2000_flash;
extern flash_driver_t cfi_flash;
extern flash_driver_t at91sam7_flash;
+extern flash_driver_t at91sam7_old_flash;
extern flash_driver_t str7x_flash;
extern flash_driver_t str9x_flash;
extern flash_driver_t aduc702x_flash;
@@ -78,24 +79,26 @@ extern flash_driver_t ecosflash_flash;
extern flash_driver_t lpc288x_flash;
extern flash_driver_t ocl_flash;
-flash_driver_t *flash_drivers[] =
-{
- &lpc2000_flash,
- &cfi_flash,
- &at91sam7_flash,
- &str7x_flash,
- &str9x_flash,
- &aduc702x_flash,
- &stellaris_flash,
- &str9xpec_flash,
- &stm32x_flash,
- &tms470_flash,
- &ecosflash_flash,
- &lpc288x_flash,
- &ocl_flash,
- NULL,
+flash_driver_t *flash_drivers[] = {
+ &lpc2000_flash,
+ &cfi_flash,
+ &at91sam7_flash,
+ &at91sam7_old_flash,
+ &str7x_flash,
+ &str9x_flash,
+ &aduc702x_flash,
+ &stellaris_flash,
+ &str9xpec_flash,
+ &stm32x_flash,
+ &tms470_flash,
+ &ecosflash_flash,
+ &lpc288x_flash,
+ &ocl_flash,
+ NULL,
};
+
+
flash_bank_t *flash_banks;
static command_t *flash_cmd;
@@ -379,7 +382,7 @@ int handle_flash_info_command(struct command_context_s *cmd_ctx, char *cmd, char
else
protect_state = "protection state unknown";
- command_print(cmd_ctx, "\t#%i: 0x%8.8x (0x%x %ikB) %s",
+ command_print(cmd_ctx, "\t#%3i: 0x%8.8x (0x%x %ikB) %s",
j, p->sectors[j].offset, p->sectors[j].size, p->sectors[j].size>>10,
protect_state);
}
@@ -466,7 +469,7 @@ int handle_flash_erase_check_command(struct command_context_s *cmd_ctx, char *cm
else
erase_state = "erase state unknown";
- command_print(cmd_ctx, "\t#%i: 0x%8.8x (0x%x %ikB) %s",
+ command_print(cmd_ctx, "\t#%3i: 0x%8.8x (0x%x %ikB) %s",
j, p->sectors[j].offset, p->sectors[j].size, p->sectors[j].size>>10,
erase_state);
}