[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [6367] mips_malta: map the CBUS UART as the third serial po
From: |
Aurelien Jarno |
Subject: |
[Qemu-devel] [6367] mips_malta: map the CBUS UART as the third serial port |
Date: |
Sun, 18 Jan 2009 14:28:20 +0000 |
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 <address@hidden>
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++) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [6367] mips_malta: map the CBUS UART as the third serial port,
Aurelien Jarno <=