]> www.infradead.org Git - users/dwmw2/qemu.git/commit
test/qtest/aspeed_smc-test: Introduce a new TestData to test different BMC SOCs
authorJamin Lin <jamin_lin@aspeedtech.com>
Wed, 27 Nov 2024 09:15:35 +0000 (17:15 +0800)
committerCédric Le Goater <clg@redhat.com>
Wed, 11 Dec 2024 06:25:53 +0000 (07:25 +0100)
commit975d4baf686c1bf16daf0277c25cd6f494df0c68
tree231797fad029baf3efc00cdb579f84ddd2eac63b
parent755e984aa4af97070a3f63812e9ed33f729dda9b
test/qtest/aspeed_smc-test: Introduce a new TestData to test different BMC SOCs

Currently, these test cases are only used for testing fmc_cs0 for AST2400.
To test others BMC SOCs, introduces a new TestData structure.
Users can set the spi base address, flash base address, jedesc id and so on
for different BMC SOCs and flash model testing.

Introduce new helper functions to make the test case more readable.

Set spi base address 0x1E620000, flash_base address 0x20000000
and jedec id 0x20ba19 for fmc_cs0 with n25q256a flash for AST2400
SMC model testing.

To pass the TestData into the test case, replace qtest_add_func with
qtest_add_data_func.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20241127091543.1243114-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
tests/qtest/aspeed_smc-test.c