summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@no-log.org>2013-05-29 21:25:05 +0200
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2013-06-04 21:35:56 +0200
commit873965e2a7771e9f040b4bbb18bdb9a27ee2bb09 (patch)
tree61dec0f60be59c6a753e7cf41e578abb63a1fcb8
parent649f18f834aaf13674e4c8e9a192b386165b39f1 (diff)
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>
-rw-r--r--src/mainboard/lenovo/x60/Kconfig1
-rw-r--r--src/mainboard/lenovo/x60/cmos.default14
-rw-r--r--src/mainboard/lenovo/x60/mainboard.c17
3 files changed, 15 insertions, 17 deletions
diff --git a/src/mainboard/lenovo/x60/Kconfig b/src/mainboard/lenovo/x60/Kconfig
index 1431a2f4b5..5ecad2f673 100644
--- a/src/mainboard/lenovo/x60/Kconfig
+++ b/src/mainboard/lenovo/x60/Kconfig
@@ -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
diff --git a/src/mainboard/lenovo/x60/cmos.default b/src/mainboard/lenovo/x60/cmos.default
new file mode 100644
index 0000000000..5d82ff0078
--- /dev/null
+++ b/src/mainboard/lenovo/x60/cmos.default
@@ -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
diff --git a/src/mainboard/lenovo/x60/mainboard.c b/src/mainboard/lenovo/x60/mainboard.c
index 3cb28ff63d..032d64160a 100644
--- a/src/mainboard/lenovo/x60/mainboard.c
+++ b/src/mainboard/lenovo/x60/mainboard.c
@@ -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 = {