All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: qemu-devel@nongnu.org
Cc: paul@codesourcery.com
Subject: [Qemu-devel] [PATCH] implement sysrq for the pl011
Date: Wed, 12 Mar 2008 13:19:01 -0500	[thread overview]
Message-ID: <47D81E95.7080304@windriver.com> (raw)


Implement sysrq for the pl011.  This was tested on
the ARM Versatile AB + kernel.org 2.6.X kernel.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>

---
 hw/pl011.c |   19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

--- a/hw/pl011.c
+++ b/hw/pl011.c
@@ -208,7 +208,24 @@ static void pl011_receive(void *opaque, 
 
 static void pl011_event(void *opaque, int event)
 {
-    /* ??? Should probably implement break.  */
+    if (event == CHR_EVENT_BREAK) {
+        pl011_state *s = (pl011_state *)opaque;
+        int slot;
+
+        slot = s->read_pos + s->read_count;
+        if (slot >= 16)
+            slot -= 16;
+        s->read_fifo[slot] = 0x400;
+        s->read_count++;
+        s->flags &= ~PL011_FLAG_RXFE;
+        if (s->cr & 0x10 || s->read_count == 16) {
+            s->flags |= PL011_FLAG_RXFF;
+        }
+        if (s->read_count == s->read_trigger) {
+            s->int_level |= PL011_INT_RX;
+            pl011_update(s);
+        }
+    }
 }
 
 static CPUReadMemoryFunc *pl011_readfn[] = {

                 reply	other threads:[~2008-03-12 18:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=47D81E95.7080304@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.