summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Zhang <jonzhang@fb.com>2020-05-28 11:02:13 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-06-02 07:18:14 +0000
commita9117ed49645a9e87c61398680711bb8fa1230e4 (patch)
treed40de569bcecccad092527d57deff7e3725d80ea
parentb781680d6edb876dbf5ce5a935b7918f590f5fdf (diff)
downloadcoreboot-a9117ed49645a9e87c61398680711bb8fa1230e4.tar.xz
drivers/vpd: rename VPD_ANY to VPD_RO_THEN_RW
Rename VPD_ANY to VPD_RO_THEN_RW, to reflect the VPD region search preference. Update all existing code references for VPD_ANY. Signed-off-by: Jonathan Zhang <jonzhang@fb.com> Change-Id: I960688d1f6ab199768107ab73b8a7400a3fdf473 Reviewed-on: https://review.coreboot.org/c/coreboot/+/41586 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/drivers/vpd/vpd.h2
-rw-r--r--src/mainboard/google/reef/variants/snappy/mainboard.c2
-rw-r--r--src/vendorcode/google/chromeos/sar.c2
-rw-r--r--src/vendorcode/google/chromeos/vpd_calibration.c2
-rw-r--r--src/vendorcode/google/chromeos/vpd_mac.c2
-rw-r--r--src/vendorcode/google/chromeos/vpd_serialno.c2
-rw-r--r--src/vendorcode/google/chromeos/wrdd.c2
7 files changed, 7 insertions, 7 deletions
diff --git a/src/drivers/vpd/vpd.h b/src/drivers/vpd/vpd.h
index d54cef8df1..df7711af90 100644
--- a/src/drivers/vpd/vpd.h
+++ b/src/drivers/vpd/vpd.h
@@ -8,7 +8,7 @@
#define GOOGLE_VPD_2_0_OFFSET 0x600
enum vpd_region {
- VPD_ANY = 0,
+ VPD_RO_THEN_RW = 0,
VPD_RO = 1,
VPD_RW = 2
};
diff --git a/src/mainboard/google/reef/variants/snappy/mainboard.c b/src/mainboard/google/reef/variants/snappy/mainboard.c
index 0dd7529ae3..fc0652cf91 100644
--- a/src/mainboard/google/reef/variants/snappy/mainboard.c
+++ b/src/mainboard/google/reef/variants/snappy/mainboard.c
@@ -46,7 +46,7 @@ uint8_t variant_board_sku(void)
if (!CONFIG(CHROMEOS))
return board_sku_num;
- if (!vpd_gets(vpd_skuid, vpd_buffer, ARRAY_SIZE(vpd_buffer), VPD_ANY))
+ if (!vpd_gets(vpd_skuid, vpd_buffer, ARRAY_SIZE(vpd_buffer), VPD_RO_THEN_RW))
return board_sku_num;
vpd_len = strlen(vpd_buffer);
diff --git a/src/vendorcode/google/chromeos/sar.c b/src/vendorcode/google/chromeos/sar.c
index ab4f3d206a..b07d41d3bd 100644
--- a/src/vendorcode/google/chromeos/sar.c
+++ b/src/vendorcode/google/chromeos/sar.c
@@ -70,7 +70,7 @@ int get_wifi_sar_limits(struct wifi_sar_limits *sar_limits)
/* Try to read the SAR limit entry from VPD */
if (!vpd_gets(wifi_sar_limit_key, wifi_sar_limit_str,
- buffer_size, VPD_ANY)) {
+ buffer_size, VPD_RO_THEN_RW)) {
printk(BIOS_ERR, "Error: Could not locate '%s' in VPD.\n",
wifi_sar_limit_key);
diff --git a/src/vendorcode/google/chromeos/vpd_calibration.c b/src/vendorcode/google/chromeos/vpd_calibration.c
index 3dc58d1097..ab862c808d 100644
--- a/src/vendorcode/google/chromeos/vpd_calibration.c
+++ b/src/vendorcode/google/chromeos/vpd_calibration.c
@@ -99,7 +99,7 @@ static size_t fill_up_entries_cache(struct vpd_blob_cache_t *cache,
strcpy(cache->key_name, templates[i]);
cache->key_name[index_location] = j + '0';
- payload = vpd_find(cache->key_name, &payload_size, VPD_ANY);
+ payload = vpd_find(cache->key_name, &payload_size, VPD_RO_THEN_RW);
if (!payload)
continue;
diff --git a/src/vendorcode/google/chromeos/vpd_mac.c b/src/vendorcode/google/chromeos/vpd_mac.c
index 097afcbac0..385b9f475d 100644
--- a/src/vendorcode/google/chromeos/vpd_mac.c
+++ b/src/vendorcode/google/chromeos/vpd_mac.c
@@ -73,7 +73,7 @@ void lb_table_add_macs_from_vpd(struct lb_header *header)
* in the VPD - move on.
*/
if (!vpd_gets(mac_addr_key, mac_addr_str,
- sizeof(mac_addr_str), VPD_ANY))
+ sizeof(mac_addr_str), VPD_RO_THEN_RW))
break;
if (!macs) {
diff --git a/src/vendorcode/google/chromeos/vpd_serialno.c b/src/vendorcode/google/chromeos/vpd_serialno.c
index 9ee4f6fa76..9a3aa81ceb 100644
--- a/src/vendorcode/google/chromeos/vpd_serialno.c
+++ b/src/vendorcode/google/chromeos/vpd_serialno.c
@@ -15,7 +15,7 @@ void lb_table_add_serialno_from_vpd(struct lb_header *header)
size_t len;
if (!vpd_gets(serialno_key, serialno,
- sizeof(serialno), VPD_ANY)) {
+ sizeof(serialno), VPD_RO_THEN_RW)) {
printk(BIOS_ERR, "no serial number in vpd\n");
return;
}
diff --git a/src/vendorcode/google/chromeos/wrdd.c b/src/vendorcode/google/chromeos/wrdd.c
index e9d7247539..524a7e0e62 100644
--- a/src/vendorcode/google/chromeos/wrdd.c
+++ b/src/vendorcode/google/chromeos/wrdd.c
@@ -48,7 +48,7 @@ uint16_t wifi_regulatory_domain(void)
/* If not found for any reason fall backto the default value */
if (!vpd_gets(wrdd_domain_key, wrdd_domain_code,
- ARRAY_SIZE(wrdd_domain_code), VPD_ANY)) {
+ ARRAY_SIZE(wrdd_domain_code), VPD_RO_THEN_RW)) {
printk(BIOS_DEBUG,
"Error: Could not locate '%s' in VPD\n", wrdd_domain_key);
return WRDD_DEFAULT_REGULATORY_DOMAIN;