public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Problem with flash cfi legacy mode
@ 2008-03-10  9:19 Tor Krill
  2008-03-14 21:52 ` Michael Schwingen
  0 siblings, 1 reply; 4+ messages in thread
From: Tor Krill @ 2008-03-10  9:19 UTC (permalink / raw)
  To: u-boot


Hi,

Im working on adding support for our board to u-boot.

I use legacy flash mode for our boot-flash. I however have some problems
with it.

When using jedec probe to identify our flash. Im unable to do so with our
16bit device-id. In my opinion it seems like this actually wont work(?)

cmdset_amd_read_jedec_ids uses _one_ flash_read_uchar call to read out
the device id(, if its not an amd extended one). The only way i could
get this to work with our flash was to only put the lower 8bit in the
dev_id field when adding an entry to the jedec_table.

Further on it seems like CFI_CMDSET_AMD_LEGACY is unsupported in
flash_write_cfibuffer.

/Tor

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

* [U-Boot-Users] Problem with flash cfi legacy mode
  2008-03-10  9:19 [U-Boot-Users] Problem with flash cfi legacy mode Tor Krill
@ 2008-03-14 21:52 ` Michael Schwingen
  2008-03-17  7:58   ` Tor Krill
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Schwingen @ 2008-03-14 21:52 UTC (permalink / raw)
  To: u-boot

Tor Krill wrote:
> Im working on adding support for our board to u-boot.
>
> I use legacy flash mode for our boot-flash. I however have some problems
> with it.
>
> When using jedec probe to identify our flash. Im unable to do so with our
> 16bit device-id. In my opinion it seems like this actually wont work(?)
>
> cmdset_amd_read_jedec_ids uses _one_ flash_read_uchar call to read out
> the device id(, if its not an amd extended one). The only way i could
> get this to work with our flash was to only put the lower 8bit in the
> dev_id field when adding an entry to the jedec_table.
>   
Hm - right. You are probably the first one to use that code on a 16-bit 
non-CFI flash - for 16-bit flashs, the read will need to be changed, but 
I am not sure how exactly - I think we may need separate code depending 
on info->chipwidth, because 8-bit flashs only have an 8-bit ID.
> Further on it seems like CFI_CMDSET_AMD_LEGACY is unsupported in
> flash_write_cfibuffer.
>   
Right. Setting info->buffer_size = 1 in jedec_flash.c/fill_info() should 
make sure that part of code is never executed.

cu
Michael

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

* [U-Boot-Users] Problem with flash cfi legacy mode
  2008-03-14 21:52 ` Michael Schwingen
@ 2008-03-17  7:58   ` Tor Krill
  2008-03-21 23:11     ` Michael Schwingen
  0 siblings, 1 reply; 4+ messages in thread
From: Tor Krill @ 2008-03-17  7:58 UTC (permalink / raw)
  To: u-boot




On 3/14/2008, "Michael Schwingen" <rincewind@discworld.dascon.de> wrote:

>Tor Krill wrote:
>> Im working on adding support for our board to u-boot.
>>
>> I use legacy flash mode for our boot-flash. I however have some problems
>> with it.
>>
>> When using jedec probe to identify our flash. Im unable to do so with our
>> 16bit device-id. In my opinion it seems like this actually wont work(?)
>>
>> cmdset_amd_read_jedec_ids uses _one_ flash_read_uchar call to read out
>> the device id(, if its not an amd extended one). The only way i could
>> get this to work with our flash was to only put the lower 8bit in the
>> dev_id field when adding an entry to the jedec_table.
>>
>Hm - right. You are probably the first one to use that code on a 16-bit
>non-CFI flash - for 16-bit flashs, the read will need to be changed, but
>I am not sure how exactly - I think we may need separate code depending
>on info->chipwidth, because 8-bit flashs only have an 8-bit ID.

Can one asume that a chip with chipwidht 16 always has an ID of 16bit?
And how does AMD expanded 3byte id mode fit?  If its safe to just change
the read   it should be trivial to fix(?)

>> Further on it seems like CFI_CMDSET_AMD_LEGACY is unsupported in
>> flash_write_cfibuffer.
>>
>Right. Setting info->buffer_size = 1 in jedec_flash.c/fill_info() should
>make sure that part of code is never executed.

Ok, i just skipped CFG_FLASH_USE_BUFFER_WRITE instead. That solved it for
me.

/Tor

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

* [U-Boot-Users] Problem with flash cfi legacy mode
  2008-03-17  7:58   ` Tor Krill
@ 2008-03-21 23:11     ` Michael Schwingen
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Schwingen @ 2008-03-21 23:11 UTC (permalink / raw)
  To: u-boot

Tor Krill wrote:
>> Hm - right. You are probably the first one to use that code on a 16-bit
>> non-CFI flash - for 16-bit flashs, the read will need to be changed, but
>> I am not sure how exactly - I think we may need separate code depending
>> on info->chipwidth, because 8-bit flashs only have an 8-bit ID.
>>     
>
> Can one asume that a chip with chipwidht 16 always has an ID of 16bit?
> And how does AMD expanded 3byte id mode fit?  If its safe to just change
> the read   it should be trivial to fix(?)
>   
I think it should be OK to use 16-bit reads if info->chipwidth==2.

cu
Michael

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

end of thread, other threads:[~2008-03-21 23:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-10  9:19 [U-Boot-Users] Problem with flash cfi legacy mode Tor Krill
2008-03-14 21:52 ` Michael Schwingen
2008-03-17  7:58   ` Tor Krill
2008-03-21 23:11     ` Michael Schwingen

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