diff mbox

[U-Boot,v2,14/28] x86: acpi: Remove acpi_create_ssdt_generator()

Message ID 1462632397-11224-15-git-send-email-bmeng.cn@gmail.com
State Accepted
Delegated to: Bin Meng
Headers show

Commit Message

Bin Meng May 7, 2016, 2:46 p.m. UTC
This acpi_create_ssdt_generator() currently does nothing.
Remove this for now.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
---

Changes in v2: None

 arch/x86/include/asm/acpi_table.h |  3 ---
 arch/x86/lib/acpi_table.c         | 33 ---------------------------------
 2 files changed, 36 deletions(-)

Comments

Simon Glass May 7, 2016, 6:46 p.m. UTC | #1
On 7 May 2016 at 08:46, Bin Meng <bmeng.cn@gmail.com> wrote:
> This acpi_create_ssdt_generator() currently does nothing.
> Remove this for now.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> Reviewed-by: Stefan Roese <sr@denx.de>
> Tested-by: Stefan Roese <sr@denx.de>
> ---
>
> Changes in v2: None
>
>  arch/x86/include/asm/acpi_table.h |  3 ---
>  arch/x86/lib/acpi_table.c         | 33 ---------------------------------
>  2 files changed, 36 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Bin Meng May 8, 2016, 8:18 a.m. UTC | #2
On Sun, May 8, 2016 at 2:46 AM, Simon Glass <sjg@chromium.org> wrote:
> On 7 May 2016 at 08:46, Bin Meng <bmeng.cn@gmail.com> wrote:
>> This acpi_create_ssdt_generator() currently does nothing.
>> Remove this for now.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> Reviewed-by: Stefan Roese <sr@denx.de>
>> Tested-by: Stefan Roese <sr@denx.de>
>> ---
>>
>> Changes in v2: None
>>
>>  arch/x86/include/asm/acpi_table.h |  3 ---
>>  arch/x86/lib/acpi_table.c         | 33 ---------------------------------
>>  2 files changed, 36 deletions(-)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

applied to u-boot-x86/next, thanks!
diff mbox

Patch

diff --git a/arch/x86/include/asm/acpi_table.h b/arch/x86/include/asm/acpi_table.h
index 9175e7a..c6688ea 100644
--- a/arch/x86/include/asm/acpi_table.h
+++ b/arch/x86/include/asm/acpi_table.h
@@ -302,9 +302,6 @@  struct acpi_mcfg_mmconfig {
 	u8 reserved[4];
 };
 
-#define OEM_REVISION		42
-#define ASL_COMPILER_REVISION	42
-
 /* These can be used by the target port */
 
 unsigned long acpi_create_madt_lapics(unsigned long current);
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index 75fa429..62fe39d 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -311,29 +311,6 @@  static void acpi_write_rsdp(struct acpi_rsdp *rsdp, struct acpi_rsdt *rsdt,
 			sizeof(struct acpi_rsdp));
 }
 
-static void acpi_create_ssdt_generator(struct acpi_table_header *ssdt,
-			 const char *oem_table_id)
-{
-	unsigned long current = (unsigned long)ssdt +
-				sizeof(struct acpi_table_header);
-
-	memset((void *)ssdt, 0, sizeof(struct acpi_table_header));
-
-	memcpy(&ssdt->signature, "SSDT", 4);
-	/* Access size in ACPI 2.0c/3.0/4.0/5.0 */
-	ssdt->revision = ACPI_REV_ACPI_3_0;
-	memcpy(&ssdt->oem_id, OEM_ID, 6);
-	memcpy(&ssdt->oem_table_id, oem_table_id, 8);
-	ssdt->oem_revision = OEM_REVISION;
-	memcpy(&ssdt->aslc_id, ASLC_ID, 4);
-	ssdt->aslc_revision = ASL_COMPILER_REVISION;
-	ssdt->length = sizeof(struct acpi_table_header);
-
-	/* (Re)calculate length and checksum */
-	ssdt->length = current - (unsigned long)ssdt;
-	ssdt->checksum = table_compute_checksum((void *)ssdt, ssdt->length);
-}
-
 /*
  * QEMU's version of write_acpi_tables is defined in
  * arch/x86/cpu/qemu/fw_cfg.c
@@ -349,7 +326,6 @@  u32 write_acpi_tables(u32 start)
 	struct acpi_fadt *fadt;
 	struct acpi_mcfg *mcfg;
 	struct acpi_madt *madt;
-	struct acpi_table_header *ssdt;
 
 	current = start;
 
@@ -426,15 +402,6 @@  u32 write_acpi_tables(u32 start)
 	}
 	current = ALIGN(current, 16);
 
-	debug("ACPI:    * SSDT\n");
-	ssdt = (struct acpi_table_header *)current;
-	acpi_create_ssdt_generator(ssdt, OEM_TABLE_ID);
-	if (ssdt->length > sizeof(struct acpi_table_header)) {
-		current += ssdt->length;
-		acpi_add_table(rsdp, ssdt);
-		current = ALIGN(current, 16);
-	}
-
 	debug("current = %x\n", current);
 
 	debug("ACPI: done.\n");