From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 4/9] ata: align ata command defines with kernel
Date: Thu, 6 Dec 2012 14:34:25 +0100 [thread overview]
Message-ID: <1354800870-28385-5-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1354800870-28385-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/ata/ide-sff.c | 6 +++---
include/ata_drive.h | 9 +++++----
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/ata/ide-sff.c b/drivers/ata/ide-sff.c
index 6a452d6..3dd6f63 100644
--- a/drivers/ata/ide-sff.c
+++ b/drivers/ata/ide-sff.c
@@ -181,7 +181,7 @@ static int ide_read_id(struct ata_port *port, void *buf)
writeb(0x00, ide->io->lbam_addr);
writeb(0x00, ide->io->lbah_addr);
- rc = ata_wr_cmd(ide, ATA_CMD_ID_DEVICE);
+ rc = ata_wr_cmd(ide, ATA_CMD_ID_ATA);
if (rc != 0)
return rc;
@@ -264,7 +264,7 @@ static int ide_read(struct ata_port *port, void *buffer, unsigned int block,
rc = ata_set_lba_sector(ide, DISK_MASTER, sector);
if (rc != 0)
return rc;
- rc = ata_wr_cmd(ide, ATA_CMD_RD);
+ rc = ata_wr_cmd(ide, ATA_CMD_READ);
if (rc != 0)
return rc;
rc = ata_wait_ready(ide, MAX_TIMEOUT);
@@ -303,7 +303,7 @@ static int __maybe_unused ide_write(struct ata_port *port,
rc = ata_set_lba_sector(ide, DISK_MASTER, sector);
if (rc != 0)
return rc;
- rc = ata_wr_cmd(ide, ATA_CMD_WR);
+ rc = ata_wr_cmd(ide, ATA_CMD_WRITE);
if (rc != 0)
return rc;
ata_wr_sector(ide, buffer);
diff --git a/include/ata_drive.h b/include/ata_drive.h
index 10edd51..1996321 100644
--- a/include/ata_drive.h
+++ b/include/ata_drive.h
@@ -35,10 +35,11 @@
#define IDE_REG_DEV_CTL 0x00
#define IDE_REG_DRV_ADDR 0x01
-#define ATA_CMD_ID_DEVICE 0xEC
-#define ATA_CMD_RD_CONF 0x40
-#define ATA_CMD_RD 0x20
-#define ATA_CMD_WR 0x30
+#define ATA_CMD_ID_ATA 0xEC
+#define ATA_CMD_READ 0x20
+#define ATA_CMD_READ_EXT 0x25
+#define ATA_CMD_WRITE 0x30
+#define ATA_CMD_WRITE_EXT 0x35
/* drive's status flags */
#define ATA_STATUS_BUSY (1 << 7)
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-12-06 13:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-06 13:34 [PATCH] AHCI support Sascha Hauer
2012-12-06 13:34 ` [PATCH 1/9] ata: register disks as /dev/ata* Sascha Hauer
2012-12-06 13:34 ` [PATCH 2/9] ata: fix status flags Sascha Hauer
2012-12-06 13:34 ` [PATCH 3/9] ata: split ide sff suport to separate file Sascha Hauer
2012-12-06 13:34 ` Sascha Hauer [this message]
2012-12-06 13:34 ` [PATCH 5/9] ata: Use dma_alloc for buffer Sascha Hauer
2012-12-06 13:34 ` [PATCH 6/9] ata: Add ahci support Sascha Hauer
2012-12-06 13:34 ` [PATCH 7/9] mfd: Add i.MX6 iomux gpr header file Sascha Hauer
2012-12-06 13:34 ` [PATCH 8/9] ata: Add i.MX AHCI driver Sascha Hauer
2012-12-06 13:34 ` [PATCH 9/9] ARM i.MX5: Add SATA support Sascha Hauer
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=1354800870-28385-5-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.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