Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3225039rdg; Tue, 17 Oct 2023 08:09:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHAEF8VpTunvT41abRrJnSK1oNcZ3CK7e2MUEols91M2iFDnEms8lkaYkGsLNREd4+epjz9 X-Received: by 2002:a05:6a20:ceaa:b0:140:a25:1c1d with SMTP id if42-20020a056a20ceaa00b001400a251c1dmr2133454pzb.51.1697555362737; Tue, 17 Oct 2023 08:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697555362; cv=none; d=google.com; s=arc-20160816; b=ksPTDu0SQqOiSOvzx7AxQK6Tt9evp970KdsdYg26hQDAFMpd+uusrfAERxXxM9mkZe x7crFgeXWJypvgVyeSBfN7e7ryxZZrZCoEMbi2xLjvNAUb5YCTxitPcjpfeZ3QngG+9N VRuHfW1M+00RrrEwwJHcstl1MzA8MQPnX8ZATnBevHeo1qE4XRsHe8Nq7ApxMwvbMLQ1 pRVPWHSx3G7/1wDf9Q0ovKX87M1z08U9+mr0WPvxKs+CqSF6y+K6qtVfejspmjjNjskx OqL7Z08tBNIwvYrnNr/pjGOfiXyko4J8cKQGtUptN8hb7BnnYtMwDREpyP9i+oioBk6h G+PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:dkim-signature; bh=RmrXgOAvig5Vto0lt8AUoV4cCecixh8p/8EyyC0Lr/I=; fh=j5MKWyz7HJjxiRGRcgIq0AtJnRPdDhGXf5n4qeqmwCg=; b=O8m6jT2M86G/hk4Uju6Lw94Y26vAtyuwpJwsQQaiy5weginRHnFtfMZPBfsUddokKN KG0qJs75byaBcPyy7Us2nOYOTvIT+TENEMiXgOhGAi38sJ7ZfqwVD/xgPniIQDnAxX9T RXo8TTzWbzT2vAhcdXu/GrCXjrvYzrhHtCs86+MjKJqIr/hOmNWmddTxwE89vqi5WIM9 9/Vbuh+JmxNShbL5vSIH/MSIezaGSaNeVgVS0z4GXg44PEChMpsnFpgPcpfW51PhXJSA eHqTpHa7NVChGYleH/f+AbsF263/EyYPH2AxEsdWSYmoA5E3QvSMzvv13scxPwtcZpY5 GTQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="SxMBs/ZN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id z11-20020a6552cb000000b005ae598c71d8si1882957pgp.900.2023.10.17.08.09.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 08:09:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="SxMBs/ZN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A49B980E73D4; Tue, 17 Oct 2023 08:09:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343644AbjJQPJT (ORCPT + 99 others); Tue, 17 Oct 2023 11:09:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235039AbjJQPJR (ORCPT ); Tue, 17 Oct 2023 11:09:17 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50253ED for ; Tue, 17 Oct 2023 08:09:16 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECAFCC433C7; Tue, 17 Oct 2023 15:09:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697555355; bh=ylrjTPEgeCTXRLNBP7ynR5MjTIiAkIbguL3M2NwS9DQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=SxMBs/ZNRNUtSFTs5IgDNLYr/hsh4MyHeROgQpVQlDSBxx4EIm71PGGUnFIiZDuND bqXFnBClEltN85tshZxXyeCUuW/Dh542mqjFNSDUjFtLEUn35fbP4wBxvGut80rcUC PyiKAdHDc3ZJx9ODZpbjBW3XbW8wWh7EAZRJY+svcOOFI3lV6/ybxbu/IKXlV0Wdfi dts+13KkGlxrTS1pVeHUyWq5N4G1Xq52qBIWojrmOu4GtTSPva69Hl1LQ+diPJbkj9 a8C06SBWd8YfIdN6DUrmVOBHYunug+uuQiHdvKm//bEIxkqueDts1FqjF0BpAlogpl qZ8Ygcqq5jFYQ== From: Pratyush Yadav To: Tudor Ambarus Cc: michael@walle.cc, pratyush@kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Mamta Shukla Subject: Re: [PATCH v4 2/2] mtd: spi-nor: micron-st: use SFDP table for mt25qu512a In-Reply-To: <20231017074711.12167-2-tudor.ambarus@linaro.org> (Tudor Ambarus's message of "Tue, 17 Oct 2023 10:47:11 +0300") References: <20231017074711.12167-1-tudor.ambarus@linaro.org> <20231017074711.12167-2-tudor.ambarus@linaro.org> Date: Tue, 17 Oct 2023 17:09:13 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 17 Oct 2023 08:09:21 -0700 (PDT) On Tue, Oct 17 2023, Tudor Ambarus wrote: > From: Mamta Shukla > [...] > diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c > index 756391c906e5..8920547c12bf 100644 > --- a/drivers/mtd/spi-nor/micron-st.c > +++ b/drivers/mtd/spi-nor/micron-st.c > @@ -180,6 +180,18 @@ static const struct flash_info micron_nor_parts[] = { > }, > }; > > +static int mt25qu512a_post_bfpt_fixup(struct spi_nor *nor, > + const struct sfdp_parameter_header *bfpt_header, > + const struct sfdp_bfpt *bfpt) > +{ > + nor->flags &= ~SNOR_F_HAS_16BIT_SR; > + return 0; > +} > + > +static struct spi_nor_fixups mt25qu512a_fixups = { > + .post_bfpt = mt25qu512a_post_bfpt_fixup, > +}; > + > static const struct flash_info st_nor_parts[] = { > { > .name = "m25p05-nonjedec", > @@ -407,10 +419,8 @@ static const struct flash_info st_nor_parts[] = { > .name = "mt25qu512a", > .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB | SPI_NOR_4BIT_BP | > SPI_NOR_BP3_SR_BIT6, > - .size = SZ_64M, > - .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ, > - .fixup_flags = SPI_NOR_4B_OPCODES, Hmm, I have missed some recent developments in SPI NOR and I was confused why you did not add a PARSE_SFDP flag. But now I understand that you just need to drop the .size parameter and it will automatically use SFDP. So LGTM. Reviewed-by: Pratyush Yadav > .mfr_flags = USE_FSR, > + .fixups = &mt25qu512a_fixups, > }, { > .id = SNOR_ID(0x20, 0xbb, 0x20), > .name = "n25q512a", -- Regards, Pratyush Yadav