From patchwork Fri Jul 22 16:09:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2229 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 0FBD23F047 for ; Fri, 22 Jul 2022 18:11:08 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id q16-20020a056402519000b0043bd73ad1basf570358edd.3 for ; Fri, 22 Jul 2022 09:11:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658506267; cv=pass; d=google.com; s=arc-20160816; b=CTIBC0Up7HOOjYrM6JYQzVcepRT8/nIbgsE56ZjbOFsS/ig8FRkOdJHIO252TluWoH +Yx4ssmucldjXWSFIeiV2/QNy/iDf4GNlK0oT1X7eD9McNtiEY/KmphoGASY2SPQAhrs PyDBJjVvM3KHPmchEcgbm+L5OlSowxI10N0qsgvKTBzoZtsZ4/8B8bj0SkfbLsaKwY0D u5cZLIaLgwscCXOJ1yvVBPtb0KFklhRTGv1uTJcAHdD0AS8Gu68kQ1Q+sKXv/VaH1VTW xyMovJqz10DRxxMDpduh5/tmIhOrubqB1pk3pwdBBcbOnzNdkQ6JD8+Lj0uknp5xeb9L thbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=vrP06u5LC+p71VnEHWQ4/eBYExPub2AvsbFOYtjJIvc=; b=KITxdRCCRDvvesQGPmCmMEGPiEi9PYgmTprzXnOK6QlmvFDyM8PZzfI9JvQaXrqe3h FS44muX4mfQnJwup/Z5uL1bjpeGuNE8kJ/Kag6cfVo6xJxwwobeb6M76dxIO5x4Ai4bM MCjRClgbU0cd9mWtWrUtjp3hQVn5eSnG0zDDy8OCUg/7EJfgCnyiRBcp0ouDRBTuZAGo FSSRkSgihtBQ7OYDPVhB+chSYemygjjE6E4J0VzFEt4jUpOSaWJCZYioVIM06AsgNZRt yY1ttCBfqCxCP6T8wN72dfGXEG6WbkgHpU7xtgvFyrOipAr9gJcJa3FjyGwyzFGKPLw2 yiiQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LadKSPt4; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=vrP06u5LC+p71VnEHWQ4/eBYExPub2AvsbFOYtjJIvc=; b=LF0eUzMBxmbvcIvuF2W64I2Sges7n3zEw79ONIfKLU99F/uAxhQiWgdRaUuD19sea/ jbSHkGlxk33DwDs0QfxHanvIoqhXu5Tm8/w32jDD3sGenIng/hZffeu0wtYCc+tfgKZP 1Y7Z45d9cP3JWiG3JJPJTRRR4pwoFtoZw6qR4= 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 :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=vrP06u5LC+p71VnEHWQ4/eBYExPub2AvsbFOYtjJIvc=; b=NQw6xD5O1LCYrz399JoQdMr0SsuFRJhrEP0juicgQrJoxSnzpBOhq47zHIS3Aavzf6 8guJ6qQbLB5sG5iIhN2b2zAjURqomQWbbZmmO9dmC7i5iptPZ1jG4kzSxi3iK99MXwNo oOa8ZytuA7pMAKroAjNm+8abiRt3KYGZ+cZKbJsHmnbQXIqYpKX2QBUnk8KQQGiIiX0J X9kstKuG6JBFY3PRsPgJ1Km18f8tCh/4Fb/9HkZCHDOiin8nsRG5xXPWraS21drk0/qv T3mPWO99BJtP73a3WTABbO3hbzw0TwnDvsvtnY62fftl2efbvBem3+JtDlrbQZNtH69f +P8Q== X-Gm-Message-State: AJIora8lYuMZUeB1VJggTD2FA7L2aesEBpmjAeyC9/3Drizqh95GMz98 aTegF09l2zvollD0uMTk/jmWczGY X-Google-Smtp-Source: AGRyM1st9g5ojSenpz9xYAOPfQ62pUFHlbJqDOL8ghLFWiOX3a5n1OrdDhAej1gmFAL0KNkM6DOZOw== X-Received: by 2002:a05:6402:2816:b0:434:ed38:16f3 with SMTP id h22-20020a056402281600b00434ed3816f3mr626392ede.116.1658506267847; Fri, 22 Jul 2022 09:11:07 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:d8c8:b0:726:abf9:5f2e with SMTP id re8-20020a170906d8c800b00726abf95f2els3080496ejb.9.-pod-prod-gmail; Fri, 22 Jul 2022 09:11:06 -0700 (PDT) X-Received: by 2002:a17:907:87b0:b0:72f:11fc:86c1 with SMTP id qv48-20020a17090787b000b0072f11fc86c1mr471846ejc.449.1658506266718; Fri, 22 Jul 2022 09:11:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658506266; cv=none; d=google.com; s=arc-20160816; b=T9r2MuOPKuSvRYuAVoxk64TRUiK8csKZDrLM4kjzuqtXtOJ/1GpKqzvgkS5TLY7yCd xgsB6bM8M6iZJW0rgBKnmAxu9I24zwdNc5+8bY1ST6c6E/qoS+n4huxbX/KOrPlQMo09 hOZDsE2OVuTYREfuyBvD6kHg1r1MmWfdfrHo4CBIc9u6rOJLNdWWTWDZor4mvooufPTu KGWE0CQbidyZx6a6rec61qe7p526NzcsuTINhRkDAhTWOBxueRWgOLsBckJe1qp/ea1J +duCVsOVCWEGb/OHgEK5P8lNdD6yVVPrdFrv5jVZsPgT0Hz5D4xyAZq7GXB/867aWZib 5/5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=nXqlx/CWZGGO4dAE6mQW7KOHinAUMSC0J+tgYS5QhN8=; b=S6yKz/Zz8jlrkIBn1jASItRtAX05UNe/Ge5xeb9fQtPU6Etgun66MHnBh6l0pKRWsk ESMwXKdtMyB1tLcOnZT/6bzz7qNJZFAx25qvZpvicUBU3TdU4pPOlUZxdaAX4e4FhP0Z RDYGUQNtGsl/40LCLqxYOGFOW2TozjumcexOoVFr4OIjE7eUiLHXiVwqUd20Yuiloe0A o91nVP9jfxmoLTDqxIWSnEkZkY6PIZzuODeU6mSKOPa4EUTbpEqc3BQmZJ9IScGlm7lj 7Mh6GUq/nRvXYN/fYMHrDNgb8GEx3F1k1Fou2vQq25LxE9ZDiX9PwlMWAFLe/NWkapcC lzgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LadKSPt4; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id p22-20020a170906839600b0072af92fa08csor2153929ejx.73.2022.07.22.09.11.06 for (Google Transport Security); Fri, 22 Jul 2022 09:11:06 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:906:c152:b0:72f:3a21:7c35 with SMTP id dp18-20020a170906c15200b0072f3a217c35mr497298ejc.476.1658506266401; Fri, 22 Jul 2022 09:11:06 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-87-14-98-67.retail.telecomitalia.it. [87.14.98.67]) by smtp.gmail.com with ESMTPSA id d19-20020a170906305300b006fe8ac6bc69sm2174025ejd.140.2022.07.22.09.11.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jul 2022 09:11:05 -0700 (PDT) From: Dario Binacchi To: u-boot@lists.denx.de Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , GSS_MTK_Uboot_upstream , Patrice Chotard , Simon Glass , Weijie Gao , Wolfgang Denk Subject: [PATCH v4 00/14] Port manufacturer specific initialization Date: Fri, 22 Jul 2022 18:09:54 +0200 Message-Id: <20220722161009.2686504-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LadKSPt4; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In preparation of re-sync of mtd stack, we opt to move the current stack slowly in order to have a more easy sync and test. We would like to prepare uboot to support no-jedec and no-onfi compliant nand so we need to clean up a bit the code we have now and upstream some of the support. In this series we expect no functional change Tested on: - imx6ull Micron MT29F2G08ABAGAH4 - imx8mn Macronix MX30LF4G18AC Changes in v4: - Add the patch "mtd: nand: Fix MediaTek MT7621 SoC build" to the series. Changes in v3: - Use commit sha1 with 13 digits. - Use commit sha1 with 13 digits. - Fix code style warnings raised by patman. - Use commit sha1 with 13 digits. - Fix code style warnings raised by patman. - Fix code style warnings raised by patman. - Use commit sha1 with 13 digits. - Fix code style warnings raised by patman. - Add the SPDX-License-Identifier tag. - Use commit sha1 with 13 digits. - Add the SPDX-License-Identifier tag. - Fix code style warnings raised by patman. - Use commit sha1 with 13 digits. - Add the SPDX-License-Identifier tag. - Fix code style warnings raised by patman. - Use commit sha1 with 13 digits. - Add the SPDX-License-Identifier tag. - Fix code style warnings raised by patman. - Use commit sha1 with 13 digits. - Add the SPDX-License-Identifier tag. - Fix code style warnings raised by patman. - Use commit sha1 with 13 digits. - Add the SPDX-License-Identifier tag. - Fix code style warnings raised by patman. - Use commit sha1 with 13 digits. - Use commit sha1 with 13 digits. - Wrap commit description to a maximum of 75 chars. Changes in v2: - Use short-commit form. - Remove linux info. Uboot seems that backport without add this extra information. - Use short-commit form. - Remove linux info. Uboot seems that backport without add this extra information. - Use short-commit form. - Remove linux info. Uboot seems that backport without add this extra information. - Use short-commit form. - Remove linux info. Uboot seems that backport without add this extra information. - Adjust the include file in nand_samsung. - Use short-commit form - Remove linux info. Uboot seems that backport without add this extra information. - Adjust the include file in nand_hynix. - Use short-commit form - Remove linux info. Uboot seems that backport without add this extra information. - Adjust the include file in nand_toshiba. - Use short-commit form - Remove linux info. Uboot seems that backport without add this extra information. - Adjust the include file in nand_micron. - Use short-commit form - Remove linux info. Uboot seems that backport without add this extra information. - Adjust the include file in nand_amd. - Use short-commit form - Remove linux info. Uboot seems that backport without add this extra information. - Adjust the include file in nand_macronix. - Use short-commit form - Remove linux info. Uboot seems that backport without add this extra information. - Use short-commit form. - Remove linux info. Uboot seems that backport without add this extra information. Michael Trimarchi (14): mtd: nand: Get rid of busw parameter mtd: nand: Store nand ID in struct nand_chip mtd: nand: Add manufacturer specific initialization/detection steps mtd: nand: Get rid of mtd variable in function calls mtd: nand: Fix MediaTek MT7621 SoC build mtd: nand: Export symbol nand_decode_ext_id mtd: nand: Move Samsung specific init/detection logic in nand_samsung.c mtd: nand: Move Hynix specific init/detection logic in nand_hynix.c mtd: nand: Move Toshiba specific init/detection logic in nand_toshiba.c mtd: nand: Move Micron specific init logic in nand_micron.c mtd: nand: Move AMD/Spansion specific init/detection logic in nand_amd.c mtd: nand: Move Macronix specific initialization in nand_macronix.c mtd: nand: toshiba: Retrieve ECC requirements from extended ID mtd: decommission the NAND museum drivers/mtd/nand/raw/Makefile | 10 +- drivers/mtd/nand/raw/mt7621_nand.c | 2 +- drivers/mtd/nand/raw/nand_amd.c | 52 ++++ drivers/mtd/nand/raw/nand_base.c | 370 ++++++++++----------------- drivers/mtd/nand/raw/nand_hynix.c | 85 ++++++ drivers/mtd/nand/raw/nand_ids.c | 24 +- drivers/mtd/nand/raw/nand_macronix.c | 31 +++ drivers/mtd/nand/raw/nand_micron.c | 87 +++++++ drivers/mtd/nand/raw/nand_samsung.c | 90 +++++++ drivers/mtd/nand/raw/nand_toshiba.c | 79 ++++++ include/linux/mtd/rawnand.h | 78 ++++-- 11 files changed, 626 insertions(+), 282 deletions(-) create mode 100644 drivers/mtd/nand/raw/nand_amd.c create mode 100644 drivers/mtd/nand/raw/nand_hynix.c create mode 100644 drivers/mtd/nand/raw/nand_macronix.c create mode 100644 drivers/mtd/nand/raw/nand_micron.c create mode 100644 drivers/mtd/nand/raw/nand_samsung.c create mode 100644 drivers/mtd/nand/raw/nand_toshiba.c