summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDoug Anderson2014-10-14 18:33:09 +0200
committerUlf Hansson2014-11-10 12:40:39 +0100
commit6130e7a9c34d01afbd4e7e215846d1f2d70333bb (patch)
treed0f1e4d512611b7260f5557a9a927f86173d727d /kernel
parentmmc: core: silence a shift wrapping warning (diff)
downloadkernel-qcow2-linux-6130e7a9c34d01afbd4e7e215846d1f2d70333bb.tar.gz
kernel-qcow2-linux-6130e7a9c34d01afbd4e7e215846d1f2d70333bb.tar.xz
kernel-qcow2-linux-6130e7a9c34d01afbd4e7e215846d1f2d70333bb.zip
mmc: dw_mmc: Remove old card detect infrastructure
The dw_mmc driver had a bunch of code that ran whenever a card was ejected and inserted. However, this code was old and crufty and should be removed. Some evidence that it's really not needed: 1. Is is supposed to be legal to use 'cd-gpio' on dw_mmc instead of using the built-in card detect mechanism. The 'cd-gpio' code doesn't run any of the crufty old code but yet still works. 2. While looking at this, I realized that my old change (369ac86 mmc: dw_mmc: don't queue up a card detect at slot startup) actually castrated the old code a little bit already and nobody noticed. Specifically "last_detect_state" was left as 0 at bootup. That means that on the first card removal none of the crufty code ran. 3. I can run "while true; do dd if=/dev/mmcblk1 of=/dev/null; done" while ejecting and inserting an SD Card and the world doesn't explode. If some of the crufty old code is actually needed, we should justify it and also put it in some place where it will be run even with "cd-gpio". Note that in my case I'm using the "cd-gpio" mechanism but for various reasons the hardware triggers a dw_mmc "card detect" at bootup. That was actually causing a real bug. The card detect workqueue was running while the system was trying to enumerate the card. The "present != slot->last_detect_state" triggered and we were doing all kinds of crazy stuff and messing up enumeration. The new mechanism of just asking the core to check the card is much safer and then the bogus interrupt doesn't hurt. Signed-off-by: Doug Anderson <dianders@chromium.org> Tested-by: Jaehoon Chung <jh80.chung@samsung.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Tested-by: alim.akhtar <alim.akhtar@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions