Browse Source

NOR: cleanup driver decls

Fix goofy struct indents.  Function names *are* their addresses.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
tags/v0.4.0-rc2
David Brownell 14 years ago
parent
commit
303b493c22
18 changed files with 200 additions and 202 deletions
  1. +11
    -11
      src/flash/nor/aduc702x.c
  2. +12
    -12
      src/flash/nor/at91sam3.c
  3. +13
    -13
      src/flash/nor/avrf.c
  4. +11
    -11
      src/flash/nor/cfi.c
  5. +11
    -11
      src/flash/nor/ecos.c
  6. +12
    -12
      src/flash/nor/faux.c
  7. +13
    -15
      src/flash/nor/lpc2000.c
  8. +11
    -11
      src/flash/nor/lpc288x.c
  9. +6
    -6
      src/flash/nor/lpc2900.c
  10. +11
    -11
      src/flash/nor/ocl.c
  11. +14
    -14
      src/flash/nor/pic32mx.c
  12. +1
    -1
      src/flash/nor/stellaris.c
  13. +17
    -17
      src/flash/nor/stm32x.c
  14. +13
    -13
      src/flash/nor/str7x.c
  15. +13
    -13
      src/flash/nor/str9x.c
  16. +12
    -12
      src/flash/nor/str9xpec.c
  17. +4
    -4
      src/flash/nor/tcl.c
  18. +15
    -15
      src/flash/nor/tms470.c

+ 11
- 11
src/flash/nor/aduc702x.c View File

@@ -412,14 +412,14 @@ static int aduc702x_check_flash_completion(struct target* target, unsigned int t
} }


struct flash_driver aduc702x_flash = { struct flash_driver aduc702x_flash = {
.name = "aduc702x",
.flash_bank_command = &aduc702x_flash_bank_command,
.erase = &aduc702x_erase,
.protect = &aduc702x_protect,
.write = &aduc702x_write,
.probe = &aduc702x_probe,
.auto_probe = &aduc702x_probe,
.erase_check = &default_flash_blank_check,
.protect_check = &aduc702x_protect_check,
.info = &aduc702x_info
};
.name = "aduc702x",
.flash_bank_command = aduc702x_flash_bank_command,
.erase = aduc702x_erase,
.protect = aduc702x_protect,
.write = aduc702x_write,
.probe = aduc702x_probe,
.auto_probe = aduc702x_probe,
.erase_check = default_flash_blank_check,
.protect_check = aduc702x_protect_check,
.info = aduc702x_info
};

+ 12
- 12
src/flash/nor/at91sam3.c View File

@@ -2501,15 +2501,15 @@ static const struct command_registration at91sam3_command_handlers[] = {
}; };


struct flash_driver at91sam3_flash = { struct flash_driver at91sam3_flash = {
.name = "at91sam3",
.commands = at91sam3_command_handlers,
.flash_bank_command = &sam3_flash_bank_command,
.erase = &sam3_erase,
.protect = &sam3_protect,
.write = &sam3_write,
.probe = &sam3_probe,
.auto_probe = &sam3_auto_probe,
.erase_check = &sam3_erase_check,
.protect_check = &sam3_protect_check,
.info = &sam3_info,
};
.name = "at91sam3",
.commands = at91sam3_command_handlers,
.flash_bank_command = sam3_flash_bank_command,
.erase = sam3_erase,
.protect = sam3_protect,
.write = sam3_write,
.probe = sam3_probe,
.auto_probe = sam3_auto_probe,
.erase_check = sam3_erase_check,
.protect_check = sam3_protect_check,
.info = sam3_info,
};

+ 13
- 13
src/flash/nor/avrf.c View File

