flash/nor: consolidate flash protect/protect_check
[fw/openocd] / src / flash / nor / ocl.c
index 895c4af219374f54f0636c201dd5290c88dc562c..f8913c09053fe0859855679cdb43781442e5fcfc 100644 (file)
@@ -35,11 +35,6 @@ static int ocl_erase_check(struct flash_bank *bank)
        return ERROR_OK;
 }
 
-static int ocl_protect_check(struct flash_bank *bank)
-{
-       return ERROR_OK;
-}
-
 /* flash_bank ocl 0 0 0 0 <target#> */
 FLASH_BANK_COMMAND_HANDLER(ocl_flash_bank_command)
 {
@@ -111,11 +106,6 @@ static int ocl_erase(struct flash_bank *bank, int first, int last)
        return ERROR_OK;
 }
 
-static int ocl_protect(struct flash_bank *bank, int set, int first, int last)
-{
-       return ERROR_OK;
-}
-
 static int ocl_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
 {
        struct ocl_priv *ocl = bank->driver_priv;
@@ -333,12 +323,10 @@ struct flash_driver ocl_flash = {
        .name = "ocl",
        .flash_bank_command = ocl_flash_bank_command,
        .erase = ocl_erase,
-       .protect = ocl_protect,
        .write = ocl_write,
        .read = default_flash_read,
        .probe = ocl_probe,
        .erase_check = ocl_erase_check,
-       .protect_check = ocl_protect_check,
        .auto_probe = ocl_auto_probe,
        .free_driver_priv = default_flash_free_driver_priv,
 };