Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Pave the way for detachment of pciide(4)-family ATA cont...
details: https://anonhg.NetBSD.org/src/rev/9df6cf607e84
branches: trunk
changeset: 758479:9df6cf607e84
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Fri Nov 05 18:07:23 2010 +0000
description:
Pave the way for detachment of pciide(4)-family ATA controllers.
diffstat:
sys/arch/i386/pci/gcscide.c | 7 +-
sys/dev/ic/wdcvar.h | 4 +-
sys/dev/pci/acardide.c | 8 +-
sys/dev/pci/aceride.c | 7 +-
sys/dev/pci/artsata.c | 14 +--
sys/dev/pci/cmdide.c | 10 +-
sys/dev/pci/cypide.c | 11 +--
sys/dev/pci/geodeide.c | 7 +-
sys/dev/pci/hptide.c | 11 +--
sys/dev/pci/iteide.c | 8 +-
sys/dev/pci/ixpide.c | 8 +-
sys/dev/pci/jmide.c | 8 +-
sys/dev/pci/optiide.c | 8 +-
sys/dev/pci/pciide_common.c | 139 ++++++++++++++++++++++++++++++++-----------
sys/dev/pci/pciidevar.h | 23 ++++---
sys/dev/pci/pdcide.c | 7 +-
sys/dev/pci/pdcsata.c | 11 +-
sys/dev/pci/piixide.c | 12 +--
sys/dev/pci/rccide.c | 9 +-
sys/dev/pci/satalink.c | 12 +--
sys/dev/pci/siside.c | 12 +--
sys/dev/pci/slide.c | 8 +-
sys/dev/pci/stpcide.c | 8 +-
sys/dev/pci/svwsata.c | 6 +-
sys/dev/pci/toshide.c | 8 +-
sys/dev/pci/viaide.c | 39 ++++-------
26 files changed, 213 insertions(+), 192 deletions(-)
diffs (truncated from 1460 to 300 lines):
diff -r 859124744e7d -r 9df6cf607e84 sys/arch/i386/pci/gcscide.c
--- a/sys/arch/i386/pci/gcscide.c Fri Nov 05 16:23:56 2010 +0000
+++ b/sys/arch/i386/pci/gcscide.c Fri Nov 05 18:07:23 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gcscide.c,v 1.7 2008/03/18 20:46:36 cube Exp $ */
+/* $NetBSD: gcscide.c,v 1.8 2010/11/05 18:07:23 jakllsch Exp $ */
/*-
* Copyright (c) 2007 Juan Romero Pardines.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gcscide.c,v 1.7 2008/03/18 20:46:36 cube Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gcscide.c,v 1.8 2010/11/05 18:07:23 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -153,7 +153,6 @@
gcscide_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
{
pcireg_t interface;
- bus_size_t cmdsize, ctlsize;
if (pciide_chipen(sc, pa) == 0)
return;
@@ -184,7 +183,7 @@
return;
pciide_mapchan(pa, &sc->pciide_channels[0], interface,
- &cmdsize, &ctlsize, pciide_pci_intr);
+ pciide_pci_intr);
}
static void
diff -r 859124744e7d -r 9df6cf607e84 sys/dev/ic/wdcvar.h
--- a/sys/dev/ic/wdcvar.h Fri Nov 05 16:23:56 2010 +0000
+++ b/sys/dev/ic/wdcvar.h Fri Nov 05 18:07:23 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wdcvar.h,v 1.90 2009/12/01 01:06:31 dyoung Exp $ */
+/* $NetBSD: wdcvar.h,v 1.91 2010/11/05 18:07:24 jakllsch Exp $ */
/*-
* Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
@@ -47,9 +47,11 @@
/* Our registers */
bus_space_tag_t cmd_iot;
bus_space_handle_t cmd_baseioh;
+ bus_size_t cmd_ios;
bus_space_handle_t cmd_iohs[WDC_NREG+WDC_NSHADOWREG];
bus_space_tag_t ctl_iot;
bus_space_handle_t ctl_ioh;
+ bus_size_t ctl_ios;
/* data32{iot,ioh} are only used for 32-bit data xfers */
bus_space_tag_t data32iot;
diff -r 859124744e7d -r 9df6cf607e84 sys/dev/pci/acardide.c
--- a/sys/dev/pci/acardide.c Fri Nov 05 16:23:56 2010 +0000
+++ b/sys/dev/pci/acardide.c Fri Nov 05 18:07:23 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acardide.c,v 1.23 2008/05/14 13:29:29 tsutsui Exp $ */
+/* $NetBSD: acardide.c,v 1.24 2010/11/05 18:07:24 jakllsch Exp $ */
/*-
* Copyright (c) 2001 Izumi Tsutsui. All rights reserved.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acardide.c,v 1.23 2008/05/14 13:29:29 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acardide.c,v 1.24 2010/11/05 18:07:24 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -115,7 +115,6 @@
struct pciide_channel *cp;
int i;
pcireg_t interface;
- bus_size_t cmdsize, ctlsize;
if (pciide_chipen(sc, pa) == 0)
return;
@@ -167,8 +166,7 @@
cp = &sc->pciide_channels[i];
if (pciide_chansetup(sc, i, interface) == 0)
continue;
- pciide_mapchan(pa, cp, interface, &cmdsize, &ctlsize,
- pciide_pci_intr);
+ pciide_mapchan(pa, cp, interface, pciide_pci_intr);
}
if (!ACARD_IS_850(sc)) {
u_int32_t reg;
diff -r 859124744e7d -r 9df6cf607e84 sys/dev/pci/aceride.c
--- a/sys/dev/pci/aceride.c Fri Nov 05 16:23:56 2010 +0000
+++ b/sys/dev/pci/aceride.c Fri Nov 05 18:07:23 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aceride.c,v 1.28 2010/11/03 11:46:30 nakayama Exp $ */
+/* $NetBSD: aceride.c,v 1.29 2010/11/05 18:07:24 jakllsch Exp $ */
/*
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aceride.c,v 1.28 2010/11/03 11:46:30 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aceride.c,v 1.29 2010/11/05 18:07:24 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -114,7 +114,6 @@
struct pciide_channel *cp;
int channel;
pcireg_t cr, interface;
- bus_size_t cmdsize, ctlsize;
pcireg_t rev = PCI_REVISION(pa->pa_class);
struct aceride_softc *acer_sc = (struct aceride_softc *)sc;
@@ -223,7 +222,7 @@
continue;
}
/* newer controllers seems to lack the ACER_CHIDS. Sigh */
- pciide_mapchan(pa, cp, interface, &cmdsize, &ctlsize,
+ pciide_mapchan(pa, cp, interface,
(rev >= 0xC2) ? pciide_pci_intr : acer_pci_intr);
}
}
diff -r 859124744e7d -r 9df6cf607e84 sys/dev/pci/artsata.c
--- a/sys/dev/pci/artsata.c Fri Nov 05 16:23:56 2010 +0000
+++ b/sys/dev/pci/artsata.c Fri Nov 05 18:07:23 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: artsata.c,v 1.19 2009/11/26 15:17:08 njoly Exp $ */
+/* $NetBSD: artsata.c,v 1.20 2010/11/05 18:07:24 jakllsch Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: artsata.c,v 1.19 2009/11/26 15:17:08 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: artsata.c,v 1.20 2010/11/05 18:07:24 jakllsch Exp $");
#include "opt_pciide.h"
@@ -119,7 +119,6 @@
static void
artisea_mapregs(struct pci_attach_args *pa, struct pciide_channel *cp,
- bus_size_t *cmdsizep, bus_size_t *ctlsizep,
int (*pci_intr)(void *))
{
struct pciide_softc *sc = CHAN_TO_PCIIDE(&cp->ata_channel);
@@ -320,7 +319,6 @@
artisea_chip_map_dpa(struct pciide_softc *sc, struct pci_attach_args *pa)
{
struct pciide_channel *cp;
- bus_size_t cmdsize, ctlsize;
pcireg_t interface;
int channel;
@@ -330,7 +328,7 @@
"interface wired in DPA mode\n");
if (pci_mapreg_map(pa, ARTISEA_PCI_DPA_BASE, PCI_MAPREG_MEM_TYPE_64BIT,
- 0, &sc->sc_ba5_st, &sc->sc_ba5_sh, NULL, NULL) != 0)
+ 0, &sc->sc_ba5_st, &sc->sc_ba5_sh, NULL, &sc->sc_ba5_ss) != 0)
return;
artisea_mapreg_dma(sc, pa);
@@ -380,7 +378,7 @@
if (artisea_chansetup(sc, channel, interface) == 0)
continue;
/* XXX We can probably do interrupts more efficiently. */
- artisea_mapregs(pa, cp, &cmdsize, &ctlsize, pciide_pci_intr);
+ artisea_mapregs(pa, cp, pciide_pci_intr);
}
}
@@ -388,7 +386,6 @@
artisea_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
{
struct pciide_channel *cp;
- bus_size_t cmdsize, ctlsize;
pcireg_t interface;
int channel;
@@ -438,7 +435,6 @@
cp = &sc->pciide_channels[channel];
if (pciide_chansetup(sc, channel, interface) == 0)
continue;
- pciide_mapchan(pa, cp, interface, &cmdsize, &ctlsize,
- pciide_pci_intr);
+ pciide_mapchan(pa, cp, interface, pciide_pci_intr);
}
}
diff -r 859124744e7d -r 9df6cf607e84 sys/dev/pci/cmdide.c
--- a/sys/dev/pci/cmdide.c Fri Nov 05 16:23:56 2010 +0000
+++ b/sys/dev/pci/cmdide.c Fri Nov 05 18:07:23 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cmdide.c,v 1.29 2009/10/19 18:41:14 bouyer Exp $ */
+/* $NetBSD: cmdide.c,v 1.30 2010/11/05 18:07:24 jakllsch Exp $ */
/*
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cmdide.c,v 1.29 2009/10/19 18:41:14 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cmdide.c,v 1.30 2010/11/05 18:07:24 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -124,7 +124,6 @@
int channel)
{
struct pciide_channel *cp = &sc->pciide_channels[channel];
- bus_size_t cmdsize, ctlsize;
u_int8_t ctrl = pciide_pci_read(sc->sc_pc, sc->sc_tag, CMD_CTRL);
int interface, one_channel;
@@ -194,7 +193,7 @@
return;
}
- pciide_mapchan(pa, cp, interface, &cmdsize, &ctlsize, cmd_pci_intr);
+ pciide_mapchan(pa, cp, interface, cmd_pci_intr);
}
static int
@@ -499,7 +498,6 @@
int channel)
{
struct pciide_channel *cp = &sc->pciide_channels[channel];
- bus_size_t cmdsize, ctlsize;
int interface, i, reg;
static const u_int8_t init_val[] =
{ 0x8a, 0x32, 0x8a, 0x32, 0x8a, 0x32,
@@ -541,7 +539,7 @@
(interface & PCIIDE_INTERFACE_PCI(channel)) ?
"native-PCI" : "compatibility");
- pciide_mapchan(pa, cp, interface, &cmdsize, &ctlsize, pciide_pci_intr);
+ pciide_mapchan(pa, cp, interface, pciide_pci_intr);
}
static void
diff -r 859124744e7d -r 9df6cf607e84 sys/dev/pci/cypide.c
--- a/sys/dev/pci/cypide.c Fri Nov 05 16:23:56 2010 +0000
+++ b/sys/dev/pci/cypide.c Fri Nov 05 18:07:23 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cypide.c,v 1.22 2009/10/19 18:41:14 bouyer Exp $ */
+/* $NetBSD: cypide.c,v 1.23 2010/11/05 18:07:24 jakllsch Exp $ */
/*
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cypide.c,v 1.22 2009/10/19 18:41:14 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cypide.c,v 1.23 2010/11/05 18:07:24 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -93,7 +93,6 @@
{
struct pciide_channel *cp;
pcireg_t interface = PCI_INTERFACE(pa->pa_class);
- bus_size_t cmdsize, ctlsize;
if (pciide_chipen(sc, pa) == 0)
return;
@@ -164,12 +163,10 @@
"configured" : "wired");
if (interface & PCIIDE_INTERFACE_PCI(0)) {
aprint_normal("native-PCI mode\n");
- pciide_mapregs_native(pa, cp, &cmdsize, &ctlsize,
- pciide_pci_intr);
+ pciide_mapregs_native(pa, cp, pciide_pci_intr);
} else {
aprint_normal("compatibility mode\n");
- pciide_mapregs_compat(pa, cp, sc->sc_cy_compatchan, &cmdsize,
- &ctlsize);
+ pciide_mapregs_compat(pa, cp, sc->sc_cy_compatchan);
if ((cp->ata_channel.ch_flags & ATACH_DISABLED) == 0)
pciide_map_compat_intr(pa, cp, sc->sc_cy_compatchan);
}
diff -r 859124744e7d -r 9df6cf607e84 sys/dev/pci/geodeide.c
--- a/sys/dev/pci/geodeide.c Fri Nov 05 16:23:56 2010 +0000
+++ b/sys/dev/pci/geodeide.c Fri Nov 05 18:07:23 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: geodeide.c,v 1.16 2009/10/19 18:41:15 bouyer Exp $ */
+/* $NetBSD: geodeide.c,v 1.17 2010/11/05 18:07:24 jakllsch Exp $ */
/*
* Copyright (c) 2004 Manuel Bouyer.
@@ -32,7 +32,7 @@
*/
Home |
Main Index |
Thread Index |
Old Index