summaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@no-log.org>2013-06-23 19:39:03 +0200
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2014-01-26 21:06:07 +0100
commit0bf998e34f0ceb30893d15154fc5324dbfab514c (patch)
tree4a21e8be0e4f82f2763e4ad48335ca3b4c42e36c /src/mainboard/lenovo
parent63e35f207c1dd80d9293b42a761e548d282a5260 (diff)
lenovo/t60: Add CMOS defaults.
The code for handling the invalid CMOS space in mainboard.c is now useless and so it was removed. Change-Id: I86ec6a7f73e32948adff9087d4af5372a49a46a5 Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Reviewed-on: http://review.coreboot.org/3520 Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/mainboard/lenovo')
-rw-r--r--src/mainboard/lenovo/t60/Kconfig1
-rw-r--r--src/mainboard/lenovo/t60/cmos.default21
-rw-r--r--src/mainboard/lenovo/t60/mainboard.c17
3 files changed, 22 insertions, 17 deletions
diff --git a/src/mainboard/lenovo/t60/Kconfig b/src/mainboard/lenovo/t60/Kconfig
index 303f55a3ef..6a743d5115 100644
--- a/src/mainboard/lenovo/t60/Kconfig
+++ b/src/mainboard/lenovo/t60/Kconfig
@@ -23,6 +23,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select HAVE_ACPI_RESUME
select EARLY_CBMEM_INIT
select H8_DOCK_EARLY_INIT
+ select HAVE_CMOS_DEFAULT
config MAINBOARD_DIR
string
default lenovo/t60
diff --git a/src/mainboard/lenovo/t60/cmos.default b/src/mainboard/lenovo/t60/cmos.default
new file mode 100644
index 0000000000..6adf85d7ed
--- /dev/null
+++ b/src/mainboard/lenovo/t60/cmos.default
@@ -0,0 +1,21 @@
+boot_option=Fallback
+last_boot=Fallback
+baud_rate=115200
+debug_level=Spew
+hyper_threading=Enable
+nmi=Enable
+boot_devices=''
+boot_default=0x41
+cmos_defaults_loaded=Yes
+lpt=Enable
+touchpad=Enable
+volume=0x3
+first_battery=Primary
+bluetooth=Enable
+wlan=Enable
+wwan=Enable
+trackpoint=Enable
+fn_ctrl_swap=Disable
+sticky_fn=Disable
+power_management_beeps=Enable
+low_battery_beep=Enable
diff --git a/src/mainboard/lenovo/t60/mainboard.c b/src/mainboard/lenovo/t60/mainboard.c
index 52f5dcf1e2..bfdbef60c4 100644
--- a/src/mainboard/lenovo/t60/mainboard.c
+++ b/src/mainboard/lenovo/t60/mainboard.c
@@ -50,7 +50,6 @@ static void mainboard_enable(device_t dev)
{
struct southbridge_intel_i82801gx_config *config;
device_t dev0, idedev;
- u8 defaults_loaded = 0;
/* If we're resuming from suspend, blink suspend LED */
dev0 = dev_find_slot(0, PCI_DEVFN(0,0));
@@ -77,22 +76,6 @@ static void mainboard_enable(device_t dev)
/* set dock status led */
ec_write(0x0c, 0x08);
ec_write(0x0c, inb(0x164c) & 8 ? 0x89 : 0x09);
-
- if (get_option(&defaults_loaded, "cmos_defaults_loaded") != CB_SUCCESS) {
- 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 = {