X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Focl.c;h=acc464b0b3f706051db344d705447760d50ffc75;hb=a15c11d7d08566dc7005ed7304c5d3f2c425b981;hp=6b297b0d366c929c8d8dfa18d8a25d797f9e72e5;hpb=cbf4760e15d217c0a83e65f13bddfcbfad7d2fec;p=openocd.git diff --git a/src/flash/nor/ocl.c b/src/flash/nor/ocl.c index 6b297b0d36..acc464b0b3 100644 --- a/src/flash/nor/ocl.c +++ b/src/flash/nor/ocl.c @@ -13,9 +13,7 @@ * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * along with this program. If not, see . * ***************************************************************************/ #ifdef HAVE_CONFIG_H @@ -32,16 +30,6 @@ struct ocl_priv { unsigned int bufalign; }; -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 */ FLASH_BANK_COMMAND_HANDLER(ocl_flash_bank_command) { @@ -113,12 +101,7 @@ 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, uint8_t *buffer, uint32_t offset, uint32_t count) +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; int retval; @@ -335,11 +318,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, + .erase_check = default_flash_blank_check, .auto_probe = ocl_auto_probe, + .free_driver_priv = default_flash_free_driver_priv, };