From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2679EC433F5 for ; Wed, 29 Sep 2021 15:10:16 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E2C661246 for ; Wed, 29 Sep 2021 15:10:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9E2C661246 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CF0BB82021; Wed, 29 Sep 2021 17:10:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SriA2yjb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EBC7880607; Wed, 29 Sep 2021 17:10:04 +0200 (CEST) Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 64A4F80F9D for ; Wed, 29 Sep 2021 17:09:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=macroalpha82@gmail.com Received: by mail-oi1-x236.google.com with SMTP id q16so3248355oiw.10 for ; Wed, 29 Sep 2021 08:09:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bYujtcnvLl6rRIWYZz9AcQWfGiXEDUKv5XwGuR1yS/k=; b=SriA2yjbIimEaE6WjIUiKMEAjvr6yPn4JMYIq6PJLcHaEvrq/V86fz4I/goEba9e0o Ayjme52dvwB7svNpHMO4u7moD49GjxWRSr0+KRIuwv021N/UFl4EPiiVYQUmdC2xSqR1 jdLZ4jLGIiFMQaYSNrvmbbRtqrjto+NBH6LJhnYqjFQcZ4t2gAnhyv7E5fuu/gZ4fDMg qtK8HUdc+uEcQmXV3fPTtsxrws6gFwmAoivT5a+lWskJ4r556prBR9RgbdJ2PLOTG3I8 /tpW85f+stn42BhfV6zOtWaJvrzjnrnLA/FtfkGGvXFjOUCRjGtDl6VU2oBbZRC15HJY 1cyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bYujtcnvLl6rRIWYZz9AcQWfGiXEDUKv5XwGuR1yS/k=; b=idh5AxMXbm9NlNqt7FI3/NcbwHVG7sWzBoR1kbe84o3kOBUk7tqI2BtwiQb2xSpuAB T0wh6Ox1a6r4eb074anHAA8P6sFyI070U9SLaFkeDdsrfdyfkz8/qK3kWavXfd9uiX9J MHhaiEVEgFFGgj6F8xfS1zarBrv1ThGsTWPWzQoLMJLpCCctgr4GU8QIiCCAyi/hLD7X BiA2j6f6nu11yTuNedmbNfTM7sOtjWvI7DMH6nOr75zrJnONsOwgem/QDsyd3x+Zc25I 7lh7849zZT9M/JfOiK/TpQNrAYkdzIL+sS71xHtOO8qU1EHC62YlbFDf1ER4OiXLEMUV X6eA== X-Gm-Message-State: AOAM530u92wiQnmCh4ud8NWu9ebAndP6k6aiIfAfOe5LVfvRx6Ejqw3c 4N16lXtAG/e7xobtxBkYG0rmBfRxdu0= X-Google-Smtp-Source: ABdhPJyT7Drwrd6LM6e4/f0fjAgFWun3tkXxeNOKJm/0hPo9UkXaIEHYTaFosMPa7w5RZ8gCbQw8vA== X-Received: by 2002:a05:6808:2003:: with SMTP id q3mr325477oiw.173.1632928195416; Wed, 29 Sep 2021 08:09:55 -0700 (PDT) Received: from wintermute.localdomain (cpe-76-183-134-35.tx.res.rr.com. [76.183.134.35]) by smtp.gmail.com with ESMTPSA id p21sm3647oip.28.2021.09.29.08.09.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Sep 2021 08:09:54 -0700 (PDT) From: Chris Morgan To: u-boot@lists.denx.de Cc: jagan@amarulasolutions.com, marek.behun@nic.cz, xypron.glpk@gmx.de, miquel.raynal@bootlin.com, sjg@chromium.org, patrice.chotard@foss.st.com, farhan.ali@broadcom.com, Chris Morgan Subject: [RFCv3 0/3] mtd: Support slc-mode for NTC CHIP Date: Wed, 29 Sep 2021 10:09:46 -0500 Message-Id: <20210929150949.198-1-macroalpha82@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean From: Chris Morgan Add support for slc-mode implemented in Linux for the Toshiba TC58TEG5DCLTA00 NAND and Hynix H27UCG8T2ETR NAND flash found on the NTC CHIP. This requires the addition of a paired-pages scheme, a new parameter for MTD partitions of slc-mode, and setting the correct paired-pages scheme for the TC58TEG5DCLTA00 and H27UCG8T2ETR flash chips. I will likely need some help making sure this is consistent with the quality expected of upstream. Changes since V2: - Copied upstream Linux implementation of mtd_erase to fix an issue with creating new ubi partitions. - Implemented paired page scheme and added support for Hynix flash chip. Based on a cursory reading of the datasheet it appears to use the same pairing scheme as the Toshiba chip. Changes since V1: - Updated mtd_read and mtd_write to match upstream Linux. - Additional mtd_get_master to match upstream Linux. - Removed notes about ubifs not working, because it is now. Signed-off-by: Chris Morgan Chris Morgan (4): mtd: Add support for Linux slc-mode for MLC NAND mtd: Add pairing info for Toshiba TC58TEG5DCLTA00 NAND mtd: Add pairing info for Hynix H27UCG8T2ETR NAND DO NOT UPSTREAM arch/arm/dts/sun5i-r8-chip.dts | 39 +++ drivers/mtd/mtdcore.c | 564 ++++++++++++++++++++++++------- drivers/mtd/mtdcore.h | 1 - drivers/mtd/mtdpart.c | 7 + drivers/mtd/nand/raw/nand_base.c | 67 ++++ include/configs/sunxi-common.h | 2 + include/linux/mtd/mtd.h | 190 ++++++++++- include/linux/mtd/partitions.h | 24 +- include/mtd/mtd-abi.h | 1 + 9 files changed, 770 insertions(+), 125 deletions(-) -- 2.30.2