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/early_serial.c | |
parent | 1608f3651f79d4b9136b020b74d29632262e896a (diff) |
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/early_serial.c')
-rw-r--r-- | src/superio/fintek/f81216h/early_serial.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/superio/fintek/f81216h/early_serial.c b/src/superio/fintek/f81216h/early_serial.c index 6b667dfd74..bf999a3e27 100644 --- a/src/superio/fintek/f81216h/early_serial.c +++ b/src/superio/fintek/f81216h/early_serial.c @@ -21,12 +21,11 @@ #include <arch/io.h> #include <device/pnp.h> #include <stdint.h> -#include "fintek.h" +#include "f81216h.h" -static u8 f81216h_entry_key; #define FINTEK_EXIT_KEY 0xAA -static void pnp_enter_conf_state(pnp_devfn_t dev) +static void pnp_enter_conf_state(pnp_devfn_t dev, u8 f81216h_entry_key) { u16 port = dev >> 8; outb(f81216h_entry_key, port); @@ -40,26 +39,27 @@ static void pnp_exit_conf_state(pnp_devfn_t dev) } /* Bring up early serial debugging output before the RAM is initialized. */ -void f81216h_enable_serial(pnp_devfn_t dev, u16 iobase, enum mode_key k) +void f81216h_enable_serial(pnp_devfn_t dev, u16 iobase, mode_key k) { + u8 key; switch(k) { - MODE_6767: - f81216h_entry_key = 0x67; + case MODE_6767: + key = 0x67; break; - MODE_7777: - f81216h_entry_key = 0x77; + case MODE_7777: + key = 0x77; break; - MODE_8787: - f81216h_entry_key = 0x87; + case MODE_8787: + key = 0x87; break; - MODE_A0A0: - f81216h_entry_key = 0xa0; + case MODE_A0A0: + key = 0xA0; break; default: - f81216h_entry_key = 0x77; /* (safe to be hw default) */ + key = 0x77; /* try the hw default */ + break; } - - pnp_enter_conf_state(dev); + pnp_enter_conf_state(dev, key); pnp_set_logical_device(dev); pnp_set_enable(dev, 0); pnp_set_iobase(dev, PNP_IDX_IO0, iobase); |