All of lore.kernel.org
 help / color / mirror / Atom feed
From: prakash bedge <prakash.bedge@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Does U-boot supports Spansion S29GL512P NOR Flash?
Date: Wed, 14 Apr 2010 10:33:59 +0530	[thread overview]
Message-ID: <s2yb9c1f3ac1004132203pab474bc0i36443501c19c2537@mail.gmail.com> (raw)
In-Reply-To: <201004131416.01575.sr@denx.de>

Hi Stefan,

Does the latest code supports S29GL512P chip, since I am not seeing any
instance of this chip in 2010.03 uboot code.

>>So you have chipwidth *and* portwidth of 16! This is the most common use
case.
But when flash is getting detected it shows the chipwidth is 8 and portwidth
is 16. If you see the logs in earlier mail it is like
*found port 2 chip 1 port 16 bits chip 8 bits. *Is it correct or wrong?

>> Again, please use the mainline CFI driver and give it another try.
 I can not use the current code as we have to use the present code for some
reason. I believe the uboot code 2009.08, I am using, must also support the
S29GL512P chip.

I replaced the cfi_flash.c with the new cfi_flash.c file from latest uboot
version 2010.03 and done relevant changes. But still I didn't get the
postive result. Is there anything else that I have to check, or by using
only cfi_flash.c and cfi_flash.h from 2010.03 uboot code CFI flash driver
will work?

I can not use the latest code but I want the CFI support for S29GL512P.
Can you please tell that, what I need to do to make the CFI driver works for
the S29GL512P chip?

>> What kind of "utility"? Don't you use the BDI3000 for FLASH programming?
We have customized utility to flash the binary. Using BDI3000 I tried to
erase the flash but it didn't work. I followed the CFI erase command seuence
but it fails to erase the flash.
BDI3000>md 0xfe7c0000
fe7c0000 : 27051956 552d426f 6f742032 3030392e  '..VU-Boot 2009.
fe7c0010 : 30382028 41707220 31342032 30313020  08 (Apr 14 2010
fe7c0020 : 2d203130 3a30313a 32392900 00000000  - 10:01:29).....
fe7c0030 : 00000000 00000000 00000000 00000000  ................
fe7c0040 : 00000000 00000000 00000000 00000000  ................
fe7c0050 : 00000000 00000000 00000000 00000000  ................
fe7c0060 : 00000000 00000000 00000000 00000000  ................
fe7c0070 : 00000000 00000000 00000000 00000000  ................
fe7c0080 : 00000000 00000000 00000000 00000000  ................
fe7c0090 : 00000000 00000000 00000000 00000000  ................
fe7c00a0 : 00000000 00000000 00000000 00000000  ................
fe7c00b0 : 00000000 00000000 00000000 00000000  ................
fe7c00c0 : 00000000 00000000 00000000 00000000  ................
fe7c00d0 : 00000000 00000000 00000000 00000000  ................
fe7c00e0 : 00000000 00000000 00000000 00000000  ................
fe7c00f0 : 00000000 00000000 00000000 00000000  ................
*BDI3000>mmb 0xfc000000 0xf0
BDI3000>mmb 0xfc000aaa 0xaa
BDI3000>mmb 0xfc000555 0x55
BDI3000>mmb 0xfc000aaa 0x80
BDI3000>mmb 0xfc000aaa 0xaa
BDI3000>mmb 0xfc000555 0x55
BDI3000>mmb 0xfe7c0000 0x30
*BDI3000>mmb 0xfc000000 0xf0
BDI3000>md 0xfe7c0000 -- *sector data is not erased
*fe7c0000 : 30051956 552d426f 6f742032 3030392e  0..VU-Boot 2009.
fe7c0010 : 30382028 41707220 31342032 30313020  08 (Apr 14 2010
fe7c0020 : 2d203130 3a30313a 32392900 00000000  - 10:01:29).....
fe7c0030 : 00000000 00000000 00000000 00000000  ................
fe7c0040 : 00000000 00000000 00000000 00000000  ................
fe7c0050 : 00000000 00000000 00000000 00000000  ................
fe7c0060 : 00000000 00000000 00000000 00000000  ................
fe7c0070 : 00000000 00000000 00000000 00000000  ................
fe7c0080 : 00000000 00000000 00000000 00000000  ................
fe7c0090 : 00000000 00000000 00000000 00000000  ................
fe7c00a0 : 00000000 00000000 00000000 00000000  ................
fe7c00b0 : 00000000 00000000 00000000 00000000  ................
fe7c00c0 : 00000000 00000000 00000000 00000000  ................
fe7c00d0 : 00000000 00000000 00000000 00000000  ................
fe7c00e0 : 00000000 00000000 00000000 00000000  ................
fe7c00f0 : 00000000 00000000 00000000 00000000  ................
BDI3000>mmb 0xfc000000 0xf0
BDI3000>mmb 0xfc0000aa 0x98
BDI3000>md 0xfc000020
fc000020 : 51005200 59000200 00004000 00000000  Q.R.Y..... at .....
fc000030 : 00000000 00002700 36000000 00000600  ......'.6.......
fc000040 : 06000900 13000300 05000300 02001a00  ................
fc000050 : 02000000 06000000 0100ff00 01000000  ................
fc000060 : 02000000 00000000 00000000 00000000  ................
fc000070 : 00000000 00000000 0000ffff ffffffff  ................
fc000080 : 50005200 49003100 33001400 02000100  P.R.I.1.3.......
fc000090 : 00000800 00000000 0200b500 c5000400  ................
fc0000a0 : 0100ffff ffffffff ffffffff ffffffff  ................
fc0000b0 : ffffffff ffffffff ffffffff ffffffff  ................
fc0000c0 : ffffffff ffffffff ffffffff ffffffff  ................
fc0000d0 : ffffffff ffffffff ffffffff ffffffff  ................
fc0000e0 : ffffffff ffffffff ffffffff ffffffff  ................
fc0000f0 : ffffffff ffffffff ffffffff ffffffff  ................
fc000100 : 00000000 00000000 00000000 00000000  ................
fc000110 : 00000000 00000000 00000000 00000000  ................
BDI3000>mmb 0xfc000000 0xf0


