linux-mips
[Top] [All Lists]

[PATCH 2/2] ata: pata_octeon_cf: Use correct byte order for DMA in when

To: ralf@linux-mips.org, linux-ide@vger.kernel.org, Jeff Garzik <jgarzik@pobox.com>
Subject: [PATCH 2/2] ata: pata_octeon_cf: Use correct byte order for DMA in when built little-endian.
From: David Daney <ddaney.cavm@gmail.com>
Date: Fri, 17 Aug 2012 16:54:33 -0700
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, David Daney <david.daney@cavium.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=KrVsgqL6xbIRMUCIK4BqQxzONkuEL3/3Z3tPldL+UYQ=; b=OLXhs/jQOu79Dcb2R7rbdxxWslzsSmVGZpUFXvWASR72VVxjTV86760F3J62lJB16f PgheyfJTVryCbPfH+1IpGfczSTu2coTVuhfFEyqtagzqAEzMikPMomyCHxqus0k3qylv uVT+tr85xdLSjPeA5mbu7xhNdo+WU6+Xwj+nr60AGhHivz87N/lCVcxplLOQjlKDcPI/ gBpRJkCWERV72W4iJqsJF88ovHFVpfOwr+Ly4B7NPpCVb6n2uwgqjAA4aBx8pp1b+eRa yU7/a/U9tN+O7PyAP9s4eVSvgGnvdmWjX8/9NjJlXLQPXPJ2dOmkMOWHE3PMJOZcBihE F0Jg==
In-reply-to: <1345247673-25086-1-git-send-email-ddaney.cavm@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1345247673-25086-1-git-send-email-ddaney.cavm@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: David Daney <david.daney@cavium.com>

We need to set the 'endian' bit in this case.

Signed-off-by: David Daney <david.daney@cavium.com>
---
 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 <linux/platform_device.h>
 #include <scsi/scsi_host.h>
 
+#include <asm/byteorder.h>
 #include <asm/octeon/octeon.h>
 
 /*
@@ -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);
 
-- 
1.7.11.2


<Prev in Thread] Current Thread [Next in Thread>