summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-10-06 12:26:33 -0400
committerTom Rini <trini@konsulko.com>2021-10-06 13:46:31 -0400
commitea67f467a43e4c8852bd1ce1bb75f5dc6c3788d1 (patch)
tree1bbf310f2b22ad465d5698bfdf71347129834561 /test
parent7240e1b8f94a56db88a2af688cad27e2e6545302 (diff)
parent6115f1c4fe81015369e110ea9830a6e36710677c (diff)
Merge branch '2021-10-06-assorted-improvements'
- Use better values for ACPI OEM_VERSION - Assorted NAND related Kconifg migrations and another dependency fix
Diffstat (limited to 'test')
-rw-r--r--test/dm/acpi.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/test/dm/acpi.c b/test/dm/acpi.c
index 6f0025814ed..c51073c9a6c 100644
--- a/test/dm/acpi.c
+++ b/test/dm/acpi.c
@@ -26,6 +26,14 @@
#define BUF_SIZE 4096
+#define OEM_REVISION ((((U_BOOT_VERSION_NUM / 1000) % 10) << 28) | \
+ (((U_BOOT_VERSION_NUM / 100) % 10) << 24) | \
+ (((U_BOOT_VERSION_NUM / 10) % 10) << 20) | \
+ ((U_BOOT_VERSION_NUM % 10) << 16) | \
+ (((U_BOOT_VERSION_NUM_PATCH / 10) % 10) << 12) | \
+ ((U_BOOT_VERSION_NUM_PATCH % 10) << 8) | \
+ 0x01)
+
/**
* struct testacpi_plat - Platform data for the test ACPI device
*
@@ -219,7 +227,7 @@ static int dm_test_acpi_fill_header(struct unit_test_state *uts)
ut_asserteq_mem(OEM_ID, hdr.oem_id, sizeof(hdr.oem_id));
ut_asserteq_mem(OEM_TABLE_ID, hdr.oem_table_id,
sizeof(hdr.oem_table_id));
- ut_asserteq(U_BOOT_BUILD_DATE, hdr.oem_revision);
+ ut_asserteq(OEM_REVISION, hdr.oem_revision);
ut_asserteq_mem(ASLC_ID, hdr.aslc_id, sizeof(hdr.aslc_id));
ut_asserteq(0x44, hdr.aslc_revision);
@@ -366,20 +374,20 @@ static int dm_test_acpi_cmd_list(struct unit_test_state *uts)
addr = ALIGN(addr + sizeof(struct acpi_rsdp), 16);
ut_assert_nextline("RSDT %08lx %06zx (v01 U-BOOT U-BOOTBL %x INTL 0)",
addr, sizeof(struct acpi_table_header) +
- 3 * sizeof(u32), U_BOOT_BUILD_DATE);
+ 3 * sizeof(u32), OEM_REVISION);
addr = ALIGN(addr + sizeof(struct acpi_rsdt), 16);
ut_assert_nextline("XSDT %08lx %06zx (v01 U-BOOT U-BOOTBL %x INTL 0)",
addr, sizeof(struct acpi_table_header) +
- 3 * sizeof(u64), U_BOOT_BUILD_DATE);
+ 3 * sizeof(u64), OEM_REVISION);
addr = ALIGN(addr + sizeof(struct acpi_xsdt), 64);
ut_assert_nextline("DMAR %08lx %06zx (v01 U-BOOT U-BOOTBL %x INTL 0)",
- addr, sizeof(struct acpi_dmar), U_BOOT_BUILD_DATE);
+ addr, sizeof(struct acpi_dmar), OEM_REVISION);
addr = ALIGN(addr + sizeof(struct acpi_dmar), 16);
ut_assert_nextline("DMAR %08lx %06zx (v01 U-BOOT U-BOOTBL %x INTL 0)",
- addr, sizeof(struct acpi_dmar), U_BOOT_BUILD_DATE);
+ addr, sizeof(struct acpi_dmar), OEM_REVISION);
addr = ALIGN(addr + sizeof(struct acpi_dmar), 16);
ut_assert_nextline("DMAR %08lx %06zx (v01 U-BOOT U-BOOTBL %x INTL 0)",
- addr, sizeof(struct acpi_dmar), U_BOOT_BUILD_DATE);
+ addr, sizeof(struct acpi_dmar), OEM_REVISION);
ut_assert_console_end();
return 0;