tests: add a m25p80 test
PATCH v5 1/1 tests: add a m25p80 test
This test uses the palmetto platform and the Aspeed SPI controller to test the m25p80 flash module device model. The flash model is defined by the platform (n25q256a) and it would be nice to find way to control it, using a property probably.
Brainstormed-with: Greg Kurz <[email protected]>
---
Changes since v5:
- use an explicit bswap for the values read/written to the flash region.
Changes since v4:
- fixed Makefile targets
- replaced -M with -m in qtest command line
Changes since v2:
- changed mkstemp() path prefix
Changes since v1:
- fixed guest args to use -drive and not -mtdblock
tests/Makefile.include | 2 tests/m25p80-test.c | 252 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 254 insertions(+) create mode 100644 tests/m25p80-test.c
tests/Makefile.include +2 -0
@@ -288,6 +288,7 @@ check-qtest-sparc64-y = tests/endianness check-qtest-arm-y = tests/tmp105-test$(EXESUF) check-qtest-arm-y += tests/ds1338-test$(EXESUF) +check-qtest-arm-y += tests/m25p80-test$(EXESUF) gcov-files-arm-y += hw/misc/tmp105.c check-qtest-arm-y += tests/virtio-blk-test$(EXESUF) gcov-files-arm-y += arm-softmmu/hw/block/virtio-blk.c
@@ -618,6 +619,7 @@ tests/bios-tables-test$(EXESUF): tests/b tests/pxe-test$(EXESUF): tests/pxe-test.o tests/boot-sector.o $(libqos-obj-y) tests/tmp105-test$(EXESUF): tests/tmp105-test.o $(libqos-omap-obj-y) tests/ds1338-test$(EXESUF): tests/ds1338-test.o $(libqos-imx-obj-y) +tests/m25p80-test$(EXESUF): tests/m25p80-test.o tests/i440fx-test$(EXESUF): tests/i440fx-test.o $(libqos-pc-obj-y) tests/q35-test$(EXESUF): tests/q35-test.o $(libqos-pc-obj-y) tests/fw_cfg-test$(EXESUF): tests/fw_cfg-test.o $(libqos-pc-obj-y)
tests/m25p80-test.c new file +252 -0
252 lines not on this page · raw message
Peter Maydell
AppliedQuoted 10 lines · Cédric Le Goater
This test uses the palmetto platform and the Aspeed SPI controller to test the m25p80 flash module device model. The flash model is defined by the platform (n25q256a) and it would be nice to find way to control it, using a property probably.
Signed-off-by Cédric Le Goater <[email protected]>Reviewed-by Peter Maydell <[email protected]>Brainstormed-with: Greg Kurz <[email protected]>
---
Applied to target-arm.next, thanks.
-- PMM