From 1ae6307a5a104b817d027abe90f2925bbdc9d4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Sun, 21 Feb 2010 22:49:57 +0000 Subject: [PATCH] sd-as3525v2: panic in case of error in the isr Disable errors on response timeout since it can happen on SD_SEND_IF_COND Disable errors on start bit error : it's ignored by the linux driver No panic on my side with those 2 bits unchecked, but no transfer completion either. Note: the Linux driver doesn't implement DMA git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24837 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/as3525/sd-as3525v2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c index 477f61e1a8..db1dbbb068 100644 --- a/firmware/target/arm/as3525/sd-as3525v2.c +++ b/firmware/target/arm/as3525/sd-as3525v2.c @@ -158,9 +158,9 @@ static void printf(const char *format, ...) #define MCI_INT_EBE (1<<15) /* end bit error */ #define MCI_INT_SDIO (0xf<<16) -#define MCI_ERROR (MCI_INT_RE | MCI_INT_RCRC | MCI_INT_DCRC | MCI_INT_RTO \ +#define MCI_ERROR (MCI_INT_RE | MCI_INT_RCRC | MCI_INT_DCRC /*| MCI_INT_RTO*/ \ | MCI_INT_DRTO | MCI_INT_HTO | MCI_INT_FRUN | MCI_INT_HLE \ - | MCI_INT_SBE | MCI_INT_EBE) + /*| MCI_INT_SBE*/ | MCI_INT_EBE) #define MCI_FIFOTH SD_REG(0x4C) /* FIFO threshold */ /* TX watermark : bits 11:0 @@ -225,7 +225,10 @@ void INT_NAND(void) MCI_RAW_STATUS = status; /* clear status */ if(status & MCI_ERROR) + { + panicf("status 0x%8x", status); retry = true; + } else if(status & MCI_INT_DTO) wakeup_signal(&transfer_completion_signal);