From patchwork Mon Oct 22 14:20:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Cartwright X-Patchwork-Id: 193162 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 08F792C00F8 for ; Tue, 23 Oct 2012 01:20:53 +1100 (EST) Received: from localhost ([::1]:58277 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQIs7-0000yZ-4C for incoming@patchwork.ozlabs.org; Mon, 22 Oct 2012 10:20:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQIru-0000xA-2z for qemu-devel@nongnu.org; Mon, 22 Oct 2012 10:20:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQIrs-0003mx-OH for qemu-devel@nongnu.org; Mon, 22 Oct 2012 10:20:37 -0400 Received: from mailserver6.natinst.com ([130.164.80.6]:36894 helo=spamkiller06.natinst.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQIrs-0003mc-Ha for qemu-devel@nongnu.org; Mon, 22 Oct 2012 10:20:36 -0400 Received: from mailserv58-us.natinst.com (nb-hsrp-1338.natinst.com [130.164.19.133]) by spamkiller06.natinst.com (8.14.5/8.14.5) with ESMTP id q9MEKZgR021389; Mon, 22 Oct 2012 09:20:35 -0500 Received: from beefymiracle.amer.corp.natinst.com ([130.164.14.197]) by mailserv58-us.natinst.com (Lotus Domino Release 8.5.3FP2 HF169) with ESMTP id 2012102209203513-518151 ; Mon, 22 Oct 2012 09:20:35 -0500 Received: by beefymiracle.amer.corp.natinst.com (Postfix, from userid 1000) id 1E43C61739; Mon, 22 Oct 2012 09:20:40 -0500 (CDT) Date: Mon, 22 Oct 2012 09:20:40 -0500 From: Josh Cartwright To: Peter Crosthwaite Message-ID: <20121022142040.GA15461@beefymiracle.amer.corp.natinst.com> MIME-Version: 1.0 User-Agent: Mutt/1.5.21 (2011-07-01) X-MIMETrack: Itemize by SMTP Server on MailServ58-US/AUS/H/NIC(Release 8.5.3FP2 HF169|September 14, 2012) at 10/22/2012 09:20:35 AM, Serialize by Router on MailServ58-US/AUS/H/NIC(Release 8.5.3FP2 HF169|September 14, 2012) at 10/22/2012 09:20:35 AM, Serialize complete at 10/22/2012 09:20:35 AM Content-Disposition: inline X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855, 1.0.431, 0.0.0000 definitions=2012-10-22_02:2012-10-22, 2012-10-21, 1970-01-01 signatures=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 130.164.80.6 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH] cadence_uart: enable tx/rx on reset X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Change the cadence_uart such that tx/rx is enabled on reset. Assuming both are enabled makes debugging early Linux kernel bootup a little bit easier. Signed-off-by: Josh Cartwright --- I've used this patch mostly for my own testing, but it may be of general use. On a real system, I would expect the bootloader to leave the uart in an enabled state, but I'm not using a bootloader for my testing :). hw/cadence_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/cadence_uart.c b/hw/cadence_uart.c index f8afc4e..2fb21a6 100644 --- a/hw/cadence_uart.c +++ b/hw/cadence_uart.c @@ -421,7 +421,7 @@ static const MemoryRegionOps uart_ops = { static void cadence_uart_reset(UartState *s) { - s->r[R_CR] = 0x00000128; + s->r[R_CR] = UART_CR_RX_EN | UART_CR_TX_EN | UART_CR_STOPBRK; s->r[R_IMR] = 0; s->r[R_CISR] = 0; s->r[R_RTRIG] = 0x00000020;