ZFMicro MachZ success with the Am29LV065D

Luke luke_epsilon at yahoo.com
Thu Aug 23 02:08:22 EDT 2001


Hello all,

I appreciate the help and encouragement by those on the list that have been pointing me in the
right direction.  Tonight I had some successes with the MachZ (ZFMicro's Cyrix 486dx4 embedded
chip) and understanding how it deals with memory devices.  

>From some ZF documentation that someone was kind enough to send me:

"The ZFL allows the MachZ to control up to four external memory devices on the ISA bus.  These
devices can be mapped into the system memory address space.  Typically, this feature is used to
map external Flash memory into the address space without external address decoding logic
necessary. 

These devices are connected externally to the ISA BUS address, data and memr/memw signals.  Each
device has a dedicated mem_cs signal generated by ZFL.  Each device can occupy up to 16 Mbytes
(occupying all 24 address lines).  The minimum window size is 8Kbyte"

I was successful getting the MTD driver to find 1 of 2 of the AM29LV065D flash chips by just
setting the ZFL MemWindow0 base address register to 0 the MemWindow0 window size to 8Mbytes and
the MemWindow0 page address register to 0.  This was conveniently done in the bios linux loader
(ZFMicro has an Option Rom Linux Loader written in assembly that comes with their chip)- right
before it does a far jump to the kernel setup code.  In the kernel I just set (in make xconfig)
the physical address to 256Mbytes and the size to 8Mbytes and it worked!  I guess?? I could have
set the MemWindow0 base address register to 256M and it would be the same (since because of the
ISA-PCI address mapping, the same memory window will roll over every 16MBytes on the entire 4GByte
PCI memory space).  I chose 256Mbytes since that is the maximum size of SDRAM accessible to the
MachZ chip.

As I have it right now, linux loads and I see:

physmap flash device: 800000 at 10000000
Physically mapped flash: Found 1 x8 devices at 0x0 in 8-bit mode
 Amd/Fujitsu Extended Query Table v1.1 at 0x0040
number of CFI chips: 1
mtd: Giving out device 0 to Physically mapped flash

and if I cat /proc/mtd I see

dev:      size        erasesize          name
mtd0    00800000      00010000        "physically mapped flash"


I tried a few different things and haven't got the second chip recognized yet.  I tried setting
the size (in the make xconfig dialog) to 16M and setting the MemWindow1 base address register to
8Mbytes (with MemWindow1 page register 0 and size 8Mbytes) - but that didn't work.  Do I need to
do something else to get MTD to work with multiple flash devices?

I know this is long and drawn out and that I may be rambling from my sleepiness - I do appreciate
the help I have been given.  I did have a JFFS2 question or two also.

I want to mount these 2 flash devices (well all of one and half of the other since the other half
is filled with the kernel and initrd, this seems like it should be straightforward by messing with
the MemWin0 size register and page register to point to the right portion of the first flash
device).

I don't have any image - I just want these 2 flash chips to be initially empty file systems where
I can write data that is collected from some atmospheric sensors hooked up to the embedded system.
 Do I need mkfs.jffs on the embedded system or can I use it on my development system and then
transfer it over?  I am a little confused by this in the HOWTO. Do I need to have the erase
utility on the embedded system and erase the /dev/mtd0 device and then just mount it?  Any further
examples or words to this effect would be good to see.

Thanks again,
Luke

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/




More information about the linux-mtd mailing list