X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=hw%2Fserial.c;h=36a7cc4e3d5ce87f4e0506d3de7163d09cc143fd;hb=cd346349b45ef056f138a184f660b8c34c3213cc;hp=088886258e36c5e70b7a561ff02267ccf5ec3e9e;hpb=e918ee04e96dd2d8809cf9d78c14a4d900001211;p=qemu diff --git a/hw/serial.c b/hw/serial.c index 0888862..36a7cc4 100644 --- a/hw/serial.c +++ b/hw/serial.c @@ -1,8 +1,8 @@ /* * QEMU 16450 UART emulation - * + * * Copyright (c) 2003-2004 Fabrice Bellard - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights @@ -86,7 +86,7 @@ struct SerialState { qemu_irq irq; CharDriverState *chr; int last_break_enable; - target_ulong base; + target_phys_addr_t base; int it_shift; }; @@ -119,7 +119,7 @@ static void serial_update_parameters(SerialState *s) } else { parity = 'N'; } - if (s->lcr & 0x04) + if (s->lcr & 0x04) stop_bits = 2; else stop_bits = 1; @@ -133,7 +133,7 @@ static void serial_update_parameters(SerialState *s) ssp.stop_bits = stop_bits; qemu_chr_ioctl(s->chr, CHR_IOCTL_SERIAL_SET_PARAMS, &ssp); #if 0 - printf("speed=%d parity=%c data=%d stop=%d\n", + printf("speed=%d parity=%c data=%d stop=%d\n", speed, parity, data_bits, stop_bits); #endif } @@ -142,7 +142,7 @@ static void serial_ioport_write(void *opaque, uint32_t addr, uint32_t val) { SerialState *s = opaque; unsigned char ch; - + addr &= 7; #ifdef DEBUG_SERIAL printf("serial: write addr=0x%02x val=0x%02x\n", addr, val); @@ -187,7 +187,7 @@ static void serial_ioport_write(void *opaque, uint32_t addr, uint32_t val) break_enable = (val >> 6) & 1; if (break_enable != s->last_break_enable) { s->last_break_enable = break_enable; - qemu_chr_ioctl(s->chr, CHR_IOCTL_SERIAL_SET_BREAK, + qemu_chr_ioctl(s->chr, CHR_IOCTL_SERIAL_SET_BREAK, &break_enable); } } @@ -215,7 +215,7 @@ static uint32_t serial_ioport_read(void *opaque, uint32_t addr) default: case 0: if (s->lcr & UART_LCR_DLAB) { - ret = s->divider & 0xff; + ret = s->divider & 0xff; } else { ret = s->rbr; s->lsr &= ~(UART_LSR_DR | UART_LSR_BI); @@ -437,7 +437,7 @@ static CPUWriteMemoryFunc *serial_mm_write[] = { &serial_mm_writel, }; -SerialState *serial_mm_init (target_ulong base, int it_shift, +SerialState *serial_mm_init (target_phys_addr_t base, int it_shift, qemu_irq irq, CharDriverState *chr, int ioregister) {