[coreboot-gerrit] Patch set updated for coreboot: f0267bf option: Add arch-agnostic get_option()

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Sat Feb 15 11:08:10 CET 2014


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5157

-gerrit

commit f0267bf4f5670910a31209e874bdcce09c43ff56
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Tue Jan 28 10:02:53 2014 +0200

    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 at gmail.com>
---
 src/console/console.c | 13 +------------
 src/console/util.c    |  2 +-
 src/include/option.h  | 19 +++++++++++++++++++
 3 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/src/console/console.c b/src/console/console.c
index 38ac3e7..081113c 100644
--- a/src/console/console.c
+++ b/src/console/console.c
@@ -25,18 +25,7 @@
 #ifndef __PRE_RAM__
 #include <string.h>
 #include <types.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
-static inline enum cb_err get_option(void *dest, const char *name)
-				{ return CB_CMOS_OTABLE_DISABLED; }
-#endif
+#include <option.h>
 
 /* initialize the console */
 void console_init(void)
diff --git a/src/console/util.c b/src/console/util.c
index 5305f44..405657d 100644
--- a/src/console/util.c
+++ b/src/console/util.c
@@ -17,8 +17,8 @@
 
 #include <console/console.h>
 #include <uart8250.h>
-#include <pc80/mc146818rtc.h>
 #if CONFIG_USE_OPTION_TABLE
+#include <option.h>
 #include "option_table.h"
 #endif
 
diff --git a/src/include/option.h b/src/include/option.h
new file mode 100644
index 0000000..83f3a84
--- /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_ */



More information about the coreboot-gerrit mailing list