mirror of
https://github.com/fail0verflow/mini.git
synced 2024-11-24 12:19:21 +01:00
sdhctrl: use sane timeouts
This commit is contained in:
parent
1e2d42e984
commit
f8368c1374
8
sdhc.c
8
sdhc.c
@ -42,9 +42,8 @@
|
|||||||
|
|
||||||
//#define SDHC_DEBUG
|
//#define SDHC_DEBUG
|
||||||
|
|
||||||
#define SDHC_COMMAND_TIMEOUT 0
|
#define SDHC_COMMAND_TIMEOUT 100
|
||||||
#define SDHC_BUFFER_TIMEOUT 0
|
#define SDHC_TRANSFER_TIMEOUT 5000
|
||||||
#define SDHC_TRANSFER_TIMEOUT 0
|
|
||||||
|
|
||||||
#define HDEVNAME(hp) ((hp)->sc->sc_dev.dv_xname)
|
#define HDEVNAME(hp) ((hp)->sc->sc_dev.dv_xname)
|
||||||
#define sdmmc_delay(t) udelay(t)
|
#define sdmmc_delay(t) udelay(t)
|
||||||
@ -857,7 +856,7 @@ sdhc_wait_intr(struct sdhc_host *hp, int mask, int timo)
|
|||||||
status = hp->intr_status & mask;
|
status = hp->intr_status & mask;
|
||||||
|
|
||||||
|
|
||||||
for (timo = 5000; timo > 0; timo--) {
|
for (; timo > 0; timo--) {
|
||||||
#ifndef CAN_HAZ_IRQ
|
#ifndef CAN_HAZ_IRQ
|
||||||
sdhc_irq(); // seems backwards but ok
|
sdhc_irq(); // seems backwards but ok
|
||||||
#endif
|
#endif
|
||||||
@ -867,6 +866,7 @@ sdhc_wait_intr(struct sdhc_host *hp, int mask, int timo)
|
|||||||
}
|
}
|
||||||
udelay(1000);
|
udelay(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timo == 0) {
|
if (timo == 0) {
|
||||||
status |= SDHC_ERROR_INTERRUPT;
|
status |= SDHC_ERROR_INTERRUPT;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user