>From baad5d90adae3d5de32bbf743996d4adb1e1ba18 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Fri, 7 Dec 2012 10:21:44 +0100
Subject: [PATCH] acpi: add apple smc device

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 src/acpi-dsdt-isa.dsl |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl
index 70e1e48..135c893 100644
--- a/src/acpi-dsdt-isa.dsl
+++ b/src/acpi-dsdt-isa.dsl
@@ -1,6 +1,28 @@
 /* Common legacy ISA style devices. */
 Scope(\_SB.PCI0.ISA) {
 
+    Device (SMC) {
+        Name(_HID, EisaId("APP0001"))
+        OperationRegion(SMC, SystemIO, 0x0300, 0x20)
+        Field(SMC, ByteAcc, NoLock, Preserve) {
+            Offset(0x04),
+            CMDP, 8,
+        }
+        Method(_STA, 0) {
+	    Store(0x10, CMDP)    // APPLESMC_READ_CMD
+	    Store(CMDP, Local0)
+            If (LEqual(Local0, 0x0c)) {
+                Return (0x0F)
+            } Else {
+                Return (0x00)
+            }
+        }
+        Name (_CRS, ResourceTemplate () {
+            IO (Decode16, 0x0300, 0x0300, 0x01, 0x20)
+            IRQNoFlags() { 6 }
+        })
+    }
+
     Device(RTC) {
         Name(_HID, EisaId("PNP0B00"))
         Name(RESI, ResourceTemplate() {
-- 
1.7.1

