implement sysrq for the pl011
PATCH 1/1 implement sysrq for the pl011
Implement sysrq for the pl011. This was tested on the ARM Versatile AB + kernel.org 2.6.X kernel.
Signed-off-by Jason Wessel <[email protected]>
--- hw/pl011.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
hw/pl011.c +18 -1
@@ -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[] = {