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>
This commit is contained in:
parent
3ee1668ab4
commit
919923def3
@ -25,18 +25,7 @@
|
|||||||
#ifndef __PRE_RAM__
|
#ifndef __PRE_RAM__
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <types.h>
|
#include <types.h>
|
||||||
|
#include <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
|
|
||||||
static inline enum cb_err get_option(void *dest, const char *name)
|
|
||||||
{ return CB_CMOS_OTABLE_DISABLED; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* initialize the console */
|
/* initialize the console */
|
||||||
void console_init(void)
|
void console_init(void)
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <uart.h>
|
#include <uart.h>
|
||||||
#if CONFIG_USE_OPTION_TABLE
|
#if CONFIG_USE_OPTION_TABLE
|
||||||
#include <pc80/mc146818rtc.h>
|
#include <option.h>
|
||||||
#include "option_table.h"
|
#include "option_table.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
19
src/include/option.h
Normal file
19
src/include/option.h
Normal file
@ -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_ */
|
Loading…
x
Reference in New Issue
Block a user