From: David Daney Date: Fri, 3 Feb 2012 17:36:57 +0000 (-0800) Subject: ata: pata_octeon_cf: Use correct byte order for DMA in when built little-endian. X-Git-Tag: upstream/snapshot3+hdmi~6066^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1007c4bc0f66925d92886dd9e664a1d49bbf6140;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: David Daney --- 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);