linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Javier Martin <javier.martin@vista-silicon.com>
Cc: Gernot.Hoyler@spansion.com, Artem.Bityutskiy@nokia.com,
	joakim.tjernlund@transmode.se, dwmw2@infradead.org,
	linux-mtd@lists.infradead.org, tabe@mvista.com
Subject: Re: MTD: Add fixup for S29NS512P NOR flash.
Date: Sat, 12 May 2012 17:01:53 +0300	[thread overview]
Message-ID: <1336831313.5707.2.camel@koala> (raw)
In-Reply-To: <1336731341-615-1-git-send-email-javier.martin@vista-silicon.com>

[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]

On Fri, 2012-05-11 at 12:15 +0200, Javier Martin wrote:
> Spansion S29NS512P flash uses a 16bit transfer to report number
> of sectors instead of two 8bit accesses as CFI specifies.
> 
> Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
> ---
>  drivers/mtd/chips/cfi_cmdset_0002.c |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
> index 23175ed..5873b1f 100644
> --- a/drivers/mtd/chips/cfi_cmdset_0002.c
> +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
> @@ -332,6 +332,19 @@ static void fixup_s29gl032n_sectors(struct mtd_info *mtd)
>  	}
>  }
>  
> +static void fixup_s29ns512p_sectors(struct mtd_info *mtd)
> +{
> +	struct map_info *map = mtd->priv;
> +	struct cfi_private *cfi = map->fldrv_priv;
> +
> +	/*
> +	 *  S29NS512P flash uses more than 8bits to report number of sectors,
> +	 * which is not permitted by CFI.
> +	 */
> +	cfi->cfiq->EraseRegionInfo[0] = 0x020001ff;
> +	pr_warning("%s: Bad S29NS512P CFI data, adjust to 512 sectors\n", mtd->name);

What is the purpose of printing this warning - how the user should act
upon it? If you successfully work-around a known HW issue, you should
not warn. HW workarounds are normal.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-05-12 14:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11 10:15 MTD: Add fixup for S29NS512P NOR flash Javier Martin
2012-05-12 14:01 ` Artem Bityutskiy [this message]
2012-05-13 18:18 ` Artem Bityutskiy
2012-05-14  8:06   ` javier Martin

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=1336831313.5707.2.camel@koala \
    --to=dedekind1@gmail.com \
    --cc=Artem.Bityutskiy@nokia.com \
    --cc=Gernot.Hoyler@spansion.com \
    --cc=dwmw2@infradead.org \
    --cc=javier.martin@vista-silicon.com \
    --cc=joakim.tjernlund@transmode.se \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tabe@mvista.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).