From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aneesh V Date: Tue, 19 Jul 2011 16:46:19 +0530 Subject: [U-Boot] [PATCH v4 11/12] omap: add MMC and FAT support to SPL In-Reply-To: <20110719111630.5fce2af3@Zitronenbaum> References: <1298893591-17636-1-git-send-email-aneesh@ti.com> <1311004011-9073-12-git-send-email-aneesh@ti.com> <20110719111630.5fce2af3@Zitronenbaum> Message-ID: <4E256783.5080601@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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@table 26-3 best regards, Aneesh