diff options
author | Cédric Le Goater <clg@kaod.org> | 2016-09-13 19:39:22 +0200 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-12-08 13:03:23 +1100 |
commit | 33fada1a6f4b1f5fcf131765f37fcb76c079bfb2 (patch) | |
tree | 2b4f11fee2f8d812b77c22b21cdce7fce102e188 /hw/fsp | |
parent | aed1fbe848ec7dcfef5c2831ab779ae9c21b41f6 (diff) | |
download | skiboot-33fada1a6f4b1f5fcf131765f37fcb76c079bfb2.zip skiboot-33fada1a6f4b1f5fcf131765f37fcb76c079bfb2.tar.gz skiboot-33fada1a6f4b1f5fcf131765f37fcb76c079bfb2.tar.bz2 |
sensor: add a family field in the handler
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>
Diffstat (limited to 'hw/fsp')
-rw-r--r-- | hw/fsp/fsp-sensor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/fsp/fsp-sensor.c b/hw/fsp/fsp-sensor.c index 51ee872..0fa3115 100644 --- a/hw/fsp/fsp-sensor.c +++ b/hw/fsp/fsp-sensor.c @@ -617,7 +617,7 @@ static struct dt_node *sensor_get_node(struct dt_node *sensors, } #define sensor_handler(header, attr_num) \ - sensor_make_handler((header).frc, (header).rid, attr_num) + sensor_make_handler(SENSOR_FSP, (header).frc, (header).rid, attr_num) static int add_sensor_prs(struct dt_node *sensors, struct sensor_prs *prs) { |