Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pekon Gupta <pekon@ti.com>
To: Brian Norris <computersforpeace@gmail.com>,
	Artem Bityutskiy <dedekind1@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>,
	u-boot@lists.denx.de,
	Enric Balletbo Serra <eballetbo@iseebcn.com>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	Pekon Gupta <pekon@ti.com>, Stefan Roese <sr@denx.de>
Subject: [PATCH v2 0/3] mtd: nand: omap: fix ecc-layout
Date: Fri, 14 Feb 2014 22:31:45 +0530	[thread overview]
Message-ID: <1392397308-17630-1-git-send-email-pekon@ti.com> (raw)

*changes v1 -> v2*
[PATCH 1/3] fix oobfree->offset calculation + adjust for reserved-marker of last sector
[PATCH 2/3] <new patch>
[PATCH 3/3] refactor code as suggested by Brian Norris <computersforpeace@gmail.com>

 
*original v1*
[PATCH 1/2] http://lists.infradead.org/pipermail/linux-mtd/2013-December/050946.html
[PATCH 2/2] http://lists.infradead.org/pipermail/linux-mtd/2013-December/050945.html

This patch-set is tested on AM335x-EVM using following end-to-end boot sequence
with appropriate u-boot configs [1]

    (BCH8_HW)      (BCH8_SW)         (BCH8_SW)         (BCH8_SW)  (UBIFS)
ROM ---------> SPL ---------> U-Boot ---------> Kernel ---------> File-System

    (BCH8_HW)      (BCH8_HW)         (BCH8_HW)         (BCH8_HW)  (UBIFS)
ROM ---------> SPL ---------> U-Boot ---------> Kernel ---------> File-System


Test1: flash ubi image from u-boot and boot the kernel
   u-boot> mw 0x82000000 0xff <u-boot.img size aligned to NAND block boundary>
   u-boot> fatload mmc 0 0x82000000 u-boot.img
   u-boot> nand erase <u-boot_offset> <u-boot.img size>
   u-boot> nand write 0x82000000  <u-boot_offset> <u-boot.img size>
   u-boot> setenv bootargs 'console=ttyO0,115200n8 noinitrd mem=256M \
                root=ubi0 rw rootfstype=ubifs ubi.mtd=<mtdpart-of-rootfs>,\
                <page-size> ip=off init=/init'
   u-boot> bootm <kernel_offset>

Test2: update u-boot.img from kernel and re-boot
   kernel> flash_erase /dev/<mtdpart-of-u-boot>  0 0
   kernel> nandwrite -s 0  /dev/<mtdpart-of-u-boot>   u-boot.img
   kernel> reboot

[1] u-boot configurations to match above ecc-layout are documented at
    https://processors.wiki.ti.com/index.php/Linux_Core_NAND_User%27s_Guide


Pekon Gupta (3):
  mtd: nand: omap: fix ecclayout->oobfree->offset
  mtd: nand: omap: fix ecclayout->oobfree->length
  mtd: nand: omap: fix ecclayout to be in sync with u-boot NAND driver

 drivers/mtd/nand/omap2.c | 61 +++++++++++++++++++++++++++++++-----------------
 1 file changed, 40 insertions(+), 21 deletions(-)

-- 
1.8.5.1.163.gd7aced9

             reply	other threads:[~2014-02-14 17:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 17:01 Pekon Gupta [this message]
2014-02-14 17:01 ` [PATCH v2 1/3] mtd: nand: omap: fix ecclayout->oobfree->offset Pekon Gupta
2014-02-14 18:59   ` Brian Norris
2014-02-14 17:01 ` [PATCH v2 2/3] mtd: nand: omap: fix ecclayout->oobfree->length Pekon Gupta
2014-02-14 17:01 ` [PATCH v2 3/3] mtd: nand: omap: fix ecclayout to be in sync with u-boot NAND driver Pekon Gupta

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=1392397308-17630-1-git-send-email-pekon@ti.com \
    --to=pekon@ti.com \
    --cc=balbi@ti.com \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=eballetbo@iseebcn.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=sr@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