[coreboot-gerrit] New patch to review for coreboot: bee25f7 superio/common/conf_mode: Provide common entry/exit used for ITE sio's

Edward O'Callaghan (eocallaghan@alterapraxis.com) gerrit at coreboot.org
Tue May 6 09:28:41 CEST 2014


Edward O'Callaghan (eocallaghan at alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5666

-gerrit

commit bee25f7fdc0a39c2e1b6b198eba3f18eab0dc1f5
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date:   Tue May 6 17:24:59 2014 +1000

    superio/common/conf_mode: Provide common entry/exit used for ITE sio's
    
    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 at alterapraxis.com>
---
 src/superio/common/conf_mode.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/src/superio/common/conf_mode.c b/src/superio/common/conf_mode.c
index 40583ff..083baca 100644
--- a/src/superio/common/conf_mode.c
+++ b/src/superio/common/conf_mode.c
@@ -39,6 +39,24 @@ 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)
+{
+	pnp_write_config(dev->path.pnp.port, 0x02, 0x02);
+}
+
+
 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 +66,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,
+};



More information about the coreboot-gerrit mailing list