This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Accessing eMMC from MLO - BeagleBone Black



Hi,


I want to write a value (0x0 or 0x1) to a memory address in eMMC via U boot cmd. Is it possible that I can use to write to any of the emmc address from uboot?I then need to read this address from MLO and then take a decision in my code.

How can I get the address range/memory map for eMMC (BeagleBone Black) and are there any APIs in Uboot for writing to eMMC?


Regards,
Aman

  • Hi,

    I will forward this to the SW team.

  • Hi,

    I think you can use the MMC commands in TI u-boot:
    U-Boot# mmc
    mmc - MMC sub system

    Usage:
    mmc info - display info of the current MMC device
    mmc read addr blk# cnt
    mmc write addr blk# cnt
    mmc erase blk# cnt
    mmc rescan
    mmc part - lists available partition on current mmc device
    mmc dev [dev] [part] - show or set current mmc device [partition]
    mmc list - lists available devices
    mmc setdsr <value> - set DSR register value

    Best Regards,
    Yordan
  • Hi Yordan,


    Thanks for your reply. My intent here is to run Memory Tests (Walkin 0s /1s) before U-Boot is loaded into DDR in the MLO. I only want to run these tests if the user enable it through Uboot(Writing 0x1 to some location in eMMC, which will then be read by the MLO during next boot time and once tests are performed, MLO will unset the flag).

    I need the Memory Map for the eMMC from which I could find free address for writing.

    Also, are there any API methods which MLO uses while reading from eMMC or can I directly access the eMMC region (via *(U32*)0xEMMC_ADDRESS)

    Regards,
    Aman

  • Hi Aman,

    "I need the Memory Map for the eMMC from which I could find free address for writing."

    Check the defines in ti_armv7_common.h.

    Also see this guide: processors.wiki.ti.com/.../AM335x_Android_eMMC_booting . It is for Android, but still the MLO is located at the beginning of the eMMC storage, and the table may give some idea of how eMMC is divided.

    Best Regards,
    Yordan