Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4565145imw; Tue, 12 Jul 2022 10:06:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s6Y/YBG4ohYVrQC06ZZIoHpptdIWm9mrfpe6ZVBikvNE6OA/J8cO+4M4Y56uzSRvxOvSLH X-Received: by 2002:a05:6402:3689:b0:43a:7c1c:8960 with SMTP id ej9-20020a056402368900b0043a7c1c8960mr32645346edb.79.1657645581130; Tue, 12 Jul 2022 10:06:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657645581; cv=none; d=google.com; s=arc-20160816; b=FNhXJy5JSIgyMPTGbDCTSN+fkzCnVJCZsBGUxCE+LN2P9uUogU7GmtfYIujnFSk1TK Ylv/mjEnhGgFKDCQEHyZEB02vPlbZYE9YnofCrljpZHzE0/w57xZ+qXohU9u9MXP3Yp1 mkAGaXiyYGtzbx4bywAuBNAAIgHLnqxrlx3QfOhW0+V9X+1XDjjOYbic9vcO4gd1NEGx zVj4YEHD1xzM4Yq6q/UrEYWmQBek5FD96Ia///GVKzQDw3598nMMdzybUAXyJ9vpymbP miBE6LJJ6VsEmje615QveX7RgvdoAomesJhfE2QpdXjpCZTKKd6bqSbMperivDQTBll1 lyHA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BXuXiklFcl+vK0kmoMLD007iJW5hMW9mAc7xKGHZhfc=; b=0qzXnzpiF4TRVPDiEeEcX/EiyngV9ew3wtPPgVU1IF/7NTAEfp50F94RbaFUE5p5ES kEMnZIvUo5JmBSfa/LgxUtqE8+o9isu+7Up5uPY506lDxLRLWjEh1ALLqB1i1eGrTNud DGF7bOjYOdG7YN1f+zIP+IjBX73h5UUuVfMN4R1yxskZqohRrnxv7ubfj/cVbUyRobnq 42OuVvPP4qfLC0YYRPbCh1vizra8O9fE28d1xazk7rH59cUC/d7sQ0VFAuzRZmlWneS7 lFAOyEDW9maDb7gi00ZwpIDXz6Y3QWPkzTQOPxRwvPDYpc16oH+oB8h7lujFoiTBRNQ/ TreA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b="Vro/dFbu"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q20-20020a056402519400b0043ad95b6b0bsi8842623edd.239.2022.07.12.10.05.54; Tue, 12 Jul 2022 10:06:21 -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=@sifive.com header.s=google header.b="Vro/dFbu"; 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 S231881AbiGLQik (ORCPT + 99 others); Tue, 12 Jul 2022 12:38:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229823AbiGLQie (ORCPT ); Tue, 12 Jul 2022 12:38:34 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B65AE1032 for ; Tue, 12 Jul 2022 09:38:32 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id h14-20020a1ccc0e000000b0039eff745c53so5146351wmb.5 for ; Tue, 12 Jul 2022 09:38:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BXuXiklFcl+vK0kmoMLD007iJW5hMW9mAc7xKGHZhfc=; b=Vro/dFbucTFTfY+imZQ1WkqMIYTcCBhqfgdDiw/JxxWQ4P0kgHI1akI7oBBajJOTcy fbxA1sjcXfsXZLM99JJDrF61XuA+Yt9jfRPrRvI3zXRuuGT7veCBHYlrtDqUdAQ+D5c1 cMitPM2+JPJEXy7DL12czQV+/2Sn+56Qdjx8V6cX8gMRHKptYtO03R1BLJtLKAddLq+L WV3lRDp5jE6pKPVhtV8QTqOEKc52tvlJWaM3udCW28xwQLzT7c42ozqDXTuGjKOWOBVa ho9d/HjLRIza73WOIfqiULK1bQG7PxQh9nnVHAkg4U2TDMLuy79CM6fiq8BlTjB2WWyg Wr0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BXuXiklFcl+vK0kmoMLD007iJW5hMW9mAc7xKGHZhfc=; b=HfuU9SPwQpR0HAkJAc6aaGLodvirmXRVdZFjUGbuWVJsJ/fotp75uUzeThv1zMcOa4 33XPXCmXA5C++TrakgZFCy8DpT7NBtsod3opPXecrg/fHWoRHUbjX7H+U0VMyHbTmpDF v1WYMFDSbHQYuvXe5WGD/JLUnCZeI/layOP1h2Bx1sv4CDdG42nH/GM6N3mOb942/J4E CoTGzR1Bcyr02Ds5+2A9XpyhzCOmyCLu+hpk8xOQu4mxNl2Nb9DqFrfZqonOduBn8dXU YpiBD5qEXNPY34SwU6ym8x1CnmvX7JF2MCPf+8lSh0VuToFWyfABvzo6RuLWg+ntZZOb aKwA== X-Gm-Message-State: AJIora+GoEOUYd6DQlJuH0dGu+5l00wFTeQK/sGwD7X2d9Yfr8WAuMji c802FH7Y9OUFxnZ71PRLdmj6HQ== X-Received: by 2002:a05:600c:354e:b0:3a1:9ddf:468d with SMTP id i14-20020a05600c354e00b003a19ddf468dmr4841011wmq.145.1657643911325; Tue, 12 Jul 2022 09:38:31 -0700 (PDT) Received: from localhost.localdomain (host-78-150-47-22.as13285.net. [78.150.47.22]) by smtp.gmail.com with ESMTPSA id s14-20020a5d424e000000b0021d4d6355efsm8623751wrr.109.2022.07.12.09.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 09:38:30 -0700 (PDT) From: Sudip Mukherjee To: Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: greentime.hu@sifive.com, jude.onyenegecha@sifive.com, william.salmon@sifive.com, adnan.chowdhury@sifive.com, ben.dooks@sifive.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Sudip Mukherjee Subject: [PATCH 1/3] mtd: spi-nor: extend no_sfdp_flags to use u16 Date: Tue, 12 Jul 2022 17:38:21 +0100 Message-Id: <20220712163823.428126-2-sudip.mukherjee@sifive.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220712163823.428126-1-sudip.mukherjee@sifive.com> References: <20220712163823.428126-1-sudip.mukherjee@sifive.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Currently no_sfdp_flags is u8 and all the bits have been used. Extend it to use u16 so that we can add more support. Signed-off-by: Sudip Mukherjee --- drivers/mtd/spi-nor/core.c | 2 +- drivers/mtd/spi-nor/core.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index ce5d69317d46c..e5f7691c5bd40 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -2335,7 +2335,7 @@ static void spi_nor_no_sfdp_init_params(struct spi_nor *nor) { struct spi_nor_flash_parameter *params = nor->params; struct spi_nor_erase_map *map = ¶ms->erase_map; - const u8 no_sfdp_flags = nor->info->no_sfdp_flags; + const u16 no_sfdp_flags = nor->info->no_sfdp_flags; u8 i, erase_mask; if (no_sfdp_flags & SPI_NOR_DUAL_READ) { diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index 61886868cd022..58fbedc94080f 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h @@ -501,7 +501,7 @@ struct flash_info { #define NO_CHIP_ERASE BIT(7) #define SPI_NOR_NO_FR BIT(8) - u8 no_sfdp_flags; + u16 no_sfdp_flags; #define SPI_NOR_SKIP_SFDP BIT(0) #define SECT_4K BIT(1) #define SPI_NOR_DUAL_READ BIT(3) -- 2.30.2