From nobody Mon Feb 9 01:16:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1562036145; cv=none; d=zoho.com; s=zohoarc; b=FqSUOO7/eTgdJJYKePuVtCHKuV6w4XVqGY7pi/x4HaMo/be7VpWp5pJc42CDiTU6zZWu3K2Ekg3wdh1VlNytqynyzW1CiHqAf5TyZz3lCygTIidSnTtgpGeUB+AiWZhn3Qv5UOekJBwRuOx7oIKKEMs0RcAAjGEJSUS9nrkG/8s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562036145; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=PnM61XSHG9eIeTIBTJjrZhb9tTx3ZD6bCAkyqh9eb/4=; b=fR6UT32K3MWRDtACqOt0ZUDDZTk9MJMwq8Ijv54D5iMPlgmWHOPSuVmUgaoBEd0OvI988jocsCPDsTw2fad8ndMWcw/RfpBxtRTyOmx+W2Mj2lUMAfqg2pSxxke5zbNRGHiWNV1Tdru+3eArAw/iHpS+Z9auo53VaFPeV4jF3xs= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1562036145326379.6723164069912; Mon, 1 Jul 2019 19:55:45 -0700 (PDT) Received: from localhost ([::1]:47628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hi8xJ-00015k-5D for importer@patchew.org; Mon, 01 Jul 2019 22:55:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53815) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hi6US-0001pY-9R for qemu-devel@nongnu.org; Mon, 01 Jul 2019 20:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hi6TW-0007gY-Md for qemu-devel@nongnu.org; Mon, 01 Jul 2019 20:16:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44544) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hi6Sc-0007I1-34; Mon, 01 Jul 2019 20:15:50 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F3E2C30860DE; Tue, 2 Jul 2019 00:15:48 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-21.brq.redhat.com [10.40.204.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E552A1001943; Tue, 2 Jul 2019 00:15:28 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Tue, 2 Jul 2019 02:12:59 +0200 Message-Id: <20190702001301.4768-8-philmd@redhat.com> In-Reply-To: <20190702001301.4768-1-philmd@redhat.com> References: <20190702001301.4768-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 02 Jul 2019 00:15:49 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 7/9] hw/block/pflash_cfi01: Improve command comments 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: , Cc: Peter Maydell , "Michael S. Tsirkin" , Max Filippov , Gerd Hoffmann , "Edgar E. Iglesias" , qemu-block@nongnu.org, Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Markus Armbruster , Laszlo Ersek , David Gibson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , qemu-arm@nongnu.org, Alistair Francis , John Snow , Richard Henderson , Kevin Wolf , Max Reitz , Michael Walle , qemu-ppc@nongnu.org, Wei Yang , Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/block/pflash_cfi01.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index c1b02219b2..f50d0a9d37 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -208,11 +208,11 @@ static uint32_t pflash_devid_query(PFlashCFI01 *pfl, = hwaddr offset) * Offsets 2/3 are block lock status, is not emulated. */ switch (boff & 0xFF) { - case 0: + case 0: /* Manufacturer ID */ resp =3D pfl->ident0; trace_pflash_manufacturer_id(resp); break; - case 1: + case 1: /* Device ID */ resp =3D pfl->ident1; trace_pflash_device_id(resp); break; @@ -456,11 +456,11 @@ static void pflash_write(PFlashCFI01 *pfl, hwaddr off= set, case 0: /* read mode */ switch (cmd) { - case 0x10: /* Single Byte Program */ - case 0x40: /* Single Byte Program */ + case 0x10: /* Single Byte Program (setup) */ + case 0x40: /* Single Byte Program (setup) [Intel] */ DPRINTF("%s: Single Byte Program\n", __func__); break; - case 0x20: /* Block erase */ + case 0x20: /* Block erase (setup) */ p =3D pfl->storage; offset &=3D ~(pfl->sector_len - 1); =20 @@ -516,8 +516,8 @@ static void pflash_write(PFlashCFI01 *pfl, hwaddr offse= t, break; case 1: switch (pfl->cmd) { - case 0x10: /* Single Byte Program */ - case 0x40: /* Single Byte Program */ + case 0x10: /* Single Byte Program (confirm) */ + case 0x40: /* Single Byte Program (confirm) [Intel] */ DPRINTF("%s: Single Byte Program\n", __func__); if (!pfl->ro) { pflash_data_write(pfl, offset, value, width, be); @@ -528,7 +528,7 @@ static void pflash_write(PFlashCFI01 *pfl, hwaddr offse= t, pfl->status |=3D 0x80; /* Ready! */ pfl->wcycle =3D 0; break; - case 0x20: /* Block erase */ + case 0x20: /* Block erase (confirm) */ case 0x28: if (cmd =3D=3D 0xd0) { /* confirm */ pfl->wcycle =3D 0; --=20 2.20.1