Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Add special IRQ handler for CMD PCI0648 and PCI0...
details: https://anonhg.NetBSD.org/src/rev/0bd70f1294f8
branches: trunk
changeset: 493922:0bd70f1294f8
user: tron <tron%NetBSD.org@localhost>
date: Tue Jun 27 05:57:05 2000 +0000
description:
Add special IRQ handler for CMD PCI0648 and PCI0649 taken from the
experimental version of Manuel Bouyer's driver.
diffstat:
sys/dev/pci/pciide.c | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diffs (59 lines):
diff -r 3ca0c8e5c632 -r 0bd70f1294f8 sys/dev/pci/pciide.c
--- a/sys/dev/pci/pciide.c Tue Jun 27 05:53:22 2000 +0000
+++ b/sys/dev/pci/pciide.c Tue Jun 27 05:57:05 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pciide.c,v 1.71 2000/06/26 14:21:12 mrg Exp $ */
+/* $NetBSD: pciide.c,v 1.72 2000/06/27 05:57:05 tron Exp $ */
/*
@@ -170,6 +170,7 @@
void cmd_channel_map __P((struct pci_attach_args *,
struct pciide_softc *, int));
int cmd_pci_intr __P((void *));
+void cmd648_9_irqack __P((struct channel_softc *));
void cy693_chip_map __P((struct pciide_softc*, struct pci_attach_args*));
void cy693_setup_channel __P((struct channel_softc*));
@@ -2163,12 +2164,15 @@
WDC_CAPABILITY_MODE;
if (sc->sc_dma_ok) {
sc->sc_wdcdev.cap |= WDC_CAPABILITY_DMA | WDC_CAPABILITY_IRQACK;
- sc->sc_wdcdev.irqack = pciide_irqack;
switch (sc->sc_pp->ide_product) {
case PCI_PRODUCT_CMDTECH_649:
case PCI_PRODUCT_CMDTECH_648:
sc->sc_wdcdev.cap |= WDC_CAPABILITY_UDMA;
sc->sc_wdcdev.UDMA_cap = 4;
+ sc->sc_wdcdev.irqack = cmd648_9_irqack;
+ break;
+ default:
+ sc->sc_wdcdev.irqack = pciide_irqack;
}
}
@@ -2278,6 +2282,24 @@
}
void
+cmd648_9_irqack(chp)
+ struct channel_softc *chp;
+{
+ u_int32_t priirq, secirq;
+ struct pciide_channel *cp = (struct pciide_channel*)chp;
+ struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.wdc;
+
+ if (chp->channel == 0) {
+ priirq = pciide_pci_read(sc->sc_pc, sc->sc_tag, CMD_CONF);
+ pciide_pci_write(sc->sc_pc, sc->sc_tag, CMD_CONF, priirq);
+ } else {
+ secirq = pciide_pci_read(sc->sc_pc, sc->sc_tag, CMD_ARTTIM23);
+ pciide_pci_write(sc->sc_pc, sc->sc_tag, CMD_ARTTIM23, secirq);
+ }
+ pciide_irqack(chp);
+}
+
+void
cy693_chip_map(sc, pa)
struct pciide_softc *sc;
struct pci_attach_args *pa;
Home |
Main Index |
Thread Index |
Old Index