summaryrefslogtreecommitdiffstats
path: root/src/include/option.h
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-01-28 10:02:53 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-03-04 15:23:10 +0100
commit919923def3d76a95665c60e7ff3dd033c2d65d84 (patch)
tree7267a6def7f00f5f4f0add194468facf655b8c33 /src/include/option.h
parent3ee1668ab4fbf75b256ac8eef4273b1ea445c998 (diff)
downloadcoreboot-919923def3d76a95665c60e7ff3dd033c2d65d84.tar.gz
coreboot-919923def3d76a95665c60e7ff3dd033c2d65d84.tar.bz2
coreboot-919923def3d76a95665c60e7ff3dd033c2d65d84.zip
option: Add arch-agnostic get_option()
We should not have pc80/ includes in console/. Change-Id: Id7da732b1ea094be01f45f9dbb49142f4e78f095 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/5157 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/include/option.h')
-rw-r--r--src/include/option.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/include/option.h b/src/include/option.h
new file mode 100644
index 000000000000..83f3a8461446
--- /dev/null
+++ b/src/include/option.h
@@ -0,0 +1,19 @@
+#ifndef _OPTION_H_
+#define _OPTION_H_
+
+/*
+ * FIXME: get_option() needs to be abstracted better so that other non-volatile
+ * storage can be used. This will benefit machines without CMOS as well as those
+ * without a battery-backed CMOS (e.g. some laptops).
+ */
+#if CONFIG_USE_OPTION_TABLE
+#include <pc80/mc146818rtc.h>
+#else
+#include <types.h>
+static inline enum cb_err get_option(void *dest, const char *name)
+{
+ return CB_CMOS_OTABLE_DISABLED;
+}
+#endif
+
+#endif /* _OPTION_H_ */