coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
variant.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <baseboard/variants.h>
4 #include <soc/pci_devs.h>
6 #include <sar.h>
7 
8 #define SKU_UNKNOWN 0xFFFFFFFF
9 
10 void variant_update_devtree(struct device *dev)
11 {
13  struct device *touchscreen_i2c_host;
14 
15  touchscreen_i2c_host = pcidev_path_on_root(PCH_DEVFN_I2C7);
16 
17  if (touchscreen_i2c_host == NULL)
18  return;
19 
20  /* SKU ID 1 does not have a touchscreen device, hence disable it. */
23  touchscreen_i2c_host->enabled = 0;
24 }
25 
26 const char *get_wifi_sar_cbfs_filename(void)
27 {
29 
31  if (sku_id == 9)
32  return "wifi_sar-foob360.hex";
34 }
uint32_t sku_id(void)
DEVTREE_CONST struct device * pcidev_path_on_root(pci_devfn_t devfn)
Definition: device_const.c:255
uint32_t google_chromeec_get_board_sku(void)
Definition: ec_skuid.c:6
const char * get_wifi_sar_cbfs_filename(void)
Definition: variant.c:5
bool no_touchscreen_sku(uint32_t sku_id)
Definition: gpio.c:46
void variant_update_devtree(struct device *dev)
Definition: variant.c:46
#define SKU_UNKNOWN
Definition: variant.c:8
#define WIFI_SAR_CBFS_DEFAULT_FILENAME
Definition: sar.h:87
#define PCH_DEVFN_I2C7
Definition: pci_devs.h:87
#define NULL
Definition: stddef.h:19
unsigned int uint32_t
Definition: stdint.h:14
Definition: device.h:107
unsigned int enabled
Definition: device.h:122