[v4,1/3] mtd: spi-nor: Extend SFDP 4byte address instruction lookup table with new octal modes as per JEDEC JESD216F
Message ID | 20221202135539.271936-2-nathan.morrison@timesys.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp874945wrr; Fri, 2 Dec 2022 06:04:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf5xfvU5aMtQE9ZQ8/EkS3h2SLpGEg12V/CEdznUCAq3FQshbfJ3Rj0ysgZsoIr+XGUwbDOK X-Received: by 2002:a17:903:2350:b0:189:907c:8378 with SMTP id c16-20020a170903235000b00189907c8378mr23365644plh.107.1669989875220; Fri, 02 Dec 2022 06:04:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669989875; cv=none; d=google.com; s=arc-20160816; b=pd69Hw26pkakxRGelfJ7cvl3Swf9MtOWVh/Rm/zz9AdjXiPA8N9zz2iQhPkhVht92W NPzyyMPJ1tT+qBeUcamMSxtzF3WR/U85iPSq19B25axpsCrUQ4/lVs/N7yPnS7OEIEaD 4Q4X9AlIOXmvAYSgBQjhQB//aLh3QPTtJ8vWlmcktspCi8RAOww/zQI4gUVUaL+KsEWE bN1PZ3Rkix+Q9K+C9tMN+St/16MlfEZ1NUAnbnK3neiAFvaWJjtElVCZ5Ef6aoVEe4FK B3D2uRATG+xUURv9mKvPDeptSKv2SQpbucKIhJGcTRRkiVjzc/2ic5En91KPx5CyT7l/ /SCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=kFCBGy/PHSqulvVt1jN7WYpo1L/uAw3+z6frKWBhRoc=; b=o7Z+6wpZ9hX4SBG3n3Tvno5guqRauqwWZO6AW4FeXArq+Fku8R+S/zul0EdwzX6zJN 8P+EIzFgGa9E9HKwIWti/CE2DPKFJkFMp1zViKgY8es0NJc+SCOqmXgGjvAbaPAFmszw TLT7MFxSgqONQibPL9QGV3LGxF8cSaJPdsCEhXqQUmaJNrGJyh3LVNHGulXdxhN6e0ur Idgw6bzza1AfCnDwqUAgkVzRgmkpUCe6A5DcpfwD0j3DjvSQ1GrX/PW1v4QkHAvnKvNW muonreTUXmGs5K5s1Revrdf21/y0OdcuOR1uDs6TYz6Hmvp3jf0vJzDZDosxfpPaa9L1 6TRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@timesys-com.20210112.gappssmtp.com header.s=20210112 header.b=L5WmemJA; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a19-20020a17090acb9300b00208606154f7si6785145pju.117.2022.12.02.06.04.10; Fri, 02 Dec 2022 06:04:35 -0800 (PST) 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=fail header.i=@timesys-com.20210112.gappssmtp.com header.s=20210112 header.b=L5WmemJA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233610AbiLBNzu (ORCPT <rfc822;lhua1029@gmail.com> + 99 others); Fri, 2 Dec 2022 08:55:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232825AbiLBNzq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 2 Dec 2022 08:55:46 -0500 Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EF2FBE4EC for <linux-kernel@vger.kernel.org>; Fri, 2 Dec 2022 05:55:45 -0800 (PST) Received: by mail-qt1-x836.google.com with SMTP id a27so5121564qtw.10 for <linux-kernel@vger.kernel.org>; Fri, 02 Dec 2022 05:55:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timesys-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kFCBGy/PHSqulvVt1jN7WYpo1L/uAw3+z6frKWBhRoc=; b=L5WmemJAO6bGk5YpyHsWgaHHqP8pQGgrhBueew2H9B5Ebuoy8da3D/W/R9F+NDZeiX Q1nKwO1vdtSB39YyxX5uuG4BhSutxQgLJdXYdyePxV0pyf4UhHyqMgoW1B0Ph526ZURO ZyN/xnkiLF/TdMISWsj0uIMog1cQZ2X8xFhoY/bMFrwZIiWp2PpOxFCeaVTUZQDWjgf6 hJoP5YJ7c5Ao7nWD4+KTTGOhPe6ujxfIa41ZWwy5a8saDxUfKYxcjbPs78f8LQuM7ysn q/l9orAO4UjDMjYUCDLg8DxBEUnuhlFkvcmuJ8QPapS7rT18UKjNVZyOp+eYQ4fTQzsy t7sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kFCBGy/PHSqulvVt1jN7WYpo1L/uAw3+z6frKWBhRoc=; b=T+yYX61U+19sqojiCein1GIrKzCn0D7jDlp1RqyUBmpMKUU/LoEqSvOWfMzhRYSKWs kp1dXZ4xMrRl+80f4NIvXvlt3FQ5N+uxtCjSsBrfC5gRM78hBxAadI9FBAsnsSp9OV9F ZL8eZUWtn1btVBqIrt39y0R/qBgz4UdGv9uivNwFpmHXFc0xa7pulBvAFI3VWKcdRmyb HzjRqkOAj+qC5ZZsVYBi9Fdz9IIjY0Upjvi8/2fl/bJ0cm57cE7whjWbZNhH15/h5zGW 6VX6Rl5MvV1zOBYCqgEAKS3+KD/0YKiQ3RRwNgosl27/IRiOXRrnlzEmo5a31nxWSjRp AW0Q== X-Gm-Message-State: ANoB5pnegCkX5d92tws2m2IEtJKJko/twsCG1bub47vDsAeVBWw3yZte 5XFU2egprQtgPxBM/c26Ql6Lbg== X-Received: by 2002:a05:622a:590e:b0:3a4:fcde:733d with SMTP id ga14-20020a05622a590e00b003a4fcde733dmr67306718qtb.269.1669989344644; Fri, 02 Dec 2022 05:55:44 -0800 (PST) Received: from nathan-ideapad.. (d-75-76-18-234.oh.cpe.breezeline.net. [75.76.18.234]) by smtp.gmail.com with ESMTPSA id x1-20020ac84d41000000b0039a610a04b1sm4122237qtv.37.2022.12.02.05.55.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 05:55:44 -0800 (PST) From: Nathan Barrett-Morrison <nathan.morrison@timesys.com> Cc: nathan.morrison@timesys.com, greg.malysa@timesys.com, Tudor Ambarus <tudor.ambarus@microchip.com>, Pratyush Yadav <pratyush@kernel.org>, Michael Walle <michael@walle.cc>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, linux-mtd@lists.infradead.org (open list:SPI NOR SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v4 1/3] mtd: spi-nor: Extend SFDP 4byte address instruction lookup table with new octal modes as per JEDEC JESD216F Date: Fri, 2 Dec 2022 08:55:37 -0500 Message-Id: <20221202135539.271936-2-nathan.morrison@timesys.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221202135539.271936-1-nathan.morrison@timesys.com> References: <20221202135539.271936-1-nathan.morrison@timesys.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751111303474109719?= X-GMAIL-MSGID: =?utf-8?q?1751111303474109719?= |
Series |
mtd: spi-nor: Extend SFDP to support additional octal modes as per latest JEDEC standard
|
|
Commit Message
Nathan Barrett-Morrison
Dec. 2, 2022, 1:55 p.m. UTC
This adds the new bit fields for
reading: 1S-1S-8S, 1S-8S-8S, 1D-8D-8D
programming: 1S-1S-8S, 1S-8S-8S
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
---
drivers/mtd/spi-nor/sfdp.c | 5 +++++
1 file changed, 5 insertions(+)
Comments
Am 2022-12-02 14:55, schrieb Nathan Barrett-Morrison: > This adds the new bit fields for > reading: 1S-1S-8S, 1S-8S-8S, 1D-8D-8D > programming: 1S-1S-8S, 1S-8S-8S > > Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com> Reviewed-by: Michael Walle <michael@walle.cc>
Looks good. On 02.12.2022 15:55, Nathan Barrett-Morrison wrote: > This adds the new bit fields for > reading: 1S-1S-8S, 1S-8S-8S, 1D-8D-8D > programming: 1S-1S-8S, 1S-8S-8S > We usually aim to have ~60 chars for the subject line and 75 chars per line for the commit message. If you want to reword both, fine, otherwise I'll do it when applying. > Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com> > --- > drivers/mtd/spi-nor/sfdp.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/mtd/spi-nor/sfdp.c b/drivers/mtd/spi-nor/sfdp.c > index 2257f1b4c2e2..e4e87815ba94 100644 > --- a/drivers/mtd/spi-nor/sfdp.c > +++ b/drivers/mtd/spi-nor/sfdp.c > @@ -953,11 +953,16 @@ static int spi_nor_parse_4bait(struct spi_nor *nor, > { SNOR_HWCAPS_READ_1_1_1_DTR, BIT(13) }, > { SNOR_HWCAPS_READ_1_2_2_DTR, BIT(14) }, > { SNOR_HWCAPS_READ_1_4_4_DTR, BIT(15) }, > + { SNOR_HWCAPS_READ_1_1_8, BIT(20) }, > + { SNOR_HWCAPS_READ_1_8_8, BIT(21) }, > + { SNOR_HWCAPS_READ_1_8_8_DTR, BIT(22) }, > }; > static const struct sfdp_4bait programs[] = { > { SNOR_HWCAPS_PP, BIT(6) }, > { SNOR_HWCAPS_PP_1_1_4, BIT(7) }, > { SNOR_HWCAPS_PP_1_4_4, BIT(8) }, > + { SNOR_HWCAPS_PP_1_1_8, BIT(23) }, > + { SNOR_HWCAPS_PP_1_8_8, BIT(24) }, > }; > static const struct sfdp_4bait erases[SNOR_ERASE_TYPE_MAX] = { > { 0u /* not used */, BIT(9) },
diff --git a/drivers/mtd/spi-nor/sfdp.c b/drivers/mtd/spi-nor/sfdp.c index 2257f1b4c2e2..e4e87815ba94 100644 --- a/drivers/mtd/spi-nor/sfdp.c +++ b/drivers/mtd/spi-nor/sfdp.c @@ -953,11 +953,16 @@ static int spi_nor_parse_4bait(struct spi_nor *nor, { SNOR_HWCAPS_READ_1_1_1_DTR, BIT(13) }, { SNOR_HWCAPS_READ_1_2_2_DTR, BIT(14) }, { SNOR_HWCAPS_READ_1_4_4_DTR, BIT(15) }, + { SNOR_HWCAPS_READ_1_1_8, BIT(20) }, + { SNOR_HWCAPS_READ_1_8_8, BIT(21) }, + { SNOR_HWCAPS_READ_1_8_8_DTR, BIT(22) }, }; static const struct sfdp_4bait programs[] = { { SNOR_HWCAPS_PP, BIT(6) }, { SNOR_HWCAPS_PP_1_1_4, BIT(7) }, { SNOR_HWCAPS_PP_1_4_4, BIT(8) }, + { SNOR_HWCAPS_PP_1_1_8, BIT(23) }, + { SNOR_HWCAPS_PP_1_8_8, BIT(24) }, }; static const struct sfdp_4bait erases[SNOR_ERASE_TYPE_MAX] = { { 0u /* not used */, BIT(9) },