diff options
author | Jack Halpin <jack.halpin@gmail.com> | 2010-04-07 05:47:12 +0000 |
---|---|---|
committer | Jack Halpin <jack.halpin@gmail.com> | 2010-04-07 05:47:12 +0000 |
commit | f25f17c5b60ade629b8b7b0449a6aafab7e32a7d (patch) | |
tree | baad312cfa266826fd8443141a94e7d5e942c897 /firmware/target/arm/as3525/sd-as3525v2.c | |
parent | 87eea33def283e23e239e716ee67093b0bdde226 (diff) |
sd-as3525v2: Set SD FIFO TX/RX watermarks once in init_controller() and leave them alone after that.
We only use DMA transfers so we should not need to change/reset the FIFO configuration.
Also add comment showing what we set as the TX/RX watermarks.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25507 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/sd-as3525v2.c')
-rw-r--r-- | firmware/target/arm/as3525/sd-as3525v2.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c index 7765201d16..5797dea7f5 100644 --- a/firmware/target/arm/as3525/sd-as3525v2.c +++ b/firmware/target/arm/as3525/sd-as3525v2.c @@ -655,8 +655,8 @@ static void init_controller(void) MCI_DEBNCE = 0xfffff; /* default value */ - MCI_FIFOTH &= MCI_FIFOTH_MASK; - MCI_FIFOTH |= 0x503f0080; + /* Rx watermark = 63(sd reads) Tx watermark = 128 (sd writes) */ + MCI_FIFOTH = (MCI_FIFOTH & MCI_FIFOTH_MASK) | 0x503f0080; MCI_MASK = 0xffff & ~(MCI_INT_ACD|MCI_INT_CRDDET|MCI_INT_RXDR|MCI_INT_TXDR); @@ -820,9 +820,6 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start, MCI_MASK |= (MCI_DATA_ERROR | MCI_INT_DTO); MCI_CTRL |= DMA_ENABLE; - MCI_FIFOTH &= MCI_FIFOTH_MASK; - MCI_FIFOTH |= 0x503f0080; - int arg = start; if(!(card_info[drive].ocr & (1<<30))) /* not SDHC */ arg *= SD_BLOCK_SIZE; |