coreboot-kgpe-d16/src/include/option.h
Angel Pons 17852e61df option: Turn CMOS option backend into choice
In order to add more option backends, transform the current CMOS option
backend into a Kconfig choice. Replace the `select` directives, as they
cannot be used with choice options.

Change-Id: Id3180e9991f0e763b4bae93a92d40668e7fc99bc
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54728
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2021-05-28 11:37:16 +00:00

29 lines
633 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _OPTION_H_
#define _OPTION_H_
#include <types.h>
void sanitize_cmos(void);
#if CONFIG(OPTION_BACKEND_NONE)
static inline unsigned int get_uint_option(const char *name, const unsigned int fallback)
{
return fallback;
}
static inline enum cb_err set_uint_option(const char *name, unsigned int value)
{
return CB_CMOS_OTABLE_DISABLED;
}
#else /* !OPTION_BACKEND_NONE */
unsigned int get_uint_option(const char *name, const unsigned int fallback);
enum cb_err set_uint_option(const char *name, unsigned int value);
#endif /* OPTION_BACKEND_NONE? */
#endif /* _OPTION_H_ */