Add the infrastructure that allows the QAIC driver to be built.

Change-Id: I5b609b2e91b6a99939bdac35849813263ad874af
Signed-off-by: Jeffrey Hugo <[email protected]>
---
 drivers/gpu/drm/Kconfig       |  2 ++
 drivers/gpu/drm/Makefile      |  1 +
 drivers/gpu/drm/qaic/Kconfig  | 33 +++++++++++++++++++++++++++++++++
 drivers/gpu/drm/qaic/Makefile | 17 +++++++++++++++++
 4 files changed, 53 insertions(+)
 create mode 100644 drivers/gpu/drm/qaic/Kconfig
 create mode 100644 drivers/gpu/drm/qaic/Makefile

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index b1f22e4..b614940 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -390,6 +390,8 @@ source "drivers/gpu/drm/gud/Kconfig"
 
 source "drivers/gpu/drm/sprd/Kconfig"
 
+source "drivers/gpu/drm/qaic/Kconfig"
+
 config DRM_HYPERV
        tristate "DRM Support for Hyper-V synthetic video device"
        depends on DRM && PCI && MMU && HYPERV
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 301a44d..28b0f1b 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -135,3 +135,4 @@ obj-y                       += xlnx/
 obj-y                  += gud/
 obj-$(CONFIG_DRM_HYPERV) += hyperv/
 obj-$(CONFIG_DRM_SPRD) += sprd/
+obj-$(CONFIG_DRM_QAIC) += qaic/
diff --git a/drivers/gpu/drm/qaic/Kconfig b/drivers/gpu/drm/qaic/Kconfig
new file mode 100644
index 0000000..eca2bcb
--- /dev/null
+++ b/drivers/gpu/drm/qaic/Kconfig
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Qualcomm Cloud AI accelerators driver
+#
+
+config DRM_QAIC
+       tristate "Qualcomm Cloud AI accelerators"
+       depends on PCI && HAS_IOMEM
+       depends on MHI_BUS
+       depends on DRM
+       depends on MMU
+       select CRC32
+       help
+         Enables driver for Qualcomm's Cloud AI accelerator PCIe cards that are
+         designed to accelerate Deep Learning inference workloads.
+
+         The driver manages the PCIe devices and provides an IOCTL interface
+         for users to submit workloads to the devices.
+
+         If unsure, say N.
+
+         To compile this driver as a module, choose M here: the
+         module will be called qaic.
+
+config QAIC_HWMON
+       bool "Qualcomm Cloud AI accelerator telemetry"
+       depends on DRM_QAIC
+       depends on HWMON
+       help
+         Enables telemetry via the HWMON interface for Qualcomm's Cloud AI
+         accelerator PCIe cards.
+
+         If unsure, say N.
diff --git a/drivers/gpu/drm/qaic/Makefile b/drivers/gpu/drm/qaic/Makefile
new file mode 100644
index 0000000..4a5daff
--- /dev/null
+++ b/drivers/gpu/drm/qaic/Makefile
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Makefile for Qualcomm Cloud AI accelerators driver
+#
+
+obj-$(CONFIG_DRM_QAIC) := qaic.o
+
+qaic-y := \
+       qaic_drv.o \
+       mhi_controller.o \
+       qaic_control.o \
+       qaic_data.o \
+       qaic_debugfs.o \
+       qaic_telemetry.o \
+       qaic_ras.o \
+       qaic_ssr.o \
+       qaic_sysfs.o
-- 
2.7.4

Reply via email to