public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: harvey.hunt@imgtec•com (Harvey Hunt)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v3 07/52] mtd: nand: core: use mtd_ooblayout_xxx() helpers where appropriate
Date: Fri, 26 Feb 2016 14:35:08 +0000	[thread overview]
Message-ID: <56D0629C.9080805@imgtec.com> (raw)
In-Reply-To: <1456448280-27788-8-git-send-email-boris.brezillon@free-electrons.com>

Hi Boris,

On 26/02/16 00:57, Boris Brezillon wrote:
> The mtd_ooblayout_xxx() helper functions have been added to avoid direct
> accesses to the ecclayout field, and thus ease for future reworks.
> Use these helpers in all places where the oobfree[] and eccpos[] arrays
> where directly accessed.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons•com>
> ---
>   drivers/mtd/nand/nand_base.c | 183 +++++++++++++++++++------------------------
>   drivers/mtd/nand/nand_bch.c  |   3 +-
>   2 files changed, 82 insertions(+), 104 deletions(-)
>
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index 91672bf..17504f2 100644
[...]

I just pulled your nand/ecclayout branch from github and tested out your 
latest patchset "mtd: rework ECC layout definition" on a Ci20 
(jz4780_{nand,bch}) and noticed that my board was failing to boot.

I bisected to this patch, here is the kernel's output during boot:

479556d ("mtd: nand: core: use mtd_ooblayout_xxx() helpers where 
appropriate"):

[ 0.256349] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x88
[ 0.262860] nand: Micron MT29F64G08CBAAAWP
[ 0.266970] nand: 8192 MiB, MLC, erase size: 2048 KiB, page size: 8192, 
OOB size: 448
[ 0.274856] jz4780-nand 1b000000.nand-controller: using hardware BCH 
(strength 24, size 1024, bytes 42)
[ 0.288982] Bad block table not found for chip 0
[ 0.297673] Bad block table not found for chip 0
[ 0.302328] Scanning device for bad blocks
[ 0.320135] Bad eraseblock 90 at 0x00000b400000
[ 0.324829] Bad eraseblock 91 at 0x00000b600000
[ 0.931085] Bad eraseblock 4092 at 0x0001ff800000
[ 0.935947] Bad eraseblock 4093 at 0x0001ffa00000
[ 0.944878] nand_bbt: error while writing bad block table -34
[ 0.950666] jz4780-nand: probe of 1b000000.nand-controller failed with 
error -34
[ 0.958302] UBI error: cannot open mtd 3, error -19
[ 0.963002] UBI error: cannot open mtd 4, error -19[ 0.970419] clk: Not 
disabling unused clocks
[ 0.975011] UBIFS error (pid: 1): cannot open "ubi1:root", error -19VFS: 
Cannot open root device "ubi1:root" or unknown-block(0,0): error -19
[ 0.987810] Please append a correct "root=" boot option; here are the 
available partitions:
[ 0.996210] Kernel panic - not syncing: VFS: Unable to mount root fs on 
unknown-block(0,0)
[ 1.004498] Rebooting in 10 seconds..

6625d32 ("mtd: use mtd_ooblayout_xxx() helpers where appropriate"):

[ 0.256232] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x88
[ 0.262745] nand: Micron MT29F64G08CBAAAWP
[ 0.266854] nand: 8192 MiB, MLC, erase size: 2048 KiB, page size: 8192, 
OOB size: 448
[ 0.274739] jz4780-nand 1b000000.nand-controller: using hardware BCH 
(strength 24, size 1024, bytes 42)
[ 0.285993] Bad block table found at page 1048320, version 0x01
[ 0.294353] Bad block table found at page 1048064, version 0x01
[ 0.301523] nand_read_bbt: bad block at 0x00000b400000
[ 0.306677] nand_read_bbt: bad block at 0x00000b600000
[ 0.312289] 5 ofpart partitions found on MTD device 
1b000000.nand-controller.1
[ 0.319553] Creating 5 MTD partitions on "1b000000.nand-controller.1":
[ 0.326098] 0x000000000000-0x000000800000 : "u-boot-spl"
[ 0.331757] 0x000000800000-0x000000a00000 : "u-boot"
[ 0.337185] 0x000000a00000-0x000000c00000 : "u-boot-env"
[ 0.342903] 0x000000c00000-0x000004c00000 : "boot"
[ 0.348109] 0x000004c00000-0x000200000000 : "system"
[ 0.354284] ubi0 error: ubi_attach_mtd_dev: More than 64 PEBs are needed 
for fastmap, sorry.
[...]

I'll look into this more later today, but wanted to run it by you in 
case you have any thoughts.

Thanks,

Harvey

  reply	other threads:[~2016-02-26 14:35 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26  0:57 [PATCH v3 00/52] mtd: rework ECC layout definition Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 01/52] mtd: kill the ecclayout->oobavail field Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 02/52] mtd: create an mtd_oobavail() helper and make use of it Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 03/52] mtd: mtdswap: remove useless if (!mtd->ecclayout) test Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 04/52] mtd: nand: simplify nand_bch_init() usage Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 05/52] mtd: add mtd_ooblayout_xxx() helper functions Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 06/52] mtd: use mtd_ooblayout_xxx() helpers where appropriate Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 07/52] mtd: nand: core: " Boris Brezillon
