Patchwork [U-Boot,01/17] spl_mmc: Make FAT checks / calls guarded with CONFIG_SPL_FAT_SUPPORT

login
register
mail settings
Submitter Tom Rini
Date Aug. 15, 2012, 9:30 p.m.
Message ID <1345066254-6911-2-git-send-email-trini@ti.com>
Download mbox | patch
Permalink /patch/177825/
State Superseded
Delegated to: Tom Rini
Headers show

Comments

Tom Rini - Aug. 15, 2012, 9:30 p.m.
Signed-off-by: Tom Rini <trini@ti.com>
---
 arch/arm/cpu/armv7/omap-common/spl_mmc.c |    4 ++++
 1 file changed, 4 insertions(+)
Stefano Babic - Aug. 16, 2012, 7:52 a.m.
On 15/08/2012 23:30, Tom Rini wrote:
> Signed-off-by: Tom Rini <trini@ti.com>
> ---
>  arch/arm/cpu/armv7/omap-common/spl_mmc.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/cpu/armv7/omap-common/spl_mmc.c b/arch/arm/cpu/armv7/omap-common/spl_mmc.c
> index 2f921bb..7552f6c 100644
> --- a/arch/arm/cpu/armv7/omap-common/spl_mmc.c
> +++ b/arch/arm/cpu/armv7/omap-common/spl_mmc.c
> @@ -84,6 +84,7 @@ end:
>  	}
>  }
>  
> +#ifdef CONFIG_SPL_FAT_SUPPORT
>  static void mmc_load_image_fat(struct mmc *mmc)
>  {
>  	s32 err;
> @@ -116,6 +117,7 @@ end:
>  		hang();
>  	}
>  }
> +#endif
>  
>  void spl_mmc_load_image(void)
>  {
> @@ -140,9 +142,11 @@ void spl_mmc_load_image(void)
>  	if (boot_mode == MMCSD_MODE_RAW) {
>  		debug("boot mode - RAW\n");
>  		mmc_load_image_raw(mmc);
> +#ifdef CONFIG_SPL_FAT_SUPPORT
>  	} else if (boot_mode == MMCSD_MODE_FAT) {
>  		debug("boot mode - FAT\n");
>  		mmc_load_image_fat(mmc);
> +#endif
>  	} else {
>  		puts("spl: wrong MMC boot mode\n");
>  		hang();
> 

Right, this should be done !

Acked-by: Stefano Babic <sbabic@denx.de>

Regards,
Stefano

Patch

diff --git a/arch/arm/cpu/armv7/omap-common/spl_mmc.c b/arch/arm/cpu/armv7/omap-common/spl_mmc.c
index 2f921bb..7552f6c 100644
--- a/arch/arm/cpu/armv7/omap-common/spl_mmc.c
+++ b/arch/arm/cpu/armv7/omap-common/spl_mmc.c
@@ -84,6 +84,7 @@  end:
 	}
 }
 
+#ifdef CONFIG_SPL_FAT_SUPPORT
 static void mmc_load_image_fat(struct mmc *mmc)
 {
 	s32 err;
@@ -116,6 +117,7 @@  end:
 		hang();
 	}
 }
+#endif
 
 void spl_mmc_load_image(void)
 {
@@ -140,9 +142,11 @@  void spl_mmc_load_image(void)
 	if (boot_mode == MMCSD_MODE_RAW) {
 		debug("boot mode - RAW\n");
 		mmc_load_image_raw(mmc);
+#ifdef CONFIG_SPL_FAT_SUPPORT
 	} else if (boot_mode == MMCSD_MODE_FAT) {
 		debug("boot mode - FAT\n");
 		mmc_load_image_fat(mmc);
+#endif
 	} else {
 		puts("spl: wrong MMC boot mode\n");
 		hang();