mmc: Poll CD in case cyclic framework is enabled
In case the cyclic framework is enabled, poll the card detect of already
initialized cards and deinitialize them in case they are removed. Since
the card initialization is a longer process and card initialization is
done on first access to an uninitialized card anyway, avoid initializing
newly detected uninitialized cards in the cyclic callback.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/include/mmc.h b/include/mmc.h
index f508cd1..0044ff8 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -14,6 +14,7 @@
#include <linux/sizes.h>
#include <linux/compiler.h>
#include <linux/dma-direction.h>
+#include <cyclic.h>
#include <part.h>
struct bd_info;
@@ -757,6 +758,8 @@
bool hs400_tuning:1;
enum bus_mode user_speed_mode; /* input speed mode from user */
+
+ CONFIG_IS_ENABLED(CYCLIC, (struct cyclic_info cyclic));
};
#if CONFIG_IS_ENABLED(DM_MMC)