From patchwork Mon Feb 3 18:09:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 11363167 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6DAAB13A4 for ; Mon, 3 Feb 2020 18:11:46 +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 44AC220838 for ; Mon, 3 Feb 2020 18:11:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rIzUlwSx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 44AC220838 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:45510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iygCH-00053V-Ge for patchwork-qemu-devel@patchwork.kernel.org; Mon, 03 Feb 2020 13:11:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44947) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyg9s-0001QU-Qk for qemu-devel@nongnu.org; Mon, 03 Feb 2020 13:09:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyg9r-0004K1-TN for qemu-devel@nongnu.org; Mon, 03 Feb 2020 13:09:16 -0500 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:33026) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iyg9p-00042J-LZ; Mon, 03 Feb 2020 13:09:13 -0500 Received: by mail-pg1-x541.google.com with SMTP id 6so8246560pgk.0; Mon, 03 Feb 2020 10:09:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=etoHwdNyoSRutm5MdnEpD2P8ySOBKOPV8Ax17Ri7UPA=; b=rIzUlwSx2cU9kTKSnSzkf/21PjTuERz6i0hT7ZLCiLODznauFpKYy8BXOCofpfctH/ 1D5aM91f+pt6xWAwHzqVckWSU+EypB9pqUAfRzLFXUX7Bcct44ym1CPqMuqS52BHtMym EF8YDBclpRtYKLtK+hkjwRxEYDMZ/kytOIDx5FSwoOlWZpT/mxh4trjf5lthlagS9xVi yWNA/roMAU8ZC3CKTTZ9YeRsCxnb8xYoC216ATprYQxVqZQkLecNKzCiPNutmP2nHZXV QfVoJvq1ftfRQFlCu3zG5e+MpfO3CTR2yq2VMF05m6x2z8WgZWnq6tnJ8suEgIgTKjlI 4/Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=etoHwdNyoSRutm5MdnEpD2P8ySOBKOPV8Ax17Ri7UPA=; b=gytas3wdBMtMYxYp2s4PqlZyoH44rFZzkY0fanEP36EY9a3kCgQNAgOZRSh1g0dJHU x/XRzb7vUh7coQyQ/s34xuPLIXyG8nysfbkfweZs4XTmD01rfQXLjCRinrVbBHLCub/S pbQI+EuCmqo/eOt5skkWAMyD2SU4imEfarl6eeAVQXN5HbJEIqwmAFgDhExvGp/hCYYz 8j2jaRl0OEw79T0C0LAax4qogAHwT47owevKLNV2hUWKyFK/yB/uYnxcKSIXxVYxqngG 49fHjKbpD0FGC5+ECLvJrE884ma4BXod5YS2twqCBkne3V0DFQe1O6VfOmMZtlJJTuYO Y5VQ== X-Gm-Message-State: APjAAAXm+ilX2O5K78KVAp2w+oRFWv3UQdopFWwwVqRFOFT1uH4bCQpp b2zsT1trOrpKDkyXOHHbyag= X-Google-Smtp-Source: APXvYqw1z9IvsrNpF/Ovy/W2pLZpyTZAyBf0dUVByblVqFbrME4fkfrMfzf5xGqwxK08fWcqmEQQAw== X-Received: by 2002:a62:4d87:: with SMTP id a129mr25624154pfb.116.1580753349506; Mon, 03 Feb 2020 10:09:09 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id 10sm21451759pfu.132.2020.02.03.10.09.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Feb 2020 10:09:08 -0800 (PST) From: Guenter Roeck To: Alistair Francis Subject: [PATCH 3/3] aspeed/smc: Fix number of dummy cycles for FAST_READ_4 command Date: Mon, 3 Feb 2020 10:09:04 -0800 Message-Id: <20200203180904.2727-3-linux@roeck-us.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200203180904.2727-1-linux@roeck-us.net> References: <20200203180904.2727-1-linux@roeck-us.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::541 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 , Peter Maydell , qemu-block@nongnu.org, Andrew Jeffery , qemu-devel@nongnu.org, Max Reitz , qemu-arm@nongnu.org, =?utf-8?q?C=C3=A9dric_Le_Goater?= , Guenter Roeck , Joel Stanley Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Linux kernel recently started using FAST_READ_4 commands. This results in flash read failures. At the same time, the m25p80 emulation is seen to read 8 more bytes than expected. Adjusting the expected number of dummy cycles to match FAST_READ fixes the problem. Signed-off-by: Guenter Roeck Reviewed-by: Cédric Le Goater --- hw/ssi/aspeed_smc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index f0c7bbbad3..61e8fa57d3 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -762,11 +762,11 @@ static int aspeed_smc_num_dummies(uint8_t command) case FAST_READ: case DOR: case QOR: + case FAST_READ_4: case DOR_4: case QOR_4: return 1; case DIOR: - case FAST_READ_4: case DIOR_4: return 2; case QIOR: