mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
This commit is contained in:
parent
9eccca0843
commit
f571872671
13 changed files with 119 additions and 119 deletions
|
|
@ -182,31 +182,31 @@ static void rackmeter_setup_dbdma(struct rackmeter *rm)
|
|||
|
||||
/* Prepare 4 dbdma commands for the 2 buffers */
|
||||
memset(cmd, 0, 4 * sizeof(struct dbdma_cmd));
|
||||
st_le16(&cmd->req_count, 4);
|
||||
st_le16(&cmd->command, STORE_WORD | INTR_ALWAYS | KEY_SYSTEM);
|
||||
st_le32(&cmd->phy_addr, rm->dma_buf_p +
|
||||
cmd->req_count = cpu_to_le16(4);
|
||||
cmd->command = cpu_to_le16(STORE_WORD | INTR_ALWAYS | KEY_SYSTEM);
|
||||
cmd->phy_addr = cpu_to_le32(rm->dma_buf_p +
|
||||
offsetof(struct rackmeter_dma, mark));
|
||||
st_le32(&cmd->cmd_dep, 0x02000000);
|
||||
cmd->cmd_dep = cpu_to_le32(0x02000000);
|
||||
cmd++;
|
||||
|
||||
st_le16(&cmd->req_count, SAMPLE_COUNT * 4);
|
||||
st_le16(&cmd->command, OUTPUT_MORE);
|
||||
st_le32(&cmd->phy_addr, rm->dma_buf_p +
|
||||
cmd->req_count = cpu_to_le16(SAMPLE_COUNT * 4);
|
||||
cmd->command = cpu_to_le16(OUTPUT_MORE);
|
||||
cmd->phy_addr = cpu_to_le32(rm->dma_buf_p +
|
||||
offsetof(struct rackmeter_dma, buf1));
|
||||
cmd++;
|
||||
|
||||
st_le16(&cmd->req_count, 4);
|
||||
st_le16(&cmd->command, STORE_WORD | INTR_ALWAYS | KEY_SYSTEM);
|
||||
st_le32(&cmd->phy_addr, rm->dma_buf_p +
|
||||
cmd->req_count = cpu_to_le16(4);
|
||||
cmd->command = cpu_to_le16(STORE_WORD | INTR_ALWAYS | KEY_SYSTEM);
|
||||
cmd->phy_addr = cpu_to_le32(rm->dma_buf_p +
|
||||
offsetof(struct rackmeter_dma, mark));
|
||||
st_le32(&cmd->cmd_dep, 0x01000000);
|
||||
cmd->cmd_dep = cpu_to_le32(0x01000000);
|
||||
cmd++;
|
||||
|
||||
st_le16(&cmd->req_count, SAMPLE_COUNT * 4);
|
||||
st_le16(&cmd->command, OUTPUT_MORE | BR_ALWAYS);
|
||||
st_le32(&cmd->phy_addr, rm->dma_buf_p +
|
||||
cmd->req_count = cpu_to_le16(SAMPLE_COUNT * 4);
|
||||
cmd->command = cpu_to_le16(OUTPUT_MORE | BR_ALWAYS);
|
||||
cmd->phy_addr = cpu_to_le32(rm->dma_buf_p +
|
||||
offsetof(struct rackmeter_dma, buf2));
|
||||
st_le32(&cmd->cmd_dep, rm->dma_buf_p);
|
||||
cmd->cmd_dep = cpu_to_le32(rm->dma_buf_p);
|
||||
|
||||
rackmeter_do_pause(rm, 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue