This commit is contained in:
martin 2013-10-25 21:42:30 +00:00
parent 0fad0c7d31
commit 652316b56c
4 changed files with 22 additions and 37 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mac68k5380.c,v 1.48 2012/12/06 13:28:17 hauke Exp $ */
/* $NetBSD: mac68k5380.c,v 1.49 2013/10/25 21:48:48 martin Exp $ */
/*
* Copyright (c) 1995 Allen Briggs
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mac68k5380.c,v 1.48 2012/12/06 13:28:17 hauke Exp $");
__KERNEL_RCSID(0, "$NetBSD: mac68k5380.c,v 1.49 2013/10/25 21:48:48 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -147,9 +147,8 @@ static int transfer_pdma(u_char *, u_char *, u_long *);
static void
scsi_clr_ipend(void)
{
int tmp;
tmp = GET_5380_REG(NCR5380_IRCV);
GET_5380_REG(NCR5380_IRCV);
scsi_clear_irq();
}
@ -357,7 +356,7 @@ extern int *nofault, m68k_fault_addr;
register int count;
volatile u_int32_t *long_drq;
u_int32_t *long_data;
volatile u_int8_t *drq, tmp_data;
volatile u_int8_t *drq;
u_int8_t *data;
#if DBG_PID
@ -499,8 +498,7 @@ extern int *nofault, m68k_fault_addr;
PID("write complete");
drq = (volatile u_int8_t *) ncr_5380_with_drq;
tmp_data = *drq;
(void)*((volatile u_int8_t *) ncr_5380_with_drq);
PID("read a byte to force a phase change");
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ncr5380.c,v 1.65 2012/10/27 17:17:59 chs Exp $ */
/* $NetBSD: ncr5380.c,v 1.66 2013/10/25 21:48:48 martin Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ncr5380.c,v 1.65 2012/10/27 17:17:59 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: ncr5380.c,v 1.66 2013/10/25 21:48:48 martin Exp $");
/*
* Bit mask of targets you want debugging to be shown
@ -262,7 +262,6 @@ ncr5380_scsi_request(struct scsipi_channel *chan, scsipi_adapter_req_t req,
void *arg)
{
struct scsipi_xfer *xs;
struct scsipi_periph *periph;
struct ncr_softc *sc = device_private(chan->chan_adapter->adapt_dev);
int sps, flags;
SC_REQ *reqp, *link, *tmp;
@ -271,7 +270,6 @@ ncr5380_scsi_request(struct scsipi_channel *chan, scsipi_adapter_req_t req,
case ADAPTER_REQ_RUN_XFER:
xs = arg;
flags = xs->xs_control;
periph = xs->xs_periph;
/*
* We do not queue RESET commands
@ -1629,7 +1627,6 @@ static int
reach_msg_out(struct ncr_softc *sc, u_long len)
{
u_char phase;
u_char data;
u_long n = len;
ncr_aprint(sc, "Trying to reach Message-out phase\n");
@ -1648,7 +1645,7 @@ reach_msg_out(struct ncr_softc *sc, u_long len)
if (((GET_5380_REG(NCR5380_IDSTAT) >> 2) & 7) != phase)
break;
if (PH_IN(phase)) {
data = GET_5380_REG(NCR5380_DATA);
GET_5380_REG(NCR5380_DATA);
SET_5380_REG(NCR5380_ICOM, SC_A_ACK | SC_A_ATN);
}
else {

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_nubus.c,v 1.76 2012/10/27 17:17:59 chs Exp $ */
/* $NetBSD: grf_nubus.c,v 1.77 2013/10/25 21:42:30 martin Exp $ */
/*
* Copyright (c) 1995 Allen Briggs. All rights reserved.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: grf_nubus.c,v 1.76 2012/10/27 17:17:59 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: grf_nubus.c,v 1.77 2013/10/25 21:42:30 martin Exp $");
#include <sys/param.h>
@ -628,9 +628,8 @@ static void
grfmv_intr_supermacgfx(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
u_int8_t dummy;
dummy = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xE70D3);
bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xE70D3);
}
/*
@ -641,10 +640,9 @@ static void
grfmv_intr_cmax(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
u_int32_t dummy;
dummy = bus_space_read_4(sc->sc_tag, sc->sc_handle, 0xf501c);
dummy = bus_space_read_4(sc->sc_tag, sc->sc_handle, 0xf5018);
bus_space_read_4(sc->sc_tag, sc->sc_handle, 0xf501c);
bus_space_read_4(sc->sc_tag, sc->sc_handle, 0xf5018);
}
/*
@ -670,10 +668,9 @@ static void
grfmv_intr_formac(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
u_int8_t dummy;
dummy = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xde80db);
dummy = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xde80d3);
bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xde80db);
bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xde80d3);
}
/*
@ -697,9 +694,8 @@ static void
grfmv_intr_gvimage(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
u_int8_t dummy;
dummy = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xf00000);
bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xf00000);
}
/*
@ -710,9 +706,8 @@ static void
grfmv_intr_radius_gsc(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
u_int8_t dummy;
dummy = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xfb802);
bus_space_read_1(sc->sc_tag, sc->sc_handle, 0xfb802);
bus_space_write_1(sc->sc_tag, sc->sc_handle, 0xfb802, 0xff);
}
@ -737,10 +732,9 @@ static void
grfmv_intr_relax_200(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
unsigned long scratch;
/* The board ROM driver code has a tst.l here. */
scratch = bus_space_read_4(sc->sc_tag, sc->sc_handle, 0x000D0040);
bus_space_read_4(sc->sc_tag, sc->sc_handle, 0x000D0040);
}
/*
@ -764,9 +758,8 @@ static void
grfmv_intr_viltro_340(void *vsc)
{
struct grfbus_softc *sc = (struct grfbus_softc *)vsc;
u_int8_t scratch;
/* Yes, two read accesses to the same spot. */
scratch = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0x0500);
scratch = bus_space_read_1(sc->sc_tag, sc->sc_handle, 0x0500);
bus_space_read_1(sc->sc_tag, sc->sc_handle, 0x0500);
bus_space_read_1(sc->sc_tag, sc->sc_handle, 0x0500);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: wdc_obio.c,v 1.26 2012/07/31 15:50:32 bouyer Exp $ */
/* $NetBSD: wdc_obio.c,v 1.27 2013/10/25 21:50:28 martin Exp $ */
/*
* Copyright (c) 2002 Takeshi Shibagaki All rights reserved.
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.26 2012/07/31 15:50:32 bouyer Exp $");
__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.27 2013/10/25 21:50:28 martin Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -91,7 +91,6 @@ wdc_obio_match(device_t parent, cfdata_t match, void *aux)
struct ata_channel ch;
struct wdc_softc wdc;
struct wdc_regs wdr;
static int wdc_matched = 0;
int i, result = 0;
memset(&wdc, 0, sizeof(wdc));
@ -132,8 +131,6 @@ wdc_obio_match(device_t parent, cfdata_t match, void *aux)
bus_space_unmap(wdr.cmd_iot, wdr.cmd_baseioh, WDC_OBIO_REG_NPORTS);
if (result)
wdc_matched = 1;
return (result);
}
return 0;