acpi: Support ordering SSDT data by device

Add a /chosen property to control the order in which the data appears
in the SSDT. This allows matching up U-Boot's output from a dump of the
known-good data obtained from within Linux.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Simon Glass
2020-07-07 13:12:06 -06:00
committed by Bin Meng
parent 64ba6f43ef
commit 0f7b111f70
4 changed files with 105 additions and 8 deletions

View File

@@ -425,13 +425,16 @@ static int dm_test_acpi_fill_ssdt(struct unit_test_state *uts)
buf[4] = 'z'; /* sentinel */
ut_assertok(acpi_fill_ssdt(&ctx));
/* These values come from acpi-test's acpi-ssdt-test-data property */
ut_asserteq('a', buf[0]);
ut_asserteq('b', buf[1]);
/*
* These values come from acpi-test2's acpi-ssdt-test-data property.
* This device comes first because of u-boot,acpi-ssdt-order
*/
ut_asserteq('c', buf[0]);
ut_asserteq('d', buf[1]);
/* These values come from acpi-test2's acpi-ssdt-test-data property */
ut_asserteq('c', buf[2]);
ut_asserteq('d', buf[3]);
/* These values come from acpi-test's acpi-ssdt-test-data property */
ut_asserteq('a', buf[2]);
ut_asserteq('b', buf[3]);
ut_asserteq('z', buf[4]);