--- trunk/src/devices/dev_z8530.c 2007/10/08 16:20:58 32 +++ trunk/src/devices/dev_z8530.c 2007/10/08 16:21:17 34 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2006 Anders Gavare. All rights reserved. + * Copyright (C) 2004-2007 Anders Gavare. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: dev_z8530.c,v 1.9 2006/10/07 02:05:21 debug Exp $ + * $Id: dev_z8530.c,v 1.13 2007/01/28 14:31:43 debug Exp $ * * Zilog "zs" serial controller (Z8530). * @@ -46,6 +46,7 @@ #include "console.h" #include "cpu.h" #include "device.h" +#include "interrupt.h" #include "machine.h" #include "memory.h" #include "misc.h" @@ -61,8 +62,7 @@ #define DEV_Z8530_LENGTH 4 struct z8530_data { - int irq_nr; - int dma_irq_nr; + struct interrupt irq; int irq_asserted; int addr_mult; @@ -116,10 +116,10 @@ asserted = 0; if (asserted) - cpu_interrupt(cpu, d->irq_nr); + INTERRUPT_ASSERT(d->irq); if (d->irq_asserted && !asserted) - cpu_interrupt_ack(cpu, d->irq_nr); + INTERRUPT_DEASSERT(d->irq); d->irq_asserted = asserted; } @@ -211,10 +211,11 @@ exit(1); } memset(d, 0, sizeof(struct z8530_data)); - d->irq_nr = devinit->irq_nr; - d->dma_irq_nr = devinit->dma_irq_nr; + d->addr_mult = devinit->addr_mult; + INTERRUPT_CONNECT(devinit->interrupt_path, d->irq); + snprintf(tmp, sizeof(tmp), "%s [ch-b]", devinit->name); d->console_handle[0] = console_start_slave(devinit->machine, tmp, devinit->in_use);