[U-Boot] [PATCH 07/14] mmc: Tinification of the mmc code

Simon Glass sjg at chromium.org
Wed Nov 30 01:32:54 CET 2016


Hi Marek,

On 25 November 2016 at 15:32, Marek Vasut <marex at denx.de> wrote:
> Add new configuration option CONFIG_MMC_TINY which strips away all
> memory allocation within the MMC code and code for handling multiple
> cards. This allows extremely space-constrained SPL code use the MMC
> framework.
>
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: Simon Glass <sjg at chromium.org>
> ---
> V2: Switch the MMC_TINY option to Kconfig
> ---
>  common/spl/spl_mmc.c     |  6 +++++-
>  drivers/mmc/Kconfig      | 16 ++++++++++++++++
>  drivers/mmc/mmc.c        | 31 ++++++++++++++++++++++++++++++-
>  drivers/mmc/mmc_legacy.c | 32 ++++++++++++++++++++++++++++++++
>  include/mmc.h            |  1 +
>  5 files changed, 84 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

nit below.

I assume this does not use DM?

>
> diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
> index 43c1030..3cad998 100644
> --- a/common/spl/spl_mmc.c
> +++ b/common/spl/spl_mmc.c
> @@ -306,7 +306,11 @@ static int spl_mmc_load_image(struct spl_image_info *spl_image,
>                         if (part == 7)
>                                 part = 0;
>
> -                       err = blk_dselect_hwpart(mmc_get_blk_desc(mmc), part);
> +                       if (CONFIG_IS_ENABLED(MMC_TINY))
> +                               err = mmc_switch_part(mmc, part);
> +                       else
> +                               err = blk_dselect_hwpart(mmc_get_blk_desc(mmc), part);
> +
>                         if (err) {
>  #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
>                                 puts("spl: mmc partition switch failed\n");
> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
> index 24f4b28..aca438b8 100644
> --- a/drivers/mmc/Kconfig
> +++ b/drivers/mmc/Kconfig
> @@ -26,6 +26,22 @@ config DM_MMC_OPS
>           option will be removed as soon as all DM_MMC drivers use it, as it
>           will the only supported behaviour.
>
> +config SPL_MMC_TINY
> +       bool "Tiny MMC framework in SPL"
> +       default n

Not needed?

Regards,
Simon


More information about the U-Boot mailing list