summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/ssp-imx233.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-06-16 18:19:59 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-06-16 18:21:49 +0200
commit8390eb931eb409f3e6c769d9179d0e9415c0e080 (patch)
treee8a20994db1a4b6958a82ceae545ff0d51bda291 /firmware/target/arm/imx233/ssp-imx233.c
parent852a82b90a5b718538642ebcffa25a168c98b329 (diff)
downloadrockbox-8390eb931eb409f3e6c769d9179d0e9415c0e080.tar.gz
rockbox-8390eb931eb409f3e6c769d9179d0e9415c0e080.tar.bz2
rockbox-8390eb931eb409f3e6c769d9179d0e9415c0e080.zip
imx233: rewrite dma using new register headers
Change-Id: If73b84d9c9f4a152a54fb9d2dbec895e72d2e753
Diffstat (limited to 'firmware/target/arm/imx233/ssp-imx233.c')
-rw-r--r--firmware/target/arm/imx233/ssp-imx233.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/firmware/target/arm/imx233/ssp-imx233.c b/firmware/target/arm/imx233/ssp-imx233.c
index 400a8d1f91..a6c3028d98 100644
--- a/firmware/target/arm/imx233/ssp-imx233.c
+++ b/firmware/target/arm/imx233/ssp-imx233.c
@@ -285,13 +285,10 @@ enum imx233_ssp_error_t imx233_ssp_sd_mmc_transfer(int ssp, uint8_t cmd,
/* setup the dma parameters */
ssp_dma_cmd[ssp - 1].dma.buffer = buffer;
ssp_dma_cmd[ssp - 1].dma.next = NULL;
- ssp_dma_cmd[ssp - 1].dma.cmd =
- (buffer == NULL ? HW_APB_CHx_CMD__COMMAND__NO_XFER :
- read ? HW_APB_CHx_CMD__COMMAND__WRITE : HW_APB_CHx_CMD__COMMAND__READ) |
- HW_APB_CHx_CMD__IRQONCMPLT | HW_APB_CHx_CMD__SEMAPHORE |
- HW_APB_CHx_CMD__WAIT4ENDCMD |
- (3 << HW_APB_CHx_CMD__CMDWORDS_BP) |
- (xfer_size << HW_APB_CHx_CMD__XFER_COUNT_BP);
+ ssp_dma_cmd[ssp - 1].dma.cmd = BF_OR6(APB_CHx_CMD,
+ COMMAND(buffer == NULL ? BV_APB_CHx_CMD_COMMAND__NO_XFER :
+ read ? BV_APB_CHx_CMD_COMMAND__WRITE : BV_APB_CHx_CMD_COMMAND__READ),
+ IRQONCMPLT(1), SEMAPHORE(1), WAIT4ENDCMD(1), CMDWORDS(3), XFER_COUNT(xfer_size));
SSP_CLRn(SSP_CTRL1, ssp, ALL_IRQ);