public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] UBI issues on SAMA5D31 NOR flash
Date: Tue, 30 Sep 2014 11:36:18 +0200	[thread overview]
Message-ID: <542A7992.6060802@denx.de> (raw)
In-Reply-To: <005501cfdc8d$a0e18f30$e2a4ad90$@pont@sdcsystems.com>

Hello Andy,

Am 30.09.2014 11:04, schrieb Andy Pont:
> Hello Heiko,
>
>>> Using the patches from Bo Shen to support the NOR flash on the Atmel
>>
>> which patches?
>
> I can't find the references in Patchman but they were sent to the mailing
> list on 18th July 2014 in a series called "ARM: atmel: sama5d3xek: enable
> NOR flash support".  The patches basically just add the board features to
> enable the IO pins for the NOR flash and to map it into the memory map at
> 0x10000000.
>
>>> U-Boot>   ubi part rootfs
>>> UBI: attaching mtd2 to ubi0
>>> UBI: physical eraseblock size:   131072 bytes (128 KiB)
>>> UBI: logical eraseblock size:    130944 bytes
>>> UBI: smallest flash I/O unit:    1
>>> UBI: VID header offset:          64 (aligned 64)
>>> UBI: data offset:                128
>>> UBI error: vtbl_check: volume table check failed: record 0, error 9
>>
>> seems ubi does not find the volume table ... could you activate
>> ubi error messages ubi_err() ?
>
> Adding:
>
> #define DEBUG
> #define CONFIG_MTD_UBI_DEBUG
> #define CONFIG_MTD_UBI_DEBUG_MSG
> #define CONFIG_UBIFS_FS_DEBUG
>
> Gives the following output:
>
> U-Boot>  ubi part rootfs
>
> ---mtdparts_init---
> last_ids  : nor0=physmap-flash.0
> env_ids   : nor0=physmap-flash.0
> last_parts:
> mtdparts=physmap-flash.0:128k(bootstrap)ro,768k(u-boot)ro,128k(fdt),4m(kerne
> l),10m(rootfs)
> env_parts :
> mtdparts=physmap-flash.0:128k(bootstrap)ro,768k(u-boot)ro,128k(fdt),4m(kerne
> l),10m(rootfs)
>
> last_partition : nor0,0
> env_partition  : nor0,0
> --- find_dev_and_part ---
> id = rootfs
> --- find_dev_and_part ---
> id = rootfs
> Creating 1 MTD partitions on "nor0":
> 0x000000500000-0x000000f00000 : "mtd=4"
> UBI: attaching mtd2 to ubi0
> UBI: physical eraseblock size:   131072 bytes (128 KiB)
> UBI: logical eraseblock size:    130944 bytes
> UBI: smallest flash I/O unit:    1
> UBI: VID header offset:          64 (aligned 64)
> UBI: data offset:                128
> UBI error: vtbl_check: volume table check failed: record 0, error 9
> UBI error: ubi_init: cannot attach mtd2
> UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
> UBI init error 22
> Command failed, result=22

Hmm.. I thought to see something like this:

"too large reserved_pebs %d, good PEBs %d"

I am not familiar with this HW ... I think, you have to debug into it ...
Maybe Bo has an idea?

>> Did the ubi partition work under linux? Did you tried current ML
>> U-Boot (there MTD/UBI and UBIFS is synced with linux 3.15) ...
>
> I haven't booted to Linux yet.  If I try to boot with the kernel that is in
> the NOR flash then I get the following output from the console messages:
>
> 0.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID
> 0x000089 Chip ID 0x00899a
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Intel/Sharp Extended Query Table at 0x010A
> Using buffer write method
> Using auto-unlock on power-up/resume
> cfi_cmdset_0001: Erase suspend on write enabled
> UBI error: ubi_init: UBI error: cannot initialize UBI, error -19

Hmm.. linux returns another error ...

> Is there something that I need to do in order to tell U-Boot and the kernel
> that the base address of the NOR flash device is 0x10000000 rather than 0x0?

I don t know ... but it seems, the chip is detected, so the base addr
should be correct.

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2014-09-30  9:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-29 16:40 [U-Boot] UBI issues on SAMA5D31 NOR flash Andy Pont
2014-09-30  4:39 ` Heiko Schocher
2014-09-30  9:04   ` Andy Pont
2014-09-30  9:36     ` Heiko Schocher [this message]
2014-09-30 11:19       ` Andy Pont
2014-10-01 11:35         ` Heiko Schocher
2014-10-02  8:16           ` Andy Pont
2014-10-02  9:10             ` Heiko Schocher
2014-10-02  9:16               ` Andy Pont
2014-10-02  9:44                 ` Andy Pont

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=542A7992.6060802@denx.de \
    --to=hs@denx.de \
    --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