aboutsummaryrefslogtreecommitdiff
path: root/hw/dts.c
AgeCommit message (Collapse)AuthorFilesLines
2019-07-26SPDX-ify all skiboot codeStewart Smith1-15/+2
Use Software Package Data Exchange (SPDX) to indicate license for each file that is unique to skiboot. At the same time, ensure the (C) who and years are correct. See https://spdx.org/ Signed-off-by: Stewart Smith <stewart@linux.ibm.com> [oliver: Added a few missing files] Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-06-04Remove POWER7 and POWER7+ supportStewart Smith1-64/+0
It's been a good long while since either OPAL POWER7 user touched a machine, and even longer since they'd have been okay using an old version rather than tracking master. There's also been no testing of OPAL on POWER7 systems for an awfully long time, so it's pretty safe to assume that it's very much bitrotted. It also saves a whole 14kb of xz compressed payload space. Signed-off-by: Stewart Smith <stewart@linux.ibm.com> Enthusiasticly-Acked-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-03-27dts: Zero struct to avoid using uninitialised valueCyril Bur1-2/+2
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-03-14dts: spl_wakeup: Remove all workarounds in the spl wakeup logicShilpasri G Bhat1-29/+1
We coded few workarounds in special wakeup logic to handle the buggy firmware. Now that is fixed remove them as they break the special wakeup protocol. As per the spec we should not de-assert beofre assert is complete. So follow this protocol. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Reviewed-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Tested-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-21sensors: Support reading u64 sensor valuesShilpasri G Bhat1-4/+5
This patch adds support to read u64 sensor values. This also adds changes to the core and the backend implementation code to make this API as the base call. Host can use this new API to read sensors upto 64bits. This adds a list to store the pointer to the kernel u32 buffer, for older kernels making async sensor u32 reads. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-11-30sensors: Fix dtc warning for dts sensors.Pridhiviraj Paidipeddi1-0/+2
dtc complains about missing reg property when a DT node is having a unit name or address but no reg property. Example warning for core dts sensor: /ibm,opal/sensors/core-temp@5c has a unit name, but no reg property /ibm,opal/sensors/core-temp@804 has a unit name, but no reg property This patch fixes this by adding necessary properties. Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> [stewart: use handle as register rather than chip id] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-11-20hw/dts: retry special wakeup operation if core still gatedRobert Lippert1-1/+29
It has been observed that in some cases the special wakeup operation can "succeed" but the core is still in a gated/offline state. Check for this state after attempting to wakeup a core and retry the wakeup if necessary. Change-Id: Ia6b1b75dcab590c299bed3ee0a42031f09c39eda Signed-off-by: Robert Lippert <rlippert@google.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-11-20sensors: dts: Assert special wakeup on idle cores while reading temperatureShilpasri G Bhat1-13/+61
In P9, when a core enters a stop state, its clocks will be stopped to save power and hence we will not be able to perform a scom operation to read the DTS temperature sensor. Hence, assert a special wakeup on cores that have entered a stop state in order to successfully complete the scom operation. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> [rlippert@google.com: Clear special wakeup only when it succeeds] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16dts: add support for p9 coresCédric Le Goater1-0/+44
P9 cores have two DTS (the location unit is unknown to me for the moment) which have the same encoding than on the P8. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16dts: introduce a dts_keep_max() routineCédric Le Goater1-14/+19
This routine will also be used for reading the p9 core DTS and it saves a couple of lines in skiboot. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-16dts: remove unused definesCédric Le Goater1-17/+6
Also move the definitions closer to the code using them. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-01-16dts: Don't assert when we don't know the processor typeBenjamin Herrenschmidt1-1/+1
Return an error instead Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-08sensor: add a family field in the handlerCédric Le Goater1-3/+3
Currently, we are hijacking the last bit of the resource field of the sensor handler to differentiate the sensor families and route the opal_sensor_read() call to the appropriate component. Let's reserve the last 3bits and provide an API to set the sensor family for current use and future use. This gives us a maximum of 8 families and 32 resource classes. The FSP uses 15, so we should be fine for a while. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-03-08dts: add helper routines to build sensor handlersCédric Le Goater1-22/+32
Sensors are identified using a 32-bit handler in which are embedded a ressource class/family, a resource identifier and a resource attribute. This patch provides a couple of routines to build core and memory buffer (Centaur) sensors. It makes the code a little cleaner and prepares ground for new sensor families. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-04-30dts: add support for p7Cédric Le Goater1-1/+79
This patch exposes the DTS of the P7 cores. For this, it simply uses the dts/sensor framework included in OPAL for P8. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-24dts: add memory buffers temperature sensorsCédric Le Goater1-0/+96
The memory buffer chips (Centaur) have DTS very similar to the ones we find on the cores. Only available on open power machines for the moment. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-24dts: add some extra properties to improve the driverCédric Le Goater1-0/+2
This patch adds a couple of properties in the device tree for the core temperatures nodes. It helps the Linux driver to identify the core and have a "pretty" sensors output, something like the following : Core 8: +46.0°C Core 16: +47.0°C Core 24: +45.0°C ... Core 112: +42.0°C Core 120: +44.0°C Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-24dts: add a type propertyCédric Le Goater1-0/+1
The hwmon framework in Linux needs a type for the sensors it exposes in userspace through the sysfs interface. This patch gives Linux a hand on what is dealing with when parsing the sensor device tree. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-24dts: add a status propertyCédric Le Goater1-0/+9
The Linux driver should use this property to reflect the status as a hwmon *_alarm or *_fault attribute. The temperature sensors trip bits are currently always set, so we brutaly assign the value to nil until we know why. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-24dts: add device tree nodes for the core temperaturesCédric Le Goater1-0/+36
This patch simply adds sensors nodes for the core temperatures. It uses the core PIR as a resource identifier to fit in the sensor model. The device tree nodes use the new layout. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-24dts: add support to read the core temperaturesCédric Le Goater1-0/+165
This patch adds a new sensor family for Digital Temperature Sensors and a new resource class to capture the core temperatures. Each core has four DTS located in different zones (LSU, ISU, FXU, L3). The max of the four temperatures is computed and returned for the core as well as a global trip point value. This is based on the meltbox tool. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>