From patchwork Fri Aug 17 23:54:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/2] ata: pata_octeon_cf: Use correct byte order for DMA in when built little-endian. Date: Fri, 17 Aug 2012 13:54:33 -0000 From: ddaney.cavm@gmail.com X-Patchwork-Id: 178422 Message-Id: <1345247673-25086-3-git-send-email-ddaney.cavm@gmail.com> To: ralf@linux-mips.org, linux-ide@vger.kernel.org, Jeff Garzik Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, David Daney From: David Daney We need to set the 'endian' bit in this case. Signed-off-by: David Daney --- drivers/ata/pata_octeon_cf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c index 652d035..4e1194b 100644 --- a/drivers/ata/pata_octeon_cf.c +++ b/drivers/ata/pata_octeon_cf.c @@ -20,6 +20,7 @@ #include #include +#include #include /* @@ -589,6 +590,9 @@ static void octeon_cf_dma_start(struct ata_queued_cmd *qc) /* Set the direction of the DMA */ mio_boot_dma_cfg.u64 = 0; +#ifdef __LITTLE_ENDIAN + mio_boot_dma_cfg.s.endian = 1; +#endif mio_boot_dma_cfg.s.en = 1; mio_boot_dma_cfg.s.rw = ((qc->tf.flags & ATA_TFLAG_WRITE) != 0);