drivers/vpd: Add VPD support
VPD reference: https://chromium.googlesource.com/chromiumos/platform/vpd/+/master/README.md Copy ChromeOS VPD driver to add support for VPD without CROMEOS. Possible use case: * Storing calibration data * Storing MAC address * Storing serial * Storing boot options + Now it's possible to define the VPD space by choosing one of the following enums: VPD_ANY, VPD_RW, VPD_RO. + CHROMEOS selects now VPD as part of it. + VPD is implemented as driver. Change-Id: Id9263bd39bf25d024e93daa57053fefcb1adc53a Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/25046 Reviewed-by: David Hendricks <david.hendricks@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Philipp Deppenwiese
parent
c4b0fd0a86
commit
28cee59ca2
@@ -18,7 +18,9 @@
|
||||
#include <types.h>
|
||||
#include <string.h>
|
||||
#include <wrdd.h>
|
||||
#include "cros_vpd.h"
|
||||
#include <drivers/vpd/vpd.h>
|
||||
|
||||
#define CROS_VPD_REGION_NAME "region"
|
||||
|
||||
/*
|
||||
* wrdd_domain_value is ISO 3166-2
|
||||
@@ -59,8 +61,8 @@ uint16_t wifi_regulatory_domain(void)
|
||||
char *separator;
|
||||
|
||||
/* If not found for any reason fall backto the default value */
|
||||
if (!cros_vpd_gets(wrdd_domain_key, wrdd_domain_code,
|
||||
ARRAY_SIZE(wrdd_domain_code))) {
|
||||
if (!vpd_gets(wrdd_domain_key, wrdd_domain_code,
|
||||
ARRAY_SIZE(wrdd_domain_code), VPD_ANY)) {
|
||||
printk(BIOS_DEBUG,
|
||||
"Error: Could not locate '%s' in VPD\n", wrdd_domain_key);
|
||||
return WRDD_DEFAULT_REGULATORY_DOMAIN;
|
||||
|
Reference in New Issue
Block a user