summaryrefslogtreecommitdiff
path: root/src/flash
diff options
context:
space:
mode:
Diffstat (limited to 'src/flash')
-rw-r--r--src/flash/mflash.c25
-rw-r--r--src/flash/pic32mx.c6
2 files changed, 5 insertions, 26 deletions
diff --git a/src/flash/mflash.c b/src/flash/mflash.c
index 340a9f56..10830b25 100644
--- a/src/flash/mflash.c
+++ b/src/flash/mflash.c
@@ -206,31 +206,6 @@ static int mflash_rst(u8 level)
return mflash_bank->gpio_drv->set_gpio_output_val(mflash_bank->rst_pin, level);
}
-static int mg_dump_task_reg (void)
-{
- target_t *target = mflash_bank->target;
- u32 address = mflash_bank->base + MG_REG_OFFSET + MG_REG_ERROR;
- u8 value, i;
- char *reg_name[9] = {
- "error ",
- "sector count ",
- "sector num (LBA 7- 0) ",
- "cyl. low (LBA 15- 8) ",
- "cyl. high (LBA 23-16) ",
- "drv/head ",
- "status ",
- "dev control ",
- "burst control "
- };
-
- for (i = 0; i < 9; i++) {
- target_read_u8(target, address + i * 2, &value);
- LOG_INFO("%s : 0x%2.2x", reg_name[i], value);
- }
-
- return ERROR_OK;
-
-}
static int mflash_init_gpio (void)
{
mflash_gpio_drv_t *gpio_drv = mflash_bank->gpio_drv;
diff --git a/src/flash/pic32mx.c b/src/flash/pic32mx.c
index d9f71973..7ae9eee2 100644
--- a/src/flash/pic32mx.c
+++ b/src/flash/pic32mx.c
@@ -268,10 +268,12 @@ int pic32mx_protect(struct flash_bank_s *bank, int set, int first, int last)
{
pic32mx_flash_bank_t *pic32mx_info = NULL;
target_t *target = bank->target;
+#if 0
u16 prot_reg[4] = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF};
int i, reg, bit;
int status;
u32 protection;
+#endif
pic32mx_info = bank->driver_priv;
@@ -824,7 +826,9 @@ int pic32mx_handle_unlock_command(struct command_context_s *cmd_ctx, char *cmd,
int pic32mx_chip_erase(struct flash_bank_s *bank)
{
target_t *target = bank->target;
+#if 0
u32 status;
+#endif
if (target->state != TARGET_HALTED)
{
@@ -865,10 +869,10 @@ int pic32mx_chip_erase(struct flash_bank_s *bank)
int pic32mx_handle_chip_erase_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
{
+#if 0
flash_bank_t *bank;
int i;
-#if 0
if (argc != 0)
{
command_print(cmd_ctx, "pic32mx chip_erase");