aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo/x60/acpi
diff options
context:
space:
mode:
authorSven Schnelle <svens@stackframe.org>2011-04-01 07:28:56 +0000
committerSven Schnelle <svens@stackframe.org>2011-04-01 07:28:56 +0000
commitfea6bd16909a29854539c431497ccc460f3cdf7a (patch)
tree6cb1ecc72deb3ec1edfaff4f98dcb4dc45ba220e /src/mainboard/lenovo/x60/acpi
parent1aba09678913404826d7581f329bfa75d26cbdca (diff)
X60: add dock code for Ultrabase X6
Move the old docking code from romstage.c to dock.c, and use that code both in romstage and SMM code. Signed-off-by: Sven Schnelle <svens@stackframe.org> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6473 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/lenovo/x60/acpi')
-rw-r--r--src/mainboard/lenovo/x60/acpi/.ec.asl.swpbin0 -> 12288 bytes
-rw-r--r--src/mainboard/lenovo/x60/acpi/.gpe.asl.swpbin0 -> 12288 bytes
-rw-r--r--src/mainboard/lenovo/x60/acpi/dock.asl55
-rw-r--r--src/mainboard/lenovo/x60/acpi/ec.asl7
-rw-r--r--src/mainboard/lenovo/x60/acpi/gpe.asl13
5 files changed, 75 insertions, 0 deletions
diff --git a/src/mainboard/lenovo/x60/acpi/.ec.asl.swp b/src/mainboard/lenovo/x60/acpi/.ec.asl.swp
new file mode 100644
index 0000000000..2930ae88cd
--- /dev/null
+++ b/src/mainboard/lenovo/x60/acpi/.ec.asl.swp
Binary files differ
diff --git a/src/mainboard/lenovo/x60/acpi/.gpe.asl.swp b/src/mainboard/lenovo/x60/acpi/.gpe.asl.swp
new file mode 100644
index 0000000000..f5f0cc8d1a
--- /dev/null
+++ b/src/mainboard/lenovo/x60/acpi/.gpe.asl.swp
Binary files differ
diff --git a/src/mainboard/lenovo/x60/acpi/dock.asl b/src/mainboard/lenovo/x60/acpi/dock.asl
new file mode 100644
index 0000000000..db61e059a8
--- /dev/null
+++ b/src/mainboard/lenovo/x60/acpi/dock.asl
@@ -0,0 +1,55 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (c) 2011 Sven Schnelle <svens@stackframe.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; version 2 of
+ * the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include "smi.h"
+
+OperationRegion (DLPC, SystemIO, 0x164c, 1)
+Field(DLPC, ByteAcc, NoLock, Preserve)
+{
+ , 3,
+ DSTA, 1,
+}
+Device(DOCK)
+{
+ Name(_HID, "ACPI0003")
+ Name(_UID, 0x00)
+ Name(_PCL, Package() { \_SB } )
+
+ Method(_DCK, 1, NotSerialized)
+ {
+ if (Arg0) {
+ Sleep(250)
+ /* connect dock */
+ TRAP(SMI_DOCK_CONNECT)
+ } else {
+ /* disconnect dock */
+ TRAP(SMI_DOCK_DISCONNECT)
+ }
+
+ Xor(Arg0, DSTA, Local0)
+ Return (Local0)
+ }
+
+ Method(_STA, 0, NotSerialized)
+ {
+ Return (DSTA)
+ }
+}
diff --git a/src/mainboard/lenovo/x60/acpi/ec.asl b/src/mainboard/lenovo/x60/acpi/ec.asl
index 81532b86db..043b72ef56 100644
--- a/src/mainboard/lenovo/x60/acpi/ec.asl
+++ b/src/mainboard/lenovo/x60/acpi/ec.asl
@@ -19,6 +19,7 @@
* MA 02110-1301 USA
*/
+#include "smi.h"
Device(EC)
{
Name (_HID, EISAID("PNP0C09"))
@@ -83,6 +84,11 @@ Device(EC)
\DSPC.BRTD()
}
+ Method(_Q18, 0, NotSerialized)
+ {
+ Notify(\_SB.PCI0.LPCB.EC.DOCK, 3)
+ }
+
/* AC status change: present */
Method(_Q26, 0, NotSerialized)
{
@@ -111,4 +117,5 @@ Device(EC)
#include "sleepbutton.asl"
#include "lid.asl"
#include "beep.asl"
+#include "dock.asl"
}
diff --git a/src/mainboard/lenovo/x60/acpi/gpe.asl b/src/mainboard/lenovo/x60/acpi/gpe.asl
index 1c5d1bdfd8..64e8e31e66 100644
--- a/src/mainboard/lenovo/x60/acpi/gpe.asl
+++ b/src/mainboard/lenovo/x60/acpi/gpe.asl
@@ -1,3 +1,4 @@
+#include "smi.h"
Scope (\_GPE)
{
Method(_L18, 0, NotSerialized)
@@ -5,4 +6,16 @@ Scope (\_GPE)
/* Read EC register to clear wake status */
Store(\_SB.PCI0.LPCB.EC.WAKE, Local0)
}
+
+ /* SLICE_ON_3M GPE (Dock status) */
+ Method(_L1D, 0, NotSerialized)
+ {
+ if (GP13) {
+ Or(GIV1, 0x20, GIV1)
+ Notify(\_SB.PCI0.LPCB.EC.DOCK, 3)
+ } else {
+ And(GIV1, 0xdf, GIV1)
+ Notify(\_SB.PCI0.LPCB.EC.DOCK, 0)
+ }
+ }
}