From patchwork Thu Jul 21 06:44:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2215 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 9A4B244190 for ; Thu, 21 Jul 2022 08:44:51 +0200 (CEST) Received: by mail-wm1-f69.google.com with SMTP id n18-20020a05600c501200b003a050cc39a0sf570486wmr.7 for ; Wed, 20 Jul 2022 23:44:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658385891; cv=pass; d=google.com; s=arc-20160816; b=CAaieQCit+gjdTPV1naaTb4gXx4EyCOJcf7aRZ+aK8MVi585DUPOn702hfany4b6R+ U+j4bJWmV3IzSy9APN/MEi3T5T1fzhntA7NbrxC4Waq1CKWNqLcO70/xoH3y4qeS0HHR V5paiLpVyqsnQzMtJ+mf5jRvVvH9Ozl1QZ58YwuKdeMfwD82VKtXMbW4JVg0I+iuH2uX NPf1rcjQZ3M41v3iibjXZO1INoEa9rRcN0BU+i8iZg0G0s6B9/L/DheOkb5z0X91rc0E M45HCFkwHK7rQJbMXMUrJAUoME+CgGUZ92hykDXS7PqvMYXE4gVO1nJfvlBFUeNuYOGC uMnw== 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=413VKTyu07b8b/hvDQxUVRIHBm5ONAGUkMgCpI3YFxc=; b=sCrMWZIJ9zi7SlZZiLIo1P/slUH/pP+vS0hnKGCQroySxePRf7eom34nDK6v+3bICP RfpY9SJtw4PREU7jQr6NUES2z+aykQaEDUKlgT++nho2Sz2IP0pG48drADlwhl7XjnX+ gltKbJxiqHB4vniaK2X5aC0YvnGKP8kV6ospZ7+nBPq0ml/KMiyLHDPr12q9S5Ku9lBi 8BkjZYXJ7WALAt+9GO+t+ElfrBmyi9vFOQeOMwci6uW/1/MFEROkuYmzh1m1WvTeFeID vEdziouhGXocdqt2mhEqe4GJ6VAeoFOqIO8tg1w/TdI7t9+fyA+LhJAdX5aGXcamd+VC twYA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HxcX0GXN; 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=413VKTyu07b8b/hvDQxUVRIHBm5ONAGUkMgCpI3YFxc=; b=RoBa5IaTqa3HFAAa5yb9OVJA1EBOyL7NDOrSuTsuf4MeDz0KoKOdH3SGOEp5avnAHC ZgJwGT6jLPJ4IwycZQTUe+alYDWNjW3b4tizkgQB2/ch7oKJ3aCiU+JCQm6+WTvNNDVk v5cn8EigN4KLZpqMEtMV/VtaAgqmforcH3krc= 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=413VKTyu07b8b/hvDQxUVRIHBm5ONAGUkMgCpI3YFxc=; b=ExXN6OqsyEKmPn+mXQsvYdLV1O0xIFdnXuOVc4rum6ukEL2GIHz5ZTmH3scIs7nw0g bjIIh6cbKJA7wyNlNvWTRzPfpdcTlqrgE6l3nSU0NOgPIb6WDN2WO3cyEBaVNW6TmGSV 94Lv6I1KHc+HxEe/uPIH5AJRZ0b5P/txSyikjYwI5yQjTKOiTNl3mR9tDTT85EAvF3bH 7chszTgrbPGWWFw2hyyJyzxK1XpyL+kuUt8V9JaJO+cQeWIEZGmsITEZFlhcUE3Zbd9r xGPtjd6T9/motFhLGUvOTKYvNCcEnCRJ+SYd1+n0zzKhWJqJT9xAv6dgUSOxNErOh/Pj t7XQ== X-Gm-Message-State: AJIora9JQ89CqyY75kNP0KjoWoJF6Wm9znZmSJhnJrXy9UMAW4fYRSQu noTXD0X/roaBspIOR4genu8dkUpn X-Google-Smtp-Source: AGRyM1tggx3R2L5pqS3HJyBl6j2EVFpOagIHmdaNJusLNTZjoBf9YBajmG+iVBOhUn5UMh3VWZrgXg== X-Received: by 2002:a05:600c:a188:b0:3a3:1802:e327 with SMTP id id8-20020a05600ca18800b003a31802e327mr6916399wmb.41.1658385891163; Wed, 20 Jul 2022 23:44:51 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:d209:0:b0:21e:53a1:af5d with SMTP id j9-20020adfd209000000b0021e53a1af5dls243455wrh.3.-pod-prod-gmail; Wed, 20 Jul 2022 23:44:50 -0700 (PDT) X-Received: by 2002:a5d:595f:0:b0:21d:78fd:70d6 with SMTP id e31-20020a5d595f000000b0021d78fd70d6mr33123391wri.402.1658385890106; Wed, 20 Jul 2022 23:44:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658385890; cv=none; d=google.com; s=arc-20160816; b=XdVXcPfqJHRT24XD4r5evWPxFxEKSuIGCD+hSM2rOz4JsB2kL35REq0M+4+8qxYcqx j73g3qaiPL3KBEn0Km/LoSdYlIggaNu2pSGaOl7orhj20BJjrdqbMlNMBTWJ/YWdlqQE PCnXH19xpQdxzMBUOJjE4MXtPkg76gMOOLuFQjuya0ke/7qrbLGbsMMkkOZuP7kLYFkA XaSRLZka2V/ai1f0c6FcNLnpnkyFvL+BOu1qp7wsr7cbljCb61VIlioEaJvGBmR0ovq9 9bjKf4dXCH+enK4k4t8dctB11WJJBb8IZoGuXaNqhdzCsHJnzWTF1OHFHRXdgZa1Imgq OXEA== 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=KL7X0nTsGzo6cGwvp3AlPnAdfaAqnx+PZih6yeCN6/o=; b=j7jt+hH5oV0Yu/nJ5cbZlDGPb2aNrgOrYaL3lttQnz+XBdIEuClVhR7pyeiFOUM48Y NSYeO/jpoiVhAlB0lKp/JWL7kBHbQcxuMEZQr8ONxkShuBXoDp5CEFu9d7jWXg8HIWEy OB4W3YNY6eLIV9RT6D7uIJPLSEX0F2OCUUATSzQ+KWRWmXbuNeeBRv35IoRw7v7RPI7K pufmunVXQQxq9AlXPM32CgIPEcm6+Dxusc7Pb4lV6bcK8TskVT8BPPpzTOBHJCFrwHXc HulOe+Glj4WTPrSzZPrSq/egqAxCzSB0HSWGNujBYrTlPLna7u973tU/l6xd5ugEj8MA /hmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HxcX0GXN; 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 k2-20020a7bc402000000b003941bfcf81bsor1166642wmi.32.2022.07.20.23.44.50 for (Google Transport Security); Wed, 20 Jul 2022 23:44:50 -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:a05:600c:6009:b0:3a3:1506:f60f with SMTP id az9-20020a05600c600900b003a31506f60fmr6733911wmb.144.1658385889652; Wed, 20 Jul 2022 23:44:49 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (mob-5-90-140-42.net.vodafone.it. [5.90.140.42]) by smtp.gmail.com with ESMTPSA id c18-20020a056000105200b0021e4f446d43sm903711wrx.58.2022.07.20.23.44.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 23:44:48 -0700 (PDT) From: Dario Binacchi To: u-boot@lists.denx.de Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Patrice Chotard , Simon Glass , Wolfgang Denk Subject: [PATCH v3 00/13] Port manufacturer specific initialization Date: Thu, 21 Jul 2022 08:44:22 +0200 Message-Id: <20220721064435.2456601-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=HxcX0GXN; 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 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 (13): 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: 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/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 ++++-- 10 files changed, 625 insertions(+), 281 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