From patchwork Mon Oct 14 16:03:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 176297 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4741287ill; Mon, 14 Oct 2019 09:37:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcQhzzXc56YcLiJjtFixsT4hkMD3Jp+Ei756bWHEfGnALCdyC1eCuNDbJdnRrQBejHdTTT X-Received: by 2002:a17:906:7e17:: with SMTP id e23mr22221089ejr.205.1571071047192; Mon, 14 Oct 2019 09:37:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571071047; cv=none; d=google.com; s=arc-20160816; b=s0gGvuumsO+9oVGLKDJIio26GPkqVTfGKNskryLaQbnrJHEuIB46gN7V4XuZJ3nol3 2wJdUWU9kzV6Q0cPp8oOjo2nJHu7Rd3R1PYz0yqmaXWdaI8KKcR3uz2yQZi52izm3Rsc 9Nb203i1xXYbDhcyVbkgsdbrvR1YDGD2JgiASvGt6V2bbY1/s7xRedozHy7PaswZbAsv lQbGrUc/+/Kin7n8lN7sy+G+10O9nNiE1Yl2HjhslnBkRfkYVUGg3hVjGCHuIac93q5x g+iFYXWz9ajEZ85Ifon3eTsGw8TwEqtFTPyal0yk2b1noQKmVOmRC0r+DxH3wuZMKWTx BZ+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=IPPpRDvS1khlTKhQXpsP8betxpNnecGFCTfAvZZmBYI=; b=x8j9R24yQoPxIw8uj2UZEMb1ZGbCgOskCG0c+atRiI+n0ACCnbMY2XPSgfZ+LLX6GN R75B+mIxhBFdiOqRAPCtcMu+4fb4E54nxkgdt5qVljRGnojesq+QfVEcKqsf8q9Zwo4a +37cBbzQXOMTKlBtob+kx4voC+PLjm3elljb/YttSuJKf1YR7jgb0927PGX07zaHp4PF nAAgNKaDWjs4d1e7EHnswnQDLSlDywO8J5xj+9KmGbRHPjfE5d6P08GOd7Fxua4uN+Li O3jJOPVFlyf3QSEqtuZ8tQM3utC4v2B67pjMtuv4btqGMELUbZWQZ2tRxDhrPH86vbi9 l05Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l2X4mcWi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e21si11075628ejd.118.2019.10.14.09.37.27 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Oct 2019 09:37:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l2X4mcWi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iK3LZ-0003RB-HF for patch@linaro.org; Mon, 14 Oct 2019 12:37:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37226) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iK2qS-0004j7-Vs for qemu-devel@nongnu.org; Mon, 14 Oct 2019 12:05:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iK2qR-0007vc-SH for qemu-devel@nongnu.org; Mon, 14 Oct 2019 12:05:16 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:54977) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iK2qR-0007ub-MA for qemu-devel@nongnu.org; Mon, 14 Oct 2019 12:05:15 -0400 Received: by mail-wm1-x330.google.com with SMTP id p7so17868212wmp.4 for ; Mon, 14 Oct 2019 09:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=IPPpRDvS1khlTKhQXpsP8betxpNnecGFCTfAvZZmBYI=; b=l2X4mcWiQwjJTESJQHgOwNf2zaN90pCzSndilgEohpgxa8rRca0IFuTfQqHaXl9+k0 pVFWTBB+5JQGE/5GckgitcniQsWk3aJ/3nghEXWqVXxEyQ8qUi5kSuUg1/hwRqejiE3Q pYmtauaLMr2FhPsxdSzdkGwI+XQ7Fl26Jt0vajhQTS9KIN3O2LoqMGw8xMXWxPpwmOmL aPuVcuNVw9fAUWz9gVrafzH6XXbdqwYff3tyuheboIarr5lYMfjQBxjNvcmIr1jCW3I0 oX6DN1UPYnw1W3B0vtW2UcTXjvA22Yw6jP7xDHKVQwir/g2VNSnClAEQC4rGq0iqIvMJ ks+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IPPpRDvS1khlTKhQXpsP8betxpNnecGFCTfAvZZmBYI=; b=UHP73vbtKKlEaQlVLGK7YjW0mtUjldAWSE0jbqwKL78mYg8S5xpXiJX7YfcyusYxpn CD1t7Zw8r2x8fqxF2easiK922tsi0W/BN5pb58de5CopCoe5DdZrWquPw+xjaR0vnWz3 nV6P28SnSs6sqP7OLQg7Mz+/xDVO4xLzHbVFfEKbJI0QnrsKSP9WPM8EY6vAsnSPzZiG OyXDk7g+o4bcsQ2/EHe6xuTviBVrEqW0JpN9GdW/hZlwOgPejpPgRemrb64am21QAXlc OFBrQ9UXxehx9AjsqEPjwi8GGSm+VVdOQRDpy+77eSFBYiVD3ZAfT6CdSwwelojsPvFE 037g== X-Gm-Message-State: APjAAAVWnt1QD4Nk2RzFt2hUYazZT2Wv69dPPgipJKDbPfM7BmcuI4u8 Ey8fRexogEVzr7y/wyeHKHACNLR2x+UGig== X-Received: by 2002:a05:600c:2201:: with SMTP id z1mr16076270wml.169.1571069113709; Mon, 14 Oct 2019 09:05:13 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id 5sm18029779wrk.86.2019.10.14.09.05.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2019 09:05:12 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 40/68] aspeed/wdt: Check correct register for clock source Date: Mon, 14 Oct 2019 17:03:36 +0100 Message-Id: <20191014160404.19553-41-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191014160404.19553-1-peter.maydell@linaro.org> References: <20191014160404.19553-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::330 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Amithash Prasad When WDT_RESTART is written, the data is not the contents of the WDT_CTRL register. Hence ensure we are looking at WDT_CTRL to check if bit WDT_CTRL_1MHZ_CLK is set or not. Signed-off-by: Amithash Prasad Reviewed-by: Joel Stanley Signed-off-by: Cédric Le Goater Message-id: 20190925143248.10000-2-clg@kaod.org [clg: improved Suject prefix ] Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley Signed-off-by: Cédric Le Goater Signed-off-by: Peter Maydell --- hw/watchdog/wdt_aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/hw/watchdog/wdt_aspeed.c b/hw/watchdog/wdt_aspeed.c index 9b932134172..f710036535d 100644 --- a/hw/watchdog/wdt_aspeed.c +++ b/hw/watchdog/wdt_aspeed.c @@ -140,7 +140,7 @@ static void aspeed_wdt_write(void *opaque, hwaddr offset, uint64_t data, case WDT_RESTART: if ((data & 0xFFFF) == WDT_RESTART_MAGIC) { s->regs[WDT_STATUS] = s->regs[WDT_RELOAD_VALUE]; - aspeed_wdt_reload(s, !(data & WDT_CTRL_1MHZ_CLK)); + aspeed_wdt_reload(s, !(s->regs[WDT_CTRL] & WDT_CTRL_1MHZ_CLK)); } break; case WDT_CTRL: