intel/kunimitisu: set oem_id oem_table_id fields of acpi_header_t

kunimitisu platform updated these two fields if maxim codec
is detected.

BUG=chrome-os-partner:49570
BRANCH=glados
TEST=Build & Booted kunimitsu board. Verified that kernel
can read new strings.

Change-Id: Icbe0d87f0b46da794db36191b0e12948fe6a2fe6
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f3d07ef07c382a2df140b457273feb3899228e10
Original-Change-Id: Ia6a111d15b851ae3fa918816e13b54ace215a09a
Original-Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/324631
Original-Commit-Ready: Yang Fang <yang.a.fang@intel.com>
Original-Tested-by: Yang Fang <yang.a.fang@intel.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/13603
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Fang, Yang A 2016-01-28 17:09:17 -08:00 committed by Patrick Georgi
parent 16ff85971f
commit 8a0d274444
1 changed files with 11 additions and 1 deletions

View File

@ -20,10 +20,14 @@
#include <device/device.h> #include <device/device.h>
#include <gpio.h> #include <gpio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <soc/nhlt.h> #include <soc/nhlt.h>
#include "ec.h" #include "ec.h"
#include "gpio.h" #include "gpio.h"
static const char *oem_id_maxim = "INTEL";
static const char *oem_table_id_maxim = "SCRDMAX";
static void mainboard_init(device_t dev) static void mainboard_init(device_t dev)
{ {
mainboard_ec_init(); mainboard_ec_init();
@ -42,6 +46,8 @@ static unsigned long mainboard_write_acpi_tables(
uintptr_t start_addr; uintptr_t start_addr;
uintptr_t end_addr; uintptr_t end_addr;
struct nhlt *nhlt; struct nhlt *nhlt;
const char *oem_id = NULL;
const char *oem_table_id = NULL;
start_addr = current; start_addr = current;
@ -67,13 +73,17 @@ static unsigned long mainboard_write_acpi_tables(
/* MAXIM Smart Amps for left and right. */ /* MAXIM Smart Amps for left and right. */
if (nhlt_soc_add_max98357(nhlt, AUDIO_LINK_SSP0)) if (nhlt_soc_add_max98357(nhlt, AUDIO_LINK_SSP0))
printk(BIOS_ERR, "Couldn't add max98357.\n"); printk(BIOS_ERR, "Couldn't add max98357.\n");
oem_id = oem_id_maxim;
oem_table_id = oem_table_id_maxim;
} }
/* NAU88l25 Headset codec. */ /* NAU88l25 Headset codec. */
if (nhlt_soc_add_nau88l25(nhlt, AUDIO_LINK_SSP1)) if (nhlt_soc_add_nau88l25(nhlt, AUDIO_LINK_SSP1))
printk(BIOS_ERR, "Couldn't add headset codec.\n"); printk(BIOS_ERR, "Couldn't add headset codec.\n");
end_addr = nhlt_soc_serialize(nhlt, start_addr); end_addr = nhlt_soc_serialize_oem_overrides(nhlt, start_addr,
oem_id, oem_table_id);
if (end_addr != start_addr) if (end_addr != start_addr)
acpi_add_table(rsdp, (void *)start_addr); acpi_add_table(rsdp, (void *)start_addr);