Author: svens
Date: Thu Apr 28 11:29:06 2011
New Revision: 6549
URL: https://tracker.coreboot.org/trac/coreboot/changeset/6549

Log:
Thinkpad: Enable Battery events

Enable the following events for battery objects on
Thinkpad X60/T60:

24: BAT0 critical
25: BAT1 critical
4A: BAT0 present
4B: BAT0 state change
4C: BAT1 present
4D: BAT1 state change

Signed-off-by: Sven Schnelle <sv...@stackframe.org>
Acked-by: Sven Schnelle <sv...@stackframe.org>

Modified:
   trunk/src/ec/lenovo/h8/acpi/battery.asl
   trunk/src/mainboard/lenovo/t60/devicetree.cb
   trunk/src/mainboard/lenovo/x60/devicetree.cb

Modified: trunk/src/ec/lenovo/h8/acpi/battery.asl
==============================================================================
--- trunk/src/ec/lenovo/h8/acpi/battery.asl     Wed Apr 27 21:48:05 2011        
(r6548)
+++ trunk/src/ec/lenovo/h8/acpi/battery.asl     Thu Apr 28 11:29:06 2011        
(r6549)
@@ -294,3 +294,39 @@
                }
        }
 }
+
+/* Battery 0 critical */
+Method(_Q24, 0, NotSerialized)
+{
+       Notify(BAT0, 0x80)
+}
+
+/* Battery 1 critical */
+Method(_Q25, 0, NotSerialized)
+{
+       Notify(BAT1, 0x80)
+}
+
+/* Battery 0 attach/detach */
+Method(_Q4A, 0, NotSerialized)
+{
+       Notify(BAT0, 0x81)
+}
+
+/* Battery 0 state change */
+Method(_Q4B, 0, NotSerialized)
+{
+       Notify(BAT0, 0x80)
+}
+
+/* Battery 1 attach/detach */
+Method(_Q4C, 0, NotSerialized)
+{
+       Notify(BAT1, 0x81)
+}
+
+/* Battery 1 state change */
+Method(_Q4D, 0, NotSerialized)
+{
+       Notify(BAT1, 0x80)
+}

Modified: trunk/src/mainboard/lenovo/t60/devicetree.cb
==============================================================================
--- trunk/src/mainboard/lenovo/t60/devicetree.cb        Wed Apr 27 21:48:05 
2011        (r6548)
+++ trunk/src/mainboard/lenovo/t60/devicetree.cb        Thu Apr 28 11:29:06 
2011        (r6549)
@@ -130,6 +130,7 @@
                                        register "event4_enable" = "0xf4"
                                        register "event5_enable" = "0x3c"
                                        register "event6_enable" = "0x80"
+                                       register "eventc_enable" = "0x3c"
 
                                        register "wlan_enable" = "0x01"
                                        register "trackpoint_enable" = "0x03"

Modified: trunk/src/mainboard/lenovo/x60/devicetree.cb
==============================================================================
--- trunk/src/mainboard/lenovo/x60/devicetree.cb        Wed Apr 27 21:48:05 
2011        (r6548)
+++ trunk/src/mainboard/lenovo/x60/devicetree.cb        Thu Apr 28 11:29:06 
2011        (r6549)
@@ -107,6 +107,7 @@
                                        register "event3_enable" = "0xff"
                                        register "event4_enable" = "0xf4"
                                        register "event5_enable" = "0x3c"
+                                       register "eventc_enable" = "0x3c"
 
                                        register "wlan_enable" = "0x01"
                                        register "trackpoint_enable" = "0x03"

-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to