Revision 8da3ff18 hw/sh_serial.c

b/hw/sh_serial.c
53 53
    uint8_t rx_tail;
54 54
    uint8_t rx_head;
55 55

  
56
    target_phys_addr_t base;
57 56
    int freq;
58 57
    int feat;
59 58
    int flags;
......
82 81
    unsigned char ch;
83 82

  
84 83
#ifdef DEBUG_SERIAL
85
    printf("sh_serial: write base=0x%08lx offs=0x%02x val=0x%02x\n",
86
	   (unsigned long) s->base, offs, val);
84
    printf("sh_serial: write offs=0x%02x val=0x%02x\n",
85
	   offs, val);
87 86
#endif
88 87
    switch(offs) {
89 88
    case 0x00: /* SMR */
......
278 277
#endif
279 278
    }
280 279
#ifdef DEBUG_SERIAL
281
    printf("sh_serial: read base=0x%08lx offs=0x%02x val=0x%x\n",
282
	   (unsigned long) s->base, offs, ret);
280
    printf("sh_serial: read offs=0x%02x val=0x%x\n",
281
	   offs, ret);
283 282
#endif
284 283

  
285 284
    if (ret & ~((1 << 16) - 1)) {
......
343 342
static uint32_t sh_serial_read (void *opaque, target_phys_addr_t addr)
344 343
{
345 344
    sh_serial_state *s = opaque;
346
    return sh_serial_ioport_read(s, addr - s->base);
345
    return sh_serial_ioport_read(s, addr);
347 346
}
348 347

  
349 348
static void sh_serial_write (void *opaque,
350 349
                             target_phys_addr_t addr, uint32_t value)
351 350
{
352 351
    sh_serial_state *s = opaque;
353
    sh_serial_ioport_write(s, addr - s->base, value);
352
    sh_serial_ioport_write(s, addr, value);
354 353
}
355 354

  
356 355
static CPUReadMemoryFunc *sh_serial_readfn[] = {
......
380 379
    if (!s)
381 380
        return;
382 381

  
383
    s->base = base;
384 382
    s->feat = feat;
385 383
    s->flags = SH_SERIAL_FLAG_TEND | SH_SERIAL_FLAG_TDE;
386 384
    s->rtrg = 1;

Also available in: Unified diff