linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: b32955@freescale.com (Huang Shijie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v9 1/3] MTD : add the common code for GPMI-NAND controller driver
Date: Thu, 18 Aug 2011 13:55:12 +0800	[thread overview]
Message-ID: <4E4CA940.3040106@freescale.com> (raw)
In-Reply-To: <1313581828-16625-2-git-send-email-b32955@freescale.com>

Hi Artem:
> +static int mil_pre_bbt_scan(struct gpmi_nand_data  *this)
> +{
> +	struct nand_chip *nand = &this->mil.nand;
> +	struct mtd_info *mtd = &this->mil.mtd;
> +	struct nand_ecclayout *layout = nand->ecc.layout;
> +	int error;
> +
> +	/*
> +	 *  fix the ECC layout before the scanning.
> +	 *  We will use all the (page + OOB).
> +	 */
> +	layout->eccbytes = 0;
> +	layout->oobavail = 0;
> +
> +	mtd->oobavail = mtd->oobsize;
Buggy?
It seems mtd->oobavail should be zero here.

thanks.


Huang Shijie
> +
> +	/* Set up swap block-mark, must be set before the mil_set_geometry() */
> +	if (GPMI_IS_MX23(this))
> +		this->swap_block_mark = false;
> +	else
> +		this->swap_block_mark = true;
> +
> +	/* Set up the medium geometry */
> +	error = mil_set_geometry(this);
> +	if (error)
> +		return error;
> +
> +	/* NAND boot init, depends on the mil_set_geometry(). */
> +	return nand_boot_init(this);
> +}
> +
> +static int gpmi_scan_bbt(struct mtd_info *mtd)
> +{
> +	struct nand_chip *nand = mtd->priv;
> +	struct gpmi_nand_data *this = nand->priv;
> +	int error;
> +
> +	/* Prepare for the BBT scan. */
> +	error = mil_pre_bbt_scan(this);
> +	if (error)
> +		return error;
> +
> +	/* use the default BBT implementation */
> +	return nand_default_bbt(mtd);
> +}
> +

  reply	other threads:[~2011-08-18  5:55 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-17 11:50 [PATCH v9 0/3] add the GPMI controller driver for IMX23/IMX28 Huang Shijie
2011-08-17 11:50 ` [PATCH v9 1/3] MTD : add the common code for GPMI-NAND controller driver Huang Shijie
2011-08-18  5:55   ` Huang Shijie [this message]
2011-08-20  5:35   ` Artem Bityutskiy
2011-08-22  4:34     ` Huang Shijie
2011-08-22  6:26       ` Artem Bityutskiy
2011-08-22  6:45         ` Huang Shijie
2011-08-22 13:11           ` Marek Vasut
2011-08-22 13:11             ` Marek Vasut
2011-08-20 11:43   ` Marek Vasut
2011-08-22  4:59     ` Huang Shijie
2011-08-22 13:09       ` Marek Vasut
2011-08-22 14:00         ` Huang Shijie
2011-08-22 14:02           ` Marek Vasut
2011-08-22 14:12             ` Huang Shijie
2011-08-23 10:27         ` Huang Shijie
2011-08-23 10:34           ` Marek Vasut
2011-08-23 10:38             ` Huang Shijie
2011-08-17 11:50 ` [PATCH v9 2/3] MTD : add helper functions library and header files for GPMI NAND driver Huang Shijie
2011-08-20 11:46   ` Marek Vasut
2011-08-22  5:03     ` Huang Shijie
2011-08-22 11:20       ` Marek Vasut
2011-08-22 13:41         ` Huang Shijie
2011-08-17 11:50 ` [PATCH v9 3/3] MTD : add GPMI-NAND driver in the config and Makefile Huang Shijie
2011-08-19  2:48 ` [PATCH v9 0/3] add the GPMI controller driver for IMX23/IMX28 Huang Shijie

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=4E4CA940.3040106@freescale.com \
    --to=b32955@freescale.com \
    --cc=linux-arm-kernel@lists.infradead.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).