From: David Daney <ddaney.cavm@gmail.com>
To: ralf@linux-mips.org, linux-ide@vger.kernel.org,
Jeff Garzik <jgarzik@pobox.com>
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
David Daney <david.daney@cavium.com>
Subject: [PATCH 2/2] ata: pata_octeon_cf: Use correct byte order for DMA in when built little-endian.
Date: Fri, 17 Aug 2012 16:54:33 -0700 [thread overview]
Message-ID: <1345247673-25086-3-git-send-email-ddaney.cavm@gmail.com> (raw)
In-Reply-To: <1345247673-25086-1-git-send-email-ddaney.cavm@gmail.com>
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
next prev parent reply other threads:[~2012-08-17 23:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-17 23:54 [PATCH 0/2] ata: Updates for pata_octeon_cf driver David Daney
2012-08-17 23:54 ` [PATCH 1/2] MIPS/OCTEON/ata: Convert pata_octeon_cf.c to use device tree David Daney
2012-08-17 23:54 ` David Daney [this message]
2012-08-18 0:19 ` [PATCH 0/2] ata: Updates for pata_octeon_cf driver Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1345247673-25086-3-git-send-email-ddaney.cavm@gmail.com \
--to=ddaney.cavm@gmail.com \
--cc=david.daney@cavium.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).