mmc: Poll for broken card detection case
PATCH 1/1 mmc: Poll for broken card detection case
Poll for broken card detection case instead of return no card detected.
--- drivers/mmc/Kconfig | 5 +++++ drivers/mmc/mmc.c | 4 ++++ 2 files changed, 9 insertions(+)
drivers/mmc/Kconfig +5 -0
@@ -10,6 +10,11 @@ config MMC If you want MMC/SD/SDIO support, you should say Y here and also to your specific host controller driver. +config MMC_BROKEN_CD + bool "Poll for broken card detection case" + help + If card detection feature is broken, just poll to detect. + config DM_MMC bool "Enable MMC controllers using Driver Model" depends on DM
drivers/mmc/mmc.c +4 -0
@@ -1650,8 +1650,12 @@ int mmc_start_init(struct mmc *mmc)bool no_card;int err; +#if !defined(CONFIG_MMC_BROKEN_CD )/* we pretend there's no card when init is NULL */ no_card =mmc_getcd (mmc) ==0 ; +#else + no_card =0 ; +#endif #if !CONFIG_IS_ENABLED (DM_MMC ) no_card = no_card || (mmc->cfg->ops->init ==NULL );#endif
Signature · 1 line
1.9.1
PATCH 1/1 mmc: Poll for broken card detection case
Hi,
Quoted 2 lines · Jun Nie
Poll for broken card detection case instead of return no card detected.
Sorry for late. i didn't see this patch in my mailbox.
Does it need to add the new config?
Best Regards,
Jaehoon Chung
Quoted 41 lines
Signed-off-by Jun Nie <[email protected]>--- drivers/mmc/Kconfig | 5 +++++ drivers/mmc/mmc.c | 4 ++++ 2 files changed, 9 insertions(+)drivers/mmc/Kconfig +5
-0@@ -10,6 +10,11 @@ config MMC If you want MMC/SD/SDIO support, you should say Y here and also to your specific host controller driver. +config MMC_BROKEN_CD + bool "Poll for broken card detection case" + help + If card detection feature is broken, just poll to detect. + config DM_MMC bool "Enable MMC controllers using Driver Model" depends on DMdrivers/mmc/mmc.c +4
-0@@ -1650,8 +1650,12 @@ int mmc_start_init(struct mmc *mmc)bool no_card;int err; +#if !defined(CONFIG_MMC_BROKEN_CD )/* we pretend there's no card when init is NULL */ no_card =mmc_getcd (mmc) ==0 ; +#else + no_card =0 ; +#endif #if !CONFIG_IS_ENABLED (DM_MMC ) no_card = no_card || (mmc->cfg->ops->init ==NULL );#endif
PATCH 1/1 mmc: Poll for broken card detection case
2018-01-22 13:03 GMT+08:00 Jaehoon Chung <[email protected]>:
Quoted 9 lines
Hi,
Quoted 2 lines · Jun Nie
Poll for broken card detection case instead of return no card detected.
Sorry for late. i didn't see this patch in my mailbox.
Does it need to add the new config?
Yes, a new config, CONFIG_MMC_BROKEN_CD is needed for board that does not support card detection pin. Not sure whether you mean this. Without this config, the logic is not changed so no board is impacted by this config.
Jun
Quoted 46 lines
Best Regards,
Jaehoon ChungQuoted 41 lines
Signed-off-by Jun Nie <[email protected]>--- drivers/mmc/Kconfig | 5 +++++ drivers/mmc/mmc.c | 4 ++++ 2 files changed, 9 insertions(+)drivers/mmc/Kconfig +5
-0@@ -10,6 +10,11 @@ config MMC If you want MMC/SD/SDIO support, you should say Y here and also to your specific host controller driver. +config MMC_BROKEN_CD + bool "Poll for broken card detection case" + help + If card detection feature is broken, just poll to detect. + config DM_MMC bool "Enable MMC controllers using Driver Model" depends on DMdrivers/mmc/mmc.c +4
-0@@ -1650,8 +1650,12 @@ int mmc_start_init(struct mmc *mmc)bool no_card;int err; +#if !defined(CONFIG_MMC_BROKEN_CD )/* we pretend there's no card when init is NULL */ no_card =mmc_getcd (mmc) ==0 ; +#else + no_card =0 ; +#endif #if !CONFIG_IS_ENABLED (DM_MMC ) no_card = no_card || (mmc->cfg->ops->init ==NULL );#endif
PATCH 1/1 mmc: Poll for broken card detection case
Quoted 7 lines · Jun Nie
2018-01-22 13:03 GMT+08:00 Jaehoon Chung <[email protected]>:
Quoted 6 lines
Hi,
Quoted 2 lines · Jun Nie
Poll for broken card detection case instead of return no card detected.
Quoted 8 lines
Quoted 3 lines
Sorry for late. i didn't see this patch in my mailbox.
Does it need to add the new config?
Yes, a new config,
CONFIG_MMC_BROKEN_CDis needed for board that does not support card detection pin. Not sure whether you mean this. Without this config, the logic is not changed so no board is impacted by this config.
Right, there is no impacted by this config.
In Kernel, there is "broken-cd" property. So how about using 'broken-cd' property instead of adding config?
Best Regards,
Jaehoon Chung
Quoted 52 lines
Jun
Quoted 46 lines
Best Regards,
Jaehoon ChungQuoted 41 lines
Signed-off-by Jun Nie <[email protected]>--- drivers/mmc/Kconfig | 5 +++++ drivers/mmc/mmc.c | 4 ++++ 2 files changed, 9 insertions(+)drivers/mmc/Kconfig +5
-0@@ -10,6 +10,11 @@ config MMC If you want MMC/SD/SDIO support, you should say Y here and also to your specific host controller driver. +config MMC_BROKEN_CD + bool "Poll for broken card detection case" + help + If card detection feature is broken, just poll to detect. + config DM_MMC bool "Enable MMC controllers using Driver Model" depends on DMdrivers/mmc/mmc.c +4
-0@@ -1650,8 +1650,12 @@ int mmc_start_init(struct mmc *mmc)bool no_card;int err; +#if !defined(CONFIG_MMC_BROKEN_CD )/* we pretend there's no card when init is NULL */ no_card =mmc_getcd (mmc) ==0 ; +#else + no_card =0 ; +#endif #if !CONFIG_IS_ENABLED (DM_MMC ) no_card = no_card || (mmc->cfg->ops->init ==NULL );#endif
PATCH 1/1 mmc: Poll for broken card detection case
2018-01-23 10:00 GMT+08:00 Jaehoon Chung <[email protected]>:
Quoted 17 lines · Jun Nie
Quoted 7 lines
2018-01-22 13:03 GMT+08:00 Jaehoon Chung <[email protected]>:
Quoted 6 lines
Hi,
Quoted 2 lines · Jun Nie
Poll for broken card detection case instead of return no card detected.
Quoted 8 lines
Quoted 3 lines
Sorry for late. i didn't see this patch in my mailbox.
Does it need to add the new config?
Yes, a new config,
CONFIG_MMC_BROKEN_CDis needed for board that does not support card detection pin. Not sure whether you mean this. Without this config, the logic is not changed so no board is impacted by this config.
Quoted 6 lines
Right, there is no impacted by this config.
In Kernel, there is "broken-cd" property. So how about using 'broken-cd' property instead of adding config?Best Regards,
Jaehoon Chung
Some platforms, if not all, do not support DTB in SPL. So a config is better than dt node property.
Jun
Quoted 53 lines
Quoted 52 lines
Jun
Quoted 46 lines
Best Regards,
Jaehoon ChungQuoted 41 lines
Signed-off-by Jun Nie <[email protected]>--- drivers/mmc/Kconfig | 5 +++++ drivers/mmc/mmc.c | 4 ++++ 2 files changed, 9 insertions(+)drivers/mmc/Kconfig +5
-0@@ -10,6 +10,11 @@ config MMC If you want MMC/SD/SDIO support, you should say Y here and also to your specific host controller driver. +config MMC_BROKEN_CD + bool "Poll for broken card detection case" + help + If card detection feature is broken, just poll to detect. + config DM_MMC bool "Enable MMC controllers using Driver Model" depends on DMdrivers/mmc/mmc.c +4
-0@@ -1650,8 +1650,12 @@ int mmc_start_init(struct mmc *mmc)bool no_card;int err; +#if !defined(CONFIG_MMC_BROKEN_CD )/* we pretend there's no card when init is NULL */ no_card =mmc_getcd (mmc) ==0 ; +#else + no_card =0 ; +#endif #if !CONFIG_IS_ENABLED (DM_MMC ) no_card = no_card || (mmc->cfg->ops->init ==NULL );#endif
PATCH 1/1 mmc: Poll for broken card detection case
Quoted 18 lines · Jun Nie
2018-01-23 10:00 GMT+08:00 Jaehoon Chung <[email protected]>:
Quoted 17 lines · Jun Nie
Quoted 15 lines
2018-01-22 13:03 GMT+08:00 Jaehoon Chung <[email protected]>:
Quoted 9 lines
Hi,
Quoted 2 lines · Jun Nie
Poll for broken card detection case instead of return no card detected.
Sorry for late. i didn't see this patch in my mailbox.
Does it need to add the new config?
Yes, a new config,
CONFIG_MMC_BROKEN_CDis needed for board that does not support card detection pin. Not sure whether you mean this. Without this config, the logic is not changed so no board is impacted by this config.
Quoted 8 lines
Quoted 6 lines
Right, there is no impacted by this config.
In Kernel, there is "broken-cd" property. So how about using 'broken-cd' property instead of adding config?Best Regards,
Jaehoon ChungSome platforms, if not all, do not support DTB in SPL. So a config is better than dt node property.
Ok. It make sense...Will apply this patch to u-boot-mmc. Thanks!
Best Regards,
Jaehoon Chung
Quoted 58 lines
Jun
Quoted 53 lines
Quoted 52 lines
Jun
Quoted 46 lines
Best Regards,
Jaehoon ChungQuoted 41 lines
Signed-off-by Jun Nie <[email protected]>--- drivers/mmc/Kconfig | 5 +++++ drivers/mmc/mmc.c | 4 ++++ 2 files changed, 9 insertions(+)drivers/mmc/Kconfig +5
-0@@ -10,6 +10,11 @@ config MMC If you want MMC/SD/SDIO support, you should say Y here and also to your specific host controller driver. +config MMC_BROKEN_CD + bool "Poll for broken card detection case" + help + If card detection feature is broken, just poll to detect. + config DM_MMC bool "Enable MMC controllers using Driver Model" depends on DMdrivers/mmc/mmc.c +4
-0@@ -1650,8 +1650,12 @@ int mmc_start_init(struct mmc *mmc)bool no_card;int err; +#if !defined(CONFIG_MMC_BROKEN_CD )/* we pretend there's no card when init is NULL */ no_card =mmc_getcd (mmc) ==0 ; +#else + no_card =0 ; +#endif #if !CONFIG_IS_ENABLED (DM_MMC ) no_card = no_card || (mmc->cfg->ops->init ==NULL );#endif
PATCH 1/1 mmc: Poll for broken card detection case
Quoted 22 lines · Jaehoon Chung
Quoted 21 lines · Jun Nie
2018-01-23 10:00 GMT+08:00 Jaehoon Chung <[email protected]>:
Quoted 20 lines · Jun Nie
Quoted 7 lines
2018-01-22 13:03 GMT+08:00 Jaehoon Chung <[email protected]>:
Quoted 6 lines
Hi,
Quoted 2 lines · Jun Nie
Poll for broken card detection case instead of return no card detected.
Quoted 8 lines
Quoted 3 lines
Sorry for late. i didn't see this patch in my mailbox.
Does it need to add the new config?
Yes, a new config,
CONFIG_MMC_BROKEN_CDis needed for board that does not support card detection pin. Not sure whether you mean this. Without this config, the logic is not changed so no board is impacted by this config.Right, there is no impacted by this config.
In Kernel, there is "broken-cd" property. So how about using 'broken-cd' property instead of adding config?
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Best Regards,
Jaehoon ChungSome platforms, if not all, do not support DTB in SPL. So a config is better than dt node property.
Ok. It make sense...Will apply this patch to u-boot-mmc. Thanks!
Applied to u-boot-mmc.
Best Regards,
Jaehoon Chung
Quoted 68 lines
Best Regards,
Jaehoon ChungQuoted 58 lines
Jun
Quoted 53 lines
Quoted 52 lines
Jun
Quoted 46 lines
Best Regards,
Jaehoon ChungQuoted 41 lines
Signed-off-by Jun Nie <[email protected]>--- drivers/mmc/Kconfig | 5 +++++ drivers/mmc/mmc.c | 4 ++++ 2 files changed, 9 insertions(+)drivers/mmc/Kconfig +5
-0@@ -10,6 +10,11 @@ config MMC If you want MMC/SD/SDIO support, you should say Y here and also to your specific host controller driver. +config MMC_BROKEN_CD + bool "Poll for broken card detection case" + help + If card detection feature is broken, just poll to detect. + config DM_MMC bool "Enable MMC controllers using Driver Model" depends on DMdrivers/mmc/mmc.c +4
-0@@ -1650,8 +1650,12 @@ int mmc_start_init(struct mmc *mmc)bool no_card;int err; +#if !defined(CONFIG_MMC_BROKEN_CD )/* we pretend there's no card when init is NULL */ no_card =mmc_getcd (mmc) ==0 ; +#else + no_card =0 ; +#endif #if !CONFIG_IS_ENABLED (DM_MMC ) no_card = no_card || (mmc->cfg->ops->init ==NULL );#endif _______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot