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 X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BFFBC433F5 for ; Thu, 23 Sep 2021 13:33:09 +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 7204E61164 for ; Thu, 23 Sep 2021 13:33:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7204E61164 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 C42FF833BC; Thu, 23 Sep 2021 15:33:05 +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="lf/3Abjh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1AA71833BC; Thu, 23 Sep 2021 15:33:02 +0200 (CEST) Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) (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 8EC2283375 for ; Thu, 23 Sep 2021 15:32: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-ot1-x336.google.com with SMTP id x33-20020a9d37a4000000b0054733a85462so8480408otb.10 for ; Thu, 23 Sep 2021 06:32: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=KFNixMuq/qYzyn6ZfWMxD5FkeAhTpMtUAzlOum6YZhU=; b=lf/3Abjhua3yuABKBKkZf0YhonxpPt7WXw978NBSHgt+ZkTqcta7gyMigsmXYtVpSf PoLvTQmP1XJyadI/Y6GzKvPzq07HcEBvKRJTeO45ndzlGB8ig1hTVbarAR9crXL5wGYm aVcA016nQP/MjBCkugqglekvNsfvr9dMqSMSHNKS9PF2kHldtocA2oJqh51vMXUQ3Hzh Juk0G2pTGzXLugQ1e6jj283X5pPcEIV9QFBEhsAfgK1tqzPuNcGnFKGDGdfz/R0W+JbT lnfcM+VbcBUGCxsgC6T6kGywoA0e8/XBAd2VV4iVApQV8AFi2cSS5yJ06pHVabQxEIjs 055w== 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=KFNixMuq/qYzyn6ZfWMxD5FkeAhTpMtUAzlOum6YZhU=; b=I+QyZZwC37RUcb+J5OFy6pb6zYCcqLOSuGzhvxrFEHQl3Asyl5REe7gonv2urugPaS HcYOePl5LEXsNlEyn/f74e5kmeQIKegNfKwJSWpb8mGa1Q3f5vNCs7y0JfZ1shLtpwtI 8O9GKrCXnueqtsebPLqACEbaFyxtomeTYCUajCQaRcI5QPZqwp0QtfiHHy+P2k8heXJ+ PFD+gonEWPr58wuWOMhOlSk0iTgQlnnWfVmJ4WlqN6nM5wDDInbcMe2ujNlMdcrd/+hd dsWs5FAg18IPxgBTRH3AydpT1f0I4Frn9q2Q7fAKbc2JzG9+iA3vbnhstYEISDAv3tmr Ms1w== X-Gm-Message-State: AOAM532jSX4n+cA869sgVyHWq1ge9cF0FYMVssKrAdSFj06sxCED5xUr G4wMrg+9wMVhSIdtDzHAY99eoPgagL8= X-Google-Smtp-Source: ABdhPJzSLm/YZ4VKGkE3khZFq5h5DJtJXPnyiih4LObksZUwupSsApm+aRw8GjG76RnFBoSmOup9YA== X-Received: by 2002:a9d:3e54:: with SMTP id h20mr4291717otg.236.1632403976284; Thu, 23 Sep 2021 06:32:56 -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 s26sm1360103ooc.26.2021.09.23.06.32.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Sep 2021 06:32:55 -0700 (PDT) From: Chris Morgan To: u-boot@lists.denx.de Cc: miquel.raynal@bootlin.com, marek.behun@nic.cz, xypron.glpk@gmx.de, sjg@chromium.org, jagan@amarulasolutions.com, farhan.ali@broadcom.com, Chris Morgan Subject: [RFC v2 0/2] mtd: Support slc-mode for Toshiba TC58TEG5DCLTA00 Date: Thu, 23 Sep 2021 08:32:46 -0500 Message-Id: <20210923133248.7792-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 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 flash chip. I will likely need some help making sure this is consistent with the quality expected of upstream. 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 (3): mtd: Add support for Linux slc-mode for MLC NAND mtd: Add pairing info for Toshiba TC58TEG5DCLTA00 NAND NOT FOR UPSTREAM arch/arm/dts/sun5i-r8-chip.dts | 39 +++ drivers/mtd/mtdcore.c | 542 ++++++++++++++++++++++++------- drivers/mtd/mtdcore.h | 1 - drivers/mtd/mtdpart.c | 7 + drivers/mtd/nand/raw/nand_base.c | 59 ++++ 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, 742 insertions(+), 123 deletions(-) -- 2.30.2