acpi: Drop code for missing XSDT from acpi_write_rsdp()
authorSimon Glass <sjg@chromium.org>
Sun, 26 Apr 2020 15:19:49 +0000 (09:19 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Thu, 30 Apr 2020 09:16:12 +0000 (17:16 +0800)
We don't actually support tables without an XSDT so we can drop this dead
code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
arch/x86/lib/acpi_table.c

index d8622da394a1c82bac3ca0532b7804c0efcac7bf..de1acb0ebb50a10f3fec833b9e1fd0eaaff56803 100644 (file)
@@ -42,19 +42,8 @@ static void acpi_write_rsdp(struct acpi_rsdp *rsdp, struct acpi_rsdt *rsdt,
        rsdp->length = sizeof(struct acpi_rsdp);
        rsdp->rsdt_address = (u32)rsdt;
 
-       /*
-        * Revision: ACPI 1.0: 0, ACPI 2.0/3.0/4.0: 2
-        *
-        * Some OSes expect an XSDT to be present for RSD PTR revisions >= 2.
-        * If we don't have an ACPI XSDT, force ACPI 1.0 (and thus RSD PTR
-        * revision 0)
-        */
-       if (xsdt == NULL) {
-               rsdp->revision = ACPI_RSDP_REV_ACPI_1_0;
-       } else {
-               rsdp->xsdt_address = (u64)(u32)xsdt;
-               rsdp->revision = ACPI_RSDP_REV_ACPI_2_0;
-       }
+       rsdp->xsdt_address = (u64)(u32)xsdt;
+       rsdp->revision = ACPI_RSDP_REV_ACPI_2_0;
 
        /* Calculate checksums */
        rsdp->checksum = table_compute_checksum((void *)rsdp, 20);