summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2008-04-26 11:01:38 +0000
committermarius <marius@FreeBSD.org>2008-04-26 11:01:38 +0000
commitcea060d682520e7be22be9111ea74d28f51de01a (patch)
tree6671742869f22d63c49a444ca1faad75eaf388f4 /sys
parent2381edc5468ff27df84fcf44a3cf35b65691e9d7 (diff)
downloadFreeBSD-src-cea060d682520e7be22be9111ea74d28f51de01a.zip
FreeBSD-src-cea060d682520e7be22be9111ea74d28f51de01a.tar.gz
Remove the MD isa_irq_pending() and the underlying PCI-specific
infrastructure. Its only consumer ever was sio(4) and thus was unused on sparc64 since removing the last traces of sio(4) in sparc64 configuration files in favor for uart(4) over three years ago. If similar functionality is required again it should be brought back as an MD intr_pending() which works for all busses by using for example interrupt controller hooks.
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/files.sparc641
-rw-r--r--sys/conf/files.sun4v1
-rw-r--r--sys/sparc64/isa/isa.c30
-rw-r--r--sys/sparc64/pci/ofw_pci.h2
-rw-r--r--sys/sparc64/pci/ofw_pci_if.m53
-rw-r--r--sys/sparc64/pci/psycho.c19
-rw-r--r--sys/sun4v/sun4v/hv_pci.c11
7 files changed, 0 insertions, 117 deletions
diff --git a/sys/conf/files.sparc64 b/sys/conf/files.sparc64
index 00b7c45..b4aac0b 100644
--- a/sys/conf/files.sparc64
+++ b/sys/conf/files.sparc64
@@ -83,7 +83,6 @@ sparc64/pci/apb.c optional pci
sparc64/pci/ofw_pcib.c optional pci
sparc64/pci/ofw_pcib_subr.c optional pci
sparc64/pci/ofw_pcibus.c optional pci
-sparc64/pci/ofw_pci_if.m optional pci
sparc64/pci/psycho.c optional pci
sparc64/sbus/dma_sbus.c optional sbus
sparc64/sbus/sbus.c optional sbus
diff --git a/sys/conf/files.sun4v b/sys/conf/files.sun4v
index 700ca8a..f05dba1 100644
--- a/sys/conf/files.sun4v
+++ b/sys/conf/files.sun4v
@@ -49,7 +49,6 @@ sun4v/sun4v/trap_trace.S optional trap_tracing
sparc64/pci/ofw_pcib.c optional pci
sparc64/pci/ofw_pcib_subr.c optional pci
sparc64/pci/ofw_pcibus.c optional pci
-sparc64/pci/ofw_pci_if.m optional pci
# XXX hvcons should be optional
sun4v/sun4v/hvcons.c standard
diff --git a/sys/sparc64/isa/isa.c b/sys/sparc64/isa/isa.c
index 78ea93f..be76e01 100644
--- a/sys/sparc64/isa/isa.c
+++ b/sys/sparc64/isa/isa.c
@@ -64,7 +64,6 @@ device_t isa_bus_device;
static phandle_t isab_node;
static struct isa_ranges *isab_ranges;
static int isab_nrange;
-static ofw_pci_intr_t isa_ino[8];
static struct ofw_bus_iinfo isa_iinfo;
/*
@@ -82,23 +81,6 @@ static struct ofw_bus_iinfo isa_iinfo;
static void isa_setup_children(device_t, phandle_t);
-intrmask_t
-isa_irq_pending(void)
-{
- intrmask_t pending;
- int i;
-
- /* XXX: Is this correct? */
- for (i = 7, pending = 0; i >= 0; i--) {
- pending <<= 1;
- if (isa_ino[i] != PCI_INVALID_IRQ) {
- pending |= (OFW_PCI_INTR_PENDING(isa_bus_device,
- isa_ino[i]) == 0) ? 0 : 1;
- }
- }
- return (pending);
-}
-
void
isa_init(device_t dev)
{
@@ -115,17 +97,6 @@ isa_init(device_t dev)
ofw_bus_setup_iinfo(isab_node, &isa_iinfo, sizeof(ofw_isa_intr_t));
- /*
- * This is really a bad kludge; however, it is needed to provide
- * isa_irq_pending(), which is unfortunately still used by some
- * drivers.
- * XXX: The only driver still using isa_irq_pending() is sio(4)
- * which we don't use on sparc64. Should we just drop support
- * for isa_irq_pending()?
- */
- for (i = 0; i < 8; i++)
- isa_ino[i] = PCI_INVALID_IRQ;
-
isa_setup_children(dev, isab_node);
for (i = isab_nrange - 1; i >= 0; i--) {
@@ -275,7 +246,6 @@ isa_setup_children(device_t dev, phandle_t parent)
intrs[i], (unsigned long)node, name);
continue;
}
- isa_ino[intrs[i]] = rintr;
bus_set_resource(cdev, SYS_RES_IRQ, i, rintr, 1);
}
if (intrs != NULL)
diff --git a/sys/sparc64/pci/ofw_pci.h b/sys/sparc64/pci/ofw_pci.h
index 40d531e..352b8b8 100644
--- a/sys/sparc64/pci/ofw_pci.h
+++ b/sys/sparc64/pci/ofw_pci.h
@@ -38,8 +38,6 @@
typedef uint32_t ofw_pci_intr_t;
-#include "ofw_pci_if.h"
-
/* PCI range child spaces. XXX: are these MI? */
#define OFW_PCI_CS_CONFIG 0x00
#define OFW_PCI_CS_IO 0x01
diff --git a/sys/sparc64/pci/ofw_pci_if.m b/sys/sparc64/pci/ofw_pci_if.m
deleted file mode 100644
index ee0e99c..0000000
--- a/sys/sparc64/pci/ofw_pci_if.m
+++ /dev/null
@@ -1,53 +0,0 @@
-#-
-# Copyright (c) 2001, 2003 by Thomas Moestl <tmm@FreeBSD.org>
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# $FreeBSD$
-
-#include <sys/bus.h>
-
-#include <dev/ofw/openfirm.h>
-
-#include <sparc64/pci/ofw_pci.h>
-
-INTERFACE ofw_pci;
-
-CODE {
- static ofw_pci_intr_pending_t ofw_pci_default_intr_pending;
-
- static int
- ofw_pci_default_intr_pending(device_t dev, ofw_pci_intr_t intr)
- {
-
- if (device_get_parent(dev) != NULL)
- return (OFW_PCI_INTR_PENDING(device_get_parent(dev),
- intr));
- return (0);
- }
-};
-
-# Return whether an interrupt request is pending for the INO intr.
-METHOD int intr_pending {
- device_t dev;
- ofw_pci_intr_t intr;
-} DEFAULT ofw_pci_default_intr_pending;
diff --git a/sys/sparc64/pci/psycho.c b/sys/sparc64/pci/psycho.c
index 87c9df8..4ea8d73 100644
--- a/sys/sparc64/pci/psycho.c
+++ b/sys/sparc64/pci/psycho.c
@@ -121,7 +121,6 @@ static pcib_maxslots_t psycho_maxslots;
static pcib_read_config_t psycho_read_config;
static pcib_write_config_t psycho_write_config;
static pcib_route_interrupt_t psycho_route_interrupt;
-static ofw_pci_intr_pending_t psycho_intr_pending;
static ofw_bus_get_node_t psycho_get_node;
static device_method_t psycho_methods[] = {
@@ -152,9 +151,6 @@ static device_method_t psycho_methods[] = {
/* ofw_bus interface */
DEVMETHOD(ofw_bus_get_node, psycho_get_node),
- /* ofw_pci interface */
- DEVMETHOD(ofw_pci_intr_pending, psycho_intr_pending),
-
{ 0, 0 }
};
@@ -1373,21 +1369,6 @@ psycho_get_dma_tag(device_t bus, device_t child)
return (sc->sc_pci_dmat);
}
-static int
-psycho_intr_pending(device_t dev, ofw_pci_intr_t intr)
-{
- struct psycho_softc *sc;
- u_long diag;
-
- sc = device_get_softc(dev);
- if (psycho_find_intrmap(sc, intr, NULL, NULL, &diag) == 0) {
- device_printf(dev, "%s: mapping not found for %d\n", __func__,
- intr);
- return (0);
- }
- return (diag != 0);
-}
-
static phandle_t
psycho_get_node(device_t bus, device_t dev)
{
diff --git a/sys/sun4v/sun4v/hv_pci.c b/sys/sun4v/sun4v/hv_pci.c
index d4ed288..204844a 100644
--- a/sys/sun4v/sun4v/hv_pci.c
+++ b/sys/sun4v/sun4v/hv_pci.c
@@ -85,7 +85,6 @@ static pcib_read_config_t hvpci_read_config;
static pcib_write_config_t hvpci_write_config;
static pcib_route_interrupt_t hvpci_route_interrupt;
static ofw_bus_get_node_t hvpci_get_node;
-static ofw_pci_intr_pending_t hvpci_intr_pending;
static device_method_t hv_pcib_methods[] = {
/* Device interface */
@@ -116,9 +115,6 @@ static device_method_t hv_pcib_methods[] = {
/* ofw_bus interface */
DEVMETHOD(ofw_bus_get_node, hvpci_get_node),
- /* ofw_pci interface */
- DEVMETHOD(ofw_pci_intr_pending, hvpci_intr_pending),
-
{ 0, 0 }
};
@@ -357,13 +353,6 @@ hvpci_get_node(device_t bus, device_t dev)
}
static int
-hvpci_intr_pending(device_t dev, ofw_pci_intr_t intr)
-{
- /* XXX - implement */
- panic("unimplemnted");
-}
-
-static int
hvpci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
{
struct hvpci_softc *sc;
OpenPOWER on IntegriCloud