From 0f5caa26cb0b25ae452a14aedc71f5c137850a4e Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Fri, 30 Nov 2012 19:16:50 -0800 Subject: Conditionally include mc146818rtc in console.c get_option() is used to get a config option (debug loglevel) from CMOS. However, not all machines have CMOS, so define a dummy inline function that will return an error code so the caller (console_init()) will use the default loglevel. Change-Id: I6adf371d79164178f40a83f7608289a6a7673357 Signed-off-by: David Hendricks Reviewed-on: http://review.coreboot.org/1962 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/console/console.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/console') diff --git a/src/console/console.c b/src/console/console.c index 8f60f04d4c..d5f25a5fee 100644 --- a/src/console/console.c +++ b/src/console/console.c @@ -24,7 +24,17 @@ #ifndef __PRE_RAM__ #include + +/* + * 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). + */ +#ifdef HAVE_CMOS_DEFAULT #include +#else +static inline int get_option(void *dest, const char *name) { return -1; } +#endif /* initialize the console */ void console_init(void) -- cgit v1.2.3