From f25f17c5b60ade629b8b7b0449a6aafab7e32a7d Mon Sep 17 00:00:00 2001 From: Jack Halpin Date: Wed, 7 Apr 2010 05:47:12 +0000 Subject: 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 --- firmware/target/arm/as3525/sd-as3525v2.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'firmware') 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; -- cgit v1.2.3