aboutsummaryrefslogtreecommitdiff
path: root/src/flash/mflash.c
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-27 12:20:13 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-05-27 12:20:13 +0000
commit2caf8655b59873d63421a9f4b23e813d27dd880b (patch)
treeb0479c1db221c16c59507e0ecde2540d2e098b93 /src/flash/mflash.c
parent5c478a2caba56518237e1d371698bef9a7679815 (diff)
downloadriscv-openocd-2caf8655b59873d63421a9f4b23e813d27dd880b.zip
riscv-openocd-2caf8655b59873d63421a9f4b23e813d27dd880b.tar.gz
riscv-openocd-2caf8655b59873d63421a9f4b23e813d27dd880b.tar.bz2
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
Diffstat (limited to 'src/flash/mflash.c')
-rw-r--r--src/flash/mflash.c28
1 files changed, 5 insertions, 23 deletions
diff --git a/src/flash/mflash.c b/src/flash/mflash.c
index 9e13151..f668db0 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;
}