From patchwork Fri Nov 24 04:05:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 840947 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yjjK821M7z9s3w for ; Fri, 24 Nov 2017 15:05:32 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="X84//q00"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3yjjK74Kl4zDrbC for ; Fri, 24 Nov 2017 15:05:31 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="X84//q00"; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c00::244; helo=mail-pf0-x244.google.com; envelope-from=oohall@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="X84//q00"; dkim-atps=neutral Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3yjjK12607zDrb4 for ; Fri, 24 Nov 2017 15:05:24 +1100 (AEDT) Received: by mail-pf0-x244.google.com with SMTP id q4so14256208pfg.13 for ; Thu, 23 Nov 2017 20:05:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=RTYlQDOnCifrkDZW8ntQ1gWzvFQfL974Q7CFb0L4K2I=; b=X84//q008Eyl5SPYRE+lTma+Mne8rkU1fw80o+JesRCiZEg/z5Yia77lkVA+SwuAsC uJZY5KtwO1DrPDRTOfkVsfoT9AsbupRkePnx+ogtc5VAifwwUa/HUrhbr85pRDxFL4HK G/FU4RK2GEK77c6GxKKxvHdoQSyo8dpIPVCjmo1RASU/5ZAuLYFFLT2T4zbQWIk1Te7E dzSNiIlD0jOjNv+M03cH65Vmi9/QhKPk0gIJev7wzOqbD3Iri3UsoQoXYI1oaTj5s4oX Uw0cgJae7NpQqU2P7Z9B8VRBnzea0d2sCBXN5aY0K72dQ25VGEOS4HErnDrOFD7cX6Dv Gdww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RTYlQDOnCifrkDZW8ntQ1gWzvFQfL974Q7CFb0L4K2I=; b=ogplbqIbukhZYxHiS3iAn79s1Huu0H+iD3nu8Tx6fG0qrH0kUfn6qOLsVBObJ8rx1o HbMIowMjF64gipIZy7+kfhAqR7wP7ibChQYXf+KfGZ5HnKnqctQHzkWub5xOfz+mZIKs RShvS64Bh1V8Kk9qVE5xmWDvFgJ4l3iCdH0yi2aemjUAE6PSieFXoZQFzm+3VbIPy64w RZPIarfpt/MtoMPhtWWasXIpTs9828NPkboJoRKCVbogTX3X/q6Y0/m5n3s4pnmdIgvr fRykxeMstRAkd/zd4y7f8DBa7/RCmmX/BJzh7QWUwEM+nVcEugKLlIpAA1p5lk8r1/wt HBNw== X-Gm-Message-State: AJaThX5j1lrLu7zQbNDmpetwl6j3UE/zuETwFJQzUi22NU30Qt+hIqw0 3EPYzX18i00BK74q5q325ibH5w== X-Google-Smtp-Source: AGs4zMaVOBhPXtjPiUUmoy4c+zORziQMEZKQRcFivHJ7pO1ATt67gVpQG27Qmt2fctNjcG85taZM6Q== X-Received: by 10.99.56.74 with SMTP id h10mr26435026pgn.311.1511496322051; Thu, 23 Nov 2017 20:05:22 -0800 (PST) Received: from flat-canetoad.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id q22sm28801606pfj.94.2017.11.23.20.05.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Nov 2017 20:05:21 -0800 (PST) From: Oliver O'Halloran To: skiboot@lists.ozlabs.org Date: Fri, 24 Nov 2017 15:05:09 +1100 Message-Id: <20171124040509.13185-1-oohall@gmail.com> X-Mailer: git-send-email 2.9.5 Subject: [Skiboot] [PATCH] occ-sensors: Fix up quad/gpu location mixup X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" 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 Reviewed-by: Shilpasri G Bhat --- 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 {