In order for the MA301 to pass interrupts from the PCCard, you must
go into the PLX 9052's interrupt control register and turn on the magic interrupt enable bit. Partial thanks are due to OpenBSD for pointing out that the chip is a PLX 9052 and pointing me to the datasheet PDF.
This commit is contained in:
parent
670f6b2fc6
commit
fa081a357e
@ -381,6 +381,20 @@ wi_pci_attach(device_t dev)
|
||||
CSR_WRITE_2(sc, WI_INT_EN, 0);
|
||||
CSR_WRITE_2(sc, WI_EVENT_ACK, 0xFFFF);
|
||||
|
||||
/* We have to do a magic PLX poke to enable interrupts */
|
||||
sc->local_rid = WI_PCI_LOCALRES;
|
||||
sc->local = bus_alloc_resource(dev, SYS_RES_IOPORT,
|
||||
&sc->local_rid, 0, ~0, 1, RF_ACTIVE);
|
||||
sc->wi_localtag = rman_get_bustag(sc->local);
|
||||
sc->wi_localhandle = rman_get_bushandle(sc->local);
|
||||
command = bus_space_read_4(sc->wi_localtag, sc->wi_localhandle,
|
||||
WI_LOCAL_INTCSR);
|
||||
command |= WI_LOCAL_INTEN;
|
||||
bus_space_write_4(sc->wi_localtag, sc->wi_localhandle,
|
||||
WI_LOCAL_INTCSR, command);
|
||||
bus_release_resource(dev, SYS_RES_IOPORT, sc->local_rid, sc->local);
|
||||
sc->local = NULL;
|
||||
|
||||
sc->mem_rid = WI_PCI_MEMRES;
|
||||
sc->mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->mem_rid,
|
||||
0, ~0, 1, RF_ACTIVE);
|
||||
|
@ -89,12 +89,16 @@ struct wi_softc {
|
||||
struct ifmedia ifmedia;
|
||||
device_t dev;
|
||||
int wi_unit;
|
||||
struct resource * local;
|
||||
int local_rid;
|
||||
struct resource * iobase;
|
||||
int iobase_rid;
|
||||
struct resource * irq;
|
||||
int irq_rid;
|
||||
struct resource * mem;
|
||||
int mem_rid;
|
||||
bus_space_handle_t wi_localhandle;
|
||||
bus_space_tag_t wi_localtag;
|
||||
bus_space_handle_t wi_bhandle;
|
||||
bus_space_tag_t wi_btag;
|
||||
bus_space_handle_t wi_bmemhandle;
|
||||
@ -146,9 +150,12 @@ struct wi_softc {
|
||||
#define WI_PORT4 4
|
||||
#define WI_PORT5 5
|
||||
|
||||
#define WI_PCI_MEMRES 0x18
|
||||
#define WI_PCI_IORES 0x1C
|
||||
#define WI_PCI_LOCALRES 0x14 /* The PLX chip's local registers */
|
||||
#define WI_PCI_MEMRES 0x18 /* The PCCard's attribute memory */
|
||||
#define WI_PCI_IORES 0x1C /* The PCCard's I/O space */
|
||||
|
||||
#define WI_LOCAL_INTCSR 0x4c
|
||||
#define WI_LOCAL_INTEN 0x40
|
||||
#define WI_HFA384X_SWSUPPORT0_OFF 0x28
|
||||
#define WI_PRISM2STA_MAGIC 0x4A2D
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user