kconfig: intel_s1000: Add neural_net Kconfig
Added Kconfig files for Intel neural network accelerator
(GNA) driver
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
diff --git a/boards/xtensa/intel_s1000_crb/intel_s1000_crb_defconfig b/boards/xtensa/intel_s1000_crb/intel_s1000_crb_defconfig
index 2558828..6b556e1 100644
--- a/boards/xtensa/intel_s1000_crb/intel_s1000_crb_defconfig
+++ b/boards/xtensa/intel_s1000_crb/intel_s1000_crb_defconfig
@@ -54,3 +54,6 @@
CONFIG_AUDIO_TLV320DAC=y
CONFIG_AUDIO_DMIC=y
CONFIG_AUDIO_INTEL_DMIC=y
+
+CONFIG_NEURAL_NET_ACCEL=y
+CONFIG_INTEL_GNA=y
diff --git a/drivers/Kconfig b/drivers/Kconfig
index 7ac2f9e..69439ad 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -83,4 +83,6 @@
source "drivers/audio/Kconfig"
+source "drivers/neural_net/Kconfig"
+
endmenu
diff --git a/drivers/neural_net/Kconfig b/drivers/neural_net/Kconfig
new file mode 100644
index 0000000..781124d
--- /dev/null
+++ b/drivers/neural_net/Kconfig
@@ -0,0 +1,22 @@
+# Kconfig - Neural network accelerator driver configuration options
+#
+# Copyright (c) 2018 Intel Corporation
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+menuconfig NEURAL_NET_ACCEL
+ bool
+ prompt "Neural Network Accelerator Drivers"
+ help
+ Enable support for Neural Network Accelerators
+
+if NEURAL_NET_ACCEL
+
+module = NEURAL_NET
+module-str = neural_net
+source "subsys/logging/Kconfig.template.log_config"
+
+gsource "drivers/neural_net/Kconfig.*"
+
+endif # NEURAL_NET
diff --git a/drivers/neural_net/Kconfig.intel_gna b/drivers/neural_net/Kconfig.intel_gna
new file mode 100644
index 0000000..74973a1
--- /dev/null
+++ b/drivers/neural_net/Kconfig.intel_gna
@@ -0,0 +1,52 @@
+# Kconfig - Neural network accelerator driver configuration options
+#
+# Copyright (c) 2018 Intel Corporation
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+menuconfig INTEL_GNA
+ bool
+ prompt "Intel GNA Inferencing Engine"
+ help
+ Enable support for Intel's GMM and Neural Network Accelerator
+
+if INTEL_GNA
+
+config INTEL_GNA_NAME
+ string "GNA device name"
+ default "GNA0"
+ help
+ Name of the GNA device this device driver can use.
+
+config INTEL_GNA_INIT_PRIORITY
+ int "Init priority"
+ default 99
+ help
+ Device driver initialization priority.
+
+config INTEL_GNA_MAX_MODELS
+ int "Max number of neural network models supported by driver"
+ default 4
+ help
+ Max. number of unique neural network models required in the system
+
+config INTEL_GNA_MAX_PENDING_REQUESTS
+ int "Max number of pending inference requests"
+ default 4
+ help
+ Maximum number of pending inference requests in the driver
+
+config INTEL_GNA_POWER_MODE
+ int "GNA operation mode"
+ default 0
+ range 0 3
+ help
+ Sets GNA operation mode for power saving
+ Levels are:
+ 0 ALWAYS_ON, GNA is always on with very minimal power save
+ 1 CLOCK_GATED, GNA clock is gated when not active
+ 2 POWER_GATED, GNA clock and power are gated when not active
+ 3 ALWAYS_OFF, GNA is tuned off and never used in the system
+
+endif # INTEL_GNA