+static int etb_read_reg_w_check(reg_t *, uint8_t *, uint8_t *);
+static int etb_set_reg_w_exec(reg_t *, uint8_t *);
+
+static int etb_read_reg(reg_t *reg)
+{
+ return etb_read_reg_w_check(reg, NULL, NULL);
+}
+
+static int etb_get_reg(reg_t *reg)
+{
+ int retval;
+
+ if ((retval = etb_read_reg(reg)) != ERROR_OK)
+ {
+ LOG_ERROR("BUG: error scheduling ETB register read");
+ return retval;
+ }
+
+ if ((retval = jtag_execute_queue()) != ERROR_OK)
+ {
+ LOG_ERROR("ETB register read failed");
+ return retval;
+ }
+
+ return ERROR_OK;
+}
+