google/snappy: Update EC keyboard backlight flag by SKU ID
Set AP SKU ID by ec command EC_CMD_SET_SKU_ID to update EC keyboard backlight flag. BUG=b:65359225 BRANCH=reef TEST=emerge-snappy coreboot Change-Id: I1153aa0b89250c55f311dd93a01fcef47afd7292 Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com> Reviewed-on: https://review.coreboot.org/21400 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
e2bb059187
commit
82fbb1cf55
|
@ -42,6 +42,8 @@ static void mainboard_init(void *chip_info)
|
||||||
gpio_configure_pads(pads, num);
|
gpio_configure_pads(pads, num);
|
||||||
|
|
||||||
mainboard_ec_init();
|
mainboard_ec_init();
|
||||||
|
|
||||||
|
variant_board_ec_set_skuid();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -64,6 +66,11 @@ uint8_t __attribute__((weak)) variant_board_sku(void)
|
||||||
return board_sku_num;
|
return board_sku_num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set variabnt board sku to ec by sku id */
|
||||||
|
void __attribute__((weak)) variant_board_ec_set_skuid(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
const char *smbios_mainboard_sku(void)
|
const char *smbios_mainboard_sku(void)
|
||||||
{
|
{
|
||||||
static char sku_str[7]; /* sku{0..255} */
|
static char sku_str[7]; /* sku{0..255} */
|
||||||
|
|
|
@ -38,6 +38,8 @@ const struct lpddr4_cfg *variant_lpddr4_config(void);
|
||||||
size_t variant_memory_sku(void);
|
size_t variant_memory_sku(void);
|
||||||
/* Return board SKU. Limited to uint8_t, so it fits into 3 decimal digits */
|
/* Return board SKU. Limited to uint8_t, so it fits into 3 decimal digits */
|
||||||
uint8_t variant_board_sku(void);
|
uint8_t variant_board_sku(void);
|
||||||
|
/* Set variabnt board sku to ec by sku id */
|
||||||
|
void variant_board_ec_set_skuid(void);
|
||||||
|
|
||||||
/* Return ChromeOS gpio table and fill in number of entries. */
|
/* Return ChromeOS gpio table and fill in number of entries. */
|
||||||
const struct cros_gpio *variant_cros_gpios(size_t *num);
|
const struct cros_gpio *variant_cros_gpios(size_t *num);
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
ramstage-y += mainboard.c
|
|
@ -0,0 +1,22 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2016, 2017 Google Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; version 2 of the License.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <baseboard/variants.h>
|
||||||
|
#include <ec/google/chromeec/ec.h>
|
||||||
|
|
||||||
|
void variant_board_ec_set_skuid(void)
|
||||||
|
{
|
||||||
|
google_chromeec_set_sku_id(variant_board_sku());
|
||||||
|
}
|
Loading…
Reference in New Issue