From patchwork Mon Jul 4 12:18:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 9212493 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3478460752 for ; Mon, 4 Jul 2016 12:20:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25FB72843F for ; Mon, 4 Jul 2016 12:20:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1ADA4286E3; Mon, 4 Jul 2016 12:20:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AC7BF2843F for ; Mon, 4 Jul 2016 12:20:26 +0000 (UTC) Received: from localhost ([::1]:47155 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK2rR-00073C-Ok for patchwork-qemu-devel@patchwork.kernel.org; Mon, 04 Jul 2016 08:20:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42626) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK2qw-000719-PA for qemu-devel@nongnu.org; Mon, 04 Jul 2016 08:19:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bK2qs-0003lf-8p for qemu-devel@nongnu.org; Mon, 04 Jul 2016 08:19:54 -0400 Received: from 14.mo3.mail-out.ovh.net ([188.165.43.98]:59745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK2qs-0003lQ-2F for qemu-devel@nongnu.org; Mon, 04 Jul 2016 08:19:50 -0400 Received: from player761.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo3.mail-out.ovh.net (Postfix) with ESMTP id 351A3FFB08F for ; Mon, 4 Jul 2016 14:19:49 +0200 (CEST) Received: from hermes.kaod.org (LFbn-1-2234-107.w90-76.abo.wanadoo.fr [90.76.55.107]) (Authenticated sender: clg@kaod.org) by player761.ha.ovh.net (Postfix) with ESMTPSA id B2123480093; Mon, 4 Jul 2016 14:19:41 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Peter Maydell , Peter Crosthwaite Date: Mon, 4 Jul 2016 14:18:53 +0200 Message-Id: <1467634738-28642-3-git-send-email-clg@kaod.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1467634738-28642-1-git-send-email-clg@kaod.org> References: <1467634738-28642-1-git-send-email-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 6081266874834455313 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeltddrvddvgdegkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 188.165.43.98 Subject: [Qemu-devel] [PATCH 2/7] m25p80: add mx25l25635f chip X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jeffery , qemu-arm@nongnu.org, qemu-devel@nongnu.org, mar.krzeminski@gmail.com, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The Macronix chip mx25l25635f used on some OpenPower boxes is very similar to the mx25l25635e. They share the same JEDEC identifier but the WRSR instruction requires 2 bytes in the mx25l25635f case. To prevent some warnings on guests, let's introduce a new chip identifying JEDEC 0xc22019 as a MX25L25635F chip. Signed-off-by: Cédric Le Goater --- hw/block/m25p80.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index d9b27939dde6..aa964280beab 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -199,6 +199,7 @@ static const FlashPartInfo known_devices[] = { { INFO("mx25l12805d", 0xc22018, 0, 64 << 10, 256, 0) }, { INFO("mx25l12855e", 0xc22618, 0, 64 << 10, 256, 0) }, { INFO("mx25l25635e", 0xc22019, 0, 64 << 10, 512, 0) }, + { INFO("mx25l25635f", 0xc22019, 0, 64 << 10, 512, 0) }, { INFO("mx25l25655e", 0xc22619, 0, 64 << 10, 512, 0) }, { INFO("mx66u51235f", 0xc2253a, 0, 64 << 10, 1024, ER_4K | ER_32K) }, { INFO("mx66u1g45g", 0xc2253b, 0, 64 << 10, 2048, ER_4K | ER_32K) }, @@ -991,6 +992,9 @@ static void decode_new_cmd(Flash *s, uint32_t value) s->pos = 0; s->len = 0; s->state = STATE_COLLECTING_DATA; + if (!strcmp(s->pi->part_name, "mx25l25635f")) { + s->needed_bytes = 2; + } } break; case RNVCR: