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 qemu 3/4] wakeup: make serial configurable
Date: Tue, 17 Jul 2012 14:30:51 +0200 [thread overview]
Message-ID: <1342528252-11470-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1342528252-11470-1-git-send-email-kraxel@redhat.com>
serial port #1 gets gpe 0x0a. Now that the wakeup is guest-configurable
via acpi we also enable it unconditionally.
Other serial ports are unchanged: they continue to use the "other" exit
reason and are disabled unless explicitly enabled via wakeup property.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/serial.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/hw/serial.c b/hw/serial.c
index a421d1e..06f7e28 100644
--- a/hw/serial.c
+++ b/hw/serial.c
@@ -140,6 +140,7 @@ struct SerialState {
int baudbase;
int tsr_retry;
uint32_t wakeup;
+ WakeupReason reason;
uint64_t last_xmit_ts; /* Time when the last byte was successfully sent out of the tsr */
SerialFIFO recv_fifo;
@@ -641,7 +642,7 @@ static void serial_receive1(void *opaque, const uint8_t *buf, int size)
SerialState *s = opaque;
if (s->wakeup) {
- qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
+ qemu_system_wakeup_request(s->reason);
}
if(s->fcr & UART_FCR_FE) {
int i;
@@ -789,6 +790,13 @@ static int serial_isa_initfn(ISADevice *dev)
isa->isairq = isa_serial_irq[isa->index];
index++;
+ if (isa->iobase == 0x3f8) {
+ s->reason = QEMU_WAKEUP_REASON_GPE_a;
+ s->wakeup = 1;
+ } else {
+ s->reason = QEMU_WAKEUP_REASON_OTHER;
+ }
+
s->baudbase = 115200;
isa_init_irq(dev, &s->irq, isa->isairq);
serial_init_core(s);
--
1.7.1
next prev parent reply other threads:[~2012-07-17 12:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-17 12:30 [Qemu-devel] [rfc patch qemu 0/4] s3 improvements Gerd Hoffmann
2012-07-17 12:30 ` [Qemu-devel] [rfc patch qemu 1/4] wakeup: add acpi gpe wakeup reasons Gerd Hoffmann
2012-07-17 12:30 ` [Qemu-devel] [rfc patch qemu 2/4] wakeup: make ps/2 configurable Gerd Hoffmann
2012-07-17 12:30 ` Gerd Hoffmann [this message]
2012-07-17 12:30 ` [Qemu-devel] [rfc patch qemu 4/4] wakeup: uhci support Gerd Hoffmann
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=1342528252-11470-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).