tests/qtest: aspeed_smc: Add fast-read variant test coverage
v2 cover tests/qtest: aspeed_smc: Add fast-read variant test coverage
Hello,
This series extends the Aspeed SMC qtest suite with coverage for fast-read and multi-IO read commands :
- Fast Read (single IO with dummy byte)
- Dual Output Read (DOR, dual data IO)
- Quad Output Read (QOR, quad data IO)
Each patch tests both the memory-mapped CTRL_FREADMODE path and the user-mode command path, to exercise the dummy cycle handling recently reworked in the m25p80 flash model.
Thanks,
C.
Changes in v2:
- Introduced spi_ctrl_set_fast_read() helper, replacing open-coded ctrl register setup in read_page_mem_fast_read/dor/qor()
- Replaced MIT license boilerplate with SPDX-License-Identifier
- Collected Reviewed-by: Bin Meng on patches 1 and 3
Cédric Le Goater (4):
tests/qtest: aspeed_smc: Introduce read_page_mem_fn for page read
helpers
tests/qtest: aspeed_smc: Add fast-read test coverage tests/qtest: aspeed_smc: Add Dual Output Read (DOR) test coverage tests/qtest: aspeed_smc: Add Quad Output Read (QOR) test coverage
tests/qtest/aspeed-smc-utils.h | 31 +++--- tests/qtest/aspeed-smc-utils.c | 192 ++++++++++++++++++++++++++++----- tests/qtest/aspeed_smc-test.c | 71 +++++++++--- tests/qtest/ast2700-smc-test.c | 12 +++ 4 files changed, 247 insertions(+), 59 deletions(-)
Signature · 1 line
2.54.0
PATCH v2 1/4 tests/qtest: aspeed_smc: Introduce read_page_mem_fn for page read helpers
This to prepare for fast-read variants. No functional change.
--- tests/qtest/aspeed-smc-utils.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-)
tests/qtest/aspeed-smc-utils.c +21 -8
@@ -186,6 +186,9 @@ static void read_page_mem(const AspeedSMCTestData *data, uint32_t addr, } } +typedef void (*read_page_mem_fn )(const AspeedSMCTestData *data, +uint32_t addr,uint32_t *page); +static void write_page_mem (const AspeedSMCTestData *data,uint32_t addr,uint32_t write_value) {
@@ -327,9 +330,9 @@ void aspeed_smc_test_erase_all(const void *data)flash_reset (test_data); } -void aspeed_smc_test_write_page (const void *data) +static void test_write_page (const AspeedSMCTestData *test_data, +read_page_mem_fn reader) { -const AspeedSMCTestData *test_data = (const AspeedSMCTestData *)data;uint32_t my_page_addr = test_data->page_addr;uint32_t some_page_addr = my_page_addr +FLASH_PAGE_SIZE ;uint32_t page[FLASH_PAGE_SIZE /4 ];
@@ -350,13 +353,13 @@ void aspeed_smc_test_write_page(const void *data)spi_ctrl_stop_user (test_data);/* Check what was written */ -read_page (test_data, my_page_addr, page); +reader (test_data, my_page_addr, page);for (i =0 ; i <FLASH_PAGE_SIZE /4 ; i++) { g_assert_cmphex(page[i], ==, my_page_addr + i * 4); }/* Check some other page. It should be full of 0xff */ -read_page (test_data, some_page_addr, page); +reader (test_data, some_page_addr, page);for (i =0 ; i <FLASH_PAGE_SIZE /4 ; i++) { g_assert_cmphex(page[i], ==, 0xffffffff); }
@@ -364,9 +367,14 @@ void aspeed_smc_test_write_page(const void *data)flash_reset (test_data); } -void aspeed_smc_test_read_page_mem (const void *data) +void aspeed_smc_test_write_page (const void *data) +{ +test_write_page (data, read_page); +} + +static void test_read_page_mem (const AspeedSMCTestData *test_data, +read_page_mem_fn reader) { -const AspeedSMCTestData *test_data = (const AspeedSMCTestData *)data;uint32_t my_page_addr = test_data->page_addr;uint32_t some_page_addr = my_page_addr +FLASH_PAGE_SIZE ;uint32_t page[FLASH_PAGE_SIZE /4 ];
@@ -393,13 +401,13 @@ void aspeed_smc_test_read_page_mem(const void *data)spi_conf_remove (test_data,1 << (CONF_ENABLE_W0 + test_data->cs));/* Check what was written */ -read_page_mem (test_data, my_page_addr, page); +reader (test_data, my_page_addr, page);for (i =0 ; i <FLASH_PAGE_SIZE /4 ; i++) { g_assert_cmphex(page[i], ==, my_page_addr + i * 4); }/* Check some other page. It should be full of 0xff */ -read_page_mem (test_data, some_page_addr, page); +reader (test_data, some_page_addr, page);for (i =0 ; i <FLASH_PAGE_SIZE /4 ; i++) { g_assert_cmphex(page[i], ==, 0xffffffff); }
@@ -407,6 +415,11 @@ void aspeed_smc_test_read_page_mem(const void *data)flash_reset (test_data); } +void aspeed_smc_test_read_page_mem (const void *data) +{ +test_read_page_mem (data, read_page_mem); +} +void aspeed_smc_test_write_page_mem (const void *data) {const AspeedSMCTestData *test_data = (const AspeedSMCTestData *)data;
Signature · 1 line
2.54.0
PATCH v2 2/4 tests/qtest: aspeed_smc: Add fast-read test coverage
In reply to Cédric Le GoaterIntroduce a spi_ctrl_set_fast_read() helper and add read_page_mem_fast_read (CTRL_FREADMODE with dummy byte) and write_page_fast_read (user-mode FAST_READ) tests.
While at it, replace the license boilerplate with SPDX identifier.
--- tests/qtest/aspeed-smc-utils.h | 23 +++-------- tests/qtest/aspeed-smc-utils.c | 75 ++++++++++++++++++++++++++-------- tests/qtest/aspeed_smc-test.c | 39 ++++++++++-------- tests/qtest/ast2700-smc-test.c | 4 ++ 4 files changed, 90 insertions(+), 51 deletions(-)
tests/qtest/aspeed-smc-utils.h +6 -17
@@ -4,23 +4,7 @@* * Copyright (C) 2016 IBM Corp. * -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. +* SPDX-License-Identifier: MIT */ #ifndef TESTS_ASPEED_SMC_UTILS_H
@@ -44,6 +28,8 @@#define CTRL_FREADMODE 0x1#define CTRL_WRITEMODE 0x2#define CTRL_USERMODE 0x3 +#define CTRL_DUMMY_LOW_SHIFT 6 +#define CTRL_DUMMY_HIGH_SHIFT 14#define SR_WEL BIT(1)/*
@@ -55,6 +41,7 @@ enum {WRDI =0x4 ,BULK_ERASE =0xc7 ,READ =0x03 , +FAST_READ =0x0b ,PP =0x02 ,WRSR =0x1 , WREN = 0x6,
@@ -90,5 +77,7 @@ void aspeed_smc_test_status_reg_write_protection(const void *data);void aspeed_smc_test_write_block_protect (const void *data);void aspeed_smc_test_write_block_protect_bottom_bit (const void *data);void aspeed_smc_test_write_page_qpi (const void *data); +void aspeed_smc_test_read_page_mem_fast_read (const void *data); +void aspeed_smc_test_write_page_fast_read (const void *data);#endif /* TESTS_ASPEED_SMC_UTILS_H */
tests/qtest/aspeed-smc-utils.c +58 -17
90 lines not on this page · raw message
tests/qtest/aspeed_smc-test.c +22 -17
@@ -4,23 +4,7 @@* * Copyright (C) 2016 IBM Corp. * -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. +* SPDX-License-Identifier: MIT */ #include "qemu/osdep.h"
@@ -68,6 +52,15 @@ static void test_palmetto_bmc(AspeedSMCTestData *data) data, aspeed_smc_test_read_status_reg);qtest_add_data_func ("/ast2400/smc/status_reg_write_protection" , data, aspeed_smc_test_status_reg_write_protection); +qtest_add_data_func ("/ast2400/smc/read_page_mem_fast_read" , + data, aspeed_smc_test_read_page_mem_fast_read); +qtest_add_data_func ("/ast2400/smc/write_page_fast_read" , + data, aspeed_smc_test_write_page_fast_read); +/* +* Block protect tests must be run last because the block protect +* state is not cleared by reset_memory() and silently prevents +* subsequent flash writes. +*/ qtest_add_data_func ("/ast2400/smc/write_block_protect" , data, aspeed_smc_test_write_block_protect); qtest_add_data_func("/ast2400/smc/write_block_protect_bottom_bit",
@@ -115,6 +108,10 @@ static void test_ast2500_evb(AspeedSMCTestData *data) data, aspeed_smc_test_read_status_reg);qtest_add_data_func ("/ast2500/smc/write_page_qpi" , data, aspeed_smc_test_write_page_qpi); +qtest_add_data_func ("/ast2500/smc/read_page_mem_fast_read" , + data, aspeed_smc_test_read_page_mem_fast_read); +qtest_add_data_func ("/ast2500/smc/write_page_fast_read" , + data, aspeed_smc_test_write_page_fast_read); }static void test_ast2600_evb (AspeedSMCTestData *data)
@@ -158,6 +155,10 @@ static void test_ast2600_evb(AspeedSMCTestData *data) data, aspeed_smc_test_read_status_reg);qtest_add_data_func ("/ast2600/smc/write_page_qpi" , data, aspeed_smc_test_write_page_qpi); +qtest_add_data_func ("/ast2600/smc/read_page_mem_fast_read" , + data, aspeed_smc_test_read_page_mem_fast_read); +qtest_add_data_func ("/ast2600/smc/write_page_fast_read" , + data, aspeed_smc_test_write_page_fast_read); }static void test_ast1030_evb (AspeedSMCTestData *data)
@@ -201,6 +202,10 @@ static void test_ast1030_evb(AspeedSMCTestData *data) data, aspeed_smc_test_read_status_reg);qtest_add_data_func ("/ast1030/smc/write_page_qpi" , data, aspeed_smc_test_write_page_qpi); +qtest_add_data_func ("/ast1030/smc/read_page_mem_fast_read" , + data, aspeed_smc_test_read_page_mem_fast_read); +qtest_add_data_func ("/ast1030/smc/write_page_fast_read" , + data, aspeed_smc_test_write_page_fast_read); }int main (int argc,char **argv)
tests/qtest/ast2700-smc-test.c +4 -0
@@ -52,6 +52,10 @@ static void test_ast2700_evb(AspeedSMCTestData *data) data, aspeed_smc_test_read_status_reg);qtest_add_data_func ("/ast2700/smc/write_page_qpi" , data, aspeed_smc_test_write_page_qpi); +qtest_add_data_func ("/ast2700/smc/read_page_mem_fast_read" , + data, aspeed_smc_test_read_page_mem_fast_read); +qtest_add_data_func ("/ast2700/smc/write_page_fast_read" , + data, aspeed_smc_test_write_page_fast_read); }int main (int argc,char **argv)
Signature · 1 line
2.54.0
Re: [PATCH v2 2/4] tests/qtest: aspeed_smc: Add fast-read test coverage
Quoted 7 lines · Cédric Le Goater
Introduce a
spi_ctrl_set_fast_read()helper and addread_page_mem_fast_read(CTRL_FREADMODEwith dummy byte) andwrite_page_fast_read(user-modeFAST_READ) tests.While at it, replace the license boilerplate with SPDX identifier.
Quoted 9 lines
Signed-off-by Cédric Le Goater <[email protected]>--- tests/qtest/aspeed-smc-utils.h | 23 +++-------- tests/qtest/aspeed-smc-utils.c | 75 ++++++++++++++++++++++++++-------- tests/qtest/aspeed_smc-test.c | 39 ++++++++++-------- tests/qtest/ast2700-smc-test.c | 4 ++ 4 files changed, 90 insertions(+), 51 deletions(-)
PATCH v2 3/4 tests/qtest: aspeed_smc: Add Dual Output Read (DOR) test coverage
In reply to Cédric Le GoaterAdd read_page_mem_dor (CTRL_FREADMODE with DOR command and dual data IO mode) and write_page_dor (user-mode DOR) tests.
--- tests/qtest/aspeed-smc-utils.h | 4 +++ tests/qtest/aspeed-smc-utils.c | 45 ++++++++++++++++++++++++++++++++++ tests/qtest/aspeed_smc-test.c | 16 ++++++++++++ tests/qtest/ast2700-smc-test.c | 4 +++ 4 files changed, 69 insertions(+)
tests/qtest/aspeed-smc-utils.h +4 -0
@@ -28,6 +28,7 @@#define CTRL_FREADMODE 0x1#define CTRL_WRITEMODE 0x2#define CTRL_USERMODE 0x3 +#define CTRL_IO_DUAL_DATA BIT(29)#define CTRL_DUMMY_LOW_SHIFT 6#define CTRL_DUMMY_HIGH_SHIFT 14#define SR_WEL BIT(1)
@@ -42,6 +43,7 @@ enum {BULK_ERASE =0xc7 ,READ =0x03 ,FAST_READ =0x0b , +DOR =0x3b ,PP =0x02 ,WRSR =0x1 , WREN = 0x6,
@@ -79,5 +81,7 @@ void aspeed_smc_test_write_block_protect_bottom_bit(const void *data);void aspeed_smc_test_write_page_qpi (const void *data);void aspeed_smc_test_read_page_mem_fast_read (const void *data);void aspeed_smc_test_write_page_fast_read (const void *data); +void aspeed_smc_test_read_page_mem_dor (const void *data); +void aspeed_smc_test_write_page_dor (const void *data);#endif /* TESTS_ASPEED_SMC_UTILS_H */
tests/qtest/aspeed-smc-utils.c +45 -0
54 lines not on this page · raw message
tests/qtest/aspeed_smc-test.c +16 -0
@@ -56,6 +56,10 @@ static void test_palmetto_bmc(AspeedSMCTestData *data) data, aspeed_smc_test_read_page_mem_fast_read);qtest_add_data_func ("/ast2400/smc/write_page_fast_read" , data, aspeed_smc_test_write_page_fast_read); +qtest_add_data_func ("/ast2400/smc/read_page_mem_dor" , + data, aspeed_smc_test_read_page_mem_dor); +qtest_add_data_func ("/ast2400/smc/write_page_dor" , + data, aspeed_smc_test_write_page_dor);/* * Block protect tests must be run last because the block protect * state is not cleared by reset_memory() and silently prevents
@@ -112,6 +116,10 @@ static void test_ast2500_evb(AspeedSMCTestData *data) data, aspeed_smc_test_read_page_mem_fast_read);qtest_add_data_func ("/ast2500/smc/write_page_fast_read" , data, aspeed_smc_test_write_page_fast_read); +qtest_add_data_func ("/ast2500/smc/read_page_mem_dor" , + data, aspeed_smc_test_read_page_mem_dor); +qtest_add_data_func ("/ast2500/smc/write_page_dor" , + data, aspeed_smc_test_write_page_dor); }static void test_ast2600_evb (AspeedSMCTestData *data)
@@ -159,6 +167,10 @@ static void test_ast2600_evb(AspeedSMCTestData *data) data, aspeed_smc_test_read_page_mem_fast_read);qtest_add_data_func ("/ast2600/smc/write_page_fast_read" , data, aspeed_smc_test_write_page_fast_read); +qtest_add_data_func ("/ast2600/smc/read_page_mem_dor" , + data, aspeed_smc_test_read_page_mem_dor); +qtest_add_data_func ("/ast2600/smc/write_page_dor" , + data, aspeed_smc_test_write_page_dor); }static void test_ast1030_evb (AspeedSMCTestData *data)
@@ -206,6 +218,10 @@ static void test_ast1030_evb(AspeedSMCTestData *data) data, aspeed_smc_test_read_page_mem_fast_read);qtest_add_data_func ("/ast1030/smc/write_page_fast_read" , data, aspeed_smc_test_write_page_fast_read); +qtest_add_data_func ("/ast1030/smc/read_page_mem_dor" , + data, aspeed_smc_test_read_page_mem_dor); +qtest_add_data_func ("/ast1030/smc/write_page_dor" , + data, aspeed_smc_test_write_page_dor); }int main (int argc,char **argv)
tests/qtest/ast2700-smc-test.c +4 -0
@@ -56,6 +56,10 @@ static void test_ast2700_evb(AspeedSMCTestData *data) data, aspeed_smc_test_read_page_mem_fast_read);qtest_add_data_func ("/ast2700/smc/write_page_fast_read" , data, aspeed_smc_test_write_page_fast_read); +qtest_add_data_func ("/ast2700/smc/read_page_mem_dor" , + data, aspeed_smc_test_read_page_mem_dor); +qtest_add_data_func ("/ast2700/smc/write_page_dor" , + data, aspeed_smc_test_write_page_dor); }int main (int argc,char **argv)
Signature · 1 line
2.54.0
PATCH v2 4/4 tests/qtest: aspeed_smc: Add Quad Output Read (QOR) test coverage
In reply to Cédric Le GoaterAdd read_page_mem_qor (CTRL_FREADMODE with QOR command and quad data IO mode) and write_page_qor (user-mode QOR) tests.
--- tests/qtest/aspeed-smc-utils.h | 4 ++++ tests/qtest/aspeed-smc-utils.c | 43 ++++++++++++++++++++++++++++++++++ tests/qtest/aspeed_smc-test.c | 16 +++++++++++++ tests/qtest/ast2700-smc-test.c | 4 ++++ 4 files changed, 67 insertions(+)
tests/qtest/aspeed-smc-utils.h +4 -0
@@ -28,6 +28,7 @@#define CTRL_FREADMODE 0x1#define CTRL_WRITEMODE 0x2#define CTRL_USERMODE 0x3 +#define CTRL_IO_QUAD_DATA BIT(30)#define CTRL_IO_DUAL_DATA BIT(29)#define CTRL_DUMMY_LOW_SHIFT 6#define CTRL_DUMMY_HIGH_SHIFT 14
@@ -44,6 +45,7 @@ enum {READ =0x03 ,FAST_READ =0x0b ,DOR =0x3b , +QOR =0x6b ,PP =0x02 ,WRSR =0x1 , WREN = 0x6,
@@ -83,5 +85,7 @@ void aspeed_smc_test_read_page_mem_fast_read(const void *data);void aspeed_smc_test_write_page_fast_read (const void *data);void aspeed_smc_test_read_page_mem_dor (const void *data);void aspeed_smc_test_write_page_dor (const void *data); +void aspeed_smc_test_read_page_mem_qor (const void *data); +void aspeed_smc_test_write_page_qor (const void *data);#endif /* TESTS_ASPEED_SMC_UTILS_H */
tests/qtest/aspeed-smc-utils.c +43 -0
52 lines not on this page · raw message
tests/qtest/aspeed_smc-test.c +16 -0
@@ -60,6 +60,10 @@ static void test_palmetto_bmc(AspeedSMCTestData *data) data, aspeed_smc_test_read_page_mem_dor);qtest_add_data_func ("/ast2400/smc/write_page_dor" , data, aspeed_smc_test_write_page_dor); +qtest_add_data_func ("/ast2400/smc/read_page_mem_qor" , + data, aspeed_smc_test_read_page_mem_qor); +qtest_add_data_func ("/ast2400/smc/write_page_qor" , + data, aspeed_smc_test_write_page_qor);/* * Block protect tests must be run last because the block protect * state is not cleared by reset_memory() and silently prevents
@@ -120,6 +124,10 @@ static void test_ast2500_evb(AspeedSMCTestData *data) data, aspeed_smc_test_read_page_mem_dor);qtest_add_data_func ("/ast2500/smc/write_page_dor" , data, aspeed_smc_test_write_page_dor); +qtest_add_data_func ("/ast2500/smc/read_page_mem_qor" , + data, aspeed_smc_test_read_page_mem_qor); +qtest_add_data_func ("/ast2500/smc/write_page_qor" , + data, aspeed_smc_test_write_page_qor); }static void test_ast2600_evb (AspeedSMCTestData *data)
@@ -171,6 +179,10 @@ static void test_ast2600_evb(AspeedSMCTestData *data) data, aspeed_smc_test_read_page_mem_dor);qtest_add_data_func ("/ast2600/smc/write_page_dor" , data, aspeed_smc_test_write_page_dor); +qtest_add_data_func ("/ast2600/smc/read_page_mem_qor" , + data, aspeed_smc_test_read_page_mem_qor); +qtest_add_data_func ("/ast2600/smc/write_page_qor" , + data, aspeed_smc_test_write_page_qor); }static void test_ast1030_evb (AspeedSMCTestData *data)
@@ -222,6 +234,10 @@ static void test_ast1030_evb(AspeedSMCTestData *data) data, aspeed_smc_test_read_page_mem_dor);qtest_add_data_func ("/ast1030/smc/write_page_dor" , data, aspeed_smc_test_write_page_dor); +qtest_add_data_func ("/ast1030/smc/read_page_mem_qor" , + data, aspeed_smc_test_read_page_mem_qor); +qtest_add_data_func ("/ast1030/smc/write_page_qor" , + data, aspeed_smc_test_write_page_qor); }int main (int argc,char **argv)
tests/qtest/ast2700-smc-test.c +4 -0
@@ -60,6 +60,10 @@ static void test_ast2700_evb(AspeedSMCTestData *data) data, aspeed_smc_test_read_page_mem_dor);qtest_add_data_func ("/ast2700/smc/write_page_dor" , data, aspeed_smc_test_write_page_dor); +qtest_add_data_func ("/ast2700/smc/read_page_mem_qor" , + data, aspeed_smc_test_read_page_mem_qor); +qtest_add_data_func ("/ast2700/smc/write_page_qor" , + data, aspeed_smc_test_write_page_qor); }int main (int argc,char **argv)
Signature · 1 line
2.54.0
Re: [PATCH v2 4/4] tests/qtest: aspeed_smc: Add Quad Output Read (QOR) test coverage
Quoted 4 lines · Cédric Le Goater
Add
read_page_mem_qor(CTRL_FREADMODEwith QOR command and quad data IO mode) andwrite_page_qor(user-mode QOR) tests.
Quoted 9 lines
Signed-off-by Cédric Le Goater <[email protected]>--- tests/qtest/aspeed-smc-utils.h | 4 ++++ tests/qtest/aspeed-smc-utils.c | 43 ++++++++++++++++++++++++++++++++++ tests/qtest/aspeed_smc-test.c | 16 +++++++++++++ tests/qtest/ast2700-smc-test.c | 4 ++++ 4 files changed, 67 insertions(+)
Quoted 30 lines · Cédric Le Goater
Hello,
This series extends the Aspeed SMC qtest suite with coverage for fast-read and multi-IO read commands :
- Fast Read (single IO with dummy byte)
- Dual Output Read (DOR, dual data IO)
- Quad Output Read (QOR, quad data IO)Each patch tests both the memory-mapped
CTRL_FREADMODEpath and the user-mode command path, to exercise the dummy cycle handling recently reworked in the m25p80 flash model.Thanks,
C.
Changes in v2:
- Introduced
spi_ctrl_set_fast_read()helper, replacing open-coded ctrl register setup in read_page_mem_fast_read/dor/qor()
- Replaced MIT license boilerplate with SPDX-License-Identifier
- Collected Reviewed-by: Bin Meng on patches 1 and 3Cédric Le Goater (4):
tests/qtest:aspeed_smc: Introduceread_page_mem_fnfor page read
helpers
tests/qtest:aspeed_smc: Add fast-read test coverage tests/qtest:aspeed_smc: Add Dual Output Read (DOR) test coverage tests/qtest:aspeed_smc: Add Quad Output Read (QOR) test coverage
Quoted 6 lines
tests/qtest/aspeed-smc-utils.h | 31 +++--- tests/qtest/aspeed-smc-utils.c | 192 ++++++++++++++++++++++++++++----- tests/qtest/aspeed_smc-test.c | 71 +++++++++--- tests/qtest/ast2700-smc-test.c | 12 +++ 4 files changed, 247 insertions(+), 59 deletions(-)
Applied to
https://github.com/legoater/qemu aspeed-next
Thanks,
C.