All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Palacios, Hector <Hector.Palacios@digi.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] mmc erase fails from U-Boot command line
Date: Fri, 13 Nov 2015 12:26:19 +0000	[thread overview]
Message-ID: <52F917CEA1B9C64C94833D53889D478C269236@dor-sms-xch01.digi.com> (raw)
In-Reply-To: <CAOMZO5A4jB_xNKbZmcpa8xVy6i12Ww-fEhu5LzJ=HyboXo-eNQ@mail.gmail.com>

Hi Fabio,

On Thu, 12 Nov 2015 21:56, Fabio Estevam wrote:
> Hi Hector and Cliff,
> 
> On Mon, Oct 19, 2015 at 9:06 AM, Hector Palacios
> <hector.palacios@digi.com> wrote:
> 
>> This issue is reproducible on Freescale's SABRESD on both SD card and eMMC with v2015.04. The
>> issue has been there always, I believe. Apparently the command erases the first block, but the
>> operation returns an error, so it aborts and it doesn't continue erasing futher blocks.
>> 
>> I opened a similar thread a while ago:
>> http://lists.denx.de/pipermail/u-boot/2015-June/215912.html
> 
> 
> I am running mainline U-boot on a mx6qsabresd and it works fine here:
> 
> => mmc dev 2
> switch to partitions #0, OK
> mmc2(part 0) is current device
> => mmc erase 4000 1000
> 
> MMC erase: dev # 2, block # 16384, count 4096 ... 4096 blocks erased: OK
> =>

I can reproduce it with latest U-Boot on a mx6qsabresd both on the SD card and on the eMMC:

U-Boot 2015.10-00638-g9ac4fc82071c (Nov 13 2015 - 12:44:11 +0100)

CPU:   Freescale i.MX6Q rev1.2 996 MHz (running at 792 MHz)
CPU:   Automotive temperature grade (-40C to 125C) at 45C
Reset cause: POR
Board: MX6-SabreSD
I2C:   ready
DRAM:  1 GiB
PMIC:  PFUZE100 ID=0x10
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
*** Warning - bad CRC, using default environment

PCI:   pcie phy link never came up
No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In:    serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Hit any key to stop autoboot:  0


SDCARD test:

=> mmc dev 1
switch to partitions #0, OK
mmc1 is current device
=> mmc erase 4000 1000

MMC erase: dev # 1, block # 16384, count 4096 ... Timeout waiting for DAT0 to go high!
mmc erase failed
0 blocks erased: ERROR


eMMC test:

=> mmc dev 2
switch to partitions #0, OK
mmc2(part 0) is current device
=> mmc erase 4000 1000

MMC erase: dev # 2, block # 16384, count 4096 ... Timeout waiting for DAT0 to go high!
mmc erase failed
0 blocks erased: ERROR
=>

Could it be a silicon revision issue? 
My CPU is i.MX6Q rev1.2.

I tested on two SABRESD units with similar results. 
In the second board, erasing the SD card (mmc erase 4000 1000) occasionally works (it takes around 30 seconds). But the rest of times fails after a random number of blocks:
=> mmc erase 4000 1000

MMC erase: dev # 1, block # 16384, count 4096 ... Timeout waiting for DAT0 to go high!
mmc erase failed
1412 blocks erased: ERROR

The eMMC however *always* fails in both SABRESD boards (and in my custom board) after erasing sector #0.
My eMMC is v4.5 and SABRESD is v4.4.1, but both of them fail:

=> mmcinfo (SABRE)
Device: FSL_SDHC
Manufacturer ID: 45
OEM: 100
Name: SEM08
Tran Speed: 52000000
Rd Block Len: 512
MMC version 4.4.1
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 16 MiB
User Capacity: 7.4 GiB WRREL
Boot Capacity: 2 MiB ENH
RPMB Capacity: 128 KiB ENH

=> mmcinfo (custom board)
Device: FSL_SDHC
Manufacturer ID: fe
OEM: 14e
Name: P1XXX 
Tran Speed: 52000000
Rd Block Len: 512
MMC version 4.5
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 4 MiB
User Capacity: 3.6 GiB
Boot Capacity: 16 MiB ENH
RPMB Capacity: 128 KiB ENH

Regards,
--
H?ctor Palacios

  reply	other threads:[~2015-11-13 12:26 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16 11:46 [U-Boot] mmc erase fails from U-Boot command line Cliff Brust
2015-10-19 11:06 ` Hector Palacios
2015-11-12 20:56   ` Fabio Estevam
2015-11-13 12:26     ` Palacios, Hector [this message]
2015-11-13 14:37       ` Fabio Estevam
2015-11-16 15:23         ` Fabio Estevam
2015-11-16 15:30           ` Fabio Estevam
2015-12-01 19:05             ` Eric Nelson
2015-12-02 17:23               ` Fabio Estevam
2015-12-02 18:47                 ` Eric Nelson
2015-12-02 18:52                   ` Fabio Estevam
2015-12-02 19:28                     ` Eric Nelson
2015-12-02 19:53                       ` Fabio Estevam
2015-12-04 16:35                         ` Eric Nelson
2015-12-04 16:37                           ` Fabio Estevam
2015-12-04 22:42                           ` Eric Nelson
2015-12-05  0:19                             ` Fabio Estevam
2015-12-07  0:21                             ` Fabio Estevam
2015-12-07 14:36                               ` Eric Nelson
2015-12-02 19:37                     ` Michael Trimarchi
2015-12-02 19:54                       ` Fabio Estevam
2015-12-02 20:00                         ` Michael Trimarchi
2015-12-04 16:08                           ` Eric Nelson
2015-12-04 16:50                             ` Eric Nelson
2015-12-04 17:06                               ` Michael Trimarchi
2015-12-07 14:50                               ` [U-Boot] [PATCH] mmc: update MMC_ERASE argument to match Linux kernel Eric Nelson
2015-12-09 10:55                                 ` Hector Palacios
2015-12-22  9:55                                   ` Fabio Estevam
2016-01-04 22:23                                 ` [U-Boot] " Tom Rini

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=52F917CEA1B9C64C94833D53889D478C269236@dor-sms-xch01.digi.com \
    --to=hector.palacios@digi.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.