aboutsummaryrefslogtreecommitdiff
path: root/hdata/fsp.c
AgeCommit message (Collapse)AuthorFilesLines
2017-08-11HDAT: Add chip-id property to ipmi sensorsVasant Hegde1-0/+36
Presently we do not have a way to map sensor to chip id. Hence we are always passing chip id 0 for occ_reset request (see occ_sensor_id_to_chip()). This patch adds chip-id property to sensors (whenever its available) so that we can map occ sensor to chip-id and pass valid chip-id to occ_reset request. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-07-13HDAT: Add IPMI sensor data under /bmc nodeVasant Hegde1-1/+51
Add IPMI sensor data under /bmc node. CC: Joel Stanley <joel@jms.id.au> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Tested-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-06-16hw/phys_map: Use GCIDs as a chip indexOliver O'Halloran1-1/+1
Currently we pass in a proc_chip structure to phys_map_get(). All we we really need from this structure is the Global Chip ID (GCID). This patch reworks the function so that we only need to pass the GCID which allows us to use it before the proc_chip structures have been initialised (i.e in the HDAT parser). Cc: Michael Neuling <mikey@neuling.org> Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Acked-By: Michael Neuling <mikey@neuling.org> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-06-16hdata: Use GCID in LPC setupOliver O'Halloran1-2/+7
The HDAT has a notion of "chip ID" which is an arbitrary numbering of chips. This numbering isn't useful outside of the HDAT so we refer to chips uing their Global Chip ID (GCID). Currently we're using the HDAT chip ID in a few places and this patch fixes them. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-10lpc: Migrate BAR assignment to phys_map_get()Michael Neuling1-4/+3
Keeps existing address. No functional change. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-05-03hdata: Make FSPv1 work againOliver O'Halloran1-0/+1
One less thing to work around for those crazy enough to try. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-07hdat: Parse BMC nodes much earlierOliver O'Halloran1-1/+27
This moves the parsing of the BMC and LPC details to the start of the HDAT parsing. This allows us to enable the Skiboot log console earlier so we can get debug output while parsing the rest of the HDAT. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-07hdata: Add BMC device-tree node for P9 OpenPOWER systemsAnanth N Mavinakayanahalli1-1/+16
On P8 Hostboot creates the node. On P9, OPAL needs to create the node. BMC information available in HDAT's SPINFO section. Signed-off-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Acked-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-03hdat: Fix interrupt & device_type of UART nodeBenjamin Herrenschmidt1-1/+3
The interrupt should use a standard "interrupts" property. The UART node also need a device_type="serial" property for historical reasons otherwise Linux won't pick it up. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-02-07lpc: Mark the power9 LPC bus as compatible with power8Benjamin Herrenschmidt1-1/+2
We support all the OPAL calls, and it avoids bugs in existing Linux kernels that would otherwise crash when attempting to access devices using a direct mapping. When Linux is fixed it will recognize that direct mapping is supported and avoid the OPAL calls. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-02-03hdata/fsp: fixup lpc device node name creationStewart Smith1-1/+1
snprintf() with size of a pointer rather than the buffer to which we were printing into Found by static analysis. Fixes: 690f9da985b5f40d4f87ff161d43fd6989f6495c Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-01-16hdat: Add BMC and LPC IOPATH supportOliver O'Halloran1-0/+163
BMC based systems use the LPC bus for communicating between the host and service processor. This is represented as a "SP IOPATH" in the HDAT and this patch adds parsing and generation of the devicetree entries to describe this. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-01-16hdat: Rework service procesor information parsingOliver O'Halloran1-51/+115
With OpenPower machines using HDAT on P9 the SPINFO structures have been amended to support BMCs in addition to the FSP. This patch reworks the existing parsing to prepare for adding BMC support. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> [stewart@linux.vnet.ibm.com: s/UNK/UNKNOWN/ suggested by Vasant] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-03-08core/fdt: Remove deivce_tree.hGavin Shan1-1/+0
None of the functions declared in the header file are public. This removes the header file. No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-11Fix endian flip in printf for FSP in hdata/fsp.cStewart Smith1-2/+3
Harmless for skiboot as we're BE. When building and running unit tests on LE though, we got an incorrect hw/software version for FSP hardware/software for hdata_to_dt test. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-10sparse: fix missing beXX_to_cpu() conversions in hdata/fsp.cStewart Smith1-5/+5
hdata/fsp.c:55:20: warning: restricted beint16_t degrades to integer hdata/fsp.c:62:27: warning: restricted beint16_t degrades to integer hdata/fsp.c:85:27: warning: restricted beint16_t degrades to integer hdata/fsp.c:85:27: warning: restricted beint16_t degrades to integer hdata/fsp.c:100:9: warning: cast from restricted beint64_t hdata/fsp.c:144:27: warning: restricted beint16_t degrades to integer doesn't do anything currently as skiboot is BE Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-09sparse: fix incorrect type warnings in hdata/fsp.cStewart Smith1-3/+3
No changes in resulting code as skiboot is BE, but does silence the sparse warnings. hdata/fsp.c:67:9: warning: incorrect type in initializer (different base types) hdata/fsp.c:67:9: expected unsigned int hdata/fsp.c:67:9: got restricted beint16_t const [usertype] hw_version hdata/fsp.c:68:9: warning: incorrect type in initializer (different base types) hdata/fsp.c:68:9: expected unsigned int hdata/fsp.c:68:9: got restricted beint16_t const [usertype] sw_version hdata/fsp.c:103:46: warning: incorrect type in argument 1 (different base types) hdata/fsp.c:103:46: expected unsigned int [unsigned] [usertype] proc_chip_id hdata/fsp.c:103:46: got restricted beint32_t const [usertype] proc_chip_id Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-07-10fsp_create_node(): Fix resource leakKamalesh Babulal1-2/+4
Fix memory leak by free-ing 'links'. Also, fix trailing white spaces. Fixes Coverity defect#98816. Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-11-18Remove useless global include memory.hBenjamin Herrenschmidt1-1/+0
It only exposed one function that is local to the hdat stuff Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-10-15Reduce severity of hdata/fsp.c log messages (mostly to PR_DEBUG)Stewart Smith1-7/+8
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-07-02Initial commit of Open Source releaseBenjamin Herrenschmidt1-0/+200
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>