public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] .../board/fads/flash.c confuses me - give me a hint
@ 2005-01-12 14:43 Peter Asemann
  2005-01-12 16:54 ` Wolfgang Denk
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Asemann @ 2005-01-12 14:43 UTC (permalink / raw)
  To: u-boot

Im writing my own flash.c for "my" custom board in the moment.
That's why I'm trying to understand what the flash.c does.
I thought I got it when I encountered the following problem examining 
board/fads/flash.c

All functions in there seem to be written to handle 4x8bit flash banks.
As indication for that are - in my opinion - the QUAD_ID macro in line 
41+ and the fact that 0xAAAAAAAA, 0x55555555 and 0x90909090 and not 
0x00AA00AA, 0x00550055 and 0x00900090 are written in the auto select 
command sequence, beginning in line 227 (u-boot 1.1.2).
But they do write to the addresses which are typical - my fine flash 
datasheet says - for word-mode flash access.
So the data written seems not to fit the addresses written to.

I'd be very happy if someone could give me a hint what I missed or what 
I got wrong or why it must be that way though.

Peter Asemann

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [U-Boot-Users] .../board/fads/flash.c confuses me - give me a hint
@ 2005-01-12 18:16 Nghiem, Tien
  2005-01-12 19:34 ` Peter Asemann
  0 siblings, 1 reply; 13+ messages in thread
From: Nghiem, Tien @ 2005-01-12 18:16 UTC (permalink / raw)
  To: u-boot

Hi,

You can you use the CFI driver in /u-boot-1.1.1/drivers/cfi_flash.c. it's generic and working. I have used it with these boards: IceCube(MPC5200) and EP8260 without modification.

Tien 

-----Original Message-----
From: u-boot-users-admin@lists.sourceforge.net
[mailto:u-boot-users-admin at lists.sourceforge.net]On Behalf Of Wolfgang
Denk
Sent: Wednesday, January 12, 2005 11:55 AM
To: Peter Asemann
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] .../board/fads/flash.c confuses me - give me
a hint 


In message <41E537A8.8050006@web.de> you wrote:
> Im writing my own flash.c for "my" custom board in the moment.
> That's why I'm trying to understand what the flash.c does.
> I thought I got it when I encountered the following problem examining 
> board/fads/flash.c

There must ne some strange fascination about the FADS port. I  really
wonder  why  everybody  is  picking  one  of the most complicated and
poroblematic ports...

Pleas ehave a loot at least at some other drivers, too.

> All functions in there seem to be written to handle 4x8bit flash banks.

SO look for other flash drivers, or maybe even for  the  generic  CFI
driver.

> I'd be very happy if someone could give me a hint what I missed or what 
> I got wrong or why it must be that way though.

Forget what the FADS is doing. Think about what is  needed  for  your
own hardware, and implement this.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The high cost of living hasn't affected its popularity.


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [U-Boot-Users] .../board/fads/flash.c confuses me - give me a hint
@ 2005-01-12 21:08 Nghiem, Tien
  0 siblings, 0 replies; 13+ messages in thread
From: Nghiem, Tien @ 2005-01-12 21:08 UTC (permalink / raw)
  To: u-boot

I can return your question: why does the CFI exist?. Have a look at the u-boot-1.1.2/board/ppm8260/strataflash.c that is an example for a port that "only" uses the cfi_flash.c.

Good luck

Tien
-----Original Message-----
From: u-boot-users-admin@lists.sourceforge.net
[mailto:u-boot-users-admin at lists.sourceforge.net]On Behalf Of Peter
Asemann
Sent: Wednesday, January 12, 2005 2:34 PM
To: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] .../board/fads/flash.c confuses me - give me
a hint


Nghiem, Tien wrote:

> Hi,
> 
> You can you use the CFI driver in /u-boot-1.1.1/drivers/cfi_flash.c. it's generic and working. I have used it with these boards: IceCube(MPC5200) and EP8260 without modification.

Ahh... thanks for the hint. But anyway... the u-boot readme says an own 
flash.c was a minimum requirement for a port. If the generic driver 
works, why do people write customs flash.c's at all? All modern flash 
chips seem to support CFI anyway. Is there an example for a port that 
"only" uses the cfi_flash.c so I can take a look on it?

Best regards,

Peter Asemann


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [U-Boot-Users] .../board/fads/flash.c confuses me - give me a hint
@ 2005-01-13  8:24 Peter Pearse
  0 siblings, 0 replies; 13+ messages in thread
From: Peter Pearse @ 2005-01-13  8:24 UTC (permalink / raw)
  To: u-boot

Hi 

I am not convinced drivers/cfi.flash.c performs correctly on the 
VersatilePB board - I am currently working on a patch.....

I believe:: 

static int flash_full_status_check (flash_info_t * info, flash_sect_t
sector,
				    ulong tout, char *prompt)
{
	int retcode;

	retcode = flash_status_check (info, sector, tout, prompt);
	switch (info->vendor) {
	case CFI_CMDSET_INTEL_EXTENDED:
	case CFI_CMDSET_INTEL_STANDARD:
		if ((retcode != ERR_OK)
		    && !flash_isequal (info, sector, 0,
FLASH_STATUS_DONE)) {

                **

			retcode = ERR_INVAL;

should be

static int flash_full_status_check (flash_info_t * info, flash_sect_t
sector,
				    ulong tout, char *prompt)
{
	int retcode;

	retcode = flash_status_check (info, sector, tout, prompt);
	switch (info->vendor) {
	case CFI_CMDSET_INTEL_EXTENDED:
	case CFI_CMDSET_INTEL_STANDARD:
		if ((retcode != ERR_OK)
		    || !flash_isequal (info, sector, 0,
FLASH_STATUS_DONE)) {

                **

			retcode = ERR_INVAL;

But perhaps only on VersatilePB.

Regards

Peter

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

end of thread, other threads:[~2005-01-13  8:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-12 14:43 [U-Boot-Users] .../board/fads/flash.c confuses me - give me a hint Peter Asemann
2005-01-12 16:54 ` Wolfgang Denk
2005-01-12 17:21   ` Peter Asemann
2005-01-12 18:47     ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2005-01-12 18:16 Nghiem, Tien
2005-01-12 19:34 ` Peter Asemann
2005-01-12 21:03   ` Tolunay Orkun
2005-01-12 22:29     ` Wolfgang Denk
2005-01-13  3:19       ` Tolunay Orkun
2005-01-12 21:06   ` Jon Loeliger
2005-01-12 22:19   ` Wolfgang Denk
2005-01-12 21:08 Nghiem, Tien
2005-01-13  8:24 Peter Pearse

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