Received: from eggs.gnu.org ([208.118.235.92]:48195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TcrIb-0005Gv-4K for qemu-devel@nongnu.org; Mon, 26 Nov 2012 00:32:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TcrIa-0006oo-0K for qemu-devel@nongnu.org; Mon, 26 Nov 2012 00:32:05 -0500 Received: from mail-pb0-f45.google.com ([209.85.160.45]:39944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TcrIZ-0006oX-QI for qemu-devel@nongnu.org; Mon, 26 Nov 2012 00:32:03 -0500 Received: by mail-pb0-f45.google.com with SMTP id mc8so7352880pbc.4 for ; Sun, 25 Nov 2012 21:32:02 -0800 (PST) Date: Mon, 26 Nov 2012 13:31:53 +0800 From: walimis Message-ID: <20121126053153.GA3127@walimis-DELL> References: <1353794593-6147-1-git-send-email-sw@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1353794593-6147-1-git-send-email-sw@weilnetz.de> Subject: Re: [Qemu-devel] [PATCH for 1.3] pflash_cfi01: Suppress warning when Linux probes for AMD flash List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Blue Swirl , Peter Maydell , Anthony Liguori , qemu-devel@nongnu.org On Sat, Nov 24, 2012 at 11:03:13PM +0100, Stefan Weil wrote: >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) Hi Stefan, I ever submited a similar patch to mailing list: http://patchwork.ozlabs.org/patch/147886/ Do you have a look at that patch to see whether it's sane for the different parts between mine and yours? Thanks, Liming Wang > >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; >-- >1.7.10.4 > >