summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pcic_pci.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-06-09 07:34:17 +0000
committerimp <imp@FreeBSD.org>2001-06-09 07:34:17 +0000
commitd12ef14587fb909fd0f7302ae70a13b5673b7036 (patch)
treee017924fdb52764e3a6506ecaf870008190f3128 /sys/pccard/pcic_pci.c
parent3177247cd55b43b6a15f29ec5eecb77bf203a68b (diff)
downloadFreeBSD-src-d12ef14587fb909fd0f7302ae70a13b5673b7036.zip
FreeBSD-src-d12ef14587fb909fd0f7302ae70a13b5673b7036.tar.gz
First stab at adding back in CL-PD6729 support.
Diffstat (limited to 'sys/pccard/pcic_pci.c')
-rw-r--r--sys/pccard/pcic_pci.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/pccard/pcic_pci.c b/sys/pccard/pcic_pci.c
index 60c6ecf..df7b1ae 100644
--- a/sys/pccard/pcic_pci.c
+++ b/sys/pccard/pcic_pci.c
@@ -414,6 +414,7 @@ pcic_pci_attach(device_t dev)
int rid;
struct resource *r;
int error;
+ static int num6729;
/*
* In sys/pci/pcireg.h, PCIR_COMMAND must be separated
@@ -430,7 +431,20 @@ pcic_pci_attach(device_t dev)
sockbase = pci_read_config(dev, 0x10, 4);
if (sockbase & 0x1) {
device_printf(dev, "I/O mapped device!\n");
- return (EIO);
+ sc->iorid = CB_PCI_SOCKET_BASE;
+ sc->iores = bus_alloc_resource(dev, SYS_RES_IOPORT,
+ &sc->iorid, 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
+ if (sc->iores == NULL)
+ return (ENOMEM);
+ sp->getb = pcic_getb_io;
+ sp->putb = pcic_putb_io;
+ sc->bst = sp->bst = rman_get_bustag(sc->iores);
+ sc->bsh = sp->bsh = rman_get_bushandle(sc->iores);
+ sp->offset = (num6729 % 2) * PCIC_SLOT_SIZE;
+ sp->controller = PCIC_PD672X;
+ sp->revision = 0;
+ sc->flags = PCIC_PD_POWER;
+ num6729++;
} else {
sc->memrid = CB_PCI_SOCKET_BASE;
sc->memres = bus_alloc_resource(dev, SYS_RES_MEMORY,
OpenPOWER on IntegriCloud