mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-15 13:26:02 +01:00
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
45 lines
1.0 KiB
C
45 lines
1.0 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Test of linux/kconfig.h macros for SPL
|
|
*
|
|
* Copyright 2022 Google LLC
|
|
* Written by Simon Glass <sjg@chromium.org>
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <test/lib.h>
|
|
#include <test/test.h>
|
|
#include <test/ut.h>
|
|
|
|
static int lib_test_spl_is_enabled(struct unit_test_state *uts)
|
|
{
|
|
ulong val;
|
|
|
|
ut_asserteq(0, CONFIG_IS_ENABLED(CMDLINE));
|
|
ut_asserteq(1, CONFIG_IS_ENABLED(OF_PLATDATA));
|
|
ut_asserteq(0, CONFIG_IS_ENABLED(_UNDEFINED));
|
|
|
|
/*
|
|
* This fails if CONFIG_TEST_KCONFIG_ENABLE is not enabled, since the
|
|
* value is used.
|
|
*/
|
|
if (IS_ENABLED(CONFIG_TEST_KCONFIG)) {
|
|
val = IF_ENABLED_INT(CONFIG_TEST_KCONFIG_ENABLE,
|
|
CONFIG_TEST_KCONFIG_VALUE);
|
|
printf("value %ld\n", val);
|
|
}
|
|
|
|
/*
|
|
* This fails if CONFIG_TEST_KCONFIG_ENABLE is not enabled, since the
|
|
* value is used.
|
|
*/
|
|
if (CONFIG_IS_ENABLED(TEST_KCONFIG)) {
|
|
val = CONFIG_IF_ENABLED_INT(TEST_KCONFIG_ENABLE,
|
|
TEST_KCONFIG_VALUE);
|
|
printf("value2 %ld\n", val);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
LIB_TEST(lib_test_spl_is_enabled, 0);
|