return retval;
}
-static int cc3220sf_protect(struct flash_bank *bank, int set, int first,
- int last)
-{
- return ERROR_OK;
-}
-
static int cc3220sf_write(struct flash_bank *bank, const uint8_t *buffer,
uint32_t offset, uint32_t count)
{
uint32_t base;
uint32_t size;
int num_sectors;
- int bank_id;
- bank_id = bank->bank_number;
-
- if (0 == bank_id) {
- base = FLASH_BASE_ADDR;
- size = FLASH_NUM_SECTORS * FLASH_SECTOR_SIZE;
- num_sectors = FLASH_NUM_SECTORS;
- } else {
- /* Invalid bank number somehow */
- return ERROR_FAIL;
- }
+ base = FLASH_BASE_ADDR;
+ size = FLASH_NUM_SECTORS * FLASH_SECTOR_SIZE;
+ num_sectors = FLASH_NUM_SECTORS;
if (NULL != bank->sectors) {
free(bank->sectors);
int retval = ERROR_OK;
- if (0 != bank->bank_number) {
- /* Invalid bank number somehow */
- return ERROR_FAIL;
- }
-
if (!cc3220sf_bank->probed)
retval = cc3220sf_probe(bank);
return retval;
}
-static int cc3220sf_protect_check(struct flash_bank *bank)
-{
- return ERROR_OK;
-}
-
static int cc3220sf_info(struct flash_bank *bank, char *buf, int buf_size)
{
int printed;
.name = "cc3220sf",
.flash_bank_command = cc3220sf_flash_bank_command,
.erase = cc3220sf_erase,
- .protect = cc3220sf_protect,
.write = cc3220sf_write,
.read = default_flash_read,
.probe = cc3220sf_probe,
.auto_probe = cc3220sf_auto_probe,
.erase_check = default_flash_blank_check,
- .protect_check = cc3220sf_protect_check,
.info = cc3220sf_info,
.free_driver_priv = default_flash_free_driver_priv,
};