[U-Boot] [u-boot][RFC v1] ARMV7: OMAP4+: Fix boot issues when using Alternative Boot operation mode

Tom Rini trini at ti.com
Wed Aug 28 17:10:19 CEST 2013


On Tue, Aug 06, 2013 at 01:47:47PM +0300, Oleksandr Tyshchenko wrote:

> The Alternative Boot operation mode (boot from eMMC boot partition)
> is selected through sys_boot pads configuration:
> - sys_boot[5:0]=0b101100 for OMAP4 (MMC2_BOOT)
> - sys_boot[3:0]=0xb1110 for OMAP5 (eMMC, boot partition only)
> 
> So, add new bootdevice BOOT_DEVICE_MMC2_BOOT for OMAP4 and change bootmode
> from MMCSD_MODE_UNDEFINED to MMCSD_MODE_RAW for it to support this mode.
> As for OMAP5, then only change bootmode to MMCSD_MODE_RAW.

To be clear, on OMAP4 (and probably later) when using the boot partition
the ROM is not setting the boot mode flag correctly, and we need to fix
it up?  If so, we should handle that fixup more directly, and spell this
out.  In the comment here:

> +		/*
> +		 * Make spl_mmc_load_image() happy with Alternative
> +		 * Boot operation mode
> +		 */
> +#if defined(CONFIG_OMAP44XX)
> +		if (boot_device == BOOT_DEVICE_MMC2_BOOT)
> +			boot_mode = MMCSD_MODE_RAW;
> +#elif defined(CONFIG_OMAP54XX)
> +		if (boot_device == BOOT_DEVICE_MMC2)
> +			boot_mode = MMCSD_MODE_RAW;
> +#endif
> +		gd->arch.omap_boot_params.omap_bootmode = boot_mode;

Also note that on OMAP54XX we'll have a separate MMC2_BOOT rather than
just MMC2, when booting from boot partitions rather than the rest of
eMMC, so this fixup isn't right.

[snip]
> @@ -92,6 +102,7 @@ int board_mmc_init(bd_t *bis)
>  		omap_mmc_init(0, 0, 0, -1, -1);
>  		break;
>  	case BOOT_DEVICE_MMC2:
> +	case BOOT_DEVICE_MMC2_BOOT:
>  	case BOOT_DEVICE_MMC2_2:

This is common code, so you need to fixup all of the omap-family spl.h
files.

> diff --git a/common/spl/spl.c b/common/spl/spl.c
> index 628c399..ba91b65 100644
> --- a/common/spl/spl.c
> +++ b/common/spl/spl.c
> @@ -177,6 +177,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
>  #ifdef CONFIG_SPL_MMC_SUPPORT
>  	case BOOT_DEVICE_MMC1:
>  	case BOOT_DEVICE_MMC2:
> +	case BOOT_DEVICE_MMC2_BOOT:
>  	case BOOT_DEVICE_MMC2_2:

And this is generic code, so everyone that sets MMC1/2/2_2 needs to add
2_BOOT.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130828/9fa34897/attachment.pgp>


More information about the U-Boot mailing list