diff options
author | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2014-05-06 17:24:59 +1000 |
---|---|---|
committer | Rudolf Marek <r.marek@assembler.cz> | 2014-05-07 21:36:48 +0200 |
commit | bf9f24385739d29dd5ccea82dec06e1cdd2c10fe (patch) | |
tree | adbae911ec08d0aff6db0dcb9ccd9b3d92a87eaa /src/superio/common | |
parent | d520840d4ca7d8fbd9c64946ee5f2d7ea44b8557 (diff) |
superio/common/conf_mode: Provide another common pnp entry/exit
ITE Super I/O's make use of this method to enter and exit in and out of
their PNP configuration. Provide functions for use in ram stage
component.
Change-Id: I2b546c2b17eefc89aaab4982192f5e9a15a16c2f
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/5666
Tested-by: build bot (Jenkins)
Reviewed-by: Rudolf Marek <r.marek@assembler.cz>
Diffstat (limited to 'src/superio/common')
-rw-r--r-- | src/superio/common/conf_mode.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/superio/common/conf_mode.c b/src/superio/common/conf_mode.c index 40583ffc49..f3e6277b22 100644 --- a/src/superio/common/conf_mode.c +++ b/src/superio/common/conf_mode.c @@ -39,6 +39,25 @@ void pnp_exit_conf_mode_aa(device_t dev) outb(0xaa, dev->path.pnp.port); } +void pnp_enter_conf_mode_870155aa(device_t dev) +{ + outb(0x87, dev->path.pnp.port); + outb(0x01, dev->path.pnp.port); + outb(0x55, dev->path.pnp.port); + + if (dev->path.pnp.port == 0x4e) + outb(0xaa, dev->path.pnp.port); + else + outb(0x55, dev->path.pnp.port); +} + +void pnp_exit_conf_mode_0202(device_t dev) +{ + outb(0x02, dev->path.pnp.port); + outb(0x02, dev->path.pnp.port + 1); +} + + const struct pnp_mode_ops pnp_conf_mode_55_aa = { .enter_conf_mode = pnp_enter_conf_mode_55, .exit_conf_mode = pnp_exit_conf_mode_aa, @@ -48,3 +67,8 @@ const struct pnp_mode_ops pnp_conf_mode_8787_aa = { .enter_conf_mode = pnp_enter_conf_mode_8787, .exit_conf_mode = pnp_exit_conf_mode_aa, }; + +const struct pnp_mode_ops pnp_conf_mode_870155_aa = { + .enter_conf_mode = pnp_enter_conf_mode_870155aa, + .exit_conf_mode = pnp_exit_conf_mode_0202, +}; |