qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org, seabios@seabios.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [rfc patch seabios 3/3] wakeup: uhci
Date: Tue, 17 Jul 2012 14:31:02 +0200	[thread overview]
Message-ID: <1342528262-11548-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1342528262-11548-1-git-send-email-kraxel@redhat.com>

Windup gpe bit 0x0b for s3 wakeup.  Also add methods to update
the pci config space register 0xc4 which enables/disables wakeup
per usb port.

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

diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl
index 03efbfd..07e531d 100644
--- a/src/acpi-dsdt.dsl
+++ b/src/acpi-dsdt.dsl
@@ -312,6 +312,46 @@ DefinitionBlock (
 
 
 /****************************************************************
+ * USB
+ ****************************************************************/
+
+    Scope(\_SB.PCI0) {
+        Device (UHCI) {
+            Name (_ADR, 0x00010002)
+
+            OperationRegion (U0CS, PCI_Config, 0xC4, 0x04)
+            Field (U0CS, DWordAcc, NoLock, Preserve)
+            {
+                U0EN,   2,
+                        Offset (0x04)
+            }
+
+            Name (_S3D, 0x03)
+            Name (_S3W, 0x03)
+
+            /* Power Resources for Wake */
+            Name(_PRW, Package(2) {
+                0x0b,  // GPE bit
+                0x03,  // S3
+            })
+
+            /* Power State Wake */
+            Method (_PSW, 1, NotSerialized)
+            {
+                If (Arg0)
+                {
+                    Store (0x03, U0EN)
+                }
+                Else
+                {
+                    Store (0x00, U0EN)
+                }
+            }
+        }
+    }
+
+
+/****************************************************************
  * PIIX3 ISA bridge
  ****************************************************************/
 
@@ -803,6 +843,7 @@ DefinitionBlock (
             Return(0x01)
         }
         Method(_L0B) {
+            Notify(\_SB.PCI0.UHCI, 0x80)
             Return(0x01)
         }
         Method(_L0C) {
-- 
1.7.1

      parent reply	other threads:[~2012-07-17 12:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-17 12:30 [Qemu-devel] [rfc patch seabios 0/3] s3 improvements Gerd Hoffmann
2012-07-17 12:31 ` [Qemu-devel] [rfc patch seabios 1/3] wakeup: kbd & mouse Gerd Hoffmann
2012-07-17 12:31 ` [Qemu-devel] [rfc patch seabios 2/3] wakeup: serial Gerd Hoffmann
2012-07-17 12:31 ` Gerd Hoffmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342528262-11548-4-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).