summaryrefslogtreecommitdiffstats
path: root/device
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2008-10-01 06:47:51 +0000
committerRonald G. Minnich <rminnich@gmail.com>2008-10-01 06:47:51 +0000
commit76167990ed1090128aa2eb66e42001bd6c63d65b (patch)
tree3d19af4fd5c64910a77d84d769f84f3685812af3 /device
parenteea8cca0617c6227b72125b0adeba36759476368 (diff)
downloadcoreboot-76167990ed1090128aa2eb66e42001bd6c63d65b.tar.gz
coreboot-76167990ed1090128aa2eb66e42001bd6c63d65b.tar.bz2
coreboot-76167990ed1090128aa2eb66e42001bd6c63d65b.zip
Bringing the m57sli to life. This includes changes to mcp55 and
mainboard that we learned with the serengeti that we needed. New function in pnp that is for reading. new prototype in pnp.h. New constants for ite8716f. This board does not build yet; we are exercising code in k8 north that the serengeti did not enable. More tomorrow. Now that we have two boards under way we can hopefully see our way to getting more put in. The 690 is the obvious next choice. Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://coreboot.org/repository/coreboot-v3@876 f3766cd6-281f-0410-b1cd-43a5c92072e9
Diffstat (limited to 'device')
-rw-r--r--device/pnp_raw.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/device/pnp_raw.c b/device/pnp_raw.c
index 1fd7b3bea6b9..653c467ad45f 100644
--- a/device/pnp_raw.c
+++ b/device/pnp_raw.c
@@ -52,7 +52,8 @@ void rawpnp_exit_ext_func_mode(u16 port)
*
* This is done by writing the register number to the port, and the value
* into port + 1. This code assumes that the data port is always the
- * config-port plus 1, but luckily this is true for pretty much all devices.
+ * config-port plus 1, but luckily this is true for pretty much all devices, since
+ * it is part of the standard.
*
* @param port The device I/O port.
* @param reg The register number.
@@ -65,6 +66,24 @@ void rawpnp_write_config(u16 port, u8 reg, u8 value)
}
/**
+ * Read an 8-bit pnp config value
+ *
+ * This is done by writing the register number to the port, and the value
+ * into port + 1. This code assumes that the data port is always the
+ * config-port plus 1, but luckily this is true for pretty much all devices, since
+ * it is part of the standard.
+ *
+ * @param port The device I/O port.
+ * @param reg The register number.
+ * @returns value of the register
+ */
+u8 rawpnp_read_config(u16 port, u8 reg)
+{
+ outb(reg, port);
+ return inb(port + 1);
+}
+
+/**
* Select a logical device.
*
* PNP has up to 16 logical devices. They are selected by writing the