From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JjJr8-0003Sa-GK for qemu-devel@nongnu.org; Tue, 08 Apr 2008 15:51:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JjJr7-0003QX-DR for qemu-devel@nongnu.org; Tue, 08 Apr 2008 15:51:45 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjJr7-0003Q8-4X for qemu-devel@nongnu.org; Tue, 08 Apr 2008 15:51:45 -0400 Received: from savannah.gnu.org ([199.232.41.3] helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JjJr6-0005jI-MT for qemu-devel@nongnu.org; Tue, 08 Apr 2008 15:51:44 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1JjJr6-00089p-6f for qemu-devel@nongnu.org; Tue, 08 Apr 2008 19:51:44 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1JjJr6-00089k-1i for qemu-devel@nongnu.org; Tue, 08 Apr 2008 19:51:44 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Tue, 08 Apr 2008 19:51:44 +0000 Subject: [Qemu-devel] [4182] Implement break for the pl011, based on a patch from Jason Wessel. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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[] = {