Go to the source code of this file.
◆ SWM050_CPU_ID
#define SWM050_CPU_ID 0xE000ED00 |
◆ SWM050_CPU_ID_VAL
#define SWM050_CPU_ID_VAL 0x410CC200 |
◆ SWM050_DELAY
◆ SWM050_FLASH_KEY
#define SWM050_FLASH_KEY 0xAAAAAAAA |
◆ SWM050_FLASH_PAGE_SIZE
#define SWM050_FLASH_PAGE_SIZE 0x200 |
◆ SWM050_FLASH_PAGES
#define SWM050_FLASH_PAGES 16 |
◆ SWM050_FLASH_REG1
#define SWM050_FLASH_REG1 0x1F000000 |
◆ SWM050_FLASH_REG2
#define SWM050_FLASH_REG2 0x1F000038 |
◆ SWM050_SYSCTL_CFG_0
#define SWM050_SYSCTL_CFG_0 0x400F0000 |
◆ SWM050_SYSCTL_DBLF
#define SWM050_SYSCTL_DBLF 0x400F0008 |
◆ COMMAND_HANDLER()
COMMAND_HANDLER |
( |
swm050_handle_mass_erase_command |
| ) |
|
◆ FLASH_BANK_COMMAND_HANDLER()
FLASH_BANK_COMMAND_HANDLER |
( |
swm050_flash_bank_command |
| ) |
|
◆ swm050_erase()
static int swm050_erase |
( |
struct flash_bank * |
bank, |
|
|
unsigned int |
first, |
|
|
unsigned int |
last |
|
) |
| |
|
static |
Definition at line 30 of file swm050.c.
References alive_sleep(), bank, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, target::state, SWM050_DELAY, SWM050_FLASH_KEY, SWM050_FLASH_PAGE_SIZE, SWM050_FLASH_REG1, TARGET_HALTED, and target_write_u32().
◆ swm050_mass_erase()
static int swm050_mass_erase |
( |
struct flash_bank * |
bank | ) |
|
|
static |
Definition at line 96 of file swm050.c.
References alive_sleep(), bank, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, target::state, SWM050_DELAY, SWM050_FLASH_KEY, SWM050_FLASH_REG1, SWM050_FLASH_REG2, TARGET_HALTED, and target_write_u32().
Referenced by COMMAND_HANDLER().
◆ swm050_probe()
static int swm050_probe |
( |
struct flash_bank * |
bank | ) |
|
|
static |
◆ swm050_write()
static int swm050_write |
( |
struct flash_bank * |
bank, |
|
|
const uint8_t * |
buffer, |
|
|
uint32_t |
offset, |
|
|
uint32_t |
count |
|
) |
| |
|
static |
Definition at line 63 of file swm050.c.
References bank, buffer, count, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, offset, target::state, SWM050_FLASH_REG1, TARGET_HALTED, target_write_memory(), and target_write_u32().
◆ swm050_command_handlers
Initial value:= {
{
.name = "swm050",
.help = "swm050 flash command group",
.usage = "",
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
static const struct command_registration swm050_exec_command_handlers[]
Definition at line 146 of file swm050.c.
◆ swm050_exec_command_handlers
Initial value:= {
{
.name = "mass_erase",
.handler = swm050_handle_mass_erase_command,
.usage = "bank_id",
.help = "Erase entire flash device.",
},
}
Definition at line 146 of file swm050.c.
◆ swm050_flash
Initial value:= {
.name = "swm050",
.flash_bank_command = swm050_flash_bank_command,
}
int default_flash_blank_check(struct flash_bank *bank)
Provides default erased-bank check handling.
int default_flash_read(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
Provides default read implementation for flash memory.
void default_flash_free_driver_priv(struct flash_bank *bank)
Deallocates bank->driver_priv.
static int swm050_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
static const struct command_registration swm050_command_handlers[]
static int swm050_probe(struct flash_bank *bank)
static int swm050_erase(struct flash_bank *bank, unsigned int first, unsigned int last)
Definition at line 146 of file swm050.c.