summaryrefslogtreecommitdiff
path: root/src/superio
diff options
context:
space:
mode:
authorSiyuan Wang <wangsiyuanbuaa@gmail.com>2012-09-07 19:18:16 +0800
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2012-09-07 20:04:01 +0200
commitcf8bcfc9dd0dd4093ab9ce65be8bbdb242959f15 (patch)
tree9a62bd1f8caa11464407bbaae5fef1960161e8ff /src/superio
parent87b5aa9e671896f82f9c1e75edbbe363e0a6fe89 (diff)
downloadcoreboot-cf8bcfc9dd0dd4093ab9ce65be8bbdb242959f15.tar.xz
superio winbond w83627dhg: add a function which is used on tyan s8226
this function is used on serial output of tyan s8226 Change-Id: I5f7fa535b922b224e381886f1bea64623fa549ef Signed-off-by: Siyuan Wang <SiYuan.Wang@amd.com> Signed-off-by: Siyuan Wang <wangsiyuanbuaa@gmail.com> Reviewed-on: http://review.coreboot.org/1494 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'src/superio')
-rw-r--r--src/superio/winbond/w83627dhg/early_serial.c10
-rw-r--r--src/superio/winbond/w83627dhg/w83627dhg.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/superio/winbond/w83627dhg/early_serial.c b/src/superio/winbond/w83627dhg/early_serial.c
index e0be8dee75..39ce8bfac8 100644
--- a/src/superio/winbond/w83627dhg/early_serial.c
+++ b/src/superio/winbond/w83627dhg/early_serial.c
@@ -67,3 +67,13 @@ void w83627dhg_enable_i2c(device_t dev)
pnp_exit_ext_func_mode(dev);
}
+void w83627dhg_set_clksel_48(device_t dev)
+{
+ u8 reg8;
+
+ pnp_enter_ext_func_mode(dev);
+ reg8 = pnp_read_config(dev, 0x24);
+ reg8 |= (1 << 6); /* Set CLKSEL (clock input on pin 1) to 48MHz. */
+ pnp_write_config(dev, 0x24, reg8);
+ pnp_exit_ext_func_mode(dev);
+}
diff --git a/src/superio/winbond/w83627dhg/w83627dhg.h b/src/superio/winbond/w83627dhg/w83627dhg.h
index 158e60b144..3aa1b261d0 100644
--- a/src/superio/winbond/w83627dhg/w83627dhg.h
+++ b/src/superio/winbond/w83627dhg/w83627dhg.h
@@ -56,5 +56,6 @@ void pnp_enter_ext_func_mode(device_t dev);
void pnp_exit_ext_func_mode(device_t dev);
void w83627dhg_enable_serial(device_t dev, u16 iobase);
void w83627dhg_enable_i2c(device_t dev);
+void w83627dhg_set_clksel_48(device_t dev);
#endif