From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FB56C63777 for ; Thu, 3 Dec 2020 08:39:10 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A326621D91 for ; Thu, 3 Dec 2020 08:39:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A326621D91 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkk8q-0004CX-Ca for qemu-devel@archiver.kernel.org; Thu, 03 Dec 2020 03:39:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkk7q-0003EZ-S6; Thu, 03 Dec 2020 03:38:06 -0500 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]:41582) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kkk7p-0003hY-6t; Thu, 03 Dec 2020 03:38:06 -0500 Received: by mail-lf1-x142.google.com with SMTP id r24so1514118lfm.8; Thu, 03 Dec 2020 00:38:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GbGBKwDDT959OToYXEGOgBUEct9NSyrRenpQR/BPLDk=; b=H43LG5mWn9NDtKWRgSiPrNSX04AabvBbfJXNw60nuylU0e+DwcpG57LSJlDy4l/fiq VvZ45iYNr1P4vEJSBmNW7R28IQeJ4Ul1VhxB3vCXRn/eWqwq2o+rq1wB1jWcaBMChAGP RY7XUEspc5n4qJ0RPHQu2vU+lrzZgvQ+cMsFy8BwYXtTrEuFNB0pmhLXIVwWYad3WSWI NVIB1Fbui/41U8QvZZyinss9/mF936rpASb7y13y5c3jlyY3mAFpzm2m+Jjl/fBZwFQE 1ffA2knzzcAaQklUKqTLGZEqt1Q1tqDIrdRUb/dr/mZncLx1JU2OhoyY+9tKu3Nmli5h 84Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GbGBKwDDT959OToYXEGOgBUEct9NSyrRenpQR/BPLDk=; b=ceKhLLmG1n/oFHtxvdDajXI6fBL57OEQzKY7l13WnC5t0mQCSDp3BjoVOO43ExjXIh JJVQDj1KqoU0N5sEXsujNCYCHpWPP+m8K7xrE9QXQEYnCvbE1sUcvsXEvHPFmLyzg7VY TRgnmAaxPDPdXWt/pIZcvulQfFH+nM5+hpEpkqLP3XzDYweCR09RwUg5EOtXuLVyteIr MzFseTqDvTXZlNTLvc5yOJ5xKArmthf4Qz5haNjas5YQqzV/wCctwBTxRVFK7o5+HJZU JuQupMQbBxSusDJJdo82nVqy937w3+kjsRPJ8NtPRkfZgwvA7jcNwMsY0XdQRDdjAuwx tErw== X-Gm-Message-State: AOAM533IRGpGp8CP9x9vdXu5dYT2BDWFtflXmTQj+0p5aKNMVWQ30nve cXr5DkvC3A/0ApKQx8easT0= X-Google-Smtp-Source: ABdhPJw1zmKJsBHHJQP8LjYYujjD9GdvQ4TvsFLKVYL8DcqdY1yntCcrFrcnHbd8TV6gZFdEXS208w== X-Received: by 2002:a19:f243:: with SMTP id d3mr833988lfk.534.1606984682796; Thu, 03 Dec 2020 00:38:02 -0800 (PST) Received: from fralle-msi (31-208-27-151.cust.bredband2.com. [31.208.27.151]) by smtp.gmail.com with ESMTPSA id x24sm257121lfc.303.2020.12.03.00.38.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2020 00:38:02 -0800 (PST) Date: Thu, 3 Dec 2020 09:38:00 +0100 From: Francisco Iglesias To: Alistair Francis , Bin Meng Subject: Re: [PATCH] hw/block: m25p80: Fix fast read for SST flashes Message-ID: <20201203083759.GA2661@fralle-msi> References: <1606704602-59435-1-git-send-email-bmeng.cn@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Received-SPF: pass client-ip=2a00:1450:4864:20::142; envelope-from=frasse.iglesias@gmail.com; helo=mail-lf1-x142.google.com X-Spam_score_int: -1020 X-Spam_score: -102.1 X-Spam_bar: --------------------------------------------------- X-Spam_report: (-102.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_WELCOMELIST=-0.01, USER_IN_WHITELIST=-100 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Kevin Wolf , Alistair Francis , Qemu-block , Bin Meng , "qemu-devel@nongnu.org Developers" , Max Reitz Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hi Bin and Alistair, On [2020 Dec 02] Wed 11:40:11, Alistair Francis wrote: > On Sun, Nov 29, 2020 at 6:55 PM Bin Meng wrote: > > > > From: Bin Meng > > > > SST flashes require a dummy byte after the address bits. > > > > Signed-off-by: Bin Meng > > I couldn't find a datasheet that says this... But the actual code > change looks fine, so: > > Acked-by: Alistair Francis > > Alistair > > > --- > > > > hw/block/m25p80.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c > > index 483925f..9b36762 100644 > > --- a/hw/block/m25p80.c > > +++ b/hw/block/m25p80.c > > @@ -825,6 +825,9 @@ static void decode_fast_read_cmd(Flash *s) > > s->needed_bytes = get_addr_length(s); > > switch (get_man(s)) { > > /* Dummy cycles - modeled with bytes writes instead of bits */ > > + case MAN_SST: > > + s->needed_bytes += 1; 1 dummy clk cycle is modelled as 1 byte write (see the comment above), so 1 dummy byte (8 dummy clk cycles) will need +8 above. An option could be to fall through to the Windbond case below instead (since it seems to operate likewise). Best regards, Francisco Iglesias > > + break; > > case MAN_WINBOND: > > s->needed_bytes += 8; > > break; > > -- > > 2.7.4 > > > > >