@@ -452,7 +452,7 @@ COMMAND_HANDLER(avrf_handle_mass_erase_command)
static const struct command_registration avrf_exec_command_handlers[] = { static const struct command_registration avrf_exec_command_handlers[] = {
{ {
.name = "mass_erase", .name = "mass_erase",
.handler = &avrf_handle_mass_erase_command,
.handler = avrf_handle_mass_erase_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.help = "erase entire device", .help = "erase entire device",
}, },
@@ -469,15 +469,15 @@ static const struct command_registration avrf_command_handlers[] = {
}; };


struct flash_driver avr_flash = { struct flash_driver avr_flash = {
.name = "avr",
.commands = avrf_command_handlers,
.flash_bank_command = &avrf_flash_bank_command,
.erase = &avrf_erase,
.protect = &avrf_protect,
.write = &avrf_write,
.probe = &avrf_probe,
.auto_probe = &avrf_auto_probe,
.erase_check = &default_flash_mem_blank_check,
.protect_check = &avrf_protect_check,
.info = &avrf_info,
};
.name = "avr",
.commands = avrf_command_handlers,
.flash_bank_command = avrf_flash_bank_command,
.erase = avrf_erase,
.protect = avrf_protect,
.write = avrf_write,
.probe = avrf_probe,
.auto_probe = avrf_auto_probe,
.erase_check = default_flash_mem_blank_check,
.protect_check = avrf_protect_check,
.info = avrf_info,
};

+ 11
- 11
src/flash/nor/cfi.c View File

@@ -2618,14 +2618,14 @@ static int cfi_info(struct flash_bank *bank, char *buf, int buf_size)
} }


struct flash_driver cfi_flash = { struct flash_driver cfi_flash = {
.name = "cfi",
.flash_bank_command = &cfi_flash_bank_command,
.erase = &cfi_erase,
.protect = &cfi_protect,
.write = &cfi_write,
.probe = &cfi_probe,
.auto_probe = &cfi_auto_probe,
.erase_check = &default_flash_blank_check,
.protect_check = &cfi_protect_check,
.info = &cfi_info,
};
.name = "cfi",
.flash_bank_command = cfi_flash_bank_command,
.erase = cfi_erase,
.protect = cfi_protect,
.write = cfi_write,
.probe = cfi_probe,
.auto_probe = cfi_auto_probe,
.erase_check = default_flash_blank_check,
.protect_check = cfi_protect_check,
.info = cfi_info,
};

+ 11
- 11
src/flash/nor/ecos.c View File

@@ -431,14 +431,14 @@ static int ecosflash_handle_gpnvm_command(struct command_context *cmd_ctx, char
#endif #endif


struct flash_driver ecosflash_flash = { struct flash_driver ecosflash_flash = {
.name = "ecosflash",
.flash_bank_command = &ecosflash_flash_bank_command,
.erase = &ecosflash_erase,
.protect = &ecosflash_protect,
.write = &ecosflash_write,
.probe = &ecosflash_probe,
.auto_probe = &ecosflash_probe,
.erase_check = &default_flash_blank_check,
.protect_check = &ecosflash_protect_check,
.info = &ecosflash_info
};
.name = "ecosflash",
.flash_bank_command = ecosflash_flash_bank_command,
.erase = ecosflash_erase,
.protect = ecosflash_protect,
.write = ecosflash_write,
.probe = ecosflash_probe,
.auto_probe = ecosflash_probe,
.erase_check = default_flash_blank_check,
.protect_check = ecosflash_protect_check,
.info = ecosflash_info
};

+ 12
- 12
src/flash/nor/faux.c View File

@@ -135,15 +135,15 @@ static const struct command_registration faux_command_handlers[] = {
}; };


struct flash_driver faux_flash = { struct flash_driver faux_flash = {
.name = "faux",
.commands = faux_command_handlers,
.flash_bank_command = &faux_flash_bank_command,
.erase = &faux_erase,
.protect = &faux_protect,
.write = &faux_write,
.probe = &faux_probe,
.auto_probe = &faux_probe,
.erase_check = &default_flash_blank_check,
.protect_check = &faux_protect_check,
.info = &faux_info
};
.name = "faux",
.commands = faux_command_handlers,
.flash_bank_command = faux_flash_bank_command,
.erase = faux_erase,
.protect = faux_protect,
.write = faux_write,
.probe = faux_probe,
.auto_probe = faux_probe,
.erase_check = default_flash_blank_check,
.protect_check = faux_protect_check,
.info = faux_info
};

