From d7f3d8c7d973a2f009bd6a1f3a6cdc1d424558a2 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 8 May 2011 19:41:37 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2939 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/sdc_lld.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/os/hal/platforms/STM32/sdc_lld.c b/os/hal/platforms/STM32/sdc_lld.c index 7c7265b94..96a523846 100644 --- a/os/hal/platforms/STM32/sdc_lld.c +++ b/os/hal/platforms/STM32/sdc_lld.c @@ -61,10 +61,6 @@ CH_IRQ_HANDLER(SDIO_IRQHandler) { chSysLockFromIsr(); if (SDCD1.thread != NULL) { - if ((SDIO->STA & SDIO_STA_DATAEND) != 0) - SDCD1.thread->p_u.rdymsg = RDY_OK; - else - SDCD1.thread->p_u.rdymsg = RDY_RESET; chSchReadyI(SDCD1.thread); SDCD1.thread = NULL; } @@ -368,16 +364,10 @@ bool_t sdc_lld_read(SDCDriver *sdcp, uint32_t startblk, sdcp->thread = chThdSelf(); chSchGoSleepS(THD_STATE_SUSPENDED); chDbgAssert(sdcp->thread == NULL, "sdc_lld_read(), #2", "not NULL"); - if (chThdSelf()->p_u.rdymsg != RDY_OK) { - chSysUnlock(); - goto error; - } } - else { - if ((SDIO->STA & SDIO_STA_DATAEND) == 0) { - chSysUnlock(); - goto error; - } + if ((SDIO->STA & SDIO_STA_DATAEND) == 0) { + chSysUnlock(); + goto error; } dmaDisableChannel(STM32_DMA2, STM32_DMA_CHANNEL_4); SDIO->ICR = 0xFFFFFFFF;