Lenovo X60: Add CMOS defaults.
After removing power and the CMOS Battery, putting it back and booting coreboot we have: # ./nvramtool -a boot_option = Fallback last_boot = Fallback baud_rate = 115200 debug_level = Spew hyper_threading = Enable nmi = Enable boot_devices = '' boot_default = 0x40 cmos_defaults_loaded = Yes lpt = Enable volume = 0xff tft_brightness = 0xbf first_battery = Primary bluetooth = Enable The code for handling the invalid CMOS space in mainboard.c is now useless and so it was removed. Change-Id: Ic57a14eeeea861aa034cb0884795b0152757bf5b Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Reviewed-on: http://review.coreboot.org/3335 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
This commit is contained in:
parent
649f18f834
commit
873965e2a7
|
@ -14,6 +14,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
|
|||
select EC_LENOVO_H8
|
||||
select DRIVERS_ICS_954309
|
||||
select HAVE_OPTION_TABLE
|
||||
select HAVE_CMOS_DEFAULT
|
||||
select HAVE_PIRQ_TABLE
|
||||
select HAVE_MP_TABLE
|
||||
select MMCONF_SUPPORT
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
boot_option=Fallback
|
||||
last_boot=Fallback
|
||||
baud_rate=115200
|
||||
debug_level=Spew
|
||||
hyper_threading=Enable
|
||||
nmi=Enable
|
||||
boot_devices=''
|
||||
boot_default=0x40
|
||||
cmos_defaults_loaded=Yes
|
||||
lpt=Enable
|
||||
volume=0x3
|
||||
tft_brightness=0xff
|
||||
first_battery=Primary
|
||||
bluetooth=Enable
|
|
@ -54,7 +54,6 @@ int get_cst_entries(acpi_cstate_t **entries)
|
|||
static void mainboard_enable(device_t dev)
|
||||
{
|
||||
device_t dev0, idedev, sdhci_dev;
|
||||
u8 defaults_loaded = 0;
|
||||
|
||||
ec_clr_bit(0x03, 2);
|
||||
|
||||
|
@ -92,22 +91,6 @@ static void mainboard_enable(device_t dev)
|
|||
pci_write_config8(sdhci_dev, 0xf9, 0x00);
|
||||
}
|
||||
}
|
||||
|
||||
if (get_option(&defaults_loaded, "cmos_defaults_loaded") < 0) {
|
||||
printk(BIOS_INFO, "failed to get cmos_defaults_loaded");
|
||||
defaults_loaded = 0;
|
||||
}
|
||||
|
||||
if (!defaults_loaded) {
|
||||
printk(BIOS_INFO, "Restoring CMOS defaults\n");
|
||||
set_option("tft_brightness", &(u8[]){ 0xff });
|
||||
set_option("volume", &(u8[]){ 0x03 });
|
||||
/* set baudrate to 115200 baud */
|
||||
set_option("baud_rate", &(u8[]){ 0x00 });
|
||||
/* set default debug_level (DEFAULT_CONSOLE_LOGLEVEL starts at 1) */
|
||||
set_option("debug_level", &(u8[]) { CONFIG_DEFAULT_CONSOLE_LOGLEVEL+1 });
|
||||
set_option("cmos_defaults_loaded", &(u8[]){ 0x01 });
|
||||
}
|
||||
}
|
||||
|
||||
struct chip_operations mainboard_ops = {
|
||||
|
|
Loading…
Reference in New Issue