public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 01/18] mmc: show hardware partition sizes in mmcinfo output
Date: Thu, 22 Jan 2015 12:59:27 -0700	[thread overview]
Message-ID: <54C1569F.2060805@wwwdotorg.org> (raw)
In-Reply-To: <E1DD57F0-CEC0-4866-9634-48C5ADD06F27@antoniou-consulting.com>

On 01/22/2015 12:45 PM, Pantelis Antoniou wrote:
> Hi Stephen,
>
>> On Jan 22, 2015, at 20:42 , Stephen Warren <swarren@wwwdotorg.org> wrote:
>>
>> On 12/23/2014 02:50 AM, Diego Santa Cruz wrote:
>>> There is currently no command that will provide an overview of the hardware
>>> partitions present on an eMMC device, one has to switch to every partition
>>> via "mmc dev" and run mmcinfo for each to get the partition's capacity.
>>> This commit adds a few lines of output to mmcinfo with the sizes of the
>>> present partitions, like this:
>>>
>>> Device: OMAP SD/MMC
>>> Manufacturer ID: fe
>>> OEM: 14e
>>> Name: MMC16
>>> Tran Speed: 52000000
>>> Rd Block Len: 512
>>> MMC version 4.41
>>> High Capacity: Yes
>>> Capacity: 13.8 GiB
>>> Bus Width: 4-bit
>>> User Capacity: 13.8 GiB
>>> Boot Capacity: 16 MiB
>>> RPMB Capacity: 128 KiB
>>> GP1 Capacity: 64 MiB
>>> GP2 Capacity: 64 MiB
>>
>> I have an MMC device which has at least boot HW partitions, yet with the very latest code in u-boot.git, I don't see the additional lines mentioned above. My HW partitions are still working fine, since I can select a boot partition and mmcinfo shows the correct "Capacity" for it:
>>
>> Any ideas why?
>>
>> Tegra124 (Jetson TK1) # mmc dev 0
>> switch to partitions #0, OK
>> mmc0(part 0) is current device
>> Tegra124 (Jetson TK1) # mmcinfo
>> Device: Tegra SD/MMC
>> Manufacturer ID: 45
>> OEM: 100
>> Name: SEM16
>> Tran Speed: 52000000
>> Rd Block Len: 512
>> MMC version 4.5
>> High Capacity: Yes
>> Capacity: 14.7 GiB <<<< Sounds right for a 16GB device with partitions
>> Bus Width: 8-bit
>> Erase Group Size: 512 KiB
>> <<<< No HW partition information is printed here
>>
>> Tegra124 (Jetson TK1) # mmc dev 0 1 <<<< select "boot0" HW partition
>> switch to partitions #1, OK
>> mmc0(part 1) is current device
>> Tegra124 (Jetson TK1) # mmcinfo
>> Device: Tegra SD/MMC
>> Manufacturer ID: 45
>> OEM: 100
>> Name: SEM16
>> Tran Speed: 52000000
>> Rd Block Len: 512
>> MMC version 4.5
>> High Capacity: Yes
>> Capacity: 4 MiB <<<< "boot0" partition size correctly reported
>> Bus Width: 8-bit
>> Erase Group Size: 512 KiB
>
> That is really weird; are you sure you got the latest version of u-boot
> containing those patches?
>
>>        if (!IS_SD(mmc) && mmc->version >= MMC_VERSION_4_41) {

Ah, my device is MMC 4.5, and the version numbers aren't monotonic:

#define MMC_VERSION_4_41	(MMC_VERSION_MMC | 0x429)
#define MMC_VERSION_4_5		(MMC_VERSION_MMC | 0x405)

Should that be 0x450, or do we need some more complex version comparison 
logic?

FWIW, if I hack the test you quoted to always pass, then the data that's 
printed looks plausible. At the very least, the boot capacity agrees 
with Linux.

  reply	other threads:[~2015-01-22 19:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-23  9:50 [U-Boot] [PATCH v4 00/18] Support for eMMC partitioning and related fixes Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 01/18] mmc: show hardware partition sizes in mmcinfo output Diego Santa Cruz
2015-01-19 15:37   ` Pantelis Antoniou
2015-01-22 18:42   ` Stephen Warren
2015-01-22 19:45     ` Pantelis Antoniou
2015-01-22 19:59       ` Stephen Warren [this message]
2015-01-22 20:48         ` Pantelis Antoniou
2015-01-23  8:30         ` Diego Santa Cruz
2015-01-23  8:34           ` Pantelis Antoniou
2015-01-23  8:43             ` Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 02/18] mmc: extend mmcinfo to show enhanced partition attribute Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 03/18] mmc: make eMMC general purpose partition numbering match spec Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 04/18] mmc: skip mmcinfo partition info processing for eMMC < 4.41 Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 05/18] mmc: incomplete test to switch to high-capacity group size definitions Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 06/18] mmc: computation of eMMC GP partition size was missing 512 KiB factor Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 07/18] mmc: read the size of eMMC enhanced user data area Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 08/18] mmc: display size and start of eMMC enhanced user data area in mmcinfo Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 09/18] mmc: fix erase_grp_size computation with high-capacity size definition Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 10/18] mmc: read the high capacity WP group size for eMMC Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 11/18] mmc: show the erase group size and HC WP group size in mmcinfo output Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 12/18] mmc: eMMC partitioning data is not effective till partitioning completed Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 13/18] mmc: the ext_csd data may be used during init even if reading failed Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 14/18] mmc: add API to do eMMC hardware partitioning Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 15/18] mmc: add mmc hwpartition sub-command " Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 16/18] mmc: extend the mmc hardware partitioning API with write reliability Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 17/18] mmc: extend the mmc hwpartition sub-command to change " Diego Santa Cruz
2014-12-23  9:50 ` [U-Boot] [PATCH v4 18/18] mmc: extend mmcinfo output to show partition write reliability settings Diego Santa Cruz
2015-01-19 15:44 ` [U-Boot] [PATCH v4 00/18] Support for eMMC partitioning and related fixes Pantelis Antoniou

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=54C1569F.2060805@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox