aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2015-02-03 00:36:21 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2015-03-22 23:29:40 -0400
commitf5718726714cd6114876c4e3ca9b6992ab81176c (patch)
treec8cfe34ac28b22e89e8f5aac01c615ac61fbb221 /drivers/ata
parent9eccca0843205f87c00404b663188b88eb248051 (diff)
powerpc: Move Power Macintosh drivers to generic byteswappers
ppc has special instruction forms to efficiently load and store values in non-native endianness. These can be accessed via the arch-specific {ld,st}_le{16,32}() inlines in arch/powerpc/include/asm/swab.h. However, gcc is perfectly capable of generating the byte-reversing load/store instructions when using the normal, generic cpu_to_le*() and le*_to_cpu() functions eaning the arch-specific functions don't have much point. Worse the "le" in the names of the arch specific functions is now misleading, because they always generate byte-reversing forms, but some ppc machines can now run a little-endian kernel. To start getting rid of the arch-specific forms, this patch removes them from all the old Power Macintosh drivers, replacing them with the generic byteswappers. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_macio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c
index a02f76fdcfcd..b0028588ff1c 100644
--- a/drivers/ata/pata_macio.c
+++ b/drivers/ata/pata_macio.c
@@ -540,9 +540,9 @@ static void pata_macio_qc_prep(struct ata_queued_cmd *qc)
540 BUG_ON (pi++ >= MAX_DCMDS); 540 BUG_ON (pi++ >= MAX_DCMDS);
541 541
542 len = (sg_len < MAX_DBDMA_SEG) ? sg_len : MAX_DBDMA_SEG; 542 len = (sg_len < MAX_DBDMA_SEG) ? sg_len : MAX_DBDMA_SEG;
543 st_le16(&table->command, write ? OUTPUT_MORE: INPUT_MORE); 543 table->command = cpu_to_le16(write ? OUTPUT_MORE: INPUT_MORE);
544 st_le16(&table->req_count, len); 544 table->req_count = cpu_to_le16(len);
545 st_le32(&table->phy_addr, addr); 545 table->phy_addr = cpu_to_le32(addr);
546 table->cmd_dep = 0; 546 table->cmd_dep = 0;
547 table->xfer_status = 0; 547 table->xfer_status = 0;
548 table->res_count = 0; 548 table->res_count = 0;
@@ -557,12 +557,12 @@ static void pata_macio_qc_prep(struct ata_queued_cmd *qc)
557 557
558 /* Convert the last command to an input/output */ 558 /* Convert the last command to an input/output */
559 table--; 559 table--;
560 st_le16(&table->command, write ? OUTPUT_LAST: INPUT_LAST); 560 table->command = cpu_to_le16(write ? OUTPUT_LAST: INPUT_LAST);
561 table++; 561 table++;
562 562
563 /* Add the stop command to the end of the list */ 563 /* Add the stop command to the end of the list */
564 memset(table, 0, sizeof(struct dbdma_cmd)); 564 memset(table, 0, sizeof(struct dbdma_cmd));
565 st_le16(&table->command, DBDMA_STOP); 565 table->command = cpu_to_le16(DBDMA_STOP);
566 566
567 dev_dbgdma(priv->dev, "%s: %d DMA list entries\n", __func__, pi); 567 dev_dbgdma(priv->dev, "%s: %d DMA list entries\n", __func__, pi);
568} 568}