+ 13
- 15
src/flash/nor/lpc2000.c View File

@@ -783,7 +783,7 @@ COMMAND_HANDLER(lpc2000_handle_part_id_command)
static const struct command_registration lpc2000_exec_command_handlers[] = { static const struct command_registration lpc2000_exec_command_handlers[] = {
{ {
.name = "part_id", .name = "part_id",
.handler = &lpc2000_handle_part_id_command,
.handler = lpc2000_handle_part_id_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.help = "print part id of lpc2000 flash bank <num>", .help = "print part id of lpc2000 flash bank <num>",
}, },
@@ -800,17 +800,15 @@ static const struct command_registration lpc2000_command_handlers[] = {
}; };


struct flash_driver lpc2000_flash = { struct flash_driver lpc2000_flash = {
.name = "lpc2000",
.commands = lpc2000_command_handlers,
.flash_bank_command = &lpc2000_flash_bank_command,
.erase = &lpc2000_erase,
.protect = &lpc2000_protect,
.write = &lpc2000_write,
.probe = &lpc2000_probe,
.auto_probe = &lpc2000_probe,
.erase_check = &lpc2000_erase_check,
.protect_check = &lpc2000_protect_check,
.info = &lpc2000_info,
};


.name = "lpc2000",
.commands = lpc2000_command_handlers,
.flash_bank_command = lpc2000_flash_bank_command,
.erase = lpc2000_erase,
.protect = lpc2000_protect,
.write = lpc2000_write,
.probe = lpc2000_probe,
.auto_probe = lpc2000_probe,
.erase_check = lpc2000_erase_check,
.protect_check = lpc2000_protect_check,
.info = lpc2000_info,
};

+ 11
- 11
src/flash/nor/lpc288x.c View File

@@ -473,14 +473,14 @@ static int lpc288x_protect(struct flash_bank *bank, int set, int first, int last
} }


struct flash_driver lpc288x_flash = { struct flash_driver lpc288x_flash = {
.name = "lpc288x",
.flash_bank_command = &lpc288x_flash_bank_command,
.erase = &lpc288x_erase,
.protect = &lpc288x_protect,
.write = &lpc288x_write,
.probe = &lpc288x_probe,
.auto_probe = &lpc288x_probe,
.erase_check = &lpc288x_erase_check,
.protect_check = &lpc288x_protect_check,
.info = &lpc288x_info,
};
.name = "lpc288x",
.flash_bank_command = lpc288x_flash_bank_command,
.erase = lpc288x_erase,
.protect = lpc288x_protect,
.write = lpc288x_write,
.probe = lpc288x_probe,
.auto_probe = lpc288x_probe,
.erase_check = lpc288x_erase_check,
.protect_check = lpc288x_protect_check,
.info = lpc288x_info,
};

+ 6
- 6
src/flash/nor/lpc2900.c View File

