Age | Commit message (Collapse) | Author | Files | Lines |
|
Use dt_find_by_name_addr() instead of dt_find_by_name(). That way we
can avoid unnecessary memory allocation/cleanup.
CC: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Presently we traverse SLCA structure to create various FRU nodes under /vpd
node. We assumed that children are always contiguous. It happened to be
contiguous in P8 and worked fine, but failed in P9 system. So it ended up
populating duplicate node under wrong parent. Also failed to populate some
of the nodes.
Unfortunately there is no way to reach all the children of a given parent
from parent node :-( Hence we have to rework vpd creation logic.
This patch goes through all the SLCA entries serially and creates vpd node.
Assumptions:
- SLCA index is always serial (0..n)
- When we traverse serially parent entry comes before child
- Redundant resources are always consecutive
- Populate node if SLCA has 'installed' and 'VPD collected' bit set
CC: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Reviewed-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Move VPD parsing code to separate function (vpd_data_parse())
and make it as global. So that we can call this function from
other files.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We detect vpd data format in vpd_parse() and set "op_platform" variable.
dt_add_vpd_node() depends on op_platform to select parser type.
There are places where we call dt_add_vpd_node() even before calling
vpd_parse(). And in such cases it will not parse vpd data properly.
This patch fixes above issue.
Fixes: 694546c1 (hdata/vpd: Parse the OpenPOWER OPFR record)
CC: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Only use devicetree model if there was one.
Fixes: CID 144258
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
It's legitimate to just add model-name to the device tree if we have
one, which is what the hdata logic tries to do, but subtley fails
in one of the code paths.
Found by static analysis
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
If the model property doesn't contain a known model number
that we can translate into a name, assume it's already a name,
stop warning and don't create an extraneous property.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Lets add model-name property for OpenPower system as well.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
In P8, for few FRU's we hardcoded description table (I don't call
the reason behind this). Hence on newers system, for most devices
description propetry under /vpd contains "Unknown".
Hence lets read description from vpd blob.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Linux kernel refers to model and sytem-id properties. Also some of
the user space tools refers these properties. Hence in error path
fill model/system-id property with "Unknown".
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Parse the OpenPOWER FRU VPD (OPFR) record on OpenPOWER instead
of the VINI records.
TODO: Add the dts and updates for make check for P9 OPFR systems once
the HDAT in those are complete.
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>
|
|
These records provide hardware version details, CCIN extension information,
card type details and hardware characteristics of the FRU
While there, use the helper to add individual records.
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>
|
|
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>
|
|
to use a more graceful structured representation.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Reviewed-by: Oliver O'Halloran <oohall@gmail.com>
[stewart@linux.vnet.ibm.com: preserve PR_WARNING on Unknown]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Handle the OSYS record on OPP machines in stead of VSYS
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Latest spec added system model information to IPL PARAMS ntuple.
Grab this information when available instead of using hardcoded
table (machine_table).
Its better to parse all IPL params in one place. But on P8 we depend
on model information ..which we get from sysvpd_parse(). Hence for now
I've added code inside sysvpd_parse().
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Latest spec added vendor information to IPL PARAMS ntuple.
Grab this information when available instead of hardcoding
vendor name.
Also move vendor property code from vpd.c to iplparms parsing
function in spira.c.
Suggested-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Previously the HDAT format was only ever used with IBM hardware so it
would store vital product data (VPD) blobs in the IBM ASCII Keyword VPD
format. With P9 HDAT is used on OpenPower machines which use Industry
Standard DIMMs that provide their product data through a "Serial Present
Detect" EEPROM mounted on the DIMM.
The SPD blob has a different format and is exported in the device-tree
under the "spd" property rather than the "ibm,vpd" property. This patch
adds support for recognising these blobs and placing them in the
appropriate DT property.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
We create our own inttypes.h to get the correct printf formatting for
64bit numbers.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
No code changes as skiboot is BE.
hdata/vpd.c:559:38: warning: incorrect type in argument 1 (different base types)
hdata/vpd.c:559:38: expected unsigned short [unsigned] [usertype] slca_index
hdata/vpd.c:559:38: got restricted beint16_t const [usertype] slca_index
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Populate CCIN description and model-name property as "Unknown" if its
not available (say new system model, etc). That way device tree will
be consistent.
Also improve error logging.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Reviewed-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
SLCA entries available through hdat have parent-child relationship of
various FRUs of the system, the patch makes use of this data to create
VPD nodes in hierarchial fashion.
This is further useful for the user space tools like 'lshw'/'lsvpd' to
plug-in the support easily on POWER.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|