aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorAnanth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>2017-03-14 15:57:14 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-03-31 16:57:06 +1100
commit70329eafa0f40645b56cfea7995d70ebc03e3e50 (patch)
tree8297b1d1f28b39de6d0a76f7b46c69b842babc9c /hdata
parentb265154139b59295f7f2138459606e797a12d9f5 (diff)
downloadskiboot-70329eafa0f40645b56cfea7995d70ebc03e3e50.zip
skiboot-70329eafa0f40645b56cfea7995d70ebc03e3e50.tar.gz
skiboot-70329eafa0f40645b56cfea7995d70ebc03e3e50.tar.bz2
hdata/vpd: Reorganize VPD code
To make it convenient to add OpenPOWER platform support. No change in functionality. This series has been tested on a Witherspoon. The HDAT has the corresponding properties, but is not populated with the right values (serial number, etc). Signed-off-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/vpd.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/hdata/vpd.c b/hdata/vpd.c
index c61621d..4c787c6 100644
--- a/hdata/vpd.c
+++ b/hdata/vpd.c
@@ -23,6 +23,8 @@
#include "hdata.h"
#include <inttypes.h>
+static bool op_platform;
+
struct card_info {
const char *ccin; /* Customer card identification number */
const char *description;
@@ -571,9 +573,10 @@ static void sysvpd_parse(void)
}
/* Look for the new OpenPower "OSYS" first */
- if (vpd_find_record(sysvpd, sysvpd_sz, "OSYS", NULL))
+ if (vpd_find_record(sysvpd, sysvpd_sz, "OSYS", NULL)) {
+ op_platform = true;
sysvpd_parse_opp(sysvpd, sysvpd_sz);
- else
+ } else
sysvpd_parse_legacy(sysvpd, sysvpd_sz);
}
@@ -651,15 +654,15 @@ void vpd_parse(void)
{
const struct HDIF_common_hdr *fruvpd_hdr;
+ /* System VPD uses the VSYS record, so its special */
+ sysvpd_parse();
+
/* Enclosure */
_vpd_parse(spira.ntuples.nt_enclosure_vpd);
/* Backplane */
_vpd_parse(spira.ntuples.backplane_vpd);
- /* System VPD uses the VSYS record, so its special */
- sysvpd_parse();
-
/* clock card -- does this use the FRUVPD sig? */
_vpd_parse(spira.ntuples.clock_vpd);