}
static void ls1_sap_memory_cmd(struct jtag_tap *tap, uint32_t address,
- int32_t size, int read)
+ int32_t size, bool rnw)
{
struct scan_field field;
uint8_t cmd[8];
field.out_value = cmd;
buf_set_u64(cmd, 0, 9, 0);
buf_set_u64(cmd, 9, 3, size);
- buf_set_u64(cmd, 12, 1, !!read);
+ buf_set_u64(cmd, 12, 1, rnw);
buf_set_u64(cmd, 13, 3, 0);
buf_set_u64(cmd, 16, 32, address);
buf_set_u64(cmd, 48, 16, 0);
ls1_sap_set_addr_high(target->tap, 0);
while (count--) {
- ls1_sap_memory_cmd(target->tap, address, size, 1);
+ ls1_sap_memory_cmd(target->tap, address, size, true);
ls1_sap_memory_read(target->tap, size, buffer);
address += size;
buffer += size;
ls1_sap_set_addr_high(target->tap, 0);
while (count--) {
- ls1_sap_memory_cmd(target->tap, address, size, 0);
+ ls1_sap_memory_cmd(target->tap, address, size, false);
ls1_sap_memory_write(target->tap, size, buffer);
address += size;
buffer += size;