diff options
author | Dave Frodin <dave.frodin@se-eng.com> | 2015-01-19 13:33:12 -0700 |
---|---|---|
committer | Dave Frodin <dave.frodin@se-eng.com> | 2015-02-04 15:45:39 +0100 |
commit | 17ace82552875b08fe723c546e64254a2ddc623d (patch) | |
tree | 883b0715cdf206fe5b2585194ff45a69c715b04a /src/superio/fintek/f81216h/superio.c | |
parent | 1608f3651f79d4b9136b020b74d29632262e896a (diff) | |
download | coreboot-17ace82552875b08fe723c546e64254a2ddc623d.tar.gz coreboot-17ace82552875b08fe723c546e64254a2ddc623d.tar.bz2 coreboot-17ace82552875b08fe723c546e64254a2ddc623d.zip |
superio/fintek: Add required changes so F81216H can be used
The amd/lamar mainboard is the first mainboard to use the f81216h.
These changes are needed to fix up commit 27a63d77 so the
Super I/O builds and functions correctly.
- Wrong #include name
- Removed global variable in romstage
- Missing "case" in switch()
Change-Id: I1b2058a915b776664fba14e4341e8a410b50330f
Signed-off-by: Dave Frodin <dave.frodin@se-eng.com>
Reviewed-on: http://review.coreboot.org/8255
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'src/superio/fintek/f81216h/superio.c')
-rw-r--r-- | src/superio/fintek/f81216h/superio.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/superio/fintek/f81216h/superio.c b/src/superio/fintek/f81216h/superio.c index eed165a65501..89204c48f81f 100644 --- a/src/superio/fintek/f81216h/superio.c +++ b/src/superio/fintek/f81216h/superio.c @@ -45,20 +45,17 @@ static void pnp_enter_ext_func_mode(struct device *dev) * See page 17 of data sheet. */ switch(conf->conf_key_mode) { - case 0: - key = 0x77; /* (default) */ - break; - case 1: - key = 0xa0; - break; - case 2: - key = 0x87; - break; - case 3: - key = 0x67; + case MODE_6767: + case MODE_7777: + case MODE_8787: + case MODE_A0A0: + key = conf->conf_key_mode; break; default: - key = 0x77; /* safe to be hw default */ + printk(BIOS_WARNING, "Warning: Undefined F81216 unlock key assignment!\n"); + printk(BIOS_WARNING, "Setting conf_key_mode to default\n"); + key = MODE_7777; /* try the hw default */ + break; } outb(key, dev->path.pnp.port); |