Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Some controllers must have certain bits always b...
details: https://anonhg.NetBSD.org/src/rev/7db05a5a1cf7
branches: trunk
changeset: 556513:7db05a5a1cf7
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Dec 19 19:09:20 2003 +0000
description:
Some controllers must have certain bits always be set in the IDEDMA_CMD
register for proper operation. Add a prototype field in the pciide_channel
for this register and use it as necessary when writing the IDEDMA_CMD
register.
diffstat:
sys/dev/pci/pciide_common.c | 6 +++---
sys/dev/pci/pciidevar.h | 9 ++++++++-
2 files changed, 11 insertions(+), 4 deletions(-)
diffs (50 lines):
diff -r 528042121d3d -r 7db05a5a1cf7 sys/dev/pci/pciide_common.c
--- a/sys/dev/pci/pciide_common.c Fri Dec 19 19:00:00 2003 +0000
+++ b/sys/dev/pci/pciide_common.c Fri Dec 19 19:09:20 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pciide_common.c,v 1.4 2003/12/19 05:16:57 thorpej Exp $ */
+/* $NetBSD: pciide_common.c,v 1.5 2003/12/19 19:09:20 thorpej Exp $ */
/*
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.4 2003/12/19 05:16:57 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.5 2003/12/19 19:09:20 thorpej Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -653,7 +653,7 @@
dma_maps->dmamap_table->dm_segs[0].ds_addr);
/* set read/write */
bus_space_write_1(sc->sc_dma_iot, cp->dma_iohs[IDEDMA_CMD], 0,
- (flags & WDC_DMA_READ) ? IDEDMA_CMD_WRITE : 0);
+ ((flags & WDC_DMA_READ) ? IDEDMA_CMD_WRITE : 0) | cp->idedma_cmd);
/* remember flags */
dma_maps->dma_flags = flags;
return 0;
diff -r 528042121d3d -r 7db05a5a1cf7 sys/dev/pci/pciidevar.h
--- a/sys/dev/pci/pciidevar.h Fri Dec 19 19:00:00 2003 +0000
+++ b/sys/dev/pci/pciidevar.h Fri Dec 19 19:09:20 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pciidevar.h,v 1.17 2003/12/19 05:55:12 thorpej Exp $ */
+/* $NetBSD: pciidevar.h,v 1.18 2003/12/19 19:09:20 thorpej Exp $ */
/*
* Copyright (c) 1998 Christopher G. Demetriou. All rights reserved.
@@ -123,6 +123,13 @@
int dma_flags;
} dma_maps[2];
bus_space_handle_t dma_iohs[IDEDMA_NREGS];
+ /*
+ * Some controllers require certain bits to
+ * always be set for proper operation of the
+ * controller. Set those bits here, if they're
+ * required.
+ */
+ uint8_t idedma_cmd;
} pciide_channels[PCIIDE_NUM_CHANNELS];
};
Home |
Main Index |
Thread Index |
Old Index