2020-04-02 23:48:27 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2020-01-05 07:05:45 +01:00
|
|
|
|
2014-01-28 09:02:53 +01:00
|
|
|
#ifndef _OPTION_H_
|
|
|
|
#define _OPTION_H_
|
|
|
|
|
|
|
|
#include <types.h>
|
2020-01-05 07:05:45 +01:00
|
|
|
|
2020-01-04 17:04:39 +01:00
|
|
|
void sanitize_cmos(void);
|
|
|
|
|
2020-01-05 07:05:45 +01:00
|
|
|
enum cb_err cmos_set_option(const char *name, void *val);
|
|
|
|
enum cb_err cmos_get_option(void *dest, const char *name);
|
|
|
|
|
|
|
|
static inline enum cb_err set_option(const char *name, void *val)
|
|
|
|
{
|
|
|
|
if (CONFIG(USE_OPTION_TABLE))
|
|
|
|
return cmos_set_option(name, val);
|
|
|
|
|
|
|
|
return CB_CMOS_OTABLE_DISABLED;
|
|
|
|
}
|
|
|
|
|
2014-01-28 09:02:53 +01:00
|
|
|
static inline enum cb_err get_option(void *dest, const char *name)
|
|
|
|
{
|
2020-01-05 07:05:45 +01:00
|
|
|
if (CONFIG(USE_OPTION_TABLE))
|
|
|
|
return cmos_get_option(dest, name);
|
|
|
|
|
2014-01-28 09:02:53 +01:00
|
|
|
return CB_CMOS_OTABLE_DISABLED;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* _OPTION_H_ */
|