2016-02-26 14:35   ` Harvey Hunt [this message]
2016-02-26 15:10     ` Boris Brezillon
2016-02-26 15:17       ` Harvey Hunt
2016-02-26 18:33         ` Boris Brezillon
2016-02-29 10:33           ` Harvey Hunt
2016-02-26  0:57 ` [PATCH v3 08/52] mtd: nand: atmel: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 09/52] mtd: nand: fsl_ifc: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 10/52] mtd: nand: gpmi: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 11/52] mtd: nand: lpc32xx: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 12/52] mtd: nand: omap2: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 13/52] mtd: onenand: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 14/52] mtd: add mtd_set_ecclayout() helper function Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 15/52] mtd: use mtd_set_ecclayout() where appropriate Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 16/52] mtd: nand: " Boris Brezillon
2016-03-05  2:26   ` Brian Norris
2016-03-05  8:53     ` Boris Brezillon
2016-03-05  9:01       ` Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 17/52] mtd: onenand: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 18/52] mtd: docg3: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 19/52] mtd: create an mtd_ooblayout_ops struct to ease ECC layout definition Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 20/52] mtd: docg3: switch to mtd_ooblayout_ops Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 21/52] mtd: nand: implement the default mtd_ooblayout_ops Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 22/52] mtd: nand: bch: switch to mtd_ooblayout_ops Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 23/52] mtd: nand: sharpsl: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 24/52] mtd: nand: jz4740: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 25/52] mtd: nand: atmel: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 26/52] mtd: nand: bf5xx: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 27/52] mtd: nand: brcm: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 28/52] mtd: nand: cafe: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 29/52] mtd: nand: davinci: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 30/52] mtd: nand: denali: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 31/52] mtd: nand: diskonchip: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 32/52] mtd: nand: docg4: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 33/52] mtd: nand: fsl_elbc: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 34/52] mtd: nand: fsl_ifc: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 35/52] mtd: nand: fsmc: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 36/52] mtd: nand: fsmc: get rid of the fsmc_nand_eccplace struct Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 37/52] mtd: nand: gpmi: switch to mtd_ooblayout_ops Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 38/52] mtd: nand: hisi504: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 39/52] mtd: nand: jz4780: " Boris Brezillon
2016-02-29 10:45   ` Harvey Hunt
2016-02-26  0:57 ` [PATCH v3 40/52] mtd: nand: lpc32xx: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 41/52] mtd: nand: mxc: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 42/52] mtd: nand: omap2: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 43/52] mtd: nand: pxa3xx: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 44/52] mtd: nand: s3c2410: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 45/52] mtd: nand: sh_flctl: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 46/52] mtd: nand: sm_common: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 47/52] mtd: nand: sunxi: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 48/52] mtd: nand: vf610: " Boris Brezillon
2016-02-26 19:43   ` Stefan Agner
2016-02-26 20:43     ` Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 49/52] mtd: onenand: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 50/52] staging: mt29f_spinand: " Boris Brezillon
2016-02-26  0:57 ` [PATCH v3 51/52] mtd: nand: kill the ecc->layout field Boris Brezillon
2016-02-26  0:58 ` [PATCH v3 52/52] mtd: kill the nand_ecclayout struct Boris Brezillon
2016-02-26  1:27 ` [PATCH v3 00/52] mtd: rework ECC layout definition Stefan Agner
2016-02-26  2:16   ` Boris Brezillon

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=56D0629C.9080805@imgtec.com \
    --to=harvey.hunt@imgtec$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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