* [U-Boot] Handling dual die and single die flash on same board
@ 2010-09-07 17:05 Chris Packham
2010-09-07 17:26 ` Stefan Roese
0 siblings, 1 reply; 3+ messages in thread
From: Chris Packham @ 2010-09-07 17:05 UTC (permalink / raw)
To: u-boot
Hi,
I've run into a situation with a new design and I could use some pointers.
Our hardware designers have built prototypes with different flash
configurations. One possible configuration is a dual die 2x32MB the
other is a single die 1x64MB.
My u-boot config is currently setup for the 2x32MB case i.e.
CONFIG_SYS_MAX_FLASH_BANKS = 2, CONFIG_SYS_FLASH_BANKS_LIST = {base,
base+32MB}. The problem with this is that when flash_get_size is called
on the 1x64 chip it discovers the same chip the 2nd time around and
promptly walks off the end of the memory area I have allocated for it.
Is there any existing way to make the cfi_flash driver handle this
situation for me?
Thanks,
Chris Packham
^ permalink raw reply [flat|nested] 3+ messages in thread* [U-Boot] Handling dual die and single die flash on same board
2010-09-07 17:05 [U-Boot] Handling dual die and single die flash on same board Chris Packham
@ 2010-09-07 17:26 ` Stefan Roese
2010-09-07 22:05 ` Chris Packham
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Roese @ 2010-09-07 17:26 UTC (permalink / raw)
To: u-boot
Hi Chris,
On Tuesday 07 September 2010 19:05:46 Chris Packham wrote:
> I've run into a situation with a new design and I could use some pointers.
>
> Our hardware designers have built prototypes with different flash
> configurations. One possible configuration is a dual die 2x32MB the
> other is a single die 1x64MB.
>
> My u-boot config is currently setup for the 2x32MB case i.e.
> CONFIG_SYS_MAX_FLASH_BANKS = 2, CONFIG_SYS_FLASH_BANKS_LIST = {base,
> base+32MB}. The problem with this is that when flash_get_size is called
> on the 1x64 chip it discovers the same chip the 2nd time around and
> promptly walks off the end of the memory area I have allocated for it.
>
> Is there any existing way to make the cfi_flash driver handle this
> situation for me?
I just recently sent a patchset for the CFI driver that could help to handle
such a situation. Here the most interesting patch:
http://www.mail-archive.com/u-boot at lists.denx.de/msg37234.html
I would suggest to set CONFIG_SYS_MAX_FLASH_BANKS_DETECT to 2 and then add
some board specific code to determine the real bank count and set
cfi_flash_num_flash_banks accordingly.
Hope this helps.
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
^ permalink raw reply [flat|nested] 3+ messages in thread* [U-Boot] Handling dual die and single die flash on same board
2010-09-07 17:26 ` Stefan Roese
@ 2010-09-07 22:05 ` Chris Packham
0 siblings, 0 replies; 3+ messages in thread
From: Chris Packham @ 2010-09-07 22:05 UTC (permalink / raw)
To: u-boot
On 07/09/10 10:26, Stefan Roese wrote:
> Hi Chris,
>
> On Tuesday 07 September 2010 19:05:46 Chris Packham wrote:
>> My u-boot config is currently setup for the 2x32MB case i.e.
>> CONFIG_SYS_MAX_FLASH_BANKS = 2, CONFIG_SYS_FLASH_BANKS_LIST = {base,
>> base+32MB}. The problem with this is that when flash_get_size is called
>> on the 1x64 chip it discovers the same chip the 2nd time around and
>> promptly walks off the end of the memory area I have allocated for it.
>>
>> Is there any existing way to make the cfi_flash driver handle this
>> situation for me?
>
> I just recently sent a patchset for the CFI driver that could help to handle
> such a situation. Here the most interesting patch:
>
> http://www.mail-archive.com/u-boot at lists.denx.de/msg37234.html
>
> I would suggest to set CONFIG_SYS_MAX_FLASH_BANKS_DETECT to 2 and then add
> some board specific code to determine the real bank count and set
> cfi_flash_num_flash_banks accordingly.
>
Thanks for the pointers. For now I've followed the example in tqm834x.c.
I've done it in such a way that when we next pull in upstream u-boot it
should co-exists nicely with your proposed patch.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-07 22:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-07 17:05 [U-Boot] Handling dual die and single die flash on same board Chris Packham
2010-09-07 17:26 ` Stefan Roese
2010-09-07 22:05 ` Chris Packham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox