rh_reg_write(RING_OPERATION1, op1_val);
}
+static void hci_dma_abort(struct hci_rh_data *rh)
+{
+ reinit_completion(&rh->op_done);
+ rh_reg_write(RING_CONTROL, rh_reg_read(RING_CONTROL) | RING_CTRL_ABORT);
+ wait_for_completion_timeout(&rh->op_done, HZ);
+}
+
static void hci_dma_unblock_enqueue(struct i3c_hci *hci)
{
if (hci->enqueue_blocked) {
hci->enqueue_blocked = true;
spin_unlock_irq(&hci->lock);
/* stop the ring */
- reinit_completion(&rh->op_done);
- rh_reg_write(RING_CONTROL, rh_reg_read(RING_CONTROL) | RING_CTRL_ABORT);
- wait_for_completion_timeout(&rh->op_done, HZ);
+ hci_dma_abort(rh);
spin_lock_irq(&hci->lock);
ring_status = rh_reg_read(RING_STATUS);
if (ring_status & RING_STATUS_RUNNING) {