Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LOYdS-0002Ir-F3 for qemu-devel@nongnu.org; Sun, 18 Jan 2009 09:28:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LOYdR-0002IY-UX for qemu-devel@nongnu.org; Sun, 18 Jan 2009 09:28:22 -0500 Received: from [199.232.76.173] (port=60904 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOYdR-0002IU-Pi for qemu-devel@nongnu.org; Sun, 18 Jan 2009 09:28:21 -0500 Received: from savannah.gnu.org ([199.232.41.3]:60730 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 1LOYdR-0003Dt-F3 for qemu-devel@nongnu.org; Sun, 18 Jan 2009 09:28:21 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LOYdR-0001XL-0I for qemu-devel@nongnu.org; Sun, 18 Jan 2009 14:28:21 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LOYdQ-0001XH-Ni for qemu-devel@nongnu.org; Sun, 18 Jan 2009 14:28:20 +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: Sun, 18 Jan 2009 14:28:20 +0000 Subject: [Qemu-devel] [6367] mips_malta: map the CBUS UART as the third serial port 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: 6367 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6367 Author: aurel32 Date: 2009-01-18 14:28:20 +0000 (Sun, 18 Jan 2009) Log Message: ----------- mips_malta: map the CBUS UART as the third serial port Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/hw/mips_malta.c Modified: trunk/hw/mips_malta.c =================================================================== --- trunk/hw/mips_malta.c 2009-01-18 14:28:10 UTC (rev 6366) +++ trunk/hw/mips_malta.c 2009-01-18 14:28:20 UTC (rev 6367) @@ -420,11 +420,6 @@ snprintf(s->display_text, 9, " "); } -static void malta_fpga_uart_init(CharDriverState *chr) -{ - qemu_chr_printf(chr, "CBUS UART\r\n"); -} - static void malta_fpga_led_init(CharDriverState *chr) { qemu_chr_printf(chr, "\e[HMalta LEDBAR\r\n"); @@ -438,10 +433,9 @@ qemu_chr_printf(chr, "+--------+\r\n"); } -static MaltaFPGAState *malta_fpga_init(target_phys_addr_t base, CPUState *env) +static MaltaFPGAState *malta_fpga_init(target_phys_addr_t base, qemu_irq uart_irq, CharDriverState *uart_chr) { MaltaFPGAState *s; - CharDriverState *uart_chr; int malta; s = (MaltaFPGAState *)qemu_mallocz(sizeof(MaltaFPGAState)); @@ -455,9 +449,7 @@ s->display = qemu_chr_open("fpga", "vc:320x200", malta_fpga_led_init); - uart_chr = qemu_chr_open("cbus", "vc:80Cx24C", malta_fpga_uart_init); - s->uart = - serial_mm_init(base + 0x900, 3, env->irq[2], 230400, uart_chr, 1); + s->uart = serial_mm_init(base + 0x900, 3, uart_irq, 230400, uart_chr, 1); malta_fpga_reset(s); qemu_register_reset(malta_fpga_reset, s); @@ -820,7 +812,7 @@ BIOS_SIZE, bios_offset | IO_MEM_ROM); /* FPGA */ - malta_fpga = malta_fpga_init(0x1f000000LL, env); + malta_fpga = malta_fpga_init(0x1f000000LL, env->irq[2], serial_hds[2]); /* Load firmware in flash / BIOS unless we boot directly into a kernel. */ if (kernel_filename) { @@ -921,10 +913,8 @@ /* Super I/O */ i8042_init(i8259[1], i8259[12], 0x60); rtc_state = rtc_init(0x70, i8259[8]); - if (serial_hds[0]) - serial_init(0x3f8, i8259[4], 115200, serial_hds[0]); - if (serial_hds[1]) - serial_init(0x2f8, i8259[3], 115200, serial_hds[1]); + serial_init(0x3f8, i8259[4], 115200, serial_hds[0]); + serial_init(0x2f8, i8259[3], 115200, serial_hds[1]); if (parallel_hds[0]) parallel_init(0x378, i8259[7], parallel_hds[0]); for(i = 0; i < MAX_FD; i++) {