From patchwork Thu Jul 26 10:39:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 949585 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41bpWj36gQz9ryl for ; Thu, 26 Jul 2018 20:40:01 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="iGaZJ4cR"; 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 41bpWj0PF2zF0h9 for ; Thu, 26 Jul 2018 20:40:01 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com 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="iGaZJ4cR"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c01::244; helo=mail-pl0-x244.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="iGaZJ4cR"; dkim-atps=neutral Received: from mail-pl0-x244.google.com (mail-pl0-x244.google.com [IPv6:2607:f8b0:400e:c01::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 41bpWY6nKNzDqnG for ; Thu, 26 Jul 2018 20:39:53 +1000 (AEST) Received: by mail-pl0-x244.google.com with SMTP id b1-v6so652065pls.5 for ; Thu, 26 Jul 2018 03:39:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=0ZNyabtb++eyDedo9fRnCZO5Bs9AtyQfQ4o2jzArWbA=; b=iGaZJ4cRaNM6EORezxHD8eHiEYgD/Ep9rnVfJ/9Nl+tjBgLbFHP6LCUU6r89J4h1Yw CzjpKBcigvu/4RoBPsu4Okv25Esj8Go/mN281TeLcZgfRgGoOOjzRyljCzZ44mLoP5RN jPALfM/orvuScKjMFpPUF/TylqQpFb0rmbLwVRHXqUDEWIKpGLyzmbLdZmpzRo/BN8e+ EsBAL5WoI/aSVT0WHJj0WVxyk6Skp4Amc11U3P41Rc40tbT7MAuiRNOiVykLwlM1hspW U/PMXZhY36Fp11A7bH1FnY5fwPcPu7kquIQY8V2KXID1HLrvMyGL9lBvdx2hFqW9z+ZD w8AQ== 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=0ZNyabtb++eyDedo9fRnCZO5Bs9AtyQfQ4o2jzArWbA=; b=aPtJIdswMJLL1gsAP6SAcVZQR7LBHSmhjF3rwCZAONWYxqStVEhLWcYRHp6TTK/VHd XqqeYlZVPUEs74xEphGAPXVe7AREruKpvKPUreilaJdDczQzEytxj1S0bb0R2BQqtlbn qVqESbLsBgCsh6//f4dCbOu20+kYPCZUX+gHk1/nGE0wJ7vRY8+vPagoccApv9qggkSG wltiqFMKzyS51gkuU3urSBT6u4burg8oBARvd26lBvOOcsjFK+jOLtfBQqGpxuQefLEm igxMnGOLKsTGOmIf9jO/Hlg4gps8dmEtN7aHtdt/vWqimCHXUg6EbNmrFd8440leuVit RVcw== X-Gm-Message-State: AOUpUlHPMfyF2sjKM1B4f/G+1fO99uiDcE8zvwi57Ll2HWl3tXs2cYo2 Q6Pbwrj6V6yWHl+ek4MoVK+devl6 X-Google-Smtp-Source: AAOMgpefMYZKBwNpcN2EyvG3/urE8EzkPbRT0VX+35DEqQqKthGbFqGGlP+TpcYtKEyYWTyGe+BoxA== X-Received: by 2002:a17:902:5a3:: with SMTP id f32-v6mr1450841plf.286.1532601591513; Thu, 26 Jul 2018 03:39:51 -0700 (PDT) Received: from roar.au.ibm.com ([61.69.188.107]) by smtp.gmail.com with ESMTPSA id o72-v6sm1981887pfk.76.2018.07.26.03.39.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 03:39:50 -0700 (PDT) From: Nicholas Piggin To: pdbg@lists.ozlabs.org Date: Thu, 26 Jul 2018 20:39:42 +1000 Message-Id: <20180726103942.28347-1-npiggin@gmail.com> X-Mailer: git-send-email 2.17.0 Subject: [Pdbg] [PATCH] libpdbg/p9chip: use SPWKUP_FSP instead of SPWKUP_OTR X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dean Sanner , Nicholas Piggin MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Dean Sanner notes that pdbg should not use the OTR special wakeup register, as it is used by the PM complex (i.e., SGPE, CME, PGPE). It should use the FSP register instead, which is reserved for service processor firmware, and nothing else in OpenBMC uses this at the moment. In theory when pdbg is used via the host, it should be using the HYP register via some OPAL arbitration mechanism (OPAL being the owner of the HYP register), but in the absence of any of that mechanism, FSP is the best option. Signed-off-by: Nicholas Piggin --- libpdbg/p9chip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c index c5de3bb..3a7ff8a 100644 --- a/libpdbg/p9chip.c +++ b/libpdbg/p9chip.c @@ -71,7 +71,7 @@ #define NET_CTRL0_FENCE_EN PPC_BIT(18) #define NET_CTRL0_WOR 0xf0042 #define PPM_GPMMR 0xf0100 -#define PPM_SPWKUP_OTR 0xf010a +#define PPM_SPWKUP_FSP 0xf010b #define PPM_SSHOTR 0xf0113 #define SPECIAL_WKUP_DONE PPC_BIT(1) @@ -468,7 +468,7 @@ static int p9_core_probe(struct pdbg_target *target) if (!(value & NET_CTRL0_CHIPLET_ENABLE)) return -1; - CHECK_ERR(pib_write(target, PPM_SPWKUP_OTR, PPC_BIT(0))); + CHECK_ERR(pib_write(target, PPM_SPWKUP_FSP, PPC_BIT(0))); do { usleep(1000); CHECK_ERR(pib_read(target, PPM_SSHOTR, &value)); @@ -486,7 +486,7 @@ static int p9_core_probe(struct pdbg_target *target) static void p9_core_release(struct pdbg_target *target) { usleep(1); /* enforce small delay before and after it is cleared */ - pib_write(target, PPM_SPWKUP_OTR, 0); + pib_write(target, PPM_SPWKUP_FSP, 0); usleep(10000); }