accel/qaic: Add mhi_qaic_cntl
authorPranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
Mon, 27 Mar 2023 15:54:55 +0000 (09:54 -0600)
committerJacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Thu, 6 Apr 2023 06:23:03 +0000 (08:23 +0200)
commit566fc96198b4bb07ca6806386956669881225271
treebe89ca2ff8c07e3088f431d4b690f3712208f2ef
parentff13be8303336ead5621712f2c55012d738878b5
accel/qaic: Add mhi_qaic_cntl

Some of the MHI channels for an AIC100 device need to be routed to
userspace so that userspace can communicate directly with QSM. The MHI
bus does not support this, and while the WWAN subsystem does (for the same
reasons), AIC100 is not a WWAN device. Also, MHI is not something that
other accelerators are expected to share, thus an accel subsystem function
that meets this usecase is unlikely.

Create a QAIC specific MHI userspace shim that exposes these channels.

Start with QAIC_SAHARA which is required to boot AIC100 and is consumed by
the kickstart application as documented in aic100.rst

Each AIC100 instance (currently, up to 16) in a system will create a
chardev for QAIC_SAHARA. This chardev will be found as
/dev/<mhi instance>_QAIC_SAHARA
For example - /dev/mhi0_QAIC_SAHARA

Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Acked-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1679932497-30277-7-git-send-email-quic_jhugo@quicinc.com
drivers/accel/qaic/mhi_qaic_ctrl.c [new file with mode: 0644]
drivers/accel/qaic/mhi_qaic_ctrl.h [new file with mode: 0644]