public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andy Pont <andy.pont@sdcsystems.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] UBI issues with DM355 and Micron NAND flash
Date: Wed, 8 Jun 2016 10:03:30 +0100	[thread overview]
Message-ID: <006101d1c164$a1ad13e0$e5073ba0$@sdcsystems.com> (raw)

Hello,

I am working on an update to a Linux configuration for a custom TI DM355
based hardware platform which uses a Micron MT29F4G08ABADAWP NAND flash
device and U-Boot 2013.07 (which I can't change).  The boards have been
deployed in the field over a number of years using the NAND flash to store
the Linux kernel and a CramFS partition and all works well with the
following settings in the board config file:

#define CONFIG_NAND_DAVINCI
#define CONFIG_SYS_NAND_CS			2
#define CONFIG_SYS_NAND_USE_FLASH_BBT
#define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
#define CONFIG_SYS_NAND_PAGE_2K
#define CONFIG_SYS_NAND_LARGEPAGE
#define CONFIG_SYS_NAND_BASE_LIST	{ 0x02000000, }
#define CONFIG_SYS_MAX_NAND_DEVICE	1
#define CONFIG_SYS_NAND_MAX_CHIPS	1

As part of the update we are moving to a UBI root file system and this is
where problems are starting.  As an initial test I am using the following
commands in U-Boot to create the UBI partition:

U-Boot> nand erase.part rootfs
U-Boot> ubi part rootfs

All appears to be well but if I reset the hardware and then rerun the "ubi
part rootfs" command then I am bombarded with errors of the following type
which never seem to end but just change in the PEB being referenced:

UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 0:0, read
64 bytes
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 0:512,
read 512 bytes
UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 1:0, read
64 bytes
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 1:512,
read 512 bytes

The datasheet for the flash device says that in 8-bit mode a page size is
2048 + 64 bytes and as far as I can tell doesn't mention subpages and so I
am confused by the output from the "ubi part rootfs" command that states
that there are 512 byte sub-pages available:

UBI: physical eraseblock size:	131072 bytes (128 KiB)
UBI: logical eraseblock size:	129024 bytes
UBI: smallest flash I/O unit:	2048
UBI: sub-page size:		512
UBI: VID header offset:		512 (aligned 512)
UBI: data offset:		2048

I have had a look through the source but can't find anyway to disable
sub-page support or to tell it that a sub-page is the same size as the
smallest flash I/O unit.  Then again, I could be looking in completely the
wrong place.

Any thoughts...

Andy.

                 reply	other threads:[~2016-06-08  9:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='006101d1c164$a1ad13e0$e5073ba0$@sdcsystems.com' \
    --to=andy.pont@sdcsystems.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox