I am writing a FFS3 NOR flash driver for an i.MX31 based board. The device is a Spansion S71WS128PC0HF3 burst-mode NOR
Flash (16MB, 16 bit bus width) connected to CS5 of the WEIM. I can boot the system from this flash and I created an EFS
and burnt it into the flash via JTAG debugger. I wrote a small test program that simply maps in the base address and
scans for the ‘QSSL’ signature of the partition - it finds it at the correct address. However, when I run my flash
driver it doesn’t recognise it.
The auto-detect of the device works ((devf t1::f3s_flash_probe:248) chip total = 1, bus_width = 2, interleave = 1)
Erasing via flashctl works.
flashctl -p/dev/fs0 -o8M -l8M -e -v
Erasing device /dev/fs0
(devf t2::f3s_table_find:66) fs0p0 raw U: 80
Formatting fails, though:
Formatting device /dev/fs0p0
amd_poll: 163 program error
(devf t2::amd_v2wordwrite:113) over poll waiting for write completion
(devf t2::f3s_ext_write:197) fs0p0 bad H P # 000010
DCMD_F3S_FORMAT failed (errno 5)
flashctl: format failed
I tried various write() functions of the MTD library but always the same. Maybe the writing works but reading doesn’t? I
supply NULL for the v2read callout, so it should use memcpy(), which works, as seen from my test program.
Any ideas greatly appriciated. Thank you.