Pablo Stebler has uploaded this change for review.

View Change

ec/hp/kbc1126: Wait a longer time after the first command

This prevents the fans from running at full speed on ProBook 6360b and
EliteBook 8470p (because the fan control command was not sent).

Change-Id: I8623af75c062d6aa69d4412e0627d426c69019fb
---
M src/ec/hp/kbc1126/ec.c
1 file changed, 7 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/50/44750/1
diff --git a/src/ec/hp/kbc1126/ec.c b/src/ec/hp/kbc1126/ec.c
index 5c11fed..ff47649 100644
--- a/src/ec/hp/kbc1126/ec.c
+++ b/src/ec/hp/kbc1126/ec.c
@@ -115,6 +115,13 @@
struct ec_hp_kbc1126_config *conf = dev->chip_info;
ec_setports(conf->ec_data_port, conf->ec_cmd_port);
kbc1126_kbdled(conf->ec_ctrl_reg, 0);
+
+ /* The EC needs additional time to process the first command on a cold
+ boot. */
+ int timeout = 0x17ff;
+ while ((inb(conf->ec_cmd_port) & KBD_IBF) && --timeout)
+ udelay(10);
+
if (kbc1126_thermalinit(conf->ec_ctrl_reg, conf->ec_fan_ctrl_value) < 0)
printk(BIOS_DEBUG, "KBC1126: error when initializing fan control.\n");
}

To view, visit change 44750. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I8623af75c062d6aa69d4412e0627d426c69019fb
Gerrit-Change-Number: 44750
Gerrit-PatchSet: 1
Gerrit-Owner: Pablo Stebler <pablo@stebler.xyz>
Gerrit-MessageType: newchange