X60: add thermal zone 0
authorSven Schnelle <svens@stackframe.org>
Mon, 7 Mar 2011 09:00:50 +0000 (09:00 +0000)
committerSven Schnelle <svens@stackframe.org>
Mon, 7 Mar 2011 09:00:50 +0000 (09:00 +0000)
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6434 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/mainboard/lenovo/x60/acpi/ec.asl
src/mainboard/lenovo/x60/acpi/thermal.asl

index 775fa582abea42c95fa827dfc85cd0f7b36bc015..f18b66586e881e7140954d7c8000ba0b1cc74493 100644 (file)
@@ -36,7 +36,9 @@ Device(EC)
                                LEDS, 8,        /* LED state */
                Offset (0x3B),
                                    , 1,
-                               KBLT, 1,         /* Keyboard Light */
+                               KBLT, 1,        /* Keyboard Light */
+               Offset (0x78),
+                               TMP0, 8,        /* Thermal Zone 0 temperature */
                Offset (0x81),
                                PAGE, 8         /* Information Page Selector */
         }
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b7256ceec1df33b484081bb82ae8c3670aebc84d 100644 (file)
@@ -0,0 +1,26 @@
+Scope(\_TZ)
+{
+       Method(C2K, 1, NotSerialized)
+       {
+               Multiply(Arg0, 10, Local0)
+               Add (Local0, 2732, Local0)
+               if (LLessEqual(Local0, 2732)) {
+                       Return (3000)
+               }
+
+               if (LGreater(Local0, 4012)) {
+                       Return (3000)
+               }
+               Return (Local0)
+       }
+
+       ThermalZone(THM0)
+       {
+               Method(_CRT, 0, NotSerialized) {
+                       Return (C2K(127))
+               }
+               Method(_TMP) {
+                       Return (C2K(\_SB.PCI0.LPCB.EC.TMP0))
+               }
+       }
+}