haiku/headers
Adrien Destugues 5ec64c5cdd sd/mmc: Cleanup and improve reliability
Store the bus cookie in the mmc_disk driver and pass it to the bus
manager when executing commands. This avoids calling into the device
manager at each read and write operation. The code to get the cookie
from mmc_disk isn't so nice since it needs to access the grandparent
device (the mmc bus root), it would be simpler if this cookie would be
available directly from mmc bus devices.

We can get card removal and card insertion interrupt at the same time
due to insufficient hardware debouncing (the SDHCI spec says we
shouldn't, but it happens on Ricoh controllers. Can't blame them, they
don't advertise themselves as compliant with the spec). So, check the
card status from the interrupt handler and ignore the incorrect
interrupts.

Fix unreliable card initialization: power must be turned on before
starting up the SD clock. Remove a now unneeded delay that was added in
an attempt to avoid initial instability.

Change-Id: Ibd8d051da1a1d859f3924ee535f4a05d9b6398d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3639
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-01-20 19:02:38 +00:00
..
build Fix definition of PAGESIZE and B_PAGE_SIZE 2021-01-08 12:02:16 +00:00
compatibility features.h: undef before define 2021-01-07 09:14:57 +00:00
config ARM64: Initial changes so we can compile GCC toolchain 2019-08-30 19:05:16 +00:00
cpp build fix. 2015-11-12 22:24:16 +01:00
glibc Make public glibc header printf.h usable. 2013-07-17 18:07:56 +02:00
libs agg: fix build. 2020-01-22 19:25:16 +01:00
os Package Kit: re-use downloads from unfinished transactions 2021-01-09 15:20:09 +00:00
posix Fix definition of PAGESIZE and B_PAGE_SIZE 2021-01-08 12:02:16 +00:00
private sd/mmc: Cleanup and improve reliability 2021-01-20 19:02:38 +00:00
tools Fix #12799: Enable elf symbol patching for Haiku 2016-10-30 10:42:24 +01:00