All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Retanubun <richardretanubun@ruggedcom.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] eMMC boot partition support in uboot
Date: Thu, 5 Dec 2013 13:46:40 -0500	[thread overview]
Message-ID: <52A0CA10.1040007@ruggedcom.com> (raw)

Hi guys,

Recap: I am trying to boot MLO + uboot from eMMC boot partition on DRA7xx_EVM eval platform.
SW-Baseline: uboot p-ti-uboot-2013.04 & p-ti-linux-3.8.y from omapzoom.

What happens so far:
1. I am able to dd the MLO into /dev/mmcblk1boot0 (need to echo 0 to force_ro).
2. I am able to setup the eMMC to enable the ROM BootLoader (RBL) to boot the "Alternate boot mode"
    using mmc-utils by setting:
    BOOT_BUS_WIDTH Register   (EXT_CSD [177]) = 0x15 (needed to set DDR mode at boot)
    PARTITION_CONFIG Register (EXT_CSD [179]) = 0x48 (needed to enable booting from boot partition)

    Up to this point I am able to get this response when booting the MLO from the eMMC boot partition

U-Boot SPL 2013.04-00366-g5f72750-dirty (Dec 03 2013 - 21:40:19)
DRA752 ES1.0
OMAP SD/MMC: 1
spl: wrong MMC boot mode
spl_mmc_load_image:
         spl_boot_mode = 0 (MMCSD_MODE_UNDEFINED)
         spl_boot_device = 6 (BOOT_DEVICE_MMC2)
### ERROR ### Please RESET the board ###

3. I realize that the MLO contents (using uboot/tools/omapimage?) needed to say
    MMCSD_MODE_RAW for my platform. I am bypassing this problem by by hard coding the response
    arch/arm/cpu/armv7/omap-common/boot-common.c::spl_boot_mode() to always says MMCSD_MODE_RAW.
    This seems to work and I am past the hang() code.

4. Now, MLO is ready to (raw) load uboot binary from the eMMC boot partition (i.e. /dev/mmcblk1boot0).
    Unfortunately, at this point I don't know how to make the platform recognize the eMMC boot partitions.
    I think they are not modelled yet in uboot. Only the User-Data-Area (UDA)
    is recognized in uboot (called mmc 1)

    My understanding is that for mmc boot partition recognition, we need to
    extend drivers/mmc/omap_hsmmc.c::omap_mmc_init() to be able to handle it?
    or is there a better place?

Question 1:
Is my understanding of the current state all correct?

Question 2:
How should I proceed to add support for /dev/mmcblk1boot0 into uboot?
I am thinking the solution should self parse the ext_csd to find out which boot
partition is active and then load the uboot raw from a known offset there.

I saw the linux patch adding eMMC boot partition at:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/Documentation/mmc/mmc-dev-parts.txt?id=371a689f64b0da140c3bcd3f55305ffa1c3a58ef

But I don't see how to adapt it into uboot...

Thanks for everyone's time.

             reply	other threads:[~2013-12-05 18:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-05 18:46 Richard Retanubun [this message]
2013-12-05 19:09 ` [U-Boot] eMMC boot partition support in uboot Tom Rini
2013-12-05 20:21   ` Richard Retanubun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52A0CA10.1040007@ruggedcom.com \
    --to=richardretanubun@ruggedcom.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.