All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH:v2] Support up to 7 banks for ids as specified in JEDEC JEP106Z
Date: Wed, 22 Jul 2009 14:17:25 +0200	[thread overview]
Message-ID: <200907221417.25929.sr@denx.de> (raw)
In-Reply-To: <1248264184-12911-1-git-send-email-niklaus.giger@member.fsf.org>

On Wednesday 22 July 2009 14:03:04 Niklaus Giger wrote:
> see http://www.jedec.org/download/search/jep106Z.pdf
> Add some second source legacy flash chips 256x8.

Please add an empty line here.

> Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>

And still some more white space cleanup comments below (sorry, I didn't catch 
them before).

> ---
>  drivers/mtd/cfi_flash.c   |   15 +++++++++-
>  drivers/mtd/jedec_flash.c |   67
> +++++++++++++++++++++++++++++++++++++++++++++ include/flash.h           |  
> 10 ++++++-
>  3 files changed, 89 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
> index 81ac5d3..4a4b697 100644
> --- a/drivers/mtd/cfi_flash.c
> +++ b/drivers/mtd/cfi_flash.c
> @@ -106,6 +106,8 @@
>  #define ATM_CMD_SOFTLOCK_START		0x80
>  #define ATM_CMD_LOCK_SECT		0x40
>
> +#define FLASH_CONTINUATION_CODE         0x7F

                                  ^^^^^^^^

Indentation by tab's please.

> +
>  #define FLASH_OFFSET_MANUFACTURER_ID	0x00
>  #define FLASH_OFFSET_DEVICE_ID		0x01
>  #define FLASH_OFFSET_DEVICE_ID2		0x0E
> @@ -1541,13 +1543,22 @@ static int cmdset_intel_init(flash_info_t *info,
> struct cfi_qry *qry)
>
>  static void cmdset_amd_read_jedec_ids(flash_info_t *info)
>  {
> +	ushort bankId = 0;
> +	uchar  manuId;
> +
>  	flash_write_cmd(info, 0, 0, AMD_CMD_RESET);
>  	flash_unlock_seq(info, 0);
>  	flash_write_cmd(info, 0, info->addr_unlock1, FLASH_CMD_READ_ID);
>  	udelay(1000); /* some flash are slow to respond */
>
> -	info->manufacturer_id = flash_read_uchar (info,
> -					FLASH_OFFSET_MANUFACTURER_ID);
> +	manuId = flash_read_uchar (info, FLASH_OFFSET_MANUFACTURER_ID);
> +	/* JEDEC JEP106Z specifies ID codes up to bank 7 */
> +	while (manuId == FLASH_CONTINUATION_CODE && bankId < 0x800) {
> +		bankId += 0x100;
> +		manuId = flash_read_uchar (info,
> +			bankId | FLASH_OFFSET_MANUFACTURER_ID);
> +	}
> +	info->manufacturer_id = manuId;
>
>  	switch (info->chipwidth){
>  	case FLASH_CFI_8BIT:
> diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c
> index e48acec..376a323 100644
> --- a/drivers/mtd/jedec_flash.c
> +++ b/drivers/mtd/jedec_flash.c
> @@ -68,6 +68,17 @@
>  #define SST39SF010A	0x00B5
>  #define SST39SF020A	0x00B6
>
> +/* MXIC */
> +#define MX29LV040	0x004F
> +
> +/* WINBOND */
> +#define W39L040A        0x00D6

tabs again.

> +
> +/* AMIC */
> +#define A29L040         0x0092

and here.

> +
> +/* EON */
> +#define EN29LV040A      0x004F

and here.

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

      reply	other threads:[~2009-07-22 12:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-22 12:03 [U-Boot] [PATCH:v2] Support up to 7 banks for ids as specified in JEDEC JEP106Z Niklaus Giger
2009-07-22 12:17 ` Stefan Roese [this message]

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=200907221417.25929.sr@denx.de \
    --to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.