[PATCH v4 6/8] accel/qaic: Add mhi_qaic_cntl

Jeffrey Hugo quic_jhugo at quicinc.com
Mon Mar 20 19:06:17 UTC 2023


On 3/20/2023 9:11 AM, Jeffrey Hugo wrote:
> From: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy at quicinc.com>
> 
> 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 at quicinc.com>
> Signed-off-by: Jeffrey Hugo <quic_jhugo at quicinc.com>
> Reviewed-by: Carl Vanderlip <quic_carlv at quicinc.com>
> Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka at linux.intel.com>
> ---
>   drivers/accel/qaic/mhi_qaic_ctrl.c | 571 +++++++++++++++++++++++++++++++++++++
>   drivers/accel/qaic/mhi_qaic_ctrl.h |  12 +
>   2 files changed, 583 insertions(+)
>   create mode 100644 drivers/accel/qaic/mhi_qaic_ctrl.c
>   create mode 100644 drivers/accel/qaic/mhi_qaic_ctrl.h
> 
> diff --git a/drivers/accel/qaic/mhi_qaic_ctrl.c b/drivers/accel/qaic/mhi_qaic_ctrl.c
> new file mode 100644
> index 0000000..a46ba1d
> --- /dev/null
> +++ b/drivers/accel/qaic/mhi_qaic_ctrl.c
> @@ -0,0 +1,571 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. */
> +
> +#include <linux/kernel.h>
> +#include <linux/mhi.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/module.h>
> +#include <linux/poll.h>
> +#include <linux/version.h>

Will remove this.

Jacek, I think I've got all of your comments addressed.  Do you see 
anything more?  I'm hopeful that we are just looking at one more spin.

-Jeff


More information about the dri-devel mailing list