summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-02-21 22:01:29 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-02-21 22:01:29 +0000
commit95f063cc6f7201e6d806fa6b903c08b4132df2da (patch)
treee97d0c932dd530ea5efbf3979ccb8a857baa0839 /firmware
parentad7d84d3150ce9ad047e5637ba004c93f7ab88cb (diff)
downloadrockbox-95f063cc6f7201e6d806fa6b903c08b4132df2da.tar.gz
rockbox-95f063cc6f7201e6d806fa6b903c08b4132df2da.tar.bz2
rockbox-95f063cc6f7201e6d806fa6b903c08b4132df2da.zip
sd-as3525v2: MCI_FIFOTH bits
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24830 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index 72a3631bb7..c547befa35 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -160,6 +160,13 @@ static void printf(const char *format, ...)
#define MCI_FIFOTH SD_REG(0x4C) /* FIFO threshold */
+/* TX watermark : bits 11:0
+ * RX watermark : bits 27:16
+ * DMA MTRANS SIZE : bits 30:28
+ * bits 31, 15:12 : unused
+ */
+#define MCI_FIFOTH_MASK 0x8000f000
+
#define MCI_CDETECT SD_REG(0x50) /* card detect */
#define MCI_WRTPRT SD_REG(0x54) /* write protect */
#define MCI_GPIO SD_REG(0x58)
@@ -499,10 +506,10 @@ static void init_controller(void)
MCI_DEBNCE = 0xfffff; /* default value */
- MCI_FIFOTH = ~0x7fff0fff;
+ MCI_FIFOTH &= MCI_FIFOTH_MASK;
MCI_FIFOTH |= 0x503f0080;
- MCI_MASK = 0xffffffff & (~MCI_INT_ACD & ~MCI_INTCRDRET);
+ MCI_MASK = 0xffffffff & ~(MCI_INT_ACD|MCI_INT_CRDDET);
}
int sd_init(void)
@@ -669,7 +676,7 @@ static int sd_transfer_sectors(unsigned long start, int count, void* buf, bool w
MCI_MASK = MCI_INT_CD|MCI_INT_DTO|MCI_INT_DCRC|MCI_INT_DRTO| \
MCI_INT_HTO|MCI_INT_FRUN|MCI_INT_HLE|MCI_INT_SBE|MCI_INT_EBE;
- MCI_FIFOTH &= ~0x7fff0fff;
+ MCI_FIFOTH &= MCI_FIFOTH_MASK;
MCI_FIFOTH |= 0x503f0080;