From patchwork Wed Nov 1 14:58:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13442853 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17AD6C4332F for ; Wed, 1 Nov 2023 14:59:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=JqB9i3+O5yrBuwn0tjyf5KEQoh45nvBFxP7n2xz6kgs=; b=zJ8qRwx+yzKU6w 7kq5eJvh6QqRq0Eq6b0yyxZuQvBBlo+OkBJK9/ERgy6upFCKgKU6jSVb2Ft/pV87mV48C9eFGBqSi G2B1elmG2InBbriNOJLEjCpHSBzNK3odWwW004Qkme0CzpCeWdiO/0XsnZxlc4O4255dB+VVZKuj9 bAjL9u2QA80iH/v8kYTEZmyFYAt+7ptFD61frjoBOUFiyzB6h/2HxhTi+9esizumxnj3xOdUuN8E5 Ecf+OGisB7InKmBFar+SfK0k/flvVwM1ZLQufmYSIyAy2o8CIaXIQoKRe7/Wz09IY2t3uaLs0asfG VrgNHRq92T5WMa1uilxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qyCgS-007geS-0z; Wed, 01 Nov 2023 14:59:04 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qyCgN-007gch-0u for linux-arm-kernel@lists.infradead.org; Wed, 01 Nov 2023 14:59:03 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-9c5b313b3ffso1030760066b.0 for ; Wed, 01 Nov 2023 07:58:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698850738; x=1699455538; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=f3YeiMm5rjHxVc5hxbE5JdX0iH5LC4lBN+TS1NBzY74=; b=BzGHL+WFATzT1qoeQ8cDfP4p2ld/sAkU+wqK9VwOS7+83Xx9orp/x5Cguaer75D4t1 ATXzVSS/E7YeUw8t0ufx+5Cq28sS+yALhT4On1hwzoJlmcdfDjc+TxstoOvpOSh3rtGx n741uEPEvdGt6BXWwKWy9wegH07GsmJgZgSZqmirtyIFpz9uvsUJUJqXkGnR9T/F3nFb +zOSWQ00G1NyNJRLm35mQI89A1jy5eAaqCbbHMCsbxdC2aeTdLxrl68jk6c3lZ1llqjn 6evKQatfEACXoNzD14nSwsoV5HJ7G6i321oOF/2SUaVqmuPAd74Q7UVuWGEYcEDCQrtg qqpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698850738; x=1699455538; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=f3YeiMm5rjHxVc5hxbE5JdX0iH5LC4lBN+TS1NBzY74=; b=Gd9m5QDVI2ChILRYdYgdcjbMYYEJFfB9INbicsiaU7InsjViENbAVvY2jBlyLDvWrq 43wkfN9gYo9rqTbbMk5UdKLtsrGuD82qF8lAbG9NWmBbv/2SdQi7qMTUOfDz8I34R4fI gG/klZguIt/ap3L3+bb5dGIHL9jURFHdRcuUyaRp0Ib4pWT2qYWXWUydWJlIIfY4XsFY RHXH9+sEpkozJjB4aYk2arPZPrGWrZQX3qIvONtrGLYISk+pPtBfQJXo6AbWeXLQm/tp ugD5j6eroFkjR8PhTHzTSSeHgQR2LpGqr/RD6P0kFsofchIoRKqG+MbytBCJMJyRZx7R qZvQ== X-Gm-Message-State: AOJu0YyMcVPl7OEM/RAAznTHx+8tHMfKGjOOw/YsXRfxqkmfRhOv+RMV /nK11YISWK0YougYLbwl2XWw4A== X-Google-Smtp-Source: AGHT+IFDV/jqvxoKb04a6+4D6bN8lN3UawvZYUWxcmMtrUMNCsgU43ASGDECWoSxJIZanrnzLf2Z5Q== X-Received: by 2002:a17:907:36c5:b0:9d3:f436:6804 with SMTP id bj5-20020a17090736c500b009d3f4366804mr1959927ejc.29.1698850737484; Wed, 01 Nov 2023 07:58:57 -0700 (PDT) Received: from tudordana.roam.corp.google.com ([79.115.63.76]) by smtp.gmail.com with ESMTPSA id i18-20020a170906115200b009ad8acac02asm20448eja.172.2023.11.01.07.58.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 07:58:56 -0700 (PDT) From: Tudor Ambarus To: michael@walle.cc, festevam@denx.de, takahiro.kuwano@infineon.com Cc: pratyush@kernel.org, linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, bacem.daassi@infineon.com, miquel.raynal@bootlin.com, richard@nod.at, Tudor Ambarus Subject: [PATCH v2 0/6] mtd: spi-nor: introduce die erase Date: Wed, 1 Nov 2023 14:58:47 +0000 Message-ID: <20231101145853.524045-1-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.42.0.820.g83a721a137-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231101_075859_348790_85F8CE77 X-CRM114-Status: GOOD ( 11.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The patch set is just compiled tested as I don't have a multi die flash at hand. Takahiro and Fabio, please test the series and let me know if it works on your side. This will be followed by the removal of SNOR_F_NO_OP_CHIP_ERASE and implicitly of the old xilinx SPI NOR driver, but let's take it all in small bites. v2: - iterate over all dices instead of erasing just one - consider address of die erase command - fix default value of nor->params->die_erase_opcode - introduce spi_nor_erase_dice Fabio Estevam (1): mtd: spi-nor: micron-st: Add support for mt25qu01g Tudor Ambarus (5): mtd: spi-nor: use kernel sized types instead of c99 types mtd: spi-nor: add erase die (chip) capability mtd: spi-nor: spansion: enable die erase for multi die flashes mtd: spi-nor: micron-st: enable die erase for multi die flashes mtd: spi-nor: remove NO_CHIP_ERASE flag drivers/mtd/spi-nor/atmel.c | 16 ++--- drivers/mtd/spi-nor/core.c | 112 +++++++++++++++++++++----------- drivers/mtd/spi-nor/core.h | 22 +++---- drivers/mtd/spi-nor/debugfs.c | 2 +- drivers/mtd/spi-nor/micron-st.c | 47 ++++++++++++-- drivers/mtd/spi-nor/spansion.c | 4 +- drivers/mtd/spi-nor/sst.c | 6 +- drivers/mtd/spi-nor/swp.c | 25 ++++--- 8 files changed, 153 insertions(+), 81 deletions(-)