From patchwork Thu Jul 14 14:35:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 2166 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4D4D53F066 for ; Thu, 14 Jul 2022 16:35:49 +0200 (CEST) Received: by mail-wr1-f70.google.com with SMTP id r17-20020adfa151000000b0021d6c4743b0sf604512wrr.10 for ; Thu, 14 Jul 2022 07:35:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657809349; cv=pass; d=google.com; s=arc-20160816; b=RS8Nyy5K0aRtVM+TkW/Cc38aUx/hFW4sOBpAQcNubLD1aL1fX9ERXToy8bmI/VwLaU qJdp+lW0timShgp9cuHqJzCgSl0koKr9d1e/SKIkEeJbvPXO7BmmfE3PK4Op4KzW4Dhp Tc7uyUYNvQCIGI8kTsu90pk2oCdtcLZyh8YYmZEA3onMWg2k+CP5KqbwxqCbgUupDQ6k SOpGAVCy8R2tll6xpN1y3q2HoAqYTVYNWXavmFjGGw5xMW6m4tWFzP1QNTp7HJ6gsneT MCLnIeVdoI9x0KymdpDiEmFnvZlq4n52kNkGuPBSZT2/ohwJtiAbN71mVpjNBklAaZS1 RGBA== 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=RV63f396Llg6TMJRCJvjAX+AP/sgxt+7Enn0ELMQxw4=; b=w513MErAyawLdmgvUqG7kbstUwXpB968DyOCdDXDxM0S6IyQ18ssuYmnFT9/p2Lz/3 1PfRRIlE+KTxxAUy4X1a20RmJUO7HPivmm1H9xaUXsfZRkgSOI/QoYVbTmGB2UoVg9N6 /UtcVDBFJXOtd6tE4JjPId93NAob/8n8/Lm/04HK2qJYb1E9YAKbCaLYYuMMn9cDjXnU 4Y67bhVCrdp0Q0BlhIJyPbYvgvnQMQaxZQA60qHMx8TiDH28MgEsK2sBM6HpcmaO2jiu 3MmA63V702XiaRLgGtz2mwN55mYRabsBGqyADiY+61ly6tEEafdICrJ2FU0livWsyiLr vDyA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="e/RpG5Fs"; 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=RV63f396Llg6TMJRCJvjAX+AP/sgxt+7Enn0ELMQxw4=; b=mfQlxlDwQaEzf4G1Lqzi520yuaStUmP6MeJKwxFgRGXM2HiHZlwJ/uaHJ9OdeDomBq 0sqUZ1GobXtGuFmGEoJduWHxkmpdkiCUJ5yckkkK3jE+lQKgHv6Grv1eAGtIlh1lamL6 wtlkuUawQ9+S/6famrhYpcqfGR+/yYHYfj9JY= 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=RV63f396Llg6TMJRCJvjAX+AP/sgxt+7Enn0ELMQxw4=; b=WOuivyo/XESV8XNj7CtQjoFSJQbnoxkOTGk4Yo7bWssIqfAiKW/R+6xsgVc2lELjJ1 cAG4dsnLppksRYtiZUlH0iC1ZGg+BEKjTO8Pr9DBIxJpjgP5hWSS2/EoqmRVIyvyBqml dgbOPGL3uatdSKe1yLcvlQimHOjI2/9aNQhFSdLZ5VA7hO6mCc3+ldlBXgu9kfY2Woyn OWy7NtlKYFuJxzaiKDraQCMEjtydq1jQAQEoxj1DQWnHPq+SjBhpsDiUXNRt0Ns1Q5Py vRCMjqXBlOH5mvjB9TfUmxaXFlZojBMDplHWLyG2XlM5IzcwvRWWovpULBZ10wWo+8mW 1aMQ== X-Gm-Message-State: AJIora9cducZvol+21EBA7WYYXU7OIDPWzZ0uUgTYD1fUfu5w4eP55NL vNH04wh2SiUpcCeWMj/8uLqKZ5vz X-Google-Smtp-Source: AGRyM1uSfdK78zFDWLwmYr5UYxri740GMm7DrnM9ykuIdVSwWJedmTTPhq4OhEF3tI4Z29XThmpeiA== X-Received: by 2002:a05:600c:1e18:b0:3a0:4865:3784 with SMTP id ay24-20020a05600c1e1800b003a048653784mr9441570wmb.139.1657809349022; Thu, 14 Jul 2022 07:35:49 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:34c6:b0:3a0:4f27:977f with SMTP id d6-20020a05600c34c600b003a04f27977fls4515418wmq.2.gmail; Thu, 14 Jul 2022 07:35:47 -0700 (PDT) X-Received: by 2002:a7b:c5da:0:b0:39c:542a:a07b with SMTP id n26-20020a7bc5da000000b0039c542aa07bmr9936000wmk.83.1657809347695; Thu, 14 Jul 2022 07:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657809347; cv=none; d=google.com; s=arc-20160816; b=d7h0RXZVAwDdCAEw0OKVu4APx/66+FxwERuY/X82j1RcC7xYXRTbbm/jXdRoTLfggz RPV04cx6W8JFyPBZme/4Iwen0JiffnfYQpNiD0/dspeNgjMz14WTSc/B+8hcGnXRqEm0 BQ9K4e3rf4rxUMTPhMOa8A0yUKrKd5W9v9LUQVYSk+luS5ZlyILHn5WZ89qLU5Ns8UUG CR7+fjhnQWnNuO+VUPg2AZFV7mn4uDguVij2i0ydjj92ZxmUBh19efIXz6PilHhwywiS boh8k5epwRb5laknCFzkzu5n+x64PLWR1wVBV9oV4/qVvRq8PdJw+SmT3ahFTt9kW7U7 ME2Q== 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=th1K+3oyv6YujqhdbN+MCbx+1L3vpXGXXKMVibC+p10=; b=EIydVko0bqQ4DGklVJRunZo0dRjbpWbu1zreaN7KskJxRQjkesmbj5V9/CfaVMji8V RAWa711i1R0d56Ox6bABb3ByTSqjB48sM2gzaf+y8grzPX2gTHF9pBVmO2AHPA5/cQz7 qLHuFWkRGx47z7WbsSw1AdYhVV2PVru7voKVF1ORfFnNaGxVOq7fH2g4nGclLzW3AMLZ b2yL8roDpKIZWsgAZSc4qndisDJJdVlJ6uKWb7gnMyrhEcPYDvkFbjuOziBMcN8ckwCa a4Sy25N6NBJ1wHqVqWIKolMe4kfWbOEETcofun21k5EqLon4q8KkZBNqkBF5KZDkz6Vk x/zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="e/RpG5Fs"; 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 m22-20020a7bce16000000b003a2fdab7d40sor1097346wmc.12.2022.07.14.07.35.47 for (Google Transport Security); Thu, 14 Jul 2022 07:35:47 -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:a7b:c3cc:0:b0:3a3:8ec:d69 with SMTP id t12-20020a7bc3cc000000b003a308ec0d69mr308124wmj.78.1657809346949; Thu, 14 Jul 2022 07:35:46 -0700 (PDT) Received: from panicking.. ([2.198.242.86]) by smtp.gmail.com with ESMTPSA id u18-20020a05600c19d200b003973c54bd69sm5712357wmq.1.2022.07.14.07.35.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 07:35:46 -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:35:32 +0200 Message-Id: <20220714143543.448991-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="e/RpG5Fs"; 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, I opt to move the current stack slowly in order to have a more easy sync and test. I would like to prepare uboot to support no-jedec and no-onfi compliant nand so I 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 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