This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Flash V2 with 2 flash chips on board !


>>>>> "Manfred" == Manfred Gruber <m.gruber@tirol.com> writes:

    Manfred> I have a problem on a custom board how to solve following
    Manfred> issue on flash_v2 ecos branche.

    Manfred> we use ecos flash_v2 branche now for a while. works very
    Manfred> good.

    Manfred> now i have an new board with 8MB/16MB Flash on it, the
    Manfred> base address for the flash is 0xf0000000.

    Manfred> now i want to add a second 16mb flash chip on 0x10000000.
    Manfred> is there a solution like in mtd to concate them or bring
    Manfred> the chips dynamically in series ?

    Manfred> i have already the asm code for detecting the size to
    Manfred> build my mmu-tables but i think it would be not enough to
    Manfred> bring the two chips in the address space in series. Doese
    Manfred> anyone have a solution for me how this should work. I
    Manfred> want to have the same configuration like in linux also to
    Manfred> have in redboot.

    Manfred> in linux the chips are concated to one chip, in series.
    Manfred> how do i do this in redboot dynamically ?

I am not sure I understand entirely what you are trying to achieve.

Setting up the MMU tables is the responsibility of the platform HAL.
No other package will know exactly what chips are present on the
target hardware. The first flash chip can always be mapped to an
appropriate virtual address. For the second one, you could map it into
the virtual address space irrespective of whether or not it is
present. Alternatively you can do run-time detection and only map it
if present. If the first flash chip is variable size and the second
must appear contiguous then run-time mapping is unavoidable.

Once the flash chip(s) have been mapped into the address space you
need to instantiate device structures for each one. The details of
this will depend on the family of flash chips you are using. For the
the AM29xxxxx V2 driver you need two CYG_FLASH_DRIVER() invocations,
one for each chip. For the first chip you would probably want to use
the CFI init function, to allow for variable-sized devices.
Alternatively if the platform HAL has already detected the block
layout it can fill in the appropriate fields. For the second chip you
would want a custom init function which checks whether or not the
platform HAL detected the chip, and then possibly chain to the CFI
init function to fill in the block details.

One caution: I have had reports that RedBoot still has trouble coping
with multiple flash chips. I have not investigated further.

Bart

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]