From: Jan Weitzel <J.Weitzel@phytec.de>
To: linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org
Cc: s.hauer@pengutronix.de, dwmw2@infradead.org, tony@atomide.com,
s-ghorai@ti.com, vimalsingh@ti.com, Artem.Bityutskiy@nokia.com
Subject: Re: [PATCH] ARM: omap2: mtd split nand_scan in ident and tail
Date: Fri, 15 Apr 2011 15:34:56 +0200 [thread overview]
Message-ID: <1302874496.7246.11.camel@lws-weitzel> (raw)
In-Reply-To: <1302772529-15641-1-git-send-email-j.weitzel@phytec.de>
Am Donnerstag, den 14.04.2011, 11:15 +0200 schrieb Jan Weitzel:
> nand_scan calls nand_scan_ident and nand_scan_tail, setting values like oobvail
> according to ecc.layout. If we change the layout afterwards values are wrong.
>
> Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
> ---
> drivers/mtd/nand/omap2.c | 10 ++++++++--
> 1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
> index da9a351..288423f 100644
> --- a/drivers/mtd/nand/omap2.c
> +++ b/drivers/mtd/nand/omap2.c
> @@ -1073,9 +1073,9 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
> /* DIP switches on some boards change between 8 and 16 bit
> * bus widths for flash. Try the other width if the first try fails.
> */
> - if (nand_scan(&info->mtd, 1)) {
> + if (nand_scan_ident(&info->mtd, 1, NULL)) {
> info->nand.options ^= NAND_BUSWIDTH_16;
> - if (nand_scan(&info->mtd, 1)) {
> + if (nand_scan_ident(&info->mtd, 1, NULL)) {
> err = -ENXIO;
> goto out_release_mem_region;
> }
> @@ -1101,6 +1101,12 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
> info->nand.ecc.layout = &omap_oobinfo;
> }
>
> + /* second phase scan */
> + if (nand_scan_tail(&info->mtd)) {
> + err = -ENXIO;
> + goto out_release_mem_region;
> + }
> +
> #ifdef CONFIG_MTD_PARTITIONS
> err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0);
> if (err > 0)
So no comments? Is any rework needed? Without this patch I am not able
to mount partions with OMAP_ECC_HAMMING_CODE_HW_ROMCODE.
Regards, Jan
next prev parent reply other threads:[~2011-04-15 13:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-14 9:15 [PATCH] ARM: omap2: mtd split nand_scan in ident and tail Jan Weitzel
2011-04-15 13:34 ` Jan Weitzel [this message]
2011-04-15 14:03 ` Artem Bityutskiy
2011-04-18 6:50 ` [PATCH v2] " Jan Weitzel
2011-04-18 6:59 ` Vimal Singh
2011-04-19 14:15 ` [PATCH v3] " Jan Weitzel
2011-04-20 9:00 ` Artem Bityutskiy
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=1302874496.7246.11.camel@lws-weitzel \
--to=j.weitzel@phytec.de \
--cc=Artem.Bityutskiy@nokia.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=s-ghorai@ti.com \
--cc=s.hauer@pengutronix.de \
--cc=tony@atomide.com \
--cc=vimalsingh@ti.com \
/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).