aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorDavid Daney <david.daney@cavium.com>2012-02-03 12:36:57 -0500
committerRalf Baechle <ralf@linux-mips.org>2012-12-13 12:15:25 -0500
commit1007c4bc0f66925d92886dd9e664a1d49bbf6140 (patch)
treefde380cb3e59964cdf041a98ef00ccdfaa75f830 /drivers/ata
parent43f01da0f2794b464ade2ffe1f780c69d7ce7b75 (diff)
ata: pata_octeon_cf: Use correct byte order for DMA in when built little-endian.
We need to set the 'endian' bit in this case. Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: David Daney <david.daney@cavium.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_octeon_cf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
index 652d035aa833..4e1194b4c271 100644
--- a/drivers/ata/pata_octeon_cf.c
+++ b/drivers/ata/pata_octeon_cf.c
@@ -20,6 +20,7 @@
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <scsi/scsi_host.h> 21#include <scsi/scsi_host.h>
22 22
23#include <asm/byteorder.h>
23#include <asm/octeon/octeon.h> 24#include <asm/octeon/octeon.h>
24 25
25/* 26/*
@@ -589,6 +590,9 @@ static void octeon_cf_dma_start(struct ata_queued_cmd *qc)
589 590
590 /* Set the direction of the DMA */ 591 /* Set the direction of the DMA */
591 mio_boot_dma_cfg.u64 = 0; 592 mio_boot_dma_cfg.u64 = 0;
593#ifdef __LITTLE_ENDIAN
594 mio_boot_dma_cfg.s.endian = 1;
595#endif
592 mio_boot_dma_cfg.s.en = 1; 596 mio_boot_dma_cfg.s.en = 1;
593 mio_boot_dma_cfg.s.rw = ((qc->tf.flags & ATA_TFLAG_WRITE) != 0); 597 mio_boot_dma_cfg.s.rw = ((qc->tf.flags & ATA_TFLAG_WRITE) != 0);
594 598