qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4182] Implement break for the pl011, based on a patch from Jason Wessel.
Date: Tue, 08 Apr 2008 19:51:44 +0000	[thread overview]
Message-ID: <E1JjJr6-00089k-1i@cvs.savannah.gnu.org> (raw)

Revision: 4182
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4182
Author:   aurel32
Date:     2008-04-08 19:51:43 +0000 (Tue, 08 Apr 2008)

Log Message:
-----------
Implement break for the pl011, based on a patch from Jason Wessel.

Modified Paths:
--------------
    trunk/hw/pl011.c

Modified: trunk/hw/pl011.c
===================================================================
--- trunk/hw/pl011.c	2008-04-08 19:51:36 UTC (rev 4181)
+++ trunk/hw/pl011.c	2008-04-08 19:51:43 UTC (rev 4182)
@@ -195,7 +195,7 @@
         return s->read_count < 1;
 }
 
-static void pl011_receive(void *opaque, const uint8_t *buf, int size)
+static void pl011_put_fifo(void *opaque, uint32_t value)
 {
     pl011_state *s = (pl011_state *)opaque;
     int slot;
@@ -203,7 +203,7 @@
     slot = s->read_pos + s->read_count;
     if (slot >= 16)
         slot -= 16;
-    s->read_fifo[slot] = *buf;
+    s->read_fifo[slot] = value;
     s->read_count++;
     s->flags &= ~PL011_FLAG_RXFE;
     if (s->cr & 0x10 || s->read_count == 16) {
@@ -215,9 +215,15 @@
     }
 }
 
+static void pl011_receive(void *opaque, const uint8_t *buf, int size)
+{
+    pl011_put_fifo(opaque, *buf);
+}
+
 static void pl011_event(void *opaque, int event)
 {
-    /* ??? Should probably implement break.  */
+    if (event == CHR_EVENT_BREAK)
+        pl011_put_fifo(opaque, 0x400);
 }
 
 static CPUReadMemoryFunc *pl011_readfn[] = {

                 reply	other threads:[~2008-04-08 19:51 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=E1JjJr6-00089k-1i@cvs.savannah.gnu.org \
    --to=aurelien@aurel32.net \
    --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 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).