From nobody Tue Nov 4 21:57:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530815282081454.1193496164075; Thu, 5 Jul 2018 11:28:02 -0700 (PDT) Received: from localhost ([::1]:54310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb8z3-0001o7-8E for importer@patchew.org; Thu, 05 Jul 2018 14:28:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb8rp-0004UK-9r for qemu-devel@nongnu.org; Thu, 05 Jul 2018 14:20:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fb8rn-0006Gv-U0 for qemu-devel@nongnu.org; Thu, 05 Jul 2018 14:20:32 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:43483) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fb8rn-0006GX-N7 for qemu-devel@nongnu.org; Thu, 05 Jul 2018 14:20:31 -0400 Received: by mail-pf0-x242.google.com with SMTP id y8-v6so6130019pfm.10 for ; Thu, 05 Jul 2018 11:20:31 -0700 (PDT) Received: from localhost.localdomain (c-73-158-53-43.hsd1.ca.comcast.net. [73.158.53.43]) by smtp.gmail.com with ESMTPSA id g75-v6sm14170847pfg.145.2018.07.05.11.20.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jul 2018 11:20:29 -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:in-reply-to:references; bh=92rTzz9Cp+yG3kMGnE5mbS8rBmHQIAvIpLTlNT8bNEM=; b=rikPfNrU2TDslUb16y13fP6w1g/fYQZfNUPP7b2ozUGeaz4N7E+trf2w1hoc4vBzQL tY5k02hHm3wwAAdEswtSlM5vO3POJaw/NCh6kSQK9poloiz1iQ4M+MdmOmnwxCYuN+R1 YcDgierTad0pOWERnx50Ych39piO2G9/C+82MyjIRmRNxwLvS5x6vluUqyz4P73KeINz eyTOM3TZfbC23spd1BEgN/uB62/uQgR7UPqS3iBCV2xNPliXXeAuv7ky6ub1qZcF71Rq n9taOoaLXhIMpYvYlZ8chJBuzI2lANy+KMbp77Zz+njn+/lwfnn+e9WTxOCIKWLzDSFg mZ2w== 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:in-reply-to :references; bh=92rTzz9Cp+yG3kMGnE5mbS8rBmHQIAvIpLTlNT8bNEM=; b=hzbbS5GTZx0D04q2ptPrA/pVHiYRBqmF81l9mOQkv7xUdLJE1fRn1UCJVFCnnFJhfj h3Gde4DnduTzchtxvSfWlpHg4xJ4PQN6u3hb7BvT/z9eUw8YzDQaAWj6E7ap+VpXFxhG TuLcpG/3l/Llf1v3+qgzjJCh5+NQxSu0s9alvcvk5HanKMqPSepXcKbHmgfbNzXzSw17 yFp01H80/KLlZO+ithKn3JYbGX6kHudDCPLg3bvks07fFx8BwrAScq1bhhNyATJPCiWL dg/G+vVnDH6hyDQobqFqHAuaBjBGqGpqjhJ/Yl2gqUWCLJiqUdCrslj5eCjCPGMqZq1S 3Ssw== X-Gm-Message-State: APt69E2TqWJSS8MLHFybSOt+K/1sJJe6xUd1ElMy9pFTRIp9KU4bPrg7 EET3FEg7At+4E+wIacYsfoI= X-Google-Smtp-Source: AAOMgpfCy7Pz5KdhAhMg9Wm3Ku09ceIih+vS0E/PcPZhgJZZhL6fFZuVOI7i/Bs35s5xJ2bC5Zp1GQ== X-Received: by 2002:a65:64c6:: with SMTP id t6-v6mr6607145pgv.223.1530814830715; Thu, 05 Jul 2018 11:20:30 -0700 (PDT) From: Michael Davidsaver To: Peter Maydell , Paolo Bonzini Date: Thu, 5 Jul 2018 11:19:57 -0700 Message-Id: <20180705182001.16537-11-mdavidsaver@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180705182001.16537-1-mdavidsaver@gmail.com> References: <20180705182001.16537-1-mdavidsaver@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::242 Subject: [Qemu-devel] [PATCH 10/14] timer: ds1338 remove vestige of un-modeled OSF X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Antoine Mathys , Thomas Huth , Michael Davidsaver , qemu-devel@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Oscillator stop has never been modeled, so the Oscillator Stop Flag can never be set. Signed-off-by: Michael Davidsaver Reviewed-by: David Gibson --- hw/timer/ds-rtc.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/hw/timer/ds-rtc.c b/hw/timer/ds-rtc.c index 3c5781d53c..126566ce1f 100644 --- a/hw/timer/ds-rtc.c +++ b/hw/timer/ds-rtc.c @@ -21,8 +21,6 @@ */ #define NVRAM_SIZE 64 =20 -#define CTRL_OSF 0x20 - #define TYPE_DSRTC "ds1338" #define DSRTC(obj) OBJECT_CHECK(DSRTCState, (obj), TYPE_DSRTC) =20 @@ -216,13 +214,11 @@ static int dsrtc_send(I2CSlave *i2c, uint8_t data) if (s->ptr =3D=3D R_CTRL) { /* Control register. */ =20 - /* Ensure bits 2, 3 and 6 will read back as zero. */ - data &=3D 0xB3; - - /* Attempting to write the OSF flag to logic 1 leaves the - value unchanged. */ - data =3D (data & ~CTRL_OSF) | (data & s->nvram[s->ptr] & CTRL_OSF); - + /* Allow guest to set no-op controls for clock out pin and + * rate select. Ignore write 1 to clear OSF. We don't model + * oscillator stop, so it is never set. + */ + data =3D data & 0x93; } s->nvram[s->ptr] =3D data; if (s->ptr <=3D R_YEAR) { --=20 2.11.0