diff options
author | Sven Schnelle <svens@stackframe.org> | 2011-04-27 19:47:28 +0000 |
---|---|---|
committer | Sven Schnelle <svens@stackframe.org> | 2011-04-27 19:47:28 +0000 |
commit | cf7dffeabc82c50f807a62ba8ef6ed45ff53cbc8 (patch) | |
tree | af1172d8201770382ba7499daddf8a052db8cd12 /src/ec/lenovo/h8/h8.c | |
parent | 4885daadb33bea37ef3970696d3cf0d05e9852a3 (diff) | |
download | coreboot-cf7dffeabc82c50f807a62ba8ef6ed45ff53cbc8.tar.xz |
Lenovo H8: add h8_ultrabay_device_present()
returns 1 if a CDROM/HDD device is plugging in the
ultrabay. Return 0 if there's a battery or superio
extensions plugged in.
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6545 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/ec/lenovo/h8/h8.c')
-rw-r--r-- | src/ec/lenovo/h8/h8.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c index 6a595257f1..e2e5f998be 100644 --- a/src/ec/lenovo/h8/h8.c +++ b/src/ec/lenovo/h8/h8.c @@ -87,6 +87,11 @@ void h8_disable_event(int event) } +int h8_ultrabay_device_present(void) +{ + return ec_read(H8_STATUS1) & 0x5 ? 0 : 1; +} + static void h8_enable(device_t dev) { struct ec_lenovo_h8_config *conf = dev->chip_info; |