Message ID | 20171124040509.13185-1-oohall@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | occ-sensors: Fix up quad/gpu location mixup | expand |
On 11/24/2017 09:35 AM, Oliver O'Halloran wrote: > The GPU and QUAD sensor location types are swapped compared to what > exists in the OCC code base which is authoritive. Fix them up. > > Signed-off-by: Oliver O'Halloran <oohall@gmail.com> > --- > hw/occ-sensor.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/hw/occ-sensor.c b/hw/occ-sensor.c > index 1042c11c8385..3854cc5baa34 100644 > --- a/hw/occ-sensor.c > +++ b/hw/occ-sensor.c > @@ -103,6 +103,11 @@ > #define OCC_SENSOR_DATA_BLOCK_OFFSET 0x00580000 > #define OCC_SENSOR_DATA_BLOCK_SIZE 0x00025800 > > +/* > + * These should match the definitions inside the OCC source: > + * occ/src/occ_405/sensor/sensor_info.c > + */ > + > enum occ_sensor_type { > OCC_SENSOR_TYPE_GENERIC = 0x0001, > OCC_SENSOR_TYPE_CURRENT = 0x0002, > @@ -123,8 +128,8 @@ enum occ_sensor_location { > OCC_SENSOR_LOC_VRM = 0x0010, > OCC_SENSOR_LOC_OCC = 0x0020, > OCC_SENSOR_LOC_CORE = 0x0040, > - OCC_SENSOR_LOC_QUAD = 0x0080, > - OCC_SENSOR_LOC_GPU = 0x0100, > + OCC_SENSOR_LOC_GPU = 0x0080, > + OCC_SENSOR_LOC_QUAD = 0x0100, > }; > > enum sensor_struct_type { > Thanks for the fix. Reviewed-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Oliver O'Halloran <oohall@gmail.com> writes: > The GPU and QUAD sensor location types are swapped compared to what > exists in the OCC code base which is authoritive. Fix them up. > > Signed-off-by: Oliver O'Halloran <oohall@gmail.com> > --- > hw/occ-sensor.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) Thanks, merged to master as of 260a11fbf3c773ad140aa3bf814c55d268be2123
diff --git a/hw/occ-sensor.c b/hw/occ-sensor.c index 1042c11c8385..3854cc5baa34 100644 --- a/hw/occ-sensor.c +++ b/hw/occ-sensor.c @@ -103,6 +103,11 @@ #define OCC_SENSOR_DATA_BLOCK_OFFSET 0x00580000 #define OCC_SENSOR_DATA_BLOCK_SIZE 0x00025800 +/* + * These should match the definitions inside the OCC source: + * occ/src/occ_405/sensor/sensor_info.c + */ + enum occ_sensor_type { OCC_SENSOR_TYPE_GENERIC = 0x0001, OCC_SENSOR_TYPE_CURRENT = 0x0002, @@ -123,8 +128,8 @@ enum occ_sensor_location { OCC_SENSOR_LOC_VRM = 0x0010, OCC_SENSOR_LOC_OCC = 0x0020, OCC_SENSOR_LOC_CORE = 0x0040, - OCC_SENSOR_LOC_QUAD = 0x0080, - OCC_SENSOR_LOC_GPU = 0x0100, + OCC_SENSOR_LOC_GPU = 0x0080, + OCC_SENSOR_LOC_QUAD = 0x0100, }; enum sensor_struct_type {
The GPU and QUAD sensor location types are swapped compared to what exists in the OCC code base which is authoritive. Fix them up. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> --- hw/occ-sensor.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)