public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Problem in CFI driver (Spansion flash 8-bit mode)
@ 2007-06-29  9:43 laba
  2007-06-29 10:36 ` laba
  0 siblings, 1 reply; 6+ messages in thread
From: laba @ 2007-06-29  9:43 UTC (permalink / raw)
  To: u-boot


Hai,
    I am using MPC8641D processor. 16MB flash with 8bit mode(part
number:S29GL128N90FFIRR). From the BDI prompt i am able to prog the uboot.
The output is

8641>md 0xfff00000
0_fff00000 : 27051956 552d426f 6f742031 2e322e30  '..VU-Boot 1.2.0
0_fff00010 : 20284a75 6e203239 20323030 37202d20   (Jun 29 2007 -
0_fff00020 : 31333a32 313a3432 29000000 00000000  13:21:42).......

   Then i give the go command in the BDI prompt means the uboot booted i got
the prompt. From the u-boot prompt i try the erase the flash and program i
get the following result.

MPC8641D-AMC> md 0xfff00000
fff00000: 05275619 2d556f42 746f3120 322e302e    .'V.-UoBto1 2.0.
fff00010: 2820754a 206e3932 32203030 2037202d    ( uJ n922 00 7 -
fff00020: 3431333a 3a383630 00290000 00000000    413::860.)......

   the result looks like swapped. The u-boot version is 1.1.6. processor
d7-d0 is connected to flash d0-d7. Byte pin in the flash is connected to the
ground. it indicates 0 -> 8bit mode.

   How can i overcome this problem? Does the currect cfi driver in uboot
support 8bit mode or not? if it is means why i got this problem? 

Thanks,
         Laba
-- 
View this message in context: http://www.nabble.com/Problem-in-CFI-driver-%28Spansion-flash-8-bit-mode%29-tf3999013.html#a11357496
Sent from the Uboot - Users mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Problem in CFI driver (Spansion flash 8-bit mode)
  2007-06-29  9:43 [U-Boot-Users] Problem in CFI driver (Spansion flash 8-bit mode) laba
@ 2007-06-29 10:36 ` laba
  2007-06-29 10:53   ` nicky geerts
  0 siblings, 1 reply; 6+ messages in thread
From: laba @ 2007-06-29 10:36 UTC (permalink / raw)
  To: u-boot




laba wrote:
> 
> Hai,
>     I am using MPC8641D processor. 16MB flash with 8bit mode(part
> number:S29GL128N90FFIRR). From the BDI prompt i am able to prog the uboot.
> The output is
> 
> 8641>md 0xfff00000
> 0_fff00000 : 27051956 552d426f 6f742031 2e322e30  '..VU-Boot 1.2.0
> 0_fff00010 : 20284a75 6e203239 20323030 37202d20   (Jun 29 2007 -
> 0_fff00020 : 31333a32 313a3432 29000000 00000000  13:21:42).......
> 
>    Then i give the go command in the BDI prompt means the uboot booted i
> got the prompt. From the u-boot prompt i try the erase the flash and
> program i get the following result.
> 
> MPC8641D-AMC> md 0xfff00000
> fff00000: 05275619 2d556f42 746f3120 322e302e    .'V.-UoBto1 2.0.
> fff00010: 2820754a 206e3932 32203030 2037202d    ( uJ n922 00 7 -
> fff00020: 3431333a 3a383630 00290000 00000000    413::860.)......
> 
>    the result looks like swapped. The u-boot version is 1.1.6. processor
> d7-d0 is connected to flash d0-d7. Byte pin in the flash is connected to
> the ground. it indicates 0 -> 8bit mode.
> 
>    How can i overcome this problem? Does the currect cfi driver in uboot
> support 8bit mode or not? if it is means why i got this problem? 
> 
> Thanks,
>          Laba
> 
Hai,
    I forgot to mention my flash configuration. here i mentioned that

#define CFG_FLASH_CFI
#define CFG_FLASH_CFI_DRIVER
#define CFG_FLASH_EMPTY_INFO
#define CFG_FLASH_USE_BUFFER_WRITE 1

#define CFG_FLASH_BASE          0xff000000     /* start of FLASH 16MB */

#define CFG_BR0_PRELIM          0xff000801      /* port size 8-bit  */
#define CFG_OR0_PRELIM          0xff006ff7      /* 16MB Boot Flash area*/

#define CFG_MAX_FLASH_BANKS     1               /* number of banks */
#define CFG_MAX_FLASH_SECT      128             /* sectors per device */

#undef  CFG_FLASH_CHECKSUM
#define CFG_FLASH_ERASE_TOUT    60000   /* Flash Erase Timeout (ms) */
#define CFG_FLASH_WRITE_TOUT    500     /* Flash Write Timeout (ms) */

   In cfi_flash.c the port width configuration is

#ifndef CFG_FLASH_CFI_WIDTH
#define CFG_FLASH_CFI_WIDTH     FLASH_CFI_8BIT
#endif

Thanks
laba


-- 
View this message in context: http://www.nabble.com/Problem-in-CFI-driver-%28Spansion-flash-8-bit-mode%29-tf3999013.html#a11358195
Sent from the Uboot - Users mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Problem in CFI driver (Spansion flash 8-bit mode)
  2007-06-29 10:36 ` laba
