* [Qemu-devel] [PATCH] implement sysrq for the pl011
@ 2008-03-12 18:19 Jason Wessel
0 siblings, 0 replies; only message in thread
From: Jason Wessel @ 2008-03-12 18:19 UTC (permalink / raw)
To: qemu-devel; +Cc: paul
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[] = {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-12 18:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-12 18:19 [Qemu-devel] [PATCH] implement sysrq for the pl011 Jason Wessel
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).