linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>,
	rogerq@ti.com, khilman@deeprootsystems.com,
	linux@arm.linux.org.uk, pali.rohar@gmail.com, sre@kernel.org,
	pavel@ucw.cz, nm@ti.com, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: OMAP2+: Fix onenand initialization to avoid filesystem corruption
Date: Wed, 10 Feb 2016 16:12:21 -0800	[thread overview]
Message-ID: <20160211001220.GM19432@atomide.com> (raw)
In-Reply-To: <20160210211226.GB1640@darkstar.musicnaut.iki.fi>

* Aaro Koskinen <aaro.koskinen@iki.fi> [160210 13:13]:
> Hi,
> 
> On Mon, Feb 08, 2016 at 11:36:45AM -0800, Tony Lindgren wrote:
> > * Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> [160205 06:38]:
> > > Commit <e7b11dc7b77bfce0a351230a5feeadc1d0bba997> ("ARM: OMAP2+: Fix
> > > onenand rate detection to avoid filesystem corruption") partially fixed
> > > onenand configuration when GPMC module is reset. Finish the job by also
> > > providing the correct values in ONENAND_REG_SYS_CFG1 register.
> > 
> > OK. So probably the INT or RDY polarity made the ECC not work.
> > 
> > Aaro, care to dump out also the nolo configured CFG1 value from
> > n8x0 and n9(50)?
> > 
> > You can do it by adding something like this to the beginning
> > of set_onenand_cfg():
> > 
> > pr_info("CFG1: 0x%04x\n", readw(onenand_base + ONENAND_REG_SYS_CFG1));
> > 
> > And presumably the values are the same as on n900. If not, we
> > should do the legacy file system flash test on all of them
> > before committing this fix.
> 
> I got these (with CONFIG_OMAP_GPMC_DEBUG also enabled):
> 
> N800:
> [    2.803100] CFG1: 0x46c0
> [    3.150115] CFG1: 0x06c0
> 
> N810:
> [    2.802368] CFG1: 0x46c0
> [    3.148620] CFG1: 0x06c0
> 
> N900:
> [    4.965576] CFG1: 0x46c0
> [    5.333740] CFG1: 0x06c0

Thanks, so these all should be fine with Ivaylo's patch.

> N950:
> [    4.217193] CFG1: 0x66c4
> [    4.583221] CFG1: 0x06c0
> 
> N9:
> [    4.212677] CFG1: 0x66c4
> [    4.578613] CFG1: 0x06c0

Aaro, care to do one more test on n9(50) like Ivaylo posted
earlier:

1. Flash original maemo rootfs

2. Boot mainline kernel with Ivaylo's patch and mount onenand

3. Boot original maemo kernel and check dmesg there's no
   file corruption

Also.. There's a chance somebody has created a onenand file system
with recent mainline kernels that did the reset and disabled ECC.
So with Ivaylo's patch fixing that, those may not mount properly
any longer. Most likely people just keep their maemo rootfs there
though with the MMC being available.

Regards,

Tony

  reply	other threads:[~2016-02-11  0:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05 14:37 [PATCH] ARM: OMAP2+: Fix onenand initialization to avoid filesystem corruption Ivaylo Dimitrov
2016-02-08 19:36 ` Tony Lindgren
2016-02-08 20:14   ` Ivaylo Dimitrov
2016-02-08 20:26     ` Tony Lindgren
2016-02-10 21:12   ` Aaro Koskinen
2016-02-11  0:12     ` Tony Lindgren [this message]
2016-02-21 18:13       ` Ivaylo Dimitrov
2016-02-22 16:09         ` Tony Lindgren
2016-02-21 18:44 ` Aaro Koskinen

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=20160211001220.GM19432@atomide.com \
    --to=tony@atomide.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nm@ti.com \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=rogerq@ti.com \
    --cc=sre@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).