]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
hw/m25p80.c: add WRSR(0x01) support
authorKuo-Jung Su <dantesu@faraday-tech.com>
Mon, 4 Feb 2013 09:56:25 +0000 (17:56 +0800)
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>
Tue, 12 Feb 2013 09:03:27 +0000 (10:03 +0100)
commit03ec2f83087de34924489eeae0ea6fe7785cc050
treefdb276f169caf89d77ed200d26a597cd430cfe63
parent58fa4325228f61d58317f48364259b31e9b92d15
hw/m25p80.c: add WRSR(0x01) support

Atmel, SST and Intel/Numonyx serial flash tend to power up
with the software protection bits set.
And thus the new m25p80.c in linux kernel would always tries
to use WREN(0x06) + WRSR(0x01) to turn-off the protection.

The WEL(0x02) of status register is supposed to be cleared after
WRSR(0x01). There are also some drivers (i.e mine for RTOSes)
would check the WEL(0x02) in status register to make sure the
protection is correctly turned off.

Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com>
Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
hw/m25p80.c