From patchwork Sat Nov 24 22:03:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 201478 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 457F52C0090 for ; Sun, 25 Nov 2012 09:03:54 +1100 (EST) Received: from localhost ([::1]:33606 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TcNpI-0005AY-MQ for incoming@patchwork.ozlabs.org; Sat, 24 Nov 2012 17:03:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TcNpB-0005AI-07 for qemu-devel@nongnu.org; Sat, 24 Nov 2012 17:03:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TcNp9-0004A3-U3 for qemu-devel@nongnu.org; Sat, 24 Nov 2012 17:03:44 -0500 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:42102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TcNp9-00049x-NZ for qemu-devel@nongnu.org; Sat, 24 Nov 2012 17:03:43 -0500 Received: from localhost (v220110690675601.yourvserver.net.local [127.0.0.1]) by v220110690675601.yourvserver.net (Postfix) with ESMTP id 89A11728003A; Sat, 24 Nov 2012 23:03:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at weilnetz.de Received: from v220110690675601.yourvserver.net ([127.0.0.1]) by localhost (v220110690675601.yourvserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LRKBE3W-hY30; Sat, 24 Nov 2012 23:03:41 +0100 (CET) Received: by v220110690675601.yourvserver.net (Postfix, from userid 1000) id 090FB728003F; Sat, 24 Nov 2012 23:03:41 +0100 (CET) From: Stefan Weil To: Anthony Liguori Date: Sat, 24 Nov 2012 23:03:13 +0100 Message-Id: <1353794593-6147-1-git-send-email-sw@weilnetz.de> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 78.47.199.172 Cc: Blue Swirl , Peter Maydell , qemu-devel@nongnu.org, Stefan Weil Subject: [Qemu-devel] [PATCH for 1.3] pflash_cfi01: Suppress warning when Linux probes for AMD flash X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org There are several ARM and MIPS boards which are manufactured with either Intel (pflash_cfi01.c) or AMD (pflash_cfi02.c) flash memory. The Linux kernel supports both and first probes for AMD flash which resulted in one or two warnings from the Intel flash emulation: pflash_write: Unimplemented flash cmd sequence (offset 0000000000000000, wcycle 0x0 cmd 0x0 value 0xf000f0) pflash_write: Unimplemented flash cmd sequence (offset 0000000000000000, wcycle 0x0 cmd 0x0 value 0xf0) These warnings confuse users, so suppress them. Signed-off-by: Stefan Weil --- This is strictly speaking not a bug fix, but it fixes a warning which confuses QEMU users since a long time (see previous mails on qemu-devel and bug report). It is also safe. Therefore I think it can be applied to 1.3. Regards Stefan hw/pflash_cfi01.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c index 7d040b5..a4dbe19 100644 --- a/hw/pflash_cfi01.c +++ b/hw/pflash_cfi01.c @@ -319,6 +319,9 @@ static void pflash_write(pflash_t *pfl, hwaddr offset, DPRINTF("%s: Write to buffer\n", __func__); pfl->status |= 0x80; /* Ready! */ break; + case 0xf0: /* Probe for AMD flash */ + DPRINTF("%s: Probe for AMD flash\n", __func__); + goto reset_flash; case 0xff: /* Read array mode */ DPRINTF("%s: Read array mode\n", __func__); goto reset_flash;