summaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo/t60/mainboard.c
diff options
context:
space:
mode:
authorSven Schnelle <svens@stackframe.org>2011-04-27 19:47:49 +0000
committerSven Schnelle <svens@stackframe.org>2011-04-27 19:47:49 +0000
commitedabf54da9abd4b5d7d37606595b4a97553897b8 (patch)
treecb15ab794a97f236baa8c06bc3f3e2ba642b8048 /src/mainboard/lenovo/t60/mainboard.c
parentbf9e9309c01602d378f6238a51e86c78c25e2301 (diff)
downloadcoreboot-edabf54da9abd4b5d7d37606595b4a97553897b8.tar.xz
T60: enable Ultrabay if device is 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@6547 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/lenovo/t60/mainboard.c')
-rw-r--r--src/mainboard/lenovo/t60/mainboard.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mainboard/lenovo/t60/mainboard.c b/src/mainboard/lenovo/t60/mainboard.c
index e6a7679e81..d6321d25d1 100644
--- a/src/mainboard/lenovo/t60/mainboard.c
+++ b/src/mainboard/lenovo/t60/mainboard.c
@@ -38,7 +38,7 @@
static void mainboard_enable(device_t dev)
{
- device_t dev0;
+ device_t dev0, idedev;
int touchpad;
/* enable Audio */
@@ -53,6 +53,17 @@ static void mainboard_enable(device_t dev)
touchpad = 1;
pmh7_touchpad_enable(touchpad);
+
+ idedev = dev_find_slot(0, PCI_DEVFN(0x1f,1));
+ if (idedev && idedev->chip_info && h8_ultrabay_device_present()) {
+ struct southbridge_intel_i82801gx_config *config = idedev->chip_info;
+ config->ide_enable_primary = 1;
+ pmh7_ultrabay_power_enable(1);
+ ec_write(0x0c, 0x84);
+ } else {
+ pmh7_ultrabay_power_enable(0);
+ ec_write(0x0c, 0x04);
+ }
}
struct chip_operations mainboard_ops = {