summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-04-06 13:06:54 -0600
committerCommit Bot <commit-bot@chromium.org>2021-04-07 06:03:23 +0000
commit6394373680fe047b98a0d8c6ab91497feb40f34b (patch)
tree80ad271eb0632dc2f3790131781982afb2ab67f6
parent5e01141c94b2f5667b84c441920e7dedf6e91005 (diff)
downloadchrome-ec-6394373680fe047b98a0d8c6ab91497feb40f34b.tar.gz
zephyr: kconfig: move mkbp_event configs to separate file
Clean up the root Kconfig for Zephyr by moving sub configs to separate file (Kconfig.mkbp_event). BRANCH=none BUG=none TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Icc9b40075c57dd5384016f213c0ebb5c38a38185 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2808148 Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--zephyr/Kconfig47
-rw-r--r--zephyr/Kconfig.mkbp_event49
2 files changed, 50 insertions, 46 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig
index 5c9c275f1b..89a236b558 100644
--- a/zephyr/Kconfig
+++ b/zephyr/Kconfig
@@ -44,6 +44,7 @@ rsource "Kconfig.header"
rsource "Kconfig.keyboard"
rsource "Kconfig.led"
rsource "Kconfig.powerseq"
+rsource "Kconfig.mkbp_event"
rsource "Kconfig.motionsense"
rsource "Kconfig.stacks"
rsource "Kconfig.system"
@@ -323,52 +324,6 @@ config PLATFORM_EC_MKBP_EVENT
This requires a MKBP event delivery method(GPIO, HOST_EVENT, and etc)
-if PLATFORM_EC_MKBP_EVENT
-
-choice
- prompt "MKBP delivery method"
- default PLATFORM_EC_MKBP_USE_GPIO
- help
- Select MKBP delivery method
-
-config PLATFORM_EC_MKBP_USE_GPIO
- bool "Use GPIO"
- help
- Select to send MKBP events via GPIO. You should define GPIO_EC_INT_L
- in gpio_map.h as output from the EC. The GPIO is used to indicate an
- event is ready for serving by the AP.
-
-config PLATFORM_EC_MKBP_USE_HOST_EVENT
- bool "Use host event"
- help
- Select to send MKBP events via host event.
-
-config PLATFORM_EC_MKBP_USE_GPIO_AND_HOST_EVENT
- bool "Use GPIO and host event"
- help
- MKBP events are notified by using both a GPIO and a host event.
-
- You should use this if you are using a GPIO to notify the AP of an MKBP
- event, and you need an MKBP event to wake the AP in suspend and the
- AP cannot wake from the GPIO. Since you are using both a GPIO and
- a hostevent for the notification, make sure that the S0 hostevent mask
- does NOT include MKBP events. Otherwise, you will have multiple
- consumers for a single event. However, make sure to configure the
- host event *sleep* mask in coreboot to include MKBP events. In order to
- prevent all MKBP events from waking the AP, use
- CONFIG_MKBP_EVENT_WAKEUP_MASK to filter the events.
-
-config PLATFORM_EC_MKBP_USE_CUSTOM
- bool "Use custom method"
- help
- Select to send MKBP events using custom method. You need to define
- mkbp_set_host_active_via_custom() which is called when there's a MKBP event
- to be sent. for more about the function, refer to mkbp_event.h.
-
-endchoice
-
-endif # PLATFORM_EC_MKBP_EVENT
-
config PLATFORM_EC_PANIC
bool "Panic output"
default y
diff --git a/zephyr/Kconfig.mkbp_event b/zephyr/Kconfig.mkbp_event
new file mode 100644
index 0000000000..e24cf370d2
--- /dev/null
+++ b/zephyr/Kconfig.mkbp_event
@@ -0,0 +1,49 @@
+# Copyright 2021 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+if PLATFORM_EC_MKBP_EVENT
+
+choice
+ prompt "MKBP delivery method"
+ default PLATFORM_EC_MKBP_USE_GPIO
+ help
+ Select MKBP delivery method
+
+config PLATFORM_EC_MKBP_USE_GPIO
+ bool "Use GPIO"
+ help
+ Select to send MKBP events via GPIO. You should define GPIO_EC_INT_L
+ in gpio_map.h as output from the EC. The GPIO is used to indicate an
+ event is ready for serving by the AP.
+
+config PLATFORM_EC_MKBP_USE_HOST_EVENT
+ bool "Use host event"
+ help
+ Select to send MKBP events via host event.
+
+config PLATFORM_EC_MKBP_USE_GPIO_AND_HOST_EVENT
+ bool "Use GPIO and host event"
+ help
+ MKBP events are notified by using both a GPIO and a host event.
+
+ You should use this if you are using a GPIO to notify the AP of an MKBP
+ event, and you need an MKBP event to wake the AP in suspend and the
+ AP cannot wake from the GPIO. Since you are using both a GPIO and
+ a hostevent for the notification, make sure that the S0 hostevent mask
+ does NOT include MKBP events. Otherwise, you will have multiple
+ consumers for a single event. However, make sure to configure the
+ host event *sleep* mask in coreboot to include MKBP events. In order to
+ prevent all MKBP events from waking the AP, use
+ CONFIG_MKBP_EVENT_WAKEUP_MASK to filter the events.
+
+config PLATFORM_EC_MKBP_USE_CUSTOM
+ bool "Use custom method"
+ help
+ Select to send MKBP events using custom method. You need to define
+ mkbp_set_host_active_via_custom() which is called when there's a MKBP event
+ to be sent. for more about the function, refer to mkbp_event.h.
+
+endchoice
+
+endif # PLATFORM_EC_MKBP_EVENT