From patchwork Thu Jul 14 14:02:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Nazzareno Trimarchi X-Patchwork-Id: 2154 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 99A2A3F013 for ; Thu, 14 Jul 2022 16:02:22 +0200 (CEST) Received: by mail-wm1-f69.google.com with SMTP id n21-20020a7bc5d5000000b003a2ff4d7a9bsf790742wmk.9 for ; Thu, 14 Jul 2022 07:02:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657807342; cv=pass; d=google.com; s=arc-20160816; b=cjX+L9jbws9OthP9t9qjLdJMM/EHMqPRlnFbENM2D/gRAJMnB3L24c6jwPheUlJBsU GVf813RztsTiuoP0YqS+vYNjFwISOwiY+o7QeaH4EDrYYvVwHZRtf9OtLyqG/tNozGtm Vk0cIHhkp4CoNw9AU0Sz/s9ROh8D/LdnsnJZLIKm9doI7XDVDAA/3ZDaDRM1Yik6NJda fJg2WlN0EsN4YEXO4RDOhCXIBxxMw8X4GvmPHN/EdU6oZ47k6iIpizm450br/25iTJnb YOsgpqphI+maW7ZpJsi0VDHdPGeN3pqL/3IHO/rgF2+tvD/69y6oxLOIYf6XKEt3Qd01 unbA== 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:to :from:dkim-signature; bh=Xjm4sI+aLdwKARoY2JJ7OiISDyy9g1f6wNKQq32oQ6A=; b=C3A8s8vK1D3S6sgokfcD2zJZ9pqyeaaIOsEI1QfHWt18OsnpzoijwtI6N0vW7OzNLD VXJtyzRIwV0DkxchqvExB7rl7cIFcSze8nBny9JMeae4fi0hKd5VlgruZpcTXKiUHq67 FxUWAfOFaRTV/O3MNNRI2jhIJBDRg762P9Sfe19iLCF+gjbKAw9Cq486RsDEu9cEFIxq GX0jxlbNeQ4CEYdIMJyGHv/6c0l7MSrZSecKasR4en6IhvVaGKZagD6abD23YwWZfyTK NjxbvybPyKBSRt/jpoY20W7BOLGnY3h9opo79VTbDzIbU1xosRNgy8mAjjpDK5DQ6qog 6hvg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kPGyaznR; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@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: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=Xjm4sI+aLdwKARoY2JJ7OiISDyy9g1f6wNKQq32oQ6A=; b=Ah2hPbMIMa+PGV33iELd7UGTMHBNQwtdYrjOXeQsjOb2HHCbyzrdVxE9pYGaSeTbjA o1nacNAz+oU0i80yPkw1f6jvqUHWPYbGI8ydha8RhZhb3jMPSilIyi49DCqUwMUijPw2 jWmAhPSmzL6Ixxudh5NjafKb6gWHZqf+8J6+M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to: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=Xjm4sI+aLdwKARoY2JJ7OiISDyy9g1f6wNKQq32oQ6A=; b=R9FMBzC18cM4TNFrg3j+rGW++nROFs/OCUFh5hXiHnGgrv+RaUOYycAFwwQv73O5+q QHXsyGqkKCw/+Xpc0Lknv/tEiIH4nyrOpVPUHNcs/y7k4LAJk1+Dfxym2mmmLWk4uD/I OOKIv820Xsd8tJN5RZKE5Wob6E7CzCn3wCmMVthF1S0L5E73h20mhAmtkCTfQT3xx1c4 GfCuuFZX7Kl0RwNnLNlde1KKJ3yZ1q0OaciL/rxEuABOD1yqArHpG4tfYBO7GoqhIPg6 wpPRVN1kyrBFdU/Mwt1a9MlVxKfYmGkWFQxUhoLs3hFJuUDB3Tbl/rx67OmExlawMsMO Bz0w== X-Gm-Message-State: AJIora+BXQlYRkB1XaKnee7SSzOdGhDqf/4pnj8L2UqcxLLY2y4kGRUF BB8taL9myZspZnXlVxnPDXAyJcQD X-Google-Smtp-Source: AGRyM1uApbh6Y2+SWHnlvTia4rR3kVHl4MQh6u38KJx3Tt3fh0IlsJ75JTJDas4c54/Gl9DOACYqMQ== X-Received: by 2002:a7b:c2aa:0:b0:39c:9039:e74b with SMTP id c10-20020a7bc2aa000000b0039c9039e74bmr15645774wmk.127.1657807342093; Thu, 14 Jul 2022 07:02:22 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6000:1849:b0:21d:9b2c:2273 with SMTP id c9-20020a056000184900b0021d9b2c2273ls109175wri.1.gmail; Thu, 14 Jul 2022 07:02:20 -0700 (PDT) X-Received: by 2002:a5d:648a:0:b0:21d:b684:9c76 with SMTP id o10-20020a5d648a000000b0021db6849c76mr8336557wri.463.1657807340697; Thu, 14 Jul 2022 07:02:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657807340; cv=none; d=google.com; s=arc-20160816; b=0w1Z1d5ajc7CD7R50f+Qqiy+ZA/elGeHdugkQ2dDi9b3/MWJhwofsHjtlVS6J2d9Qq Y8ATt0DNGjIaChabnkrIhxG22pUuRJGEc+fSXREpJ1u5GrkKRm9RXtEnwAGE70XBFbei nwW177SxamyIfIxGkIOIYVEizB/XG/NGc7cC80cqP81wRXmtqOyl0fE68XA37jmtF5LC Yivxsp7Jz0C0S3GQE69/2AVlpaRfsz6l6j2ghSh+QfgmsDn1zSxmMutJXswVxTfZVnMN QvMDf6ioDb6c9k50l7ky6zi12d57eQLGoZWi4LC77b7pgUBqUuotZ40Rq5wbnl845lxk leiw== 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:to :from:dkim-signature; bh=HBXefyhxTqCi/Yay08YtSNJaQwiE3zldMIMXriOFs/I=; b=QO8IQnEyY4UoH1/xY42PaIzkVKXb9BRRAKrX0VuvXnG1sxOl9wk2o9IMONNqrph9jI CZZXiOwq8rmTERw1G1lmzgBrx3w8CRonqmb11GDucatMZHZWKh5eN9tCVieGN/sURl94 poYNZ+EQj9lQOnVqW+w+hZCq06YxXkT4IXGuUjocaJ2nUlouTFO8lxYYW6jQMCCsbpA5 L0kTw9U5M8O0jaaaempBQCHHyim47M4UflJlVNRNs7pd4b5xZuyUZLm6kcbqKL9SNOVV OGafxBpDXNUjms0lPGUR3pjw1yAgpe+r6pEFdZ3j7kNVJlU88DEIvTPrufkfdmvt12k2 IjUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kPGyaznR; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@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 k5-20020adfb345000000b0021dbb1d4393sor884897wrd.25.2022.07.14.07.02.20 for (Google Transport Security); Thu, 14 Jul 2022 07:02:20 -0700 (PDT) Received-SPF: pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:6000:88:b0:21d:691c:38d5 with SMTP id m8-20020a056000008800b0021d691c38d5mr8648791wrx.450.1657807339845; Thu, 14 Jul 2022 07:02:19 -0700 (PDT) Received: from panicking.. ([2.198.242.86]) by smtp.gmail.com with ESMTPSA id k11-20020a7bc40b000000b0039c5cecf206sm2029114wmi.4.2022.07.14.07.02.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 07:02:19 -0700 (PDT) From: Michael Trimarchi To: linux-amarula@amarulasolutions.com, Dario Binacchi , Tommaso Merciai Subject: [PATCH 00/11] Port manufacturer specific initialization Date: Thu, 14 Jul 2022 16:02:04 +0200 Message-Id: <20220714140215.444993-1-michael@amarulasolutions.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Original-Sender: michael@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kPGyaznR; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@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 Michael Trimarchi (11): 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 drivers/mtd/nand/raw/Makefile | 10 +- drivers/mtd/nand/raw/nand_amd.c | 53 ++++ drivers/mtd/nand/raw/nand_base.c | 359 ++++++++++----------------- drivers/mtd/nand/raw/nand_hynix.c | 86 +++++++ drivers/mtd/nand/raw/nand_ids.c | 14 +- drivers/mtd/nand/raw/nand_macronix.c | 32 +++ drivers/mtd/nand/raw/nand_micron.c | 88 +++++++ drivers/mtd/nand/raw/nand_samsung.c | 90 +++++++ drivers/mtd/nand/raw/nand_toshiba.c | 53 ++++ include/linux/mtd/rawnand.h | 78 ++++-- 10 files changed, 599 insertions(+), 264 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