summaryrefslogtreecommitdiff
path: root/sys/alpha/pci/apecs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/alpha/pci/apecs.c')
-rw-r--r--sys/alpha/pci/apecs.c84
1 files changed, 5 insertions, 79 deletions
diff --git a/sys/alpha/pci/apecs.c b/sys/alpha/pci/apecs.c
index 66bedcfcf03d7..433410225271f 100644
--- a/sys/alpha/pci/apecs.c
+++ b/sys/alpha/pci/apecs.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: apecs.c,v 1.4 1998/12/04 22:54:42 archie Exp $
+ * $Id: apecs.c,v 1.1 1998/08/10 07:53:59 dfr Exp $
*/
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -60,16 +60,12 @@
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/bus.h>
-#include <sys/rman.h>
#include <alpha/pci/apecsreg.h>
#include <alpha/pci/apecsvar.h>
-#include <alpha/pci/pcibus.h>
#include <machine/intr.h>
-#include <machine/intrcnt.h>
#include <machine/cpuconf.h>
#include <machine/swiz.h>
-#include <machine/rpb.h>
#define KV(pa) ALPHA_PHYS_TO_K0SEG(pa)
@@ -107,8 +103,6 @@ static alpha_chipset_cfgwriteb_t apecs_swiz_cfgwriteb;
static alpha_chipset_cfgwritew_t apecs_swiz_cfgwritew;
static alpha_chipset_cfgwritel_t apecs_swiz_cfgwritel;
static alpha_chipset_addrcvt_t apecs_cvt_dense;
-static alpha_chipset_read_hae_t apecs_read_hae;
-static alpha_chipset_write_hae_t apecs_write_hae;
static alpha_chipset_t apecs_swiz_chipset = {
apecs_swiz_inb,
@@ -132,8 +126,6 @@ static alpha_chipset_t apecs_swiz_chipset = {
apecs_swiz_cfgwritel,
apecs_cvt_dense,
NULL,
- apecs_read_hae,
- apecs_write_hae,
};
static int
@@ -427,37 +419,18 @@ apecs_cvt_dense(vm_offset_t addr)
}
-static u_int64_t
-apecs_read_hae(void)
-{
- return apecs_hae_mem & 0xf8000000;
-}
-
-static void
-apecs_write_hae(u_int64_t hae)
-{
- u_int32_t pa = hae;
- apecs_swiz_set_hae_mem(&pa);
-}
static int apecs_probe(device_t dev);
static int apecs_attach(device_t dev);
-static int apecs_setup_intr(device_t dev, device_t child, struct resource *irq,
- driver_intr_t *intr, void *arg, void **cookiep);
-static int apecs_teardown_intr(device_t dev, device_t child,
- struct resource *irq, void *cookie);
+static void *apecs_create_intr(device_t dev, device_t child, int irq, driver_intr_t *intr, void *arg);
+static int apecs_connect_intr(device_t dev, void* ih);
+
static device_method_t apecs_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, apecs_probe),
DEVMETHOD(device_attach, apecs_attach),
/* Bus interface */
- DEVMETHOD(bus_alloc_resource, pci_alloc_resource),
- DEVMETHOD(bus_release_resource, pci_release_resource),
- DEVMETHOD(bus_activate_resource, pci_activate_resource),
- DEVMETHOD(bus_deactivate_resource, pci_deactivate_resource),
- DEVMETHOD(bus_setup_intr, apecs_setup_intr),
- DEVMETHOD(bus_teardown_intr, apecs_teardown_intr),
{ 0, 0 }
};
@@ -498,8 +471,6 @@ apecs_probe(device_t dev)
}
apecs_hae_mem = REGVAL(EPIC_HAXR1);
- pci_init_resources();
-
isa0 = device_add_child(dev, "isa", 0, 0);
return 0;
@@ -512,15 +483,7 @@ apecs_attach(device_t dev)
{
struct apecs_softc* sc = APECS_SOFTC(dev);
apecs_init();
-
- /*
- * the avanti routes interrupts through the isa interrupt
- * controller, so we need to special case it
- */
- if(hwrpb->rpb_type == ST_DEC_2100_A50)
- chipset.intrdev = isa0;
- else
- chipset.intrdev = apecs0;
+ chipset.intrdev = isa0;
sc->dmem_base = APECS_PCI_DENSE;
sc->smem_base = APECS_PCI_SPARSE;
@@ -530,46 +493,9 @@ apecs_attach(device_t dev)
set_iointr(alpha_dispatch_intr);
- snprintf(chipset_type, sizeof(chipset_type), "apecs");
- chipset_bwx = 0;
- chipset_ports = APECS_PCI_SIO;
- chipset_memory = APECS_PCI_SPARSE;
- chipset_dense = APECS_PCI_DENSE;
- chipset_hae_mask = EPIC_HAXR1_EADDR;
-
bus_generic_attach(dev);
return 0;
}
-static int
-apecs_setup_intr(device_t dev, device_t child,
- struct resource *irq,
- driver_intr_t *intr, void *arg, void **cookiep)
-{
- int error;
-
- error = rman_activate_resource(irq);
- if (error)
- return error;
-
- error = alpha_setup_intr(0x900 + (irq->r_start << 4),
- intr, arg, cookiep,
- &intrcnt[INTRCNT_EB64PLUS_IRQ + irq->r_start]);
- if (error)
- return error;
-
- /* Enable PCI interrupt */
- platform.pci_intr_enable(irq->r_start);
- return 0;
-}
-
-static int
-apecs_teardown_intr(device_t dev, device_t child,
- struct resource *irq, void *cookie)
-{
- alpha_teardown_intr(cookie);
- return rman_deactivate_resource(irq);
-}
-
DRIVER_MODULE(apecs, root, apecs_driver, apecs_devclass, 0, 0);