OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | archnames |
struct | sam3_bank_private |
struct | sam3_cfg |
struct | sam3_chip |
struct | sam3_chip_details |
struct | sam3_reg_list |
Macros | |
#define | AT91C_EFC_FCMD_CFB (0xC) /* (EFC) Clear Fuse Bit */ |
#define | AT91C_EFC_FCMD_CLB (0x9) /* (EFC) Clear Lock Bit */ |
#define | AT91C_EFC_FCMD_EA (0x5) /* (EFC) Erase All */ |
#define | AT91C_EFC_FCMD_EWP (0x3) /* (EFC) Erase Page and Write Page */ |
#define | AT91C_EFC_FCMD_EWPL (0x4) /* (EFC) Erase Page and Write Page then Lock */ |
#define | AT91C_EFC_FCMD_GETD (0x0) /* (EFC) Get Flash Descriptor */ |
#define | AT91C_EFC_FCMD_GFB (0xD) /* (EFC) Get Fuse Bit */ |
#define | AT91C_EFC_FCMD_GLB (0xA) /* (EFC) Get Lock Bit */ |
#define | AT91C_EFC_FCMD_SFB (0xB) /* (EFC) Set Fuse Bit */ |
#define | AT91C_EFC_FCMD_SLB (0x8) /* (EFC) Set Lock Bit */ |
#define | AT91C_EFC_FCMD_SPUI (0xF) /* (EFC) Stop Read Unique ID */ |
#define | AT91C_EFC_FCMD_STUI (0xE) /* (EFC) Start Read Unique ID */ |
#define | AT91C_EFC_FCMD_WP (0x1) /* (EFC) Write Page */ |
#define | AT91C_EFC_FCMD_WPL (0x2) /* (EFC) Write Page and Lock */ |
#define | FLASH_BANK0_BASE_AX 0x00080000 |
#define | FLASH_BANK0_BASE_SD FLASH_BANK_BASE_S |
#define | FLASH_BANK0_BASE_U 0x00080000 |
#define | FLASH_BANK1_BASE_256K_AX 0x000A0000 |
#define | FLASH_BANK1_BASE_512K_AX 0x000C0000 |
#define | FLASH_BANK1_BASE_512K_SD (FLASH_BANK0_BASE_SD+(512*1024/2)) |
#define | FLASH_BANK1_BASE_U 0x00100000 |
#define | FLASH_BANK_BASE_N 0x00400000 |
#define | FLASH_BANK_BASE_S 0x00400000 |
#define | nvpsize2 nvpsize /* these two tables are identical */ |
#define | OFFSET_EFC_FCR 4 |
#define | OFFSET_EFC_FMR 0 |
#define | OFFSET_EFC_FRR 12 |
#define | OFFSET_EFC_FSR 8 |
#define | REG_NAME_WIDTH (12) |
#define | SAM3_CHIPID_CIDR (0x400E0740) |
#define | SAM3_CHIPID_CIDR2 (0x400E0940) /*SAM3X and SAM3A cidr at this address*/ |
#define | SAM3_CHIPID_EXID (0x400E0744) |
#define | SAM3_CHIPID_EXID2 (0x400E0944) /*SAM3X and SAM3A cidr at this address*/ |
#define | SAM3_CKGR_MCFR (SAM3_PMC_BASE + 0x0024) |
#define | SAM3_CKGR_MOR (SAM3_PMC_BASE + 0x0020) |
#define | SAM3_CKGR_PLLAR (SAM3_PMC_BASE + 0x0028) |
#define | SAM3_CKGR_UCKR (SAM3_PMC_BASE + 0x001c) |
#define | SAM3_ENTRY(NAME, FUNC) |
#define | SAM3_MAX_FLASH_BANKS 2 |
#define | SAM3_N_NVM_BITS 3 |
#define | SAM3_PMC_BASE (0x400E0400) |
#define | SAM3_PMC_FSMR (SAM3_PMC_BASE + 0x0070) |
#define | SAM3_PMC_FSPR (SAM3_PMC_BASE + 0x0074) |
#define | SAM3_PMC_IMR (SAM3_PMC_BASE + 0x006c) |
#define | SAM3_PMC_MCKR (SAM3_PMC_BASE + 0x0030) |
#define | SAM3_PMC_PCK0 (SAM3_PMC_BASE + 0x0040) |
#define | SAM3_PMC_PCK1 (SAM3_PMC_BASE + 0x0044) |
#define | SAM3_PMC_PCK2 (SAM3_PMC_BASE + 0x0048) |
#define | SAM3_PMC_PCSR (SAM3_PMC_BASE + 0x0018) |
#define | SAM3_PMC_SCSR (SAM3_PMC_BASE + 0x0008) |
#define | SAM3_PMC_SR (SAM3_PMC_BASE + 0x0068) |
Functions | |
static int | _sam3_probe (struct flash_bank *bank, int noise) |
static float | _tomhz (uint32_t freq_hz) |
static const char * | _yes_or_no (uint32_t v) |
COMMAND_HANDLER (sam3_handle_gpnvm_command) | |
COMMAND_HANDLER (sam3_handle_info_command) | |
COMMAND_HANDLER (sam3_handle_slowclk_command) | |
static int | efc_get_result (struct sam3_bank_private *private, uint32_t *v) |
Get the result of the last executed command. More... | |
static int | efc_get_status (struct sam3_bank_private *private, uint32_t *v) |
Get the current status of the EEFC and the value of some status bits (LOCKE, PROGE). More... | |
static int | efc_perform_command (struct sam3_bank_private *private, unsigned int command, unsigned int argument, uint32_t *status) |
Performs the given command and wait until its completion (or an error). More... | |
static int | efc_start_command (struct sam3_bank_private *private, unsigned int command, unsigned int argument) |
FLASH_BANK_COMMAND_HANDLER (sam3_flash_bank_command) | |
static int | flashd_clr_gpnvm (struct sam3_bank_private *private, unsigned int gpnvm) |
Clears the selected GPNVM bit. More... | |
static int | flashd_erase_entire_bank (struct sam3_bank_private *private) |
Erases the entire flash. More... | |
static int | flashd_get_gpnvm (struct sam3_bank_private *private, unsigned int gpnvm, unsigned int *puthere) |
Gets current GPNVM state. More... | |
static int | flashd_get_lock_bits (struct sam3_bank_private *private, uint32_t *v) |
Returns a bit field (at most 64) of locked regions within a page. More... | |
static int | flashd_lock (struct sam3_bank_private *private, unsigned int start_sector, unsigned int end_sector) |
Locks regions. More... | |
static int | flashd_read_uid (struct sam3_bank_private *private) |
Read the unique ID. More... | |
static int | flashd_set_gpnvm (struct sam3_bank_private *private, unsigned int gpnvm) |
Sets the selected GPNVM bit. More... | |
static int | flashd_unlock (struct sam3_bank_private *private, unsigned int start_sector, unsigned int end_sector) |
Unlocks all the regions in the given address range. More... | |
static struct sam3_chip * | get_current_sam3 (struct command_invocation *cmd) |
static struct sam3_bank_private * | get_sam3_bank_private (struct flash_bank *bank) |
static int | sam3_auto_probe (struct flash_bank *bank) |
static int | sam3_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static void | sam3_explain_chipid_cidr (struct sam3_chip *chip) |
static void | sam3_explain_ckgr_mcfr (struct sam3_chip *chip) |
static void | sam3_explain_ckgr_mor (struct sam3_chip *chip) |
static void | sam3_explain_ckgr_plla (struct sam3_chip *chip) |
static void | sam3_explain_mckr (struct sam3_chip *chip) |
static void | sam3_free_driver_priv (struct flash_bank *bank) |
Remove all chips from the internal list without distinguishing which one is owned by this bank. More... | |
static int | sam3_get_details (struct sam3_bank_private *private) |
static int | sam3_get_info (struct sam3_chip *chip) |
static const struct sam3_reg_list * | sam3_get_reg (struct sam3_chip *chip, uint32_t *goes_here) |
Given a pointer to where it goes in the structure, determine the register name, address from the all registers table. More... | |
static uint32_t * | sam3_get_reg_ptr (struct sam3_cfg *cfg, const struct sam3_reg_list *list) |
static int | sam3_page_read (struct sam3_bank_private *private, unsigned int pagenum, uint8_t *buf) |
static int | sam3_page_write (struct sam3_bank_private *private, unsigned int pagenum, const uint8_t *buf) |
static int | sam3_probe (struct flash_bank *bank) |
static int | sam3_protect (struct flash_bank *bank, int set, unsigned int first, unsigned int last) |
static int | sam3_protect_check (struct flash_bank *bank) |
static int | sam3_read_all_regs (struct sam3_chip *chip) |
static int | sam3_read_this_reg (struct sam3_chip *chip, uint32_t *goes_here) |
static uint32_t | sam3_reg_fieldname (struct sam3_chip *chip, const char *regname, uint32_t value, unsigned int shift, unsigned int width) |
static int | sam3_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
Variables | |
static const char *const | _rc_freq [] |
static const char | _unknown [] = "unknown" |
static struct sam3_chip * | all_sam3_chips |
static const struct sam3_chip_details | all_sam3_details [] |
static const struct archnames | archnames [] |
static const struct command_registration | at91sam3_command_handlers [] |
static const struct command_registration | at91sam3_exec_command_handlers [] |
const struct flash_driver | at91sam3_flash |
static const char *const | eproc_names [] |
static const char *const | nvpsize [] |
static const char *const | nvptype [] |
static const struct sam3_reg_list | sam3_all_regs [] |
static const char *const | sramsize [] |
#define AT91C_EFC_FCMD_CFB (0xC) /* (EFC) Clear Fuse Bit */ |
Definition at line 60 of file at91sam3.c.
#define AT91C_EFC_FCMD_CLB (0x9) /* (EFC) Clear Lock Bit */ |
Definition at line 57 of file at91sam3.c.
#define AT91C_EFC_FCMD_EA (0x5) /* (EFC) Erase All */ |
Definition at line 51 of file at91sam3.c.
#define AT91C_EFC_FCMD_EWP (0x3) /* (EFC) Erase Page and Write Page */ |
Definition at line 49 of file at91sam3.c.
#define AT91C_EFC_FCMD_EWPL (0x4) /* (EFC) Erase Page and Write Page then Lock */ |
Definition at line 50 of file at91sam3.c.
#define AT91C_EFC_FCMD_GETD (0x0) /* (EFC) Get Flash Descriptor */ |
Definition at line 46 of file at91sam3.c.
#define AT91C_EFC_FCMD_GFB (0xD) /* (EFC) Get Fuse Bit */ |
Definition at line 61 of file at91sam3.c.
#define AT91C_EFC_FCMD_GLB (0xA) /* (EFC) Get Lock Bit */ |
Definition at line 58 of file at91sam3.c.
#define AT91C_EFC_FCMD_SFB (0xB) /* (EFC) Set Fuse Bit */ |
Definition at line 59 of file at91sam3.c.
#define AT91C_EFC_FCMD_SLB (0x8) /* (EFC) Set Lock Bit */ |
Definition at line 56 of file at91sam3.c.
#define AT91C_EFC_FCMD_SPUI (0xF) /* (EFC) Stop Read Unique ID */ |
Definition at line 63 of file at91sam3.c.
#define AT91C_EFC_FCMD_STUI (0xE) /* (EFC) Start Read Unique ID */ |
Definition at line 62 of file at91sam3.c.
#define AT91C_EFC_FCMD_WP (0x1) /* (EFC) Write Page */ |
Definition at line 47 of file at91sam3.c.
#define AT91C_EFC_FCMD_WPL (0x2) /* (EFC) Write Page and Lock */ |
Definition at line 48 of file at91sam3.c.
#define FLASH_BANK0_BASE_AX 0x00080000 |
Definition at line 41 of file at91sam3.c.
#define FLASH_BANK0_BASE_SD FLASH_BANK_BASE_S |
Definition at line 33 of file at91sam3.c.
#define FLASH_BANK0_BASE_U 0x00080000 |
Definition at line 26 of file at91sam3.c.
#define FLASH_BANK1_BASE_256K_AX 0x000A0000 |
Definition at line 43 of file at91sam3.c.
#define FLASH_BANK1_BASE_512K_AX 0x000C0000 |
Definition at line 44 of file at91sam3.c.
#define FLASH_BANK1_BASE_512K_SD (FLASH_BANK0_BASE_SD+(512*1024/2)) |
Definition at line 34 of file at91sam3.c.
#define FLASH_BANK1_BASE_U 0x00100000 |
Definition at line 27 of file at91sam3.c.
#define FLASH_BANK_BASE_N 0x00400000 |
Definition at line 38 of file at91sam3.c.
#define FLASH_BANK_BASE_S 0x00400000 |
Definition at line 30 of file at91sam3.c.
#define nvpsize2 nvpsize /* these two tables are identical */ |
Definition at line 2454 of file at91sam3.c.
#define OFFSET_EFC_FCR 4 |
Definition at line 66 of file at91sam3.c.
#define OFFSET_EFC_FMR 0 |
Definition at line 65 of file at91sam3.c.
#define OFFSET_EFC_FRR 12 |
Definition at line 68 of file at91sam3.c.
#define OFFSET_EFC_FSR 8 |
Definition at line 67 of file at91sam3.c.
#define REG_NAME_WIDTH (12) |
Definition at line 23 of file at91sam3.c.
#define SAM3_CHIPID_CIDR (0x400E0740) |
Definition at line 94 of file at91sam3.c.
#define SAM3_CHIPID_CIDR2 (0x400E0940) /*SAM3X and SAM3A cidr at this address*/ |
Definition at line 96 of file at91sam3.c.
#define SAM3_CHIPID_EXID (0x400E0744) |
Definition at line 98 of file at91sam3.c.
#define SAM3_CHIPID_EXID2 (0x400E0944) /*SAM3X and SAM3A cidr at this address*/ |
Definition at line 100 of file at91sam3.c.
#define SAM3_CKGR_MCFR (SAM3_PMC_BASE + 0x0024) |
Definition at line 113 of file at91sam3.c.
#define SAM3_CKGR_MOR (SAM3_PMC_BASE + 0x0020) |
Definition at line 111 of file at91sam3.c.
#define SAM3_CKGR_PLLAR (SAM3_PMC_BASE + 0x0028) |
Definition at line 115 of file at91sam3.c.
#define SAM3_CKGR_UCKR (SAM3_PMC_BASE + 0x001c) |
Definition at line 109 of file at91sam3.c.
#define SAM3_ENTRY | ( | NAME, | |
FUNC | |||
) |
Definition at line 2796 of file at91sam3.c.
#define SAM3_MAX_FLASH_BANKS 2 |
Definition at line 185 of file at91sam3.c.
#define SAM3_N_NVM_BITS 3 |
Definition at line 180 of file at91sam3.c.
#define SAM3_PMC_BASE (0x400E0400) |
Definition at line 104 of file at91sam3.c.
#define SAM3_PMC_FSMR (SAM3_PMC_BASE + 0x0070) |
Definition at line 129 of file at91sam3.c.
#define SAM3_PMC_FSPR (SAM3_PMC_BASE + 0x0074) |
Definition at line 131 of file at91sam3.c.
#define SAM3_PMC_IMR (SAM3_PMC_BASE + 0x006c) |
Definition at line 127 of file at91sam3.c.
#define SAM3_PMC_MCKR (SAM3_PMC_BASE + 0x0030) |
Definition at line 117 of file at91sam3.c.
#define SAM3_PMC_PCK0 (SAM3_PMC_BASE + 0x0040) |
Definition at line 119 of file at91sam3.c.
#define SAM3_PMC_PCK1 (SAM3_PMC_BASE + 0x0044) |
Definition at line 121 of file at91sam3.c.
#define SAM3_PMC_PCK2 (SAM3_PMC_BASE + 0x0048) |
Definition at line 123 of file at91sam3.c.
#define SAM3_PMC_PCSR (SAM3_PMC_BASE + 0x0018) |
Definition at line 107 of file at91sam3.c.
#define SAM3_PMC_SCSR (SAM3_PMC_BASE + 0x0008) |
Definition at line 105 of file at91sam3.c.
#define SAM3_PMC_SR (SAM3_PMC_BASE + 0x0068) |
Definition at line 125 of file at91sam3.c.
|
static |
Definition at line 3128 of file at91sam3.c.
References bank, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, flashd_read_uid(), get_sam3_bank_private(), LOG_DEBUG, LOG_ERROR, sam3_get_details(), sam3_get_info(), SAM3_MAX_FLASH_BANKS, sam3_protect_check(), sam3_read_all_regs(), and TARGET_HALTED.
Referenced by sam3_auto_probe(), and sam3_probe().
|
static |
Definition at line 70 of file at91sam3.c.
Referenced by sam3_explain_ckgr_mcfr(), sam3_explain_ckgr_plla(), sam3_explain_mckr(), and sam3_get_info().
|
static |
Definition at line 2545 of file at91sam3.c.
Referenced by sam3_explain_chipid_cidr(), sam3_explain_ckgr_mcfr(), and sam3_explain_ckgr_mor().
COMMAND_HANDLER | ( | sam3_handle_gpnvm_command | ) |
Definition at line 3550 of file at91sam3.c.
References at91sam3_flash, sam3_bank_private::bank, sam3_chip_details::bank, CMD, CMD_ARGC, CMD_ARGV, COMMAND_PARSE_NUMBER, command_print(), sam3_chip::details, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, flashd_clr_gpnvm(), flashd_get_gpnvm(), flashd_set_gpnvm(), get_current_sam3(), LOG_ERROR, sam3_chip_details::n_gpnvms, flash_driver::name, sam3_bank_private::probed, sam3_auto_probe(), target::state, sam3_chip::target, and TARGET_HALTED.
COMMAND_HANDLER | ( | sam3_handle_info_command | ) |
Definition at line 3493 of file at91sam3.c.
References at91sam3_flash, sam3_bank_private::bank, sam3_chip_details::bank, CMD, command_print(), sam3_chip::details, ERROR_FAIL, ERROR_OK, get_current_sam3(), LOG_DEBUG, flash_driver::name, sam3_bank_private::present, sam3_bank_private::probed, sam3_auto_probe(), sam3_get_info(), and SAM3_MAX_FLASH_BANKS.
COMMAND_HANDLER | ( | sam3_handle_slowclk_command | ) |
Definition at line 3635 of file at91sam3.c.
|
static |
Get the result of the last executed command.
private | - info about the bank |
v | - result goes here |
Definition at line 2018 of file at91sam3.c.
References LOG_DEBUG, OFFSET_EFC_FRR, and target_read_u32().
Referenced by flashd_get_gpnvm(), and flashd_get_lock_bits().
|
static |
Get the current status of the EEFC and the value of some status bits (LOCKE, PROGE).
private | - info about the bank |
v | - result goes here |
Definition at line 1998 of file at91sam3.c.
References LOG_DEBUG, OFFSET_EFC_FSR, and target_read_u32().
Referenced by efc_perform_command(), and efc_start_command().
|
static |
Performs the given command and wait until its completion (or an error).
private | - info about the bank |
command | - Command to perform. |
argument | - Optional command argument. |
status | - put command status bits here |
Definition at line 2126 of file at91sam3.c.
References efc_get_status(), efc_start_command(), ERROR_FAIL, ERROR_OK, LOG_ERROR, status, and timeval_ms().
Referenced by flashd_clr_gpnvm(), flashd_erase_entire_bank(), flashd_get_gpnvm(), flashd_get_lock_bits(), flashd_lock(), flashd_read_uid(), flashd_set_gpnvm(), flashd_unlock(), and sam3_page_write().
|
static |
Definition at line 2031 of file at91sam3.c.
References AT91C_EFC_FCMD_CFB, AT91C_EFC_FCMD_CLB, AT91C_EFC_FCMD_EA, AT91C_EFC_FCMD_EWP, AT91C_EFC_FCMD_EWPL, AT91C_EFC_FCMD_GETD, AT91C_EFC_FCMD_GFB, AT91C_EFC_FCMD_GLB, AT91C_EFC_FCMD_SFB, AT91C_EFC_FCMD_SLB, AT91C_EFC_FCMD_SPUI, AT91C_EFC_FCMD_STUI, AT91C_EFC_FCMD_WP, AT91C_EFC_FCMD_WPL, efc_get_status(), ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, OFFSET_EFC_FCR, and target_write_u32().
Referenced by efc_perform_command(), and flashd_read_uid().
FLASH_BANK_COMMAND_HANDLER | ( | sam3_flash_bank_command | ) |
Definition at line 2983 of file at91sam3.c.
References all_sam3_chips, sam3_bank_private::bank, sam3_chip_details::bank, bank, sam3_chip::cfg, sam3_bank_private::chip, sam3_chip::details, ERROR_FAIL, ERROR_OK, FLASH_BANK0_BASE_AX, FLASH_BANK0_BASE_U, FLASH_BANK1_BASE_256K_AX, FLASH_BANK1_BASE_512K_AX, FLASH_BANK1_BASE_U, FLASH_BANK_BASE_N, FLASH_BANK_BASE_S, LOG_ERROR, sam3_chip::next, sam3_chip::probed, sam3_cfg::slow_freq, and sam3_chip::target.
|
static |
Clears the selected GPNVM bit.
private | info about the bank |
gpnvm | GPNVM index. |
Definition at line 2264 of file at91sam3.c.
References AT91C_EFC_FCMD_CFB, efc_perform_command(), ERROR_FAIL, ERROR_OK, flashd_get_gpnvm(), sam3_chip_details::gpnvm, LOG_DEBUG, LOG_ERROR, and NULL.
Referenced by COMMAND_HANDLER().
|
static |
Erases the entire flash.
private | - the info about the bank. |
Definition at line 2210 of file at91sam3.c.
References AT91C_EFC_FCMD_EA, efc_perform_command(), LOG_DEBUG, and NULL.
Referenced by sam3_erase().
|
static |
Gets current GPNVM state.
private | - info about the bank. |
gpnvm | - GPNVM bit index. |
puthere | - result stored here. |
Definition at line 2223 of file at91sam3.c.
References AT91C_EFC_FCMD_GFB, efc_get_result(), efc_perform_command(), ERROR_FAIL, ERROR_OK, sam3_chip_details::gpnvm, LOG_DEBUG, LOG_ERROR, and NULL.
Referenced by COMMAND_HANDLER(), flashd_clr_gpnvm(), and flashd_set_gpnvm().
|
static |
Returns a bit field (at most 64) of locked regions within a page.
private | info about the bank |
v | where to store locked bits |
Definition at line 2330 of file at91sam3.c.
References AT91C_EFC_FCMD_GLB, efc_get_result(), efc_perform_command(), ERROR_OK, LOG_DEBUG, and NULL.
Referenced by sam3_protect_check().
|
static |
Locks regions.
private | - info about the bank |
start_sector | - first sector to lock |
end_sector | - last sector (inclusive) to lock |
Definition at line 2378 of file at91sam3.c.
References AT91C_EFC_FCMD_SLB, efc_perform_command(), ERROR_OK, and status.
Referenced by sam3_protect().
|
static |
Read the unique ID.
private | - info about the bank The unique ID is stored in the 'private' structure. |
Definition at line 2170 of file at91sam3.c.
References AT91C_EFC_FCMD_SPUI, AT91C_EFC_FCMD_STUI, efc_perform_command(), efc_start_command(), LOG_DEBUG, NULL, and target_read_u32().
Referenced by _sam3_probe().
|
static |
Sets the selected GPNVM bit.
private | info about the bank |
gpnvm | GPNVM index. |
Definition at line 2296 of file at91sam3.c.
References AT91C_EFC_FCMD_SFB, efc_perform_command(), ERROR_FAIL, ERROR_OK, flashd_get_gpnvm(), sam3_chip_details::gpnvm, LOG_ERROR, and NULL.
Referenced by COMMAND_HANDLER().
|
static |
Unlocks all the regions in the given address range.
private | info about the bank |
start_sector | first sector to unlock |
end_sector | last (inclusive) to unlock |
Definition at line 2348 of file at91sam3.c.
References AT91C_EFC_FCMD_CLB, efc_perform_command(), ERROR_OK, and status.
Referenced by sam3_protect().
|
static |
Definition at line 208 of file at91sam3.c.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 2823 of file at91sam3.c.
References bank.
Referenced by _sam3_probe(), sam3_erase(), sam3_protect(), sam3_protect_check(), and sam3_write().
|
static |
Definition at line 3205 of file at91sam3.c.
References _sam3_probe(), and bank.
Referenced by COMMAND_HANDLER(), and sam3_erase().
|
static |
Definition at line 3210 of file at91sam3.c.
References bank, ERROR_FLASH_BANK_NOT_PROBED, ERROR_OK, ERROR_TARGET_NOT_HALTED, flashd_erase_entire_bank(), get_sam3_bank_private(), LOG_DEBUG, LOG_ERROR, LOG_INFO, sam3_auto_probe(), and TARGET_HALTED.
|
static |
Definition at line 2601 of file at91sam3.c.
References _unknown, _yes_or_no(), sam3_chip::cfg, sam3_cfg::CHIPID_CIDR, eproc_names, LOG_USER, LOG_USER_N, archnames::name, nvpsize, nvpsize2, nvptype, sam3_reg_fieldname(), and sramsize.
Referenced by sam3_get_details().
|
static |
Definition at line 2640 of file at91sam3.c.
References _tomhz(), _yes_or_no(), sam3_chip::cfg, sam3_cfg::CKGR_MCFR, LOG_USER, sam3_cfg::mainosc_freq, sam3_reg_fieldname(), and sam3_cfg::slow_freq.
|
static |
Definition at line 2557 of file at91sam3.c.
References _rc_freq, _yes_or_no(), sam3_chip::cfg, sam3_cfg::CKGR_MOR, LOG_USER, sam3_cfg::rc_freq, sam3_reg_fieldname(), and sam3_cfg::slow_freq.
|
static |
Definition at line 2658 of file at91sam3.c.
References _tomhz(), sam3_chip::cfg, sam3_cfg::CKGR_PLLAR, LOG_USER, LOG_USER_N, sam3_cfg::mainosc_freq, sam3_cfg::plla_freq, and sam3_reg_fieldname().
|
static |
Definition at line 2678 of file at91sam3.c.
References _tomhz(), sam3_chip::cfg, sam3_cfg::CKGR_UCKR, sam3_cfg::cpu_freq, sam3_cfg::fclk_freq, LOG_USER, sam3_cfg::mainosc_freq, sam3_cfg::mclk_freq, NULL, sam3_cfg::plla_freq, sam3_cfg::PMC_MCKR, sam3_reg_fieldname(), and sam3_cfg::slow_freq.
|
static |
Remove all chips from the internal list without distinguishing which one is owned by this bank.
This simplification works only for one shot deallocation like current flash_free_all_banks()
Definition at line 3058 of file at91sam3.c.
References all_sam3_chips, sam3_chip::next, and NULL.
|
static |
Definition at line 3069 of file at91sam3.c.
References all_sam3_details, sam3_bank_private::bank, sam3_chip_details::bank, sam3_bank_private::chip, sam3_chip_details::chipid_cidr, sam3_chip::details, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, LOG_INFO, sam3_chip_details::name, sam3_explain_chipid_cidr(), and SAM3_MAX_FLASH_BANKS.
Referenced by _sam3_probe().
|
static |
Definition at line 2915 of file at91sam3.c.
References _tomhz(), sam3_chip::cfg, sam3_cfg::cpu_freq, ERROR_OK, LOG_DEBUG, LOG_USER, sam3_cfg::mainosc_freq, sam3_cfg::mclk_freq, reg::name, sam3_cfg::plla_freq, sam3_cfg::rc_freq, REG_NAME_WIDTH, sam3_all_regs, sam3_get_reg_ptr(), and sam3_cfg::unique_id.
Referenced by _sam3_probe(), and COMMAND_HANDLER().
|
static |
Given a pointer to where it goes in the structure, determine the register name, address from the all registers table.
Definition at line 2832 of file at91sam3.c.
References sam3_chip::cfg, LOG_ERROR, reg::name, NULL, and sam3_all_regs.
Referenced by sam3_read_this_reg().
|
static |
Definition at line 2783 of file at91sam3.c.
Referenced by sam3_get_info(), and sam3_read_all_regs().
|
static |
Definition at line 3267 of file at91sam3.c.
References ERROR_OK, LOG_ERROR, and target_read_memory().
Referenced by sam3_write().
|
static |
Definition at line 3286 of file at91sam3.c.
References AT91C_EFC_FCMD_EWP, efc_perform_command(), ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, status, target_read_u32(), target_write_memory(), and target_write_u32().
Referenced by sam3_write().
|
static |
Definition at line 3200 of file at91sam3.c.
References _sam3_probe(), and bank.
|
static |
Definition at line 3241 of file at91sam3.c.
References bank, ERROR_FLASH_BANK_NOT_PROBED, ERROR_TARGET_NOT_HALTED, flashd_lock(), flashd_unlock(), get_sam3_bank_private(), LOG_DEBUG, LOG_ERROR, and TARGET_HALTED.
|
static |
Definition at line 2950 of file at91sam3.c.
References bank, ERROR_FAIL, ERROR_FLASH_BANK_NOT_PROBED, ERROR_OK, ERROR_TARGET_NOT_HALTED, flashd_get_lock_bits(), get_sam3_bank_private(), LOG_DEBUG, LOG_ERROR, and TARGET_HALTED.
Referenced by _sam3_probe().
|
static |
Definition at line 2876 of file at91sam3.c.
References sam3_chip::cfg, sam3_cfg::CHIPID_CIDR, sam3_cfg::CHIPID_CIDR2, sam3_cfg::CHIPID_EXID, sam3_cfg::CHIPID_EXID2, ERROR_OK, LOG_ERROR, reg::name, sam3_all_regs, sam3_get_reg_ptr(), and sam3_read_this_reg().
Referenced by _sam3_probe().
|
static |
Definition at line 2859 of file at91sam3.c.
References ERROR_FAIL, ERROR_OK, LOG_ERROR, reg::name, sam3_get_reg(), sam3_chip::target, and target_read_u32().
Referenced by sam3_read_all_regs().
|
static |
Definition at line 2405 of file at91sam3.c.
References LOG_USER_N, REG_NAME_WIDTH, and width.
Referenced by sam3_explain_chipid_cidr(), sam3_explain_ckgr_mcfr(), sam3_explain_ckgr_mor(), sam3_explain_ckgr_plla(), and sam3_explain_mckr().
|
static |
Definition at line 3344 of file at91sam3.c.
References bank, buffer, count, ERROR_FAIL, ERROR_FLASH_BANK_NOT_PROBED, ERROR_OK, ERROR_TARGET_NOT_HALTED, get_sam3_bank_private(), LOG_DEBUG, LOG_ERROR, NULL, offset, sam3_page_read(), sam3_page_write(), and TARGET_HALTED.
|
static |
Definition at line 2553 of file at91sam3.c.
Referenced by sam3_explain_ckgr_mor().
|
static |
Definition at line 2434 of file at91sam3.c.
Referenced by sam3_explain_chipid_cidr().
|
static |
Definition at line 206 of file at91sam3.c.
Referenced by FLASH_BANK_COMMAND_HANDLER(), and sam3_free_driver_priv().
|
static |
Definition at line 208 of file at91sam3.c.
Referenced by sam3_get_details().
|
static |
Definition at line 3635 of file at91sam3.c.
|
static |
Definition at line 3635 of file at91sam3.c.
const struct flash_driver at91sam3_flash |
Definition at line 3635 of file at91sam3.c.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 2435 of file at91sam3.c.
Referenced by sam3_explain_chipid_cidr().
|
static |
Definition at line 2455 of file at91sam3.c.
Referenced by sam3_explain_chipid_cidr().
|
static |
Definition at line 2534 of file at91sam3.c.
Referenced by sam3_explain_chipid_cidr().
|
static |
Definition at line 2783 of file at91sam3.c.
Referenced by sam3_get_info(), sam3_get_reg(), and sam3_read_all_regs().
|
static |
Definition at line 2474 of file at91sam3.c.
Referenced by sam3_explain_chipid_cidr().