OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | tms470_flash_bank |
Functions | |
COMMAND_HANDLER (tms470_handle_flash_keyset_command) | |
COMMAND_HANDLER (tms470_handle_osc_megahertz_command) | |
COMMAND_HANDLER (tms470_handle_plldis_command) | |
FLASH_BANK_COMMAND_HANDLER (tms470_flash_bank_command) | |
static int | get_tms470_info (struct flash_bank *bank, struct command_invocation *cmd) |
static int | tms470_auto_probe (struct flash_bank *bank) |
static int | tms470_check_flash_unlocked (struct target *target) |
static int | tms470_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | tms470_erase_check (struct flash_bank *bank) |
static int | tms470_erase_sector (struct flash_bank *bank, int sector) |
static int | tms470_flash_initialize_internal_state_machine (struct flash_bank *bank) |
static int | tms470_flash_status (struct flash_bank *bank) |
static int | tms470_probe (struct flash_bank *bank) |
static int | tms470_protect (struct flash_bank *bank, int set, unsigned int first, unsigned int last) |
static int | tms470_protect_check (struct flash_bank *bank) |
static int | tms470_read_part_info (struct flash_bank *bank) |
static int | tms470_try_flash_keys (struct target *target, const uint32_t *key_set) |
static int | tms470_unlock_flash (struct flash_bank *bank) |
static int | tms470_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
Variables | |
static uint32_t | flash_keys [4] |
static const uint32_t | flash_keys_all_ones [] |
static const uint32_t | flash_keys_all_zeros [] |
static const uint32_t | flash_keys_mix1 [] |
static const uint32_t | flash_keys_mix2 [] |
static uint32_t | keys_set |
static int | osc_mhz = 12 |
static int | plldis |
static const struct command_registration | tms470_any_command_handlers [] |
static const struct command_registration | tms470_command_handlers [] |
const struct flash_driver | tms470_flash |
static const struct flash_sector | tms470r1a256_sectors [] |
static const struct flash_sector | tms470r1a288_bank0_sectors [] |
static const struct flash_sector | tms470r1a288_bank1_sectors [] |
static const struct flash_sector | tms470r1a384_bank0_sectors [] |
static const struct flash_sector | tms470r1a384_bank1_sectors [] |
static const struct flash_sector | tms470r1a384_bank2_sectors [] |
#define TMS470R1A256_NUM_SECTORS ARRAY_SIZE(tms470r1a256_sectors) |
#define TMS470R1A288_BANK0_NUM_SECTORS ARRAY_SIZE(tms470r1a288_bank0_sectors) |
#define TMS470R1A288_BANK1_NUM_SECTORS ARRAY_SIZE(tms470r1a288_bank1_sectors) |
#define TMS470R1A384_BANK0_NUM_SECTORS ARRAY_SIZE(tms470r1a384_bank0_sectors) |
#define TMS470R1A384_BANK1_NUM_SECTORS ARRAY_SIZE(tms470r1a384_bank1_sectors) |
#define TMS470R1A384_BANK2_NUM_SECTORS ARRAY_SIZE(tms470r1a384_bank2_sectors) |
COMMAND_HANDLER | ( | tms470_handle_flash_keyset_command | ) |
Definition at line 277 of file tms470.c.
References CMD, CMD_ARGC, CMD_ARGV, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, flash_keys, keys_set, LOG_ERROR, and start.
COMMAND_HANDLER | ( | tms470_handle_osc_megahertz_command | ) |
Definition at line 330 of file tms470.c.
References CMD, CMD_ARGC, CMD_ARGV, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, LOG_ERROR, and osc_mhz.
COMMAND_HANDLER | ( | tms470_handle_plldis_command | ) |
Definition at line 353 of file tms470.c.
References CMD, CMD_ARGC, CMD_ARGV, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, and plldis.
FLASH_BANK_COMMAND_HANDLER | ( | tms470_flash_bank_command | ) |
Definition at line 1133 of file tms470.c.
References bank, ERROR_FLASH_OPERATION_FAILED, and ERROR_OK.
|
static |
Definition at line 1107 of file tms470.c.
References bank, cmd, command_print_sameline(), tms470_flash_bank::device_ident_reg, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, tms470_flash_bank::part_name, tms470_check_flash_unlocked(), and tms470_read_part_info().
|
static |
Definition at line 977 of file tms470.c.
References bank, tms470_flash_bank::device_ident_reg, ERROR_OK, and tms470_probe().
|
static |
Definition at line 369 of file tms470.c.
References ERROR_FLASH_OPERATION_FAILED, ERROR_OK, LOG_INFO, and target_read_u32().
Referenced by get_tms470_info(), and tms470_try_flash_keys().
|
static |
Definition at line 788 of file tms470.c.
References bank, ERROR_FLASH_SECTOR_INVALID, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, LOG_INFO, tms470_flash_bank::ordinal, TARGET_HALTED, tms470_erase_sector(), tms470_read_part_info(), and tms470_unlock_flash().
|
static |
Definition at line 988 of file tms470.c.
References addr, bank, buffer, tms470_flash_bank::device_ident_reg, ERROR_FLASH_SECTOR_NOT_ERASED, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, LOG_INFO, tms470_flash_bank::ordinal, target::state, TARGET_HALTED, target_read_buffer(), target_read_u32(), target_write_u32(), and tms470_read_part_info().
|
static |
Definition at line 670 of file tms470.c.
Referenced by tms470_erase().
|
static |
Definition at line 488 of file tms470.c.
References bank, ERROR_OK, LOG_DEBUG, tms470_flash_bank::ordinal, osc_mhz, plldis, target_read_u32(), and target_write_u32().
Referenced by tms470_write().
|
static |
Definition at line 621 of file tms470.c.
References bank, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, LOG_DEBUG, LOG_WARNING, and target_read_u32().
|
static |
Definition at line 967 of file tms470.c.
References bank, ERROR_TARGET_NOT_HALTED, LOG_WARNING, TARGET_HALTED, and tms470_read_part_info().
Referenced by tms470_auto_probe().
|
static |
Definition at line 828 of file tms470.c.
References bank, ERROR_FLASH_SECTOR_INVALID, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, tms470_flash_bank::ordinal, target::state, TARGET_HALTED, target_read_u32(), target_write_u32(), and tms470_read_part_info().
|
static |
Definition at line 1063 of file tms470.c.
References bank, tms470_flash_bank::device_ident_reg, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_ERROR, tms470_flash_bank::ordinal, target::state, TARGET_HALTED, target_read_u32(), target_write_u32(), and tms470_read_part_info().
|
static |
Definition at line 109 of file tms470.c.
References bank, tms470_flash_bank::device_ident_reg, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, LOG_ERROR, LOG_INFO, LOG_WARNING, NULL, tms470_flash_bank::ordinal, tms470_flash_bank::part_name, tms470_flash_bank::part_number, tms470_flash_bank::rom_flash, tms470_flash_bank::silicon_version, TARGET_ADDR_FMT, target_read_u32(), target_write_u32(), tms470_flash_bank::technology_family, TMS470R1A256_NUM_SECTORS, tms470r1a256_sectors, TMS470R1A288_BANK0_NUM_SECTORS, tms470r1a288_bank0_sectors, TMS470R1A288_BANK1_NUM_SECTORS, tms470r1a288_bank1_sectors, TMS470R1A384_BANK0_NUM_SECTORS, tms470r1a384_bank0_sectors, TMS470R1A384_BANK1_NUM_SECTORS, tms470r1a384_bank1_sectors, TMS470R1A384_BANK2_NUM_SECTORS, and tms470r1a384_bank2_sectors.
Referenced by get_tms470_info(), tms470_erase(), tms470_erase_check(), tms470_probe(), tms470_protect(), tms470_protect_check(), and tms470_write().
|
static |
Definition at line 382 of file tms470.c.
References alive_sleep(), ERROR_FLASH_OPERATION_FAILED, ERROR_OK, LOG_INFO, target_read_u32(), target_write_u32(), and tms470_check_flash_unlocked().
Referenced by tms470_unlock_flash().
|
static |
Definition at line 454 of file tms470.c.
References bank, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, flash_keys, flash_keys_all_ones, flash_keys_all_zeros, flash_keys_mix1, flash_keys_mix2, keys_set, LOG_INFO, LOG_WARNING, and tms470_try_flash_keys().
Referenced by tms470_erase().
|
static |
Definition at line 876 of file tms470.c.
References addr, alive_sleep(), bank, buffer, count, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, LOG_INFO, offset, target::state, TARGET_ADDR_FMT, TARGET_HALTED, target_read_u32(), target_write_u16(), target_write_u32(), tms470_flash_initialize_internal_state_machine(), and tms470_read_part_info().
|
static |
Definition at line 275 of file tms470.c.
Referenced by COMMAND_HANDLER(), and tms470_unlock_flash().
|
static |
Definition at line 314 of file tms470.c.
Referenced by tms470_unlock_flash().
|
static |
Definition at line 317 of file tms470.c.
Referenced by tms470_unlock_flash().
|
static |
Definition at line 320 of file tms470.c.
Referenced by tms470_unlock_flash().
|
static |
Definition at line 323 of file tms470.c.
Referenced by tms470_unlock_flash().
|
static |
Definition at line 274 of file tms470.c.
Referenced by COMMAND_HANDLER(), and tms470_unlock_flash().
|
static |
Definition at line 328 of file tms470.c.
Referenced by COMMAND_HANDLER(), and tms470_flash_initialize_internal_state_machine().
|
static |
Definition at line 351 of file tms470.c.
Referenced by COMMAND_HANDLER(), and tms470_flash_initialize_internal_state_machine().
|
static |
|
static |
const struct flash_driver tms470_flash |
|
static |
Definition at line 1 of file tms470.c.
Referenced by tms470_read_part_info().
|
static |
Definition at line 1 of file tms470.c.
Referenced by tms470_read_part_info().
|
static |
Definition at line 1 of file tms470.c.
Referenced by tms470_read_part_info().
|
static |
Definition at line 1 of file tms470.c.
Referenced by tms470_read_part_info().
|
static |
Definition at line 1 of file tms470.c.
Referenced by tms470_read_part_info().
|
static |
Definition at line 1 of file tms470.c.
Referenced by tms470_read_part_info().