flash_driver::erase field
Bank/sector erase routine (target-specific). When called, the flash driver should erase the specified sectors using whatever means are at its disposal.
Syntax
int (*erase)(struct flash_bank *bank, unsigned int first,
unsigned int last);