diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-27 12:20:13 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-27 12:20:13 +0000 |
commit | 2caf8655b59873d63421a9f4b23e813d27dd880b (patch) | |
tree | b0479c1db221c16c59507e0ecde2540d2e098b93 | |
parent | 5c478a2caba56518237e1d371698bef9a7679815 (diff) | |
download | openocd+libswd-2caf8655b59873d63421a9f4b23e813d27dd880b.tar.gz openocd+libswd-2caf8655b59873d63421a9f4b23e813d27dd880b.tar.bz2 openocd+libswd-2caf8655b59873d63421a9f4b23e813d27dd880b.tar.xz openocd+libswd-2caf8655b59873d63421a9f4b23e813d27dd880b.zip |
unsik Kim <donari75@gmail.com>:
Remove unused mflash bank command options.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1928 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r-- | doc/openocd.texi | 17 | ||||
-rw-r--r-- | src/flash/mflash.c | 28 | ||||
-rw-r--r-- | src/flash/mflash.h | 4 |
3 files changed, 12 insertions, 37 deletions
diff --git a/doc/openocd.texi b/doc/openocd.texi index 4a40551e..78d53c58 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -2509,22 +2509,19 @@ Use the standard str9 driver for programming. @xref{STR9 specific commands}. @subsection mFlash Configuration @cindex mFlash Configuration -@b{mflash bank} <@var{soc}> <@var{base}> <@var{chip_width}> <@var{bus_width}> -<@var{RST pin}> <@var{WP pin}> <@var{DPD pin}> <@var{target}> +@b{mflash bank} <@var{soc}> <@var{base}> <@var{RST pin}> <@var{target}> @cindex mflash bank @*Configures a mflash for <@var{soc}> host bank at -<@var{base}>. <@var{chip_width}> and <@var{bus_width}> are bytes -order. Pin number format is dependent on host GPIO calling convention. -If WP or DPD pin was not used, write -1. Currently, mflash bank -support s3c2440 and pxa270. +<@var{base}>. Pin number format is dependent on host GPIO calling convention. +Currently, mflash bank support s3c2440 and pxa270. -(ex. of s3c2440) mflash <@var{RST pin}> is GPIO B1, <@var{WP pin}> and <@var{DPD pin}> are not used. +(ex. of s3c2440) mflash <@var{RST pin}> is GPIO B1. @example -mflash bank s3c2440 0x10000000 2 2 1b -1 -1 0 +mflash bank s3c2440 0x10000000 1b 0 @end example -(ex. of pxa270) mflash <@var{RST pin}> is GPIO 43, <@var{DPD pin}> is not used and <@var{DPD pin}> is GPIO 51. +(ex. of pxa270) mflash <@var{RST pin}> is GPIO 43. @example -mflash bank pxa270 0x08000000 2 2 43 -1 51 0 +mflash bank pxa270 0x08000000 43 0 @end example @section Microcontroller specific Flash Commands diff --git a/src/flash/mflash.c b/src/flash/mflash.c index 9e13151e..f668db0d 100644 --- a/src/flash/mflash.c +++ b/src/flash/mflash.c @@ -203,16 +203,6 @@ static int mg_init_gpio (void) gpio_drv->set_gpio_to_output(mflash_bank->rst_pin); gpio_drv->set_gpio_output_val(mflash_bank->rst_pin, 1); - if (mflash_bank->wp_pin.num != -1) { - gpio_drv->set_gpio_to_output(mflash_bank->wp_pin); - gpio_drv->set_gpio_output_val(mflash_bank->wp_pin, 1); - } - - if (mflash_bank->dpd_pin.num != -1) { - gpio_drv->set_gpio_to_output(mflash_bank->dpd_pin); - gpio_drv->set_gpio_output_val(mflash_bank->dpd_pin, 1); - } - return ERROR_OK; } @@ -790,30 +780,22 @@ static int mg_bank_cmd(struct command_context_s *cmd_ctx, char *cmd, char **args char *str; int i; - if (argc < 8) + if (argc < 4) { return ERROR_COMMAND_SYNTAX_ERROR; } - if ((target = get_target(args[7])) == NULL) + if ((target = get_target(args[3])) == NULL) { - LOG_ERROR("target '%s' not defined", args[7]); + LOG_ERROR("target '%s' not defined", args[3]); return ERROR_FAIL; } mflash_bank = calloc(sizeof(mflash_bank_t), 1); mflash_bank->base = strtoul(args[1], NULL, 0); - mflash_bank->chip_width = strtoul(args[2], NULL, 0); - mflash_bank->bus_width = strtoul(args[3], NULL, 0); - mflash_bank->rst_pin.num = strtoul(args[4], &str, 0); + mflash_bank->rst_pin.num = strtoul(args[2], &str, 0); if (*str) mflash_bank->rst_pin.port[0] = (u16)tolower(str[0]); - mflash_bank->wp_pin.num = strtol(args[5], &str, 0); - if (*str) - mflash_bank->wp_pin.port[0] = (u16)tolower(str[0]); - mflash_bank->dpd_pin.num = strtol(args[6], &str, 0); - if (*str) - mflash_bank->dpd_pin.port[0] = (u16)tolower(str[0]); mflash_bank->target = target; @@ -835,6 +817,6 @@ int mflash_register_commands(struct command_context_s *cmd_ctx) { mflash_cmd = register_command(cmd_ctx, NULL, "mflash", NULL, COMMAND_ANY, NULL); register_command(cmd_ctx, mflash_cmd, "bank", mg_bank_cmd, COMMAND_CONFIG, - "mflash bank <soc> <base> <chip_width> <bus_width> <RST pin> <WP pin> <DPD pin> <target #>"); + "mflash bank <soc> <base> <RST pin> <target #>"); return ERROR_OK; } diff --git a/src/flash/mflash.h b/src/flash/mflash.h index e78f2486..d4429165 100644 --- a/src/flash/mflash.h +++ b/src/flash/mflash.h @@ -125,12 +125,8 @@ typedef struct mg_drv_info_s { typedef struct mflash_bank_s { u32 base; - u32 chip_width; - u32 bus_width; mflash_gpio_num_t rst_pin; - mflash_gpio_num_t wp_pin; - mflash_gpio_num_t dpd_pin; mflash_gpio_drv_t *gpio_drv; target_t *target; |