summaryrefslogtreecommitdiff
path: root/board/boundary
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2022-07-10 14:42:55 +0300
committerTom Rini <trini@konsulko.com>2022-11-21 17:23:00 +0300
commit2827c2f07d6a5c498262cee7fe78aacfbf44f174 (patch)
treef42641fdf3688dfbd6d518fb882beb9e6911e39b /board/boundary
parentbebb393b340295edb9ba50a996fc0510cd1b6ac0 (diff)
downloadu-boot-2827c2f07d6a5c498262cee7fe78aacfbf44f174.tar.xz
Fix usage of CONFIG_PREBOOT
Due to usage of PREBOOT in Kconfig, macro CONFIG_PREBOOT is always defined when CONFIG_USE_PREBOOT is enabled. In case CONFIG_PREBOOT is not explicitly enabled it is set to empty C string and therefore '#ifdef CONFIG_PREBOOT' guard does not work. Fix this issue by introducing a new Kconfig symbol PREBOOT_DEFINED which cause to define new C macro CONFIG_PREBOOT_DEFINED only when CONFIG_PREBOOT is really defined. Change usage of '#ifdef CONFIG_PREBOOT' by '#ifdef CONFIG_USE_PREBOOT' for code which checks if preboot code would be called and by '#ifdef CONFIG_PREBOOT_DEFINED' for defining preboot code. Signed-off-by: Pali Rohár <pali@kernel.org>
Diffstat (limited to 'board/boundary')
-rw-r--r--board/boundary/nitrogen6x/nitrogen6x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 83bb445d48..382c01ddf4 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -929,7 +929,7 @@ U_BOOT_CMD(
"Returns 0 (true) to shell if key is pressed."
);
-#ifdef CONFIG_PREBOOT
+#ifdef CONFIG_USE_PREBOOT
static char const kbd_magic_prefix[] = "key_magic";
static char const kbd_command_prefix[] = "key_cmd";
@@ -989,7 +989,7 @@ int misc_init_r(void)
gpio_request(IMX_GPIO_NR(2, 3), "search");
gpio_request(IMX_GPIO_NR(7, 13), "volup");
gpio_request(IMX_GPIO_NR(4, 5), "voldown");
-#ifdef CONFIG_PREBOOT
+#ifdef CONFIG_USE_PREBOOT
preboot_keys();
#endif