[U-Boot] [PATCH v4 11/12] omap: add MMC and FAT support to SPL

Aneesh V aneesh at ti.com
Tue Jul 19 13:16:19 CEST 2011


Hi Simon,

On Tuesday 19 July 2011 02:46 PM, Simon Schwarz wrote:
> Hi Aneesh,
>
> I'am not really sure about the save_boot_params() feature you added.
>
> May you point me where I can find this in the OMAP reference docs?

What I have done for OMAP4 will not work for OMAP3. For OMAP3 you will
get only the boot-device(eMMC, MMC/SD, nand etc) and *not* the bootmode(raw
vs FAT).

To get boot device you can don one of the following approaches.

1. What x-loader does

git://git.omapzoom.org/repo/x-loader.git - master branch

cpu/omap3/start.S:

reset:
	ldr	r4, scratchpad		/* r4 <- scratchpad reg address */
	ldr	r5, [r0, #0x4]		/* r5 <- value of boot device */
	str	r5, [r4]		/* store r5 in scratchpad reg */


See the usage in lib/board.c:

Here are the device numbers:
	case 0x03:
		strcpy(boot_dev_name, "ONENAND");
	case 0x02:
		strcpy(boot_dev_name, "NAND");
	case 0x05:
		strcpy(boot_dev_name, "EMMC");
	case 0x06:
		strcpy(boot_dev_name, "MMC/SD1");

This is internal ROM code information and not documented anywhere.

You may assume FAT mode for MMC/SD1 and raw mode for the rest.

2. Read the boot device from a hw register(SYS_BOOT)

See 'chapter 26 Initialization' and look at table 26-3

best regards,
Aneesh


More information about the U-Boot mailing list