From patchwork Sun Apr 15 20:31:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 898316 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JkrEUKBk"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40PNTs30NWz9s06 for ; Mon, 16 Apr 2018 06:31:59 +1000 (AEST) Received: from localhost ([::1]:41083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f7oJW-00089d-LT for incoming@patchwork.ozlabs.org; Sun, 15 Apr 2018 16:31:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f7oIy-00088h-IC for qemu-devel@nongnu.org; Sun, 15 Apr 2018 16:31:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f7oIu-0001Ps-JX for qemu-devel@nongnu.org; Sun, 15 Apr 2018 16:31:20 -0400 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:33656) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f7oIu-0001Oh-Fy; Sun, 15 Apr 2018 16:31:16 -0400 Received: by mail-qk0-x241.google.com with SMTP id d206so14533332qkb.0; Sun, 15 Apr 2018 13:31:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+1ohr4bEvUmIeXOx6WIsu/FNT/1ucdsQfhl4GFMBGwA=; b=JkrEUKBkrirMzrzRnY0mvyyfl1zszLUBLcl/R7WlmTRP82NhJ/t/jZ4Z/r6xnpJifI 2XtLSohrvK9bCne2pmOX7Ud25NKg70nHENjqVIUlrcznK18BWYBvF/SBYTeIW6kKC+DD DEqwBS7sp3MY9QwaijISXIafJDRzLoOhm2Id8MqqFzNafEX9RRhNZpFZCZTAElauIwC9 9DYLItOIjkRVDAeQ5aatEAEfaK09d+kxQbEL/L320AUJQgn8IwsO92/jpcfY/kGBFr5r 6QERZqjE2ly+UVzCLcXu7mvPr2KucU5QQvXGwBl7iBlqkNANQGYN0FPxx+YFr/E/QJ9R 8nMw== 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 :mime-version:content-transfer-encoding; bh=+1ohr4bEvUmIeXOx6WIsu/FNT/1ucdsQfhl4GFMBGwA=; b=X7y0maE/PgKDq7ojyP4jMf3/EJ+fs7qEpaTav3EZ/DLw9OGqWTZE5V4vO1mdqjIaG9 VRHRc0WvHFmiQ41JGOjRXuyC8yfWmdskK3u6fAF/pKWIuL6hAB/Dpi+LvpzOzL3lI2nA drJkXUOiF5JxXpdkofYUR43N6F4Uka+FIo+OKznGnJ9azCZwjG1iVJF1MjRU9wezz6Py hUXjMgy8ZlkVFBbEP8JcsEarqvjYQNQrxe9PBzxUfMD5mGOXrSU202Vp8/zZfGLWaeQ+ GZRP7ZgMuCjUBlpwo1URTzV9nfxS9uxjEmMDiFK2m3PCXDElze8zg+O6ohQLCYlwI+7Q KSKg== X-Gm-Message-State: ALQs6tBSVzWqb+Eo1qxmfadR0Z4obeaAkv4y6rXeHrtKpL3Ekq+ZX/Jx wKXbiAM4n+tdinqNDX6b5sA= X-Google-Smtp-Source: AIpwx48yHTOHXIoy9KxZshdO9DGw7QtoU9jyyKwaFFZjwENXtpEMXGrZBem6z1O9x6y8Zx/UgkLTmg== X-Received: by 10.55.19.2 with SMTP id d2mr1555792qkh.258.1523824275830; Sun, 15 Apr 2018 13:31:15 -0700 (PDT) Received: from x1.local ([138.117.48.212]) by smtp.gmail.com with ESMTPSA id f30sm8368932qtg.63.2018.04.15.13.31.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Apr 2018 13:31:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: =?utf-8?q?Marcin_Krzemi=C5=84ski?= , Peter Crosthwaite , Alistair Francis , Kevin Wolf , Max Reitz Date: Sun, 15 Apr 2018 17:31:06 -0300 Message-Id: <20180415203106.24333-1-f4bug@amsat.org> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::241 Subject: [Qemu-devel] [PATCH for-2.12?] m25p80: Correct the at25128a/at25256a eeproms size 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: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From the datasheet (3368J–SEEPR) description: The AT25128A/256A provides 131,072/262,144 bits of serial electrically-erasable programmable read only memory (EEPROM) organized as 16,384/32,768 words of 8 bits each. However QEMU models the flash size in bytes. Correct the at25128a/at25256a entries to reflect the datasheet size. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marcin Krzeminski Reviewed-by: Alistair Francis --- This is not a regression, so can now wait for 2.13. hw/block/m25p80.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index b49c8e9caa..d0b9fbfc50 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -196,8 +196,8 @@ static const FlashPartInfo known_devices[] = { /* Atmel EEPROMS - it is assumed, that don't care bit in command * is set to 0. Block protection is not supported. */ - { INFO("at25128a-nonjedec", 0x0, 0, 1, 131072, EEPROM) }, - { INFO("at25256a-nonjedec", 0x0, 0, 1, 262144, EEPROM) }, + { INFO("at25128a-nonjedec", 0x0, 0, 1, 16384, EEPROM) }, + { INFO("at25256a-nonjedec", 0x0, 0, 1, 32768, EEPROM) }, /* EON -- en25xxx */ { INFO("en25f32", 0x1c3116, 0, 64 << 10, 64, ER_4K) },