[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] MTD and JFFS with BigEndian uClinux systems



Hi Falk,

Brettschneider Falk wrote:

> Hi,
> reading
> http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/archive/2003/08/msg00
> 017.html
> I get a deja vu.

Apart from Robert's patient instruction on MTD and JFFS2, I don't think
that thread is very relevant.  The ultimate error there was an early
mb-gcc bug.

> I recognized it is due a global 16bit-word order read problem. The chip
> driver writes from a BigEndian memory in 16bit steps to a LitteEndian flash
> memory, but the map driver reads in 32bit steps (due the use of memcpy() in
> ..._copy_from()), and in my opinion, this only does work for LittleEndian
> uClinux platforms but not for the BigEndian-based microblaze. The 32bit read
> access to the flash splits it in 2 16bit read accesses but they result in
> the wrong word order (because of the transition from LittleEndian flash to
> BigEndian microblaze).

There is a FLASH_WIDTH #define in most of the mtd mapping drivers - it
sounds like you should set this to '2' to force MTD to make dual 16 bit
accesses for each word.

The Xilinx opb_emc has a hack called datawidth matching - for 16 bit
flash, the emc will do two 16 bit fetch cycles and return a 32-bit word
on the bus.  That's fine, and convenient, except that it breaks any sort
of standard approach to programming the flash.

It sounds like your custom flash interface controller is 16 bits wide -
just tell MTD that, and let it do its job.  It's very generic code in
there, I've looked and it's hard to imagine a flash configuration that
it can't work with.

> My suspicion is noone ever has successfully get a jffs2 filesystem work on
> the microblaze, maybe except just for booting a read-only kernel image from
> it, but not for real file copy/move/delete actions. Is this true?

Nope, JFFS2 on MTD definitely works - we had a PetaLogix customer
putting a 50MB JFFS2 filesystem on an MTD partition, no problem.  We
were creating large files, copying, moving, deleting, the works.

Can you post your MTD mapping driver?

John



___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/