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.
This commit is contained in:
marius 2008-04-26 11:01:38 +00:00
parent 2381edc546
commit cea060d682
7 changed files with 0 additions and 117 deletions

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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;

View File

@ -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)
{

View File

@ -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 }
};
@ -356,13 +352,6 @@ hvpci_get_node(device_t bus, device_t dev)
return (sc->hs_node);
}
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)
{