Patchwork [U-Boot,6/9] mx23_olinuxino: Skip MMC Card detection

login
register
mail settings
Submitter Otavio Salvador
Date Jan. 22, 2013, 1:47 a.m.
Message ID <1358819250-31625-7-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/214309/
State Not Applicable
Headers show

Comments

Otavio Salvador - Jan. 22, 2013, 1:47 a.m.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 drivers/mmc/mxsmmc.c             | 2 ++
 include/configs/mx23_olinuxino.h | 1 +
 2 files changed, 3 insertions(+)
Marek Vasut - Jan. 22, 2013, 1:48 a.m.
Dear Otavio Salvador,

> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  drivers/mmc/mxsmmc.c             | 2 ++
>  include/configs/mx23_olinuxino.h | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c
> index 4b178be..618659e 100644
> --- a/drivers/mmc/mxsmmc.c
> +++ b/drivers/mmc/mxsmmc.c
> @@ -165,11 +165,13 @@ mxsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
> struct mmc_data *data) return TIMEOUT;
>  	}
> 
> +#ifndef CONFIG_MMC_SKIP_CARD_DETECT

Undocumented feature added. I think mxsmmc_register() call can take a param for 
this.

Best regards,
Marek Vasut
Otavio Salvador - Jan. 22, 2013, 1:58 a.m.
On Mon, Jan 21, 2013 at 11:48 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Otavio Salvador,
>
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> ---
>>  drivers/mmc/mxsmmc.c             | 2 ++
>>  include/configs/mx23_olinuxino.h | 1 +
>>  2 files changed, 3 insertions(+)
>>
>> diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c
>> index 4b178be..618659e 100644
>> --- a/drivers/mmc/mxsmmc.c
>> +++ b/drivers/mmc/mxsmmc.c
>> @@ -165,11 +165,13 @@ mxsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
>> struct mmc_data *data) return TIMEOUT;
>>       }
>>
>> +#ifndef CONFIG_MMC_SKIP_CARD_DETECT
>
> Undocumented feature added. I think mxsmmc_register() call can take a param for
> this.

Where I should document it? mmc_register cannot.

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
Marek Vasut - Jan. 22, 2013, 1:59 a.m.
Dear Otavio Salvador,

> On Mon, Jan 21, 2013 at 11:48 PM, Marek Vasut <marex@denx.de> wrote:
> > Dear Otavio Salvador,
> > 
> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> >> ---
> >> 
> >>  drivers/mmc/mxsmmc.c             | 2 ++
> >>  include/configs/mx23_olinuxino.h | 1 +
> >>  2 files changed, 3 insertions(+)
> >> 
> >> diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c
> >> index 4b178be..618659e 100644
> >> --- a/drivers/mmc/mxsmmc.c
> >> +++ b/drivers/mmc/mxsmmc.c
> >> @@ -165,11 +165,13 @@ mxsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd
> >> *cmd, struct mmc_data *data) return TIMEOUT;
> >> 
> >>       }
> >> 
> >> +#ifndef CONFIG_MMC_SKIP_CARD_DETECT
> > 
> > Undocumented feature added. I think mxsmmc_register() call can take a
> > param for this.
> 
> Where I should document it? mmc_register cannot.

mxsmmc_initialize() can.

Best regards,
Marek Vasut

Patch

diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c
index 4b178be..618659e 100644
--- a/drivers/mmc/mxsmmc.c
+++ b/drivers/mmc/mxsmmc.c
@@ -165,11 +165,13 @@  mxsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
 		return TIMEOUT;
 	}
 
+#ifndef CONFIG_MMC_SKIP_CARD_DETECT
 	/* See if card is present */
 	if (readl(&ssp_regs->hw_ssp_status) & SSP_STATUS_CARD_DETECT) {
 		printf("MMC%d: No card detected!\n", mmc->block_dev.dev);
 		return NO_CARD_ERR;
 	}
+#endif
 
 	/* Start building CTRL0 contents */
 	ctrl0 = priv->buswidth;
diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h
index bc63481..a62e3a2 100644
--- a/include/configs/mx23_olinuxino.h
+++ b/include/configs/mx23_olinuxino.h
@@ -116,6 +116,7 @@ 
  */
 #ifdef	CONFIG_CMD_MMC
 #define	CONFIG_MMC
+#define	CONFIG_MMC_SKIP_CARD_DETECT
 #define	CONFIG_BOUNCE_BUFFER
 #define	CONFIG_GENERIC_MMC
 #define	CONFIG_MXS_MMC