[PATCH v2 10/23] dmaengine: sdxi: Complete administrative context jump start

From: Nathan Lynch via B4 Relay

Date: Mon May 11 2026 - 15:22:13 EST


From: Nathan Lynch <nathan.lynch@xxxxxxx>

Now that the SDXI function has been placed in active state, the admin
context can finally be started by writing its doorbell. Introduce
a sdxi_cxt_push_doorbell() helper to simplify this for callers; it
will be used in all descriptor submission paths.

Co-developed-by: Wei Huang <wei.huang2@xxxxxxx>
Signed-off-by: Wei Huang <wei.huang2@xxxxxxx>
Signed-off-by: Nathan Lynch <nathan.lynch@xxxxxxx>
---
drivers/dma/sdxi/context.h | 6 ++++++
drivers/dma/sdxi/device.c | 15 ++++++++++++++-
2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/sdxi/context.h b/drivers/dma/sdxi/context.h
index 65b773446ba3..8dd6beb7a642 100644
--- a/drivers/dma/sdxi/context.h
+++ b/drivers/dma/sdxi/context.h
@@ -7,6 +7,7 @@
#define DMA_SDXI_CONTEXT_H

#include <linux/dma-mapping.h>
+#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/types.h>

#include "hw.h"
@@ -58,4 +59,9 @@ struct sdxi_cxt {

int sdxi_admin_cxt_init(struct sdxi_dev *sdxi);

+static inline void sdxi_cxt_push_doorbell(struct sdxi_cxt *cxt, u64 index)
+{
+ iowrite64(index, cxt->db);
+}
+
#endif /* DMA_SDXI_CONTEXT_H */
diff --git a/drivers/dma/sdxi/device.c b/drivers/dma/sdxi/device.c
index 204841afa5b7..8e621875b10b 100644
--- a/drivers/dma/sdxi/device.c
+++ b/drivers/dma/sdxi/device.c
@@ -262,7 +262,20 @@ static int sdxi_fn_activate(struct sdxi_dev *sdxi)
* SDXI 1.0 4.1.8.9: Set MMIO_CTL0.fn_gsr to GSRV_ACTIVE and
* wait for MMIO_STS0.fn_gsv to reach GSV_ACTIVE or GSV_ERROR.
*/
- return sdxi_dev_start(sdxi);
+ err = sdxi_dev_start(sdxi);
+ if (err)
+ return err;
+
+ /*
+ * SDXI 1.0 4.1.8.10.b: Start the admin context using method
+ * #3 ("Jump Start 1") from 4.3.4 Starting A Context and
+ * Context Signaling. We haven't queued any descriptors to the
+ * admin context at this point, so the appropriate value for
+ * the doorbell is 0.
+ */
+ sdxi_cxt_push_doorbell(sdxi->admin_cxt, 0);
+
+ return 0;
}

static int sdxi_device_init(struct sdxi_dev *sdxi)

--
2.54.0