X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fflash%2Fnor%2Focl.c;h=d2a6594189d1f2a864a30f10667eb570875ff1d7;hp=39e52c7295c81f23018b1db5c94aea00b8e19725;hb=b61e454869c988e7fafc1c16982ccfec04415b51;hpb=9f0cba528a163645c8ecace413731c23310f2c26 diff --git a/src/flash/nor/ocl.c b/src/flash/nor/ocl.c index 39e52c7295..d2a6594189 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., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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; @@ -321,11 +304,6 @@ static int ocl_probe(struct flash_bank *bank) return ERROR_OK; } -static int ocl_info(struct flash_bank *bank, char *buf, int buf_size) -{ - return ERROR_OK; -} - static int ocl_auto_probe(struct flash_bank *bank) { struct ocl_priv *ocl = bank->driver_priv; @@ -336,16 +314,14 @@ static int ocl_auto_probe(struct flash_bank *bank) return ERROR_OK; } -struct flash_driver ocl_flash = { +const 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, - .info = ocl_info, + .erase_check = default_flash_blank_check, .auto_probe = ocl_auto_probe, + .free_driver_priv = default_flash_free_driver_priv, };