@@ -951,14 +951,14 @@ COMMAND_HANDLER(lpc2900_handle_secure_jtag_command)
static const struct command_registration lpc2900_exec_command_handlers[] = { static const struct command_registration lpc2900_exec_command_handlers[] = {
{ {
.name = "signature", .name = "signature",
.handler = &lpc2900_handle_signature_command,
.handler = lpc2900_handle_signature_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.usage = "bank_id", .usage = "bank_id",
.help = "Calculate and display signature of flash bank.", .help = "Calculate and display signature of flash bank.",
}, },
{ {
.name = "read_custom", .name = "read_custom",
.handler = &lpc2900_handle_read_custom_command,
.handler = lpc2900_handle_read_custom_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.usage = "bank_id filename", .usage = "bank_id filename",
.help = "Copies 912 bytes of customer information " .help = "Copies 912 bytes of customer information "
@@ -966,14 +966,14 @@ static const struct command_registration lpc2900_exec_command_handlers[] = {
}, },
{ {
.name = "password", .name = "password",
.handler = &lpc2900_handle_password_command,
.handler = lpc2900_handle_password_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.usage = "bank_id password", .usage = "bank_id password",
.help = "Enter fixed password to enable 'dangerous' options.", .help = "Enter fixed password to enable 'dangerous' options.",
}, },
{ {
.name = "write_custom", .name = "write_custom",
.handler = &lpc2900_handle_write_custom_command,
.handler = lpc2900_handle_write_custom_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.usage = "bank_id filename ('bin'|'ihex'|'elf'|'s19')", .usage = "bank_id filename ('bin'|'ihex'|'elf'|'s19')",
.help = "Copies 912 bytes of customer info from file " .help = "Copies 912 bytes of customer info from file "
@@ -981,7 +981,7 @@ static const struct command_registration lpc2900_exec_command_handlers[] = {
}, },
{ {
.name = "secure_sector", .name = "secure_sector",
.handler = &lpc2900_handle_secure_sector_command,
.handler = lpc2900_handle_secure_sector_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.usage = "bank_id first_sector last_sector", .usage = "bank_id first_sector last_sector",
.help = "Activate sector security for a range of sectors. " .help = "Activate sector security for a range of sectors. "
@@ -989,7 +989,7 @@ static const struct command_registration lpc2900_exec_command_handlers[] = {
}, },
{ {
.name = "secure_jtag", .name = "secure_jtag",
.handler = &lpc2900_handle_secure_jtag_command,
.handler = lpc2900_handle_secure_jtag_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.usage = "bank_id", .usage = "bank_id",
.help = "Disable the JTAG port. " .help = "Disable the JTAG port. "


+ 11
- 11
src/flash/nor/ocl.c View File

@@ -348,14 +348,14 @@ static int ocl_auto_probe(struct flash_bank *bank)
} }


struct flash_driver ocl_flash = { struct flash_driver ocl_flash = {
.name = "ocl",
.flash_bank_command = &ocl_flash_bank_command,
.erase = &ocl_erase,
.protect = &ocl_protect,
.write = &ocl_write,
.probe = &ocl_probe,
.erase_check = &ocl_erase_check,
.protect_check = &ocl_protect_check,
.info = &ocl_info,
.auto_probe = &ocl_auto_probe,
};
.name = "ocl",
.flash_bank_command = ocl_flash_bank_command,
.erase = ocl_erase,
.protect = ocl_protect,
.write = ocl_write,
.probe = ocl_probe,
.erase_check = ocl_erase_check,
.protect_check = ocl_protect_check,
.info = ocl_info,
.auto_probe = ocl_auto_probe,
};

+ 14
- 14
src/flash/nor/pic32mx.c View File

@@ -886,13 +886,13 @@ COMMAND_HANDLER(pic32mx_handle_pgm_word_command)
static const struct command_registration pic32mx_exec_command_handlers[] = { static const struct command_registration pic32mx_exec_command_handlers[] = {
{ {
.name = "chip_erase", .name = "chip_erase",
.handler = &pic32mx_handle_chip_erase_command,
.handler = pic32mx_handle_chip_erase_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.help = "erase device", .help = "erase device",
}, },
{ {
.name = "pgm_word", .name = "pgm_word",
.handler = &pic32mx_handle_pgm_word_command,
.handler = pic32mx_handle_pgm_word_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.help = "program a word", .help = "program a word",
}, },
@@ -909,15 +909,15 @@ static const struct command_registration pic32mx_command_handlers[] = {
}; };


struct flash_driver pic32mx_flash = { struct flash_driver pic32mx_flash = {
.name = "pic32mx",
.commands = pic32mx_command_handlers,
.flash_bank_command = &pic32mx_flash_bank_command,
.erase = &pic32mx_erase,
.protect = &pic32mx_protect,
.write = &pic32mx_write,
.probe = &pic32mx_probe,
.auto_probe = &pic32mx_auto_probe,
.erase_check = &default_flash_mem_blank_check,
.protect_check = &pic32mx_protect_check,
.info = &pic32mx_info,
};
.name = "pic32mx",
.commands = pic32mx_command_handlers,
.flash_bank_command = pic32mx_flash_bank_command,
.erase = pic32mx_erase,
.protect = pic32mx_protect,
.write = pic32mx_write,
.probe = pic32mx_probe,
.auto_probe = pic32mx_auto_probe,
.erase_check = default_flash_mem_blank_check,
.protect_check = pic32mx_protect_check,
.info = pic32mx_info,
};

+ 1
- 1
src/flash/nor/stellaris.c View File

@@ -1173,7 +1173,7 @@ COMMAND_HANDLER(stellaris_handle_mass_erase_command)
static const struct command_registration stellaris_exec_command_handlers[] = { static const struct command_registration stellaris_exec_command_handlers[] = {
{ {
.name = "mass_erase", .name = "mass_erase",
.handler = &stellaris_handle_mass_erase_command,
.handler = stellaris_handle_mass_erase_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.help = "erase entire device", .help = "erase entire device",
}, },


+ 17
- 17
src/flash/nor/stm32x.c View File

@@ -1193,35 +1193,35 @@ COMMAND_HANDLER(stm32x_handle_mass_erase_command)
static const struct command_registration stm32x_exec_command_handlers[] = { static const struct command_registration stm32x_exec_command_handlers[] = {
{ {
.name = "lock", .name = "lock",
.handler = &stm32x_handle_lock_command,
.handler = stm32x_handle_lock_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.usage = "bank_id", .usage = "bank_id",
.help = "Lock entire flash device.", .help = "Lock entire flash device.",
}, },
{ {
.name = "unlock", .name = "unlock",
.handler = &stm32x_handle_unlock_command,
.handler = stm32x_handle_unlock_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.usage = "bank_id", .usage = "bank_id",
.help = "Unlock entire protected flash device.", .help = "Unlock entire protected flash device.",
}, },
{ {
.name = "mass_erase", .name = "mass_erase",
.handler = &stm32x_handle_mass_erase_command,
.handler = stm32x_handle_mass_erase_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.usage = "bank_id", .usage = "bank_id",
.help = "Erase entire flash device.", .help = "Erase entire flash device.",
}, },
{ {
.name = "options_read", .name = "options_read",
.handler = &stm32x_handle_options_read_command,
.handler = stm32x_handle_options_read_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.usage = "bank_id", .usage = "bank_id",
.help = "Read and display device option byte.", .help = "Read and display device option byte.",
}, },
{ {
.name = "options_write", .name = "options_write",
.handler = &stm32x_handle_options_write_command,
.handler = stm32x_handle_options_write_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.usage = "bank_id ('SWWDG'|'HWWDG') " .usage = "bank_id ('SWWDG'|'HWWDG') "
"('RSTSTNDBY'|'NORSTSTNDBY') " "('RSTSTNDBY'|'NORSTSTNDBY') "
@@ -1241,15 +1241,15 @@ static const struct command_registration stm32x_command_handlers[] = {
}; };


struct flash_driver stm32x_flash = { struct flash_driver stm32x_flash = {
.name = "stm32x",
.commands = stm32x_command_handlers,
.flash_bank_command = &stm32x_flash_bank_command,
.erase = &stm32x_erase,
.protect = &stm32x_protect,
.write = &stm32x_write,
.probe = &stm32x_probe,
.auto_probe = &stm32x_auto_probe,
.erase_check = &default_flash_mem_blank_check,
.protect_check = &stm32x_protect_check,
.info = &stm32x_info,
};
.name = "stm32x",
.commands = stm32x_command_handlers,
.flash_bank_command = stm32x_flash_bank_command,
.erase = stm32x_erase,
.protect = stm32x_protect,
.write = stm32x_write,
.probe = stm32x_probe,
.auto_probe = stm32x_auto_probe,
.erase_check = default_flash_mem_blank_check,
.protect_check = stm32x_protect_check,
.info = stm32x_info,
};

+ 13
- 13
src/flash/nor/str7x.c View File

@@ -676,7 +676,7 @@ COMMAND_HANDLER(str7x_handle_disable_jtag_command)
static const struct command_registration str7x_exec_command_handlers[] = { static const struct command_registration str7x_exec_command_handlers[] = {
{ {
.name = "disable_jtag", .name = "disable_jtag",
.handler = &str7x_handle_disable_jtag_command,
.handler = str7x_handle_disable_jtag_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.help = "disable jtag access", .help = "disable jtag access",
}, },
@@ -693,15 +693,15 @@ static const struct command_registration str7x_command_handlers[] = {
}; };


struct flash_driver str7x_flash = { struct flash_driver str7x_flash = {
.name = "str7x",
.commands = str7x_command_handlers,
.flash_bank_command = &str7x_flash_bank_command,
.erase = &str7x_erase,
.protect = &str7x_protect,
.write = &str7x_write,
.probe = &str7x_probe,
.auto_probe = &str7x_probe,
.erase_check = &default_flash_blank_check,
.protect_check = &str7x_protect_check,
.info = &str7x_info,
};
.name = "str7x",
.commands = str7x_command_handlers,
.flash_bank_command = str7x_flash_bank_command,
.erase = str7x_erase,
.protect = str7x_protect,
.write = str7x_write,
.probe = str7x_probe,
.auto_probe = str7x_probe,
.erase_check = default_flash_blank_check,
.protect_check = str7x_protect_check,
.info = str7x_info,
};

+ 13
- 13
src/flash/nor/str9x.c View File

@@ -668,7 +668,7 @@ COMMAND_HANDLER(str9x_handle_flash_config_command)
static const struct command_registration str9x_config_command_handlers[] = { static const struct command_registration str9x_config_command_handlers[] = {
{ {
.name = "flash_config", .name = "flash_config",
.handler = &str9x_handle_flash_config_command,
.handler = str9x_handle_flash_config_command,
.mode = COMMAND_EXEC, .mode = COMMAND_EXEC,
.help = "Configure str9x flash controller, prior to " .help = "Configure str9x flash controller, prior to "
"programming the flash.", "programming the flash.",
@@ -687,15 +687,15 @@ static const struct command_registration str9x_command_handlers[] = {
}; };


struct flash_driver str9x_flash = { struct flash_driver str9x_flash = {
.name = "str9x",
.commands = str9x_command_handlers,
.flash_bank_command = &str9x_flash_bank_command,
.erase = &str9x_erase,
.protect = &str9x_protect,
.write = &str9x_write,
.probe = &str9x_probe,
.auto_probe = &str9x_probe,
.erase_check = &default_flash_blank_check,
.protect_check = &str9x_protect_check,
.info = &str9x_info,
};
.name = "str9x",
.commands = str9x_command_handlers,
.flash_bank_command = str9x_flash_bank_command,
.erase = str9x_erase,
.protect = str9x_protect,
.write = str9x_write,
.probe = str9x_probe,
.auto_probe = str9x_probe,
.erase_check = default_flash_blank_check,
.protect_check = str9x_protect_check,
.info = str9x_info,
};

+ 12
- 12
src/flash/nor/str9xpec.c View File

@@ -1244,15 +1244,15 @@ static const struct command_registration str9xpec_command_handlers[] = {
}; };


struct flash_driver str9xpec_flash = { struct flash_driver str9xpec_flash = {
.name = "str9xpec",
.commands = str9xpec_command_handlers,
.flash_bank_command = &str9xpec_flash_bank_command,
.erase = &str9xpec_erase,
.protect = &str9xpec_protect,
.write = &str9xpec_write,
.probe = &str9xpec_probe,
.auto_probe = &str9xpec_probe,
.erase_check = &str9xpec_erase_check,
.protect_check = &str9xpec_protect_check,
.info = &str9xpec_info,
};
.name = "str9xpec",
.commands = str9xpec_command_handlers,
.flash_bank_command = str9xpec_flash_bank_command,
.erase = str9xpec_erase,
.protect = str9xpec_protect,
.write = str9xpec_write,
.probe = str9xpec_probe,
.auto_probe = str9xpec_probe,
.erase_check = str9xpec_erase_check,
.protect_check = str9xpec_protect_check,
.info = str9xpec_info,
};

+ 4
- 4
src/flash/nor/tcl.c View File

@@ -924,7 +924,7 @@ COMMAND_HANDLER(handle_flash_init_command)
static const struct command_registration flash_config_command_handlers[] = { static const struct command_registration flash_config_command_handlers[] = {
{ {
.name = "bank", .name = "bank",
.handler = &handle_flash_bank_command,
.handler = handle_flash_bank_command,
.mode = COMMAND_CONFIG, .mode = COMMAND_CONFIG,
.usage = "bank_id driver_name base_address size_bytes " .usage = "bank_id driver_name base_address size_bytes "
"chip_width_bytes bus_width_bytes target " "chip_width_bytes bus_width_bytes target "
@@ -935,19 +935,19 @@ static const struct command_registration flash_config_command_handlers[] = {
{ {
.name = "init", .name = "init",
.mode = COMMAND_CONFIG, .mode = COMMAND_CONFIG,
.handler = &handle_flash_init_command,
.handler = handle_flash_init_command,
.help = "Initialize flash devices.", .help = "Initialize flash devices.",
}, },
{ {
.name = "banks", .name = "banks",
.mode = COMMAND_ANY, .mode = COMMAND_ANY,
.handler = &handle_flash_banks_command,
.handler = handle_flash_banks_command,
.help = "Display table with information about flash banks.", .help = "Display table with information about flash banks.",
}, },
{ {
.name = "list", .name = "list",
.mode = COMMAND_ANY, .mode = COMMAND_ANY,
.jim_handler = &jim_flash_list,
.jim_handler = jim_flash_list,
.help = "Returns a list of details about the flash banks.", .help = "Returns a list of details about the flash banks.",
}, },
COMMAND_REGISTRATION_DONE COMMAND_REGISTRATION_DONE


+ 15
- 15
src/flash/nor/tms470.c View File

@@ -821,19 +821,19 @@ static int tms470_erase_sector(struct flash_bank *bank, int sector)
static const struct command_registration tms470_any_command_handlers[] = { static const struct command_registration tms470_any_command_handlers[] = {
{ {
.name = "flash_keyset", .name = "flash_keyset",
.handler = &tms470_handle_flash_keyset_command,
.handler = tms470_handle_flash_keyset_command,
.mode = COMMAND_ANY, .mode = COMMAND_ANY,
.help = "tms470 flash_keyset <key0> <key1> <key2> <key3>", .help = "tms470 flash_keyset <key0> <key1> <key2> <key3>",
}, },
{ {
.name = "osc_megahertz", .name = "osc_megahertz",
.handler = &tms470_handle_osc_megahertz_command,
.handler = tms470_handle_osc_megahertz_command,
.mode = COMMAND_ANY, .mode = COMMAND_ANY,
.help = "tms470 osc_megahertz <MHz>", .help = "tms470 osc_megahertz <MHz>",
}, },
{ {
.name = "plldis", .name = "plldis",
.handler = &tms470_handle_plldis_command,
.handler = tms470_handle_plldis_command,
.mode = COMMAND_ANY, .mode = COMMAND_ANY,
.help = "tms470 plldis <0/1>", .help = "tms470 plldis <0/1>",
}, },
@@ -1258,15 +1258,15 @@ FLASH_BANK_COMMAND_HANDLER(tms470_flash_bank_command)
} }


struct flash_driver tms470_flash = { struct flash_driver tms470_flash = {
.name = "tms470",
.commands = tms470_command_handlers,
.flash_bank_command = &tms470_flash_bank_command,
.erase = &tms470_erase,
.protect = &tms470_protect,
.write = &tms470_write,
.probe = &tms470_probe,
.auto_probe = &tms470_auto_probe,
.erase_check = &tms470_erase_check,
.protect_check = &tms470_protect_check,
.info = &tms470_info,
};
.name = "tms470",
.commands = tms470_command_handlers,
.flash_bank_command = tms470_flash_bank_command,
.erase = tms470_erase,
.protect = tms470_protect,
.write = tms470_write,
.probe = tms470_probe,
.auto_probe = tms470_auto_probe,
.erase_check = tms470_erase_check,
.protect_check = tms470_protect_check,
.info = tms470_info,
};

Loading…
Cancel
Save