summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/ssp-imx233.c
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-07-03 15:18:41 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-07-03 15:18:41 +0000
commite36b20c4a1709ae9fd3020b9f08875c8c03a0912 (patch)
treed17371221234fc16da4e9175fdd0890b7eb58b62 /firmware/target/arm/imx233/ssp-imx233.c
parent22b6def065ab7c2ca030f405577e34104ad20011 (diff)
downloadrockbox-e36b20c4a1709ae9fd3020b9f08875c8c03a0912.tar.gz
rockbox-e36b20c4a1709ae9fd3020b9f08875c8c03a0912.tar.bz2
rockbox-e36b20c4a1709ae9fd3020b9f08875c8c03a0912.zip
imx233/fuze+: replace software i2c by hardware i2c, make some code more correct, reduce code size of lcd init sequences
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30120 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx233/ssp-imx233.c')
-rw-r--r--firmware/target/arm/imx233/ssp-imx233.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/ssp-imx233.c b/firmware/target/arm/imx233/ssp-imx233.c
index ef137fcfbf..59405bbdc2 100644
--- a/firmware/target/arm/imx233/ssp-imx233.c
+++ b/firmware/target/arm/imx233/ssp-imx233.c
@@ -258,6 +258,7 @@ enum imx233_ssp_error_t imx233_ssp_sd_mmc_transfer(int ssp, uint8_t cmd,
(3 << HW_APB_CHx_CMD__CMDWORDS_BP) |
(xfer_size << HW_APB_CHx_CMD__XFER_COUNT_BP);
+ __REG_CLR(HW_SSP_CTRL1(ssp)) = HW_SSP_CTRL1__ALL_IRQ;
imx233_dma_reset_channel(APB_SSP(ssp));
imx233_dma_start_command(APB_SSP(ssp), &ssp_dma_cmd[ssp - 1].dma);
@@ -266,7 +267,10 @@ enum imx233_ssp_error_t imx233_ssp_sd_mmc_transfer(int ssp, uint8_t cmd,
enum imx233_ssp_error_t ret;
if(semaphore_wait(&ssp_sema[ssp - 1], HZ) == OBJ_WAIT_TIMEDOUT)
+ {
+ imx233_dma_reset_channel(APB_SSP(ssp));
ret = SSP_TIMEOUT;
+ }
else if((HW_SSP_CTRL1(ssp) & HW_SSP_CTRL1__ALL_IRQ) == 0)
ret = SSP_SUCCESS;
else if(HW_SSP_CTRL1(ssp) & (HW_SSP_CTRL1__RESP_TIMEOUT_IRQ |