Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp701894rwl; Fri, 31 Mar 2023 00:47:36 -0700 (PDT) X-Google-Smtp-Source: AKy350a1L2RNgypA96X883xHJx75iLkPuRP4nIfI7lIz4ChFA1qaZUgkJgeCc0ZaJ2zn5BJ43OQk X-Received: by 2002:a05:6402:2803:b0:502:e50:3358 with SMTP id h3-20020a056402280300b005020e503358mr5560224ede.3.1680248856415; Fri, 31 Mar 2023 00:47:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680248856; cv=none; d=google.com; s=arc-20160816; b=TZ7LTTWG/+0Kw2yxx2+Is+ESPdbkYBuPj0tT/eHRcXLUju+8wL4wYcB0sBwzhlTiCY hyWRdJlC+R6QZPkJyeGsnZfzlSHlMwiDqdxyvhBw6Qxv5XNPnX5CZ4GYyD3gjEeldsXh LUSBoh/ZGrkPFwOCsUN/mYjVbsz+cbMRCH+3pPRtVBl5UyVQ8oasUzGh5cK7IaueYT9a DzXWRdt/LlbqgmcG3lATSnw/q1JeLrk/U0tNsCUoz1ZSGjwJYupw3D/y+sSEibWxYAUU PJlel83BeXbIK/YLDRqCQ5e5jF1L1W1xEQRB2Ae7JMoef3aK4aPwdFXf8+yWQtXI6kg1 wnPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=J6XgOZTowFcGahu4EGU1yeiRvS3r5TbCq21y2qrH2tY=; b=GKoOlpwoc5svWEpkdyo2hhbXiry3bsqUQhNDHrLxzD5dONQgOA2F4r2zBclN2XtNos dR7AzuKp68+K7Fjd1AmdSeWKbmm8lGtE4qUqokC2X2UnzdOO73gHu9U5M+G7PNw9CEjM NRkiQOVzZlfr68Ky4yO3m0mfxrunkj5m3xo2UuIScThCK/gGxxYwm7HPwFQor5ntdy5p wBZdP7RXYLQ3c7XHq7irnICGPbtinuA0cZOOqZzy8M1HRqqLO2WwIT4M1EurkqROUAr5 GTWYwdd99hvQ6iicv0zX4+CJXwmYzj2jWpOl6kPGD0+ALqAOGYx8NeLZxGrCcHwk4MwJ iCZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ShxO/adj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g12-20020a170906348c00b00933b668c967si1526906ejb.477.2023.03.31.00.47.11; Fri, 31 Mar 2023 00:47:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ShxO/adj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230501AbjCaHq0 (ORCPT + 99 others); Fri, 31 Mar 2023 03:46:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230494AbjCaHqR (ORCPT ); Fri, 31 Mar 2023 03:46:17 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A48F71A973 for ; Fri, 31 Mar 2023 00:46:14 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id bx10so3806940ljb.8 for ; Fri, 31 Mar 2023 00:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680248773; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=J6XgOZTowFcGahu4EGU1yeiRvS3r5TbCq21y2qrH2tY=; b=ShxO/adjRbHt3ZcSXKAHCOZfKZxIjIZpjHoLvdSa0NraKb1dT6g/nG0gzs+zmU3wHq BLaTic7PYrsGjtBIC69bKi+1R/TLwJNZ9MSqIjEG99GikJsOYyjQlfXVhUJsDLUjOBS5 c161O2gPvAguXU6BPN8sNUSvEN3TkwApx1PX1AJyMq0u0FFHFmI3XEeeb847Pbpvj9uD gAfa+jdVjK377DQtIPl5xu1CALt/xcbJzxElaHIJY2lSakDtYbbtczIJPSJFVXC2lLdI v+mUQ9mwBlUf2l41OdHgEqXdui08YtLLZBTPUrIy/5JlJKZdnkYoR3SmX/adhVnnU7I9 MTOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680248773; 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=J6XgOZTowFcGahu4EGU1yeiRvS3r5TbCq21y2qrH2tY=; b=fkez14Sb4TQ54ut5gjfGJqsCrqV4EIPqc3qv6gZU/N73YZGJGu8qEARNct9iMV6Xnk bfyKiictZ7YeBUa7bN+MA8xgxbqHdnH89ExwajwxWjtOmSPtKuPWpS08jzOiIQuyq8KE HIp9IvWavCORcG0/WtD2wbROR7XwhQA9hR+TY1+WPgm8l480ZvEVXJp2E6Jt+nJ/uavG kKRVVu7qYhBUN0BfvntmhmCfIiUK9EAtcK6xLJrV8hYBbYspuslLSeH13LtZhZUObLCi yKMOZ2GQBe+xgEEfgjg2jM9HMURD8XL3LBUB6fzOHMo6AJCjFZlZyrvqIc9y0FyRPl81 mH/g== X-Gm-Message-State: AAQBX9c9f73dMY9KgrIne92b+ORvNNa8zU4nZTezUZOkrqggkk57RmdM R/CkY9MZvWCk2SHT2vRjalB+gA== X-Received: by 2002:a2e:8091:0:b0:298:9ea9:fd9e with SMTP id i17-20020a2e8091000000b002989ea9fd9emr8199264ljg.24.1680248772753; Fri, 31 Mar 2023 00:46:12 -0700 (PDT) Received: from ta1.c.googlers.com.com (61.215.228.35.bc.googleusercontent.com. [35.228.215.61]) by smtp.gmail.com with ESMTPSA id n20-20020a2e8794000000b0029573844d03sm241201lji.109.2023.03.31.00.46.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 00:46:12 -0700 (PDT) From: Tudor Ambarus To: michael@walle.cc, pratyush@kernel.org Cc: miquel.raynal@bootlin.com, richard@nod.at, Takahiro.Kuwano@infineon.com, bacem.daassi@infineon.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Tudor Ambarus Subject: [PATCH v5 00/10] mtd: spi-nor: Address mode discovery (BFPT method & current address mode) Date: Fri, 31 Mar 2023 07:45:56 +0000 Message-Id: <20230331074606.3559258-1-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.40.0.348.gf938b09366-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a new version of the following patch sets: https://lore.kernel.org/linux-mtd/20220411125346.118274-1-tudor.ambarus@microchip.com/ https://lore.kernel.org/linux-mtd/20230315034004.5535-1-Takahiro.Kuwano@infineon.com/ Changes in v5: - squash 6/11 and 7/11 to have a single point of failure in case regressions are determnined by bisecting. Update commit message. - get rif of the now empty winbond_nor_default_init() - s/sfdp_bits_set/SFDP_MASK_CHECK - set micron-st's static spi_nor_set_4byte_addr_mode_wren_en4b_ex4 only when the 4byte addr mode method is not determined at BFPT parsing time - reverse xmas tree for local variables in cypress_nor_set_addr_mode_nbytes. Changes in v4: - consider the BFPT retrieved address mode as an enumeration, manufacturers could support different methods at the same time - split renaming of set_4byte_addr_mode methods in several patches for better clarity - have initializations in a single line, even if bypasses the 80 chars limit, as they are < 100 chars anyway - new patches that introduce spi_nor_set_4byte_addr_mode() and handle spi_nor_restore() - clean Takahiro's patch Takahiro Kuwano (1): mtd: spi-nor: spansion: Determine current address mode Tudor Ambarus (9): mtd: spi-nor: core: Move generic method to core - micron_st_nor_set_4byte_addr_mode mtd: spi-nor: core: Update name and description of micron_st_nor_set_4byte_addr_mode mtd: spi-nor: core: Update name and description of spansion_set_4byte_addr_mode mtd: spi-nor: core: Update name and description of spi_nor_set_4byte_addr_mode mtd: spi-nor: core: Make spi_nor_set_4byte_addr_mode_brwr public mtd: spi-nor: Set the 4-Byte Address Mode method based on SFDP data mtd: spi-nor: Stop exporting spi_nor_restore() mtd: spi-nor: core: Update flash's current address mode when changing address mode mtd: spi-nor: core: Introduce spi_nor_set_4byte_addr_mode() Documentation/driver-api/mtd/spi-nor.rst | 3 - drivers/mtd/spi-nor/core.c | 85 +++++++++++++-- drivers/mtd/spi-nor/core.h | 4 + drivers/mtd/spi-nor/macronix.c | 8 +- drivers/mtd/spi-nor/micron-st.c | 32 ++---- drivers/mtd/spi-nor/sfdp.c | 11 ++ drivers/mtd/spi-nor/sfdp.h | 27 +++++ drivers/mtd/spi-nor/spansion.c | 131 ++++++++++++++++++++++- drivers/mtd/spi-nor/winbond.c | 24 +++-- include/linux/mtd/spi-nor.h | 6 -- 10 files changed, 272 insertions(+), 59 deletions(-) -- 2.40.0.348.gf938b09366-goog