[U-Boot] [PATCH 4/6] mxs: mmc: Allow overriding default card detect implementation

Stefano Babic sbabic at denx.de
Thu Jan 24 19:27:22 CET 2013


On 23/01/2013 02:01, Marek Vasut wrote:
> Some MXS based boards do not implement the card-detect signal. Allow
> user to specify alternate card-detect implementation.
> 
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Otavio Salvador <otavio at ossystems.com.br>
> Cc: Fabio Estevam <fabio.estevam at freescale.com>
> Cc: Stefano Babic <sbabic at denx.de>
> ---
>  arch/arm/include/asm/arch-mxs/sys_proto.h |    2 +-
>  board/bluegiga/apx4devkit/apx4devkit.c    |    2 +-
>  board/denx/m28evk/m28evk.c                |    2 +-
>  board/freescale/mx28evk/mx28evk.c         |    2 +-
>  board/schulercontrol/sc_sps_1/sc_sps_1.c  |    2 +-
>  drivers/mmc/mxsmmc.c                      |   16 ++++++++++++++--
>  6 files changed, 19 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/include/asm/arch-mxs/sys_proto.h b/arch/arm/include/asm/arch-mxs/sys_proto.h
> index 8aaf196..5bafde5 100644
> --- a/arch/arm/include/asm/arch-mxs/sys_proto.h
> +++ b/arch/arm/include/asm/arch-mxs/sys_proto.h
> @@ -31,7 +31,7 @@ int mxs_wait_mask_clr(struct mxs_register_32 *reg,
>  		       uint32_t mask,
>  		       unsigned int timeout);
>  
> -int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int));
> +int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int), int (*cd)(int));
>  
>  #ifdef CONFIG_SPL_BUILD
>  
> diff --git a/board/bluegiga/apx4devkit/apx4devkit.c b/board/bluegiga/apx4devkit/apx4devkit.c
> index 029b973..5927693 100644
> --- a/board/bluegiga/apx4devkit/apx4devkit.c
> +++ b/board/bluegiga/apx4devkit/apx4devkit.c
> @@ -69,7 +69,7 @@ int board_init(void)
>  #ifdef CONFIG_CMD_MMC
>  int board_mmc_init(bd_t *bis)
>  {
> -	return mxsmmc_initialize(bis, 0, NULL);
> +	return mxsmmc_initialize(bis, 0, NULL, NULL);

I see, but it seems to me that mxs is doing different as other SOCs. If
there is nothing to set, cpu_mmc_init() should be used, dropping
board_mmc_init(). And we implement board_mmc_init() only for boards that
really need it, not for all.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list