Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3117708imu; Mon, 17 Dec 2018 13:41:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/W/UvG1dnRMfmBGyAPQB40Nr9L2/8Y03Oh0NjF9EvISWgiEF+T1TO4dOFSYLa9H+xTrt7aC X-Received: by 2002:a63:585c:: with SMTP id i28mr13689911pgm.178.1545082898071; Mon, 17 Dec 2018 13:41:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545082898; cv=none; d=google.com; s=arc-20160816; b=StuFe3ZHpLM6O+XJrxq7XjXMm9PCh+LXmfEzL6QIvbYJ44bXLdcQjcNJLC343g6sLN O9MqYGZgl5WwgIbDXhiVOwccgSTnvvJwRMhyvFvZ05CsUUsQkxdyYj9r/8U2FuEXLUuc 3WjbYlyhjybuNmDq5sQrjJjtV5T26W7up/XcSQeMsILKCf/LtNlcdZyHMj5oAOUGeSVY rGXLfkOlTQ3ndjLB+8Kf5m4vXPj7ct/euhLanRxVc8AvYxPBdw0eke8zU6hH+gWUmv5g cRpYqB0FJBVIw+0PdonGB9JJcm6R2vbUbWZj0+u3s2MDTVYlHVvOkwqFf81kzGapyQQD Wddg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=XopfwmDGBRIezikhqRfeyncW45sq0kVjwf3oyQkRgnw=; b=DbEX+9YkcRKkM2pZG1XAJmhPakbev/6QF4bK3Hr+8H8FRKHf3z3x4xgUEAm6bOM2oS EYB3S4RuTHwus76f3MxPcKRfMsaeiyjGVyvS62k1IjceO1aKAGJ9MZL+ciLM6AANjieo yP58WdcI+bZ9SvdEDFebALNosIPBqlIb8X4321XK3V+kgKsV4vjb17qQU9SXDSlbzNU3 6KsEcuHIT9mJVb483EYQkoQw7poYE89p77LUwxFvVxOyC4BX0mwwDuSepCb3uBGxVZ64 afa9U8wb7g0YoDCHReLjUm+QJp4SjCx7ez1ZyhJGTyNcSg0JfxA9MJyvHse994Sfgf8D 1I0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y2si11561237pli.266.2018.12.17.13.41.22; Mon, 17 Dec 2018 13:41:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387875AbeLQPtA convert rfc822-to-8bit (ORCPT + 99 others); Mon, 17 Dec 2018 10:49:00 -0500 Received: from skedge03.snt-world.com ([91.208.41.68]:41596 "EHLO skedge03.snt-world.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387609AbeLQPs7 (ORCPT ); Mon, 17 Dec 2018 10:48:59 -0500 Received: from sntmail12r.snt-is.com (unknown [10.203.32.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by skedge03.snt-world.com (Postfix) with ESMTPS id 8248867A867; Mon, 17 Dec 2018 16:48:56 +0100 (CET) Received: from sntmail12r.snt-is.com (10.203.32.182) by sntmail12r.snt-is.com (10.203.32.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1466.3; Mon, 17 Dec 2018 16:48:56 +0100 Received: from sntmail12r.snt-is.com ([fe80::e551:8750:7bba:3305]) by sntmail12r.snt-is.com ([fe80::e551:8750:7bba:3305%5]) with mapi id 15.01.1466.003; Mon, 17 Dec 2018 16:48:56 +0100 From: Schrempf Frieder To: "boris.brezillon@bootlin.com" , "miquel.raynal@bootlin.com" , "richard@nod.at" CC: "linux-mtd@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "Schrempf Frieder" Subject: [PATCH 0/3] mtd: rawnand: Support bad block markers in first, second or last page Thread-Topic: [PATCH 0/3] mtd: rawnand: Support bad block markers in first, second or last page Thread-Index: AQHUliAEJkxnuayTuEK0ie4z0SeQIw== Date: Mon, 17 Dec 2018 15:48:56 +0000 Message-ID: <1545061693-29216-1-git-send-email-frieder.schrempf@kontron.de> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.25.9.42] x-c2processedorg: 51b406b7-48a2-4d03-b652-521f56ac89f3 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-SnT-MailScanner-Information: Please contact the ISP for more information X-SnT-MailScanner-ID: 8248867A867.AB83D X-SnT-MailScanner: Found to be clean X-SnT-MailScanner-SpamCheck: X-SnT-MailScanner-From: frieder.schrempf@kontron.de X-SnT-MailScanner-To: boris.brezillon@bootlin.com, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, miquel.raynal@bootlin.com, richard@nod.at X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Frieder Schrempf Currently supported bad block marker positions within the block are: * in first page only * in last page only * in first or second page Some ESMT NANDs are known to have been shipped by the manufacturer with bad block markers in the first or last page, instead of the first or second page. Also the datasheets for Cypress/Spansion/AMD NANDs claim that the first, second *and* last page needs to be checked. Therefore we make it possible to set NAND_BBT_SCAN2NDPAGE and NAND_BBT_SCANLASTPAGE at the same time to scan/set all three pages. This series also contains patches for AMD/Spansion/Cypress and ESMT chips to enable both flags at the same time. Frieder Schrempf (3): mtd: rawnand: Support bad block markers in first, second or last page mtd: rawnand: ESMT: Also use the last page for bad block markers mtd: rawnand: AMD: Also use the last page for bad block markers drivers/mtd/nand/raw/internals.h | 1 + drivers/mtd/nand/raw/nand_amd.c | 8 +++- drivers/mtd/nand/raw/nand_base.c | 72 ++++++++++++++++++++++++++--------- drivers/mtd/nand/raw/nand_bbt.c | 30 +++++++-------- drivers/mtd/nand/raw/nand_esmt.c | 9 ++++- 5 files changed, 83 insertions(+), 37 deletions(-) -- 2.7.4