#include "config.h"
#endif
+#include "imp.h"
#include "ocl.h"
-#include "flash.h"
-#include "embeddedice.h"
+#include <target/embeddedice.h>
struct ocl_priv
/* wait for response, fixed timeout of 1 s */
if ((retval = embeddedice_handshake(ocl->jtag_info, EICE_COMM_CTRL_WBIT, 1000) != ERROR_OK))
{
- if (retval == ERROR_TARGET_TIMEOUT)
- LOG_ERROR("loader not responding");
return retval;
}
/* wait for response, fixed timeout of 1 s */
if ((retval = embeddedice_handshake(ocl->jtag_info, EICE_COMM_CTRL_WBIT, 1000) != ERROR_OK))
{
- if (retval == ERROR_TARGET_TIMEOUT)
- LOG_ERROR("loader not responding");
free(dcc_buffer);
return retval;
}
/* wait for response, fixed timeout of 1 s */
if ((retval = embeddedice_handshake(ocl->jtag_info, EICE_COMM_CTRL_WBIT, 1000) != ERROR_OK))
{
- if (retval == ERROR_TARGET_TIMEOUT)
- LOG_ERROR("loader not responding");
return retval;
}
}
struct flash_driver ocl_flash = {
- .name = "ocl",
- .flash_bank_command = &ocl_flash_bank_command,
- .erase = &ocl_erase,
- .protect = &ocl_protect,
- .write = &ocl_write,
- .probe = &ocl_probe,
- .erase_check = &ocl_erase_check,
- .protect_check = &ocl_protect_check,
- .info = &ocl_info,
- .auto_probe = &ocl_auto_probe,
- };
+ .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,
+ .auto_probe = ocl_auto_probe,
+};