>> This mirroring might a a result of an incorrect EBC setup.
What does it mean?
In BDI3000 I am using chiptype MIRRORX16 and BUSWIDTH 16.

BDI parameter
[FLASH]
; user flash at 0xFC000000, S29GL512P (16M x 8)
CHIPTYPE    MIRRORX16          ;Flash type (Flash M29W128GH is of MIRRORX8
Flash Type)
CHIPSIZE    0x4000000       ;The size of one flash chip in bytes
BUSWIDTH    16              ;The width of the flash memory bus in bits (8 |
16 | 32)
ERASE       0xFC000000  0x20000 512 ;erase sector 512 of flash (S29GL512P)


On Tue, Apr 13, 2010 at 5:46 PM, Stefan Roese <sr@denx.de> wrote:

> Hi Prakash,
>
> On Tuesday 13 April 2010 13:46:11 prakash bedge wrote:
> > >> Are you not using the mainline version of cfi_flash.c? If not, which
> > >> "fixup code" are you referring to (link)?
> >
> > I am using U-Boot 2009.08 version.
>
> This version is outdated. I suggest to switch to current code.
>
> > I used the fixup for M29W128GH chip from the patch you suggested earlier.
> > In that code, I changed the condition to check chipwidth and it works.
>
> You shouldn't need any additional code to support the Spansion S29GL chips.
> Please use the latest code from mainline U-Boot.
>
> > But I have a concern now, as it works with by changing chipwidth to 16Bit
> > or portwidth to 16Bit. This is making me a little bit confuse.
> >  if(info->chipwidth == FLASH_CFI_16BIT)
> >   info->portwidth = FLASH_CFI_8BIT;
> >
> > if(info->chipwidth == FLASH_CFI_8BIT)
> > info->portwidth = FLASH_CFI_16BIT;
>
> ???
>
> > Can you please tell what is chipwidth and portwidth and how we can find
> > that?
>
> chipwidth: Width of the NOR FLASH chip, meaning count of data lines
>        actively used.
>
> portwidth: Width of the external bus (data lines).
>
> > Also I am not getting the correct manufacturer and device ids.
> >
> > From the flash control register I can see that my device is 16 Bit.It
> > reprsent a bit set 1 saying it is a 16 bit device.
> > Now is this flash chipwidth or flash portwidth?
>
> chipwidth.
>
> > To my flash chip 16 data lines and 26 address lines are connected.
>
> So you have chipwidth *and* portwidth of 16! This is the most common use
> case.
> Again, please use the mainline CFI driver and give it another try.
>
> > >> Perhaps a problem of incorrect unlocking addresses (byte vs. word
> >
> > address)?
> > Does it mean that unlocking addresses are not correct?
> > Supoose if chip is in word mode then what should be the portwidth and
> > chipwidth? What will be the ublocking address then?
> >
> > I am using an utilty to erase flash and to load uboot image and it is
> > working fine, only that it copies data at multple locations.
>
> What kind of "utility"? Don't you use the BDI3000 for FLASH programming?
> This
> mirroring might a a result of an incorrect EBC setup.
>
> Cheers,
> 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:[~2010-04-14  5:03 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-09  5:26 [U-Boot] Does U-boot supports Spansion S29GL512P NOR Flash? prakash bedge
2010-04-09  6:10 ` Stefan Roese
2010-04-09  7:22   ` prakash bedge
2010-04-09  7:35     ` Stefan Roese
2010-04-09  7:55       ` Frank Svendsbøe
2010-04-09  8:05       ` prakash bedge
2010-04-09  8:09         ` Stefan Roese
2010-04-09  9:10           ` Frank Svendsbøe
2010-04-09 12:11             ` prakash bedge
2010-04-09 13:27               ` Frank Svendsbøe
2010-04-12  4:13                 ` prakash bedge
2010-04-12 17:01                   ` Frank Svendsbøe
2010-04-12 17:15                   ` Frank Svendsbøe
2010-04-13  6:31                     ` prakash bedge
2010-04-13  8:34                       ` Stefan Roese
2010-04-13 11:46                         ` prakash bedge
2010-04-13 12:16                           ` Stefan Roese
2010-04-14  5:03                             ` prakash bedge [this message]
2010-04-14  7:38                               ` Frank Svendsbøe
2010-04-14 12:05                               ` Stefan Roese
2010-04-16 14:38                                 ` prakash bedge
2010-04-20  9:25                                   ` prakash bedge
2010-04-09 13:35               ` Stefan Roese
2010-04-12  4:18                 ` prakash bedge
2010-04-12  7:59                   ` Stefan Roese
2012-03-10 10:47   ` Balaji Sivakumar
2012-03-10 18:29     ` Dirk Behme
2012-03-10 19:10     ` Wolfgang Denk
2010-04-09  7:48 ` Frank Svendsbøe
2010-04-09  8:07   ` prakash bedge
2010-04-09  8:23     ` Frank Svendsbøe

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=s2yb9c1f3ac1004132203pab474bc0i36443501c19c2537@mail.gmail.com \
    --to=prakash.bedge@gmail.com \
    --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.