mb/google/brya/crota: Remove MAC address passthru support
ChromeOS connection manager (shill) already has support for dock MAC address passthrough, therefore remove the code to pass a dock's MAC address in ACPI. BUG=b:235045188 TEST=build coreboot Signed-off-by: Franklin Lin <franklin_lin@wistron.corp-partner.google.com> Change-Id: I78320a7c6b0fd5392e24b63bff234229a3f4b9bc Reviewed-on: https://review.coreboot.org/c/coreboot/+/66040 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
c1b01ea9f5
commit
573fa36c3a
|
@ -214,7 +214,6 @@ config BOARD_GOOGLE_CROTA
|
|||
select CHROMEOS_WIFI_SAR if CHROMEOS
|
||||
select DRIVERS_GENESYSLOGIC_GL9750
|
||||
select DRIVERS_I2C_CS42L42
|
||||
select VPD
|
||||
|
||||
config BOARD_GOOGLE_MOLI
|
||||
bool "-> Moli"
|
||||
|
|
|
@ -14,13 +14,6 @@ const char *get_wifi_sar_cbfs_filename(void)
|
|||
return "wifi_sar_0.hex";
|
||||
}
|
||||
|
||||
static const char *get_dock_mac_from_vpd(char *buf, int size)
|
||||
{
|
||||
/* Support MAC address pass-through */
|
||||
/* Read value of 'dock_mac' from RO VPD */
|
||||
return vpd_gets("dock_mac", buf, size, VPD_RO);
|
||||
}
|
||||
|
||||
void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config)
|
||||
{
|
||||
if (fw_config_probe(FW_CONFIG(DB_LTE, LTE_USB))) {
|
||||
|
@ -37,49 +30,3 @@ void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config)
|
|||
config->ext_fivr_settings.vnn_sx_voltage_mv = 1250;
|
||||
}
|
||||
}
|
||||
|
||||
void variant_fill_ssdt(const struct device *unused)
|
||||
{
|
||||
/* Write MAC address to SSDT for Linux kernel r8152 driver */
|
||||
/* enable pass-through support */
|
||||
/* and read ACPI object name: "\_SB.AMAC" */
|
||||
|
||||
/* ASL code like this */
|
||||
// Scope (\_SB)
|
||||
// {
|
||||
// Method (AMAC, 0, Serialized)
|
||||
// {
|
||||
// Return (ToBuffer (STRING))
|
||||
// }
|
||||
// }
|
||||
|
||||
char buf[32], acpi_buf[32];
|
||||
if (get_dock_mac_from_vpd(buf, sizeof(buf)) != NULL) {
|
||||
printk(BIOS_INFO, "RO_VPD, dock_mac=%s\n", buf);
|
||||
|
||||
/* remove ':' from mac address string */
|
||||
size_t len = strlen(buf);
|
||||
int i, j;
|
||||
for (i = 0; i < len; i++) {
|
||||
if (buf[i] == ':') {
|
||||
for (j = i; j < len; j++)
|
||||
buf[j] = buf[j+1];
|
||||
len--;
|
||||
i--;
|
||||
}
|
||||
}
|
||||
buf[len] = '\0';
|
||||
|
||||
/* Format expected by the Linux kernel r8152 driver */
|
||||
/* "_AUXMAC_#XXXXXXXXXXXX#" */
|
||||
int acpi_buf_len = snprintf(acpi_buf, sizeof(acpi_buf), "_AUXMAC_#%s#", buf);
|
||||
|
||||
acpigen_write_scope("\\_SB");
|
||||
acpigen_write_method_serialized("AMAC", 0);
|
||||
|
||||
acpigen_write_return_byte_buffer((uint8_t *)acpi_buf, acpi_buf_len);
|
||||
|
||||
acpigen_write_method_end();
|
||||
acpigen_write_scope_end();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue