summaryrefslogtreecommitdiffstats
path: root/sys/arm/mv
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-12-06 00:10:13 +0000
committermav <mav@FreeBSD.org>2009-12-06 00:10:13 +0000
commit6a3018e7cff16ab166672e276b4b39154ad09739 (patch)
tree8def18d183a8f2ec2847c5ef06fe2fac081d798e /sys/arm/mv
parent9bb92ae41af45cc801f28a880e08648aad72e241 (diff)
downloadFreeBSD-src-6a3018e7cff16ab166672e276b4b39154ad09739.zip
FreeBSD-src-6a3018e7cff16ab166672e276b4b39154ad09739.tar.gz
MFp4:
Introduce ATA_CAM kernel option, turning ata(4) controller drivers into cam(4) interface modules. When enabled, this options deprecates all ata(4) peripheral drivers (ad, acd, ...) and interfaces and allows cam(4) drivers (ada, cd, ...) and interfaces to be natively used instead. As side effect of this, ata(4) mode setting code was completely rewritten to make controller API more strict and permit above change. While doing this, SATA revision was separated from PATA mode. It allows DMA-incapable SATA devices to operate and makes hw.ata.atapi_dma tunable work again. Also allow ata(4) controller drivers (except some specific or broken ones) to handle larger data transfers. Previous constraint of 64K was artificial and is not really required by PCI ATA BM specification or hardware. Submitted by: nwitehorn (powerpc part)
Diffstat (limited to 'sys/arm/mv')
-rw-r--r--sys/arm/mv/mv_sata.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/arm/mv/mv_sata.c b/sys/arm/mv/mv_sata.c
index 3593956..7d0649b 100644
--- a/sys/arm/mv/mv_sata.c
+++ b/sys/arm/mv/mv_sata.c
@@ -136,7 +136,7 @@ static int sata_channel_detach(device_t dev);
static int sata_channel_begin_transaction(struct ata_request *request);
static int sata_channel_end_transaction(struct ata_request *request);
static int sata_channel_status(device_t dev);
-static void sata_channel_setmode(device_t parent, device_t dev);
+static int sata_channel_setmode(device_t dev, int target, int mode);
static void sata_channel_reset(device_t dev);
static void sata_channel_dmasetprd(void *xsc, bus_dma_segment_t *segs,
int nsegs, int error);
@@ -748,19 +748,13 @@ sata_channel_reset(device_t dev)
SATA_OUTL(sc, SATA_EDMA_IEMR(ch->unit), 0xFFFFFFFF);
}
-static void
-sata_channel_setmode(device_t parent, device_t dev)
+static int
+sata_channel_setmode(device_t parent, int target, int mode)
{
- struct ata_device *atadev;
-
- atadev = device_get_softc(dev);
/* Disable EDMA before using legacy registers */
sata_edma_ctrl(parent, 0);
-
- ata_sata_setmode(dev, ATA_PIO_MAX);
- if (atadev->mode >= ATA_DMA)
- ata_sata_setmode(dev, atadev->mode);
+ return (ata_sata_setmode(dev, mode));
}
static void
OpenPOWER on IntegriCloud