@ 2007-06-29 10:53   ` nicky geerts
  2007-06-29 11:05     ` laba
  0 siblings, 1 reply; 6+ messages in thread
From: nicky geerts @ 2007-06-29 10:53 UTC (permalink / raw)
  To: u-boot

> #ifndef CFG_FLASH_CFI_WIDTH
> #define CFG_FLASH_CFI_WIDTH     FLASH_CFI_8BIT
> #endif

You don't really need to specify the CFI_WIDTH, the flash detection
will determine that automagically, it tries all combination of
multiple banks and bus widths in sequence untill it finds one that is
supported starting with the bus width specified in
CFG_FLASH_CFI_WIDTH. if it is not specified it starts with 8bits.  it
doesn't hurt though.

> > MPC8641D-AMC> md 0xfff00000
> > fff00000: 05275619 2d556f42 746f3120 322e302e    .'V.-UoBto1 2.0.
> > fff00010: 2820754a 206e3932 32203030 2037202d    ( uJ n922 00 7 -
> > fff00020: 3431333a 3a383630 00290000 00000000    413::860.)......

Your problem seems endianness related.  PowerPC is usually big endian,
but it is able to switch to little endian just as easily, did you
define it to be little endian somewhere in your configuration?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Problem in CFI driver (Spansion flash 8-bit mode)
  2007-06-29 10:53   ` nicky geerts
@ 2007-06-29 11:05     ` laba
  2007-06-29 11:12       ` nicky geerts
  0 siblings, 1 reply; 6+ messages in thread
From: laba @ 2007-06-29 11:05 UTC (permalink / raw)
  To: u-boot




nicky geerts wrote:
> 
> Your problem seems endianness related.  PowerPC is usually big endian,
> but it is able to switch to little endian just as easily, did you
> define it to be little endian somewhere in your configuration?
> 

I'm not defining little endian anywhere in my configuration. 

Thanks
         Laba
-- 
View this message in context: http://www.nabble.com/Problem-in-CFI-driver-%28Spansion-flash-8-bit-mode%29-tf3999013.html#a11358518
Sent from the Uboot - Users mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Problem in CFI driver (Spansion flash 8-bit mode)
  2007-06-29 11:05     ` laba
@ 2007-06-29 11:12       ` nicky geerts
  2007-06-29 11:54         ` laba
  0 siblings, 1 reply; 6+ messages in thread
From: nicky geerts @ 2007-06-29 11:12 UTC (permalink / raw)
  To: u-boot

> I'm not defining little endian anywhere in my configuration.

I'm only familiar with the ppc405 series, but does your CPU have an
SLER register you can dump with your BDI?  It could indicate whether
your cpu is running in little endian mode.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot-Users] Problem in CFI driver (Spansion flash 8-bit mode)
  2007-06-29 11:12       ` nicky geerts
@ 2007-06-29 11:54         ` laba
  0 siblings, 0 replies; 6+ messages in thread
From: laba @ 2007-06-29 11:54 UTC (permalink / raw)
  To: u-boot




nicky geerts wrote:
> 
>> I'm not defining little endian anywhere in my configuration.
> 
> I'm only familiar with the ppc405 series, but does your CPU have an
> SLER register you can dump with your BDI?  It could indicate whether
> your cpu is running in little endian mode.
> 
> 
I checked the MSR register. It is configured as big-endian. 
-- 
View this message in context: http://www.nabble.com/Problem-in-CFI-driver-%28Spansion-flash-8-bit-mode%29-tf3999013.html#a11359014
Sent from the Uboot - Users mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-06-29 11:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-29  9:43 [U-Boot-Users] Problem in CFI driver (Spansion flash 8-bit mode) laba
2007-06-29 10:36 ` laba
2007-06-29 10:53   ` nicky geerts
2007-06-29 11:05     ` laba
2007-06-29 11:12       ` nicky geerts
2007-06-29 11:54         ` laba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox