Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp717922lqb; Wed, 17 Apr 2024 08:50:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWnn6PdiYUaj+rPge+03BwOu26jsp0v3OJVROKxk1S2LHfrjLp3qrNLbG7yWqvIS90d9BNTEry8P1w4/Sd/Gk0RsOnohApF6aMWPWWvNw== X-Google-Smtp-Source: AGHT+IHyIr2kepLG/4rZispPq+kCcFByo2PAE2j3o07CcbPmT4HZd97Q2ujA3IQS30xbWXyb97RY X-Received: by 2002:a05:6512:1106:b0:518:9183:864f with SMTP id l6-20020a056512110600b005189183864fmr16416472lfg.34.1713369015003; Wed, 17 Apr 2024 08:50:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713369014; cv=pass; d=google.com; s=arc-20160816; b=daiERwdj6MS4yYZDVY/oT2zVQiiJljbNcoRgaQbA0eteZasVZ30VHfBvmHVxLtjDbn Al7p9vuDchw5HCkT701QPcgoqMbQ6ssvv6sVnzFo7GLEK/fl02R3IOOalo5DEDSu9+oC fq36zbBWGrquMEO0KLRJC6NkHd9uitWqaUmov5DbJYrlP/08WteNHwkN6adFRztGobiU 6vzYA6CyunJL2mhOcj+PSTmRMJvWPbhi5IRoy3cUB/Fkjzo286ZJlid1uYIdLd6va4bj GVNbC9wVHc+s0f1kmpsGY4Jx+8YHNELPTMG2+5yRaV82N4nzAuItzfFQ7hDMN5vAoY83 bE1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:date:references:in-reply-to:subject:cc:to :from:dkim-signature; bh=w7r9FWILRHElGrqAOWYDbed2J+d4m5WghNxKLjbXBBQ=; fh=r8L5bXDsBG/bRUCI0fySNuvIQQUALttCCAl1LUs2PY8=; b=yp4UF1afcfkMCRR6VeXLz3dLrmsbySg14XlBtjEf4m7yRtATSrv4GIfV/0wMFfvDmU bS3GTzAey8dUUr59DQXLtAoilKYEYt+X9AFbzV0zznzgCHTxEEarXE+eLaCf8F6zfqCk aNk5+KDmmbDrTaj2dicrjD0mAQKGcwC9kZyitFZjzDQWXBTV4ASuIuW6nWnrS3u9qhLt jCq1vn1JzXTH/y04btflE4zchqo8TA6ymGZb30eUgVlNoKhkPgmeSZTNiUKQMnCWZoqx 5P2+eaVDe4BOlDIJfcxn/3Gtg0bQ/6N4+AtxPCvqbKhbHcwHsxHlMq5LgLkz6AswT7k+ bRdg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mbkUZ1SS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-148833-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148833-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id u17-20020a50a411000000b0056e0c08fa30si6908722edb.450.2024.04.17.08.50.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 08:50:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148833-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mbkUZ1SS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-148833-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148833-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CACDA1F26E8B for ; Wed, 17 Apr 2024 15:40:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E0841482E5; Wed, 17 Apr 2024 15:38:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mbkUZ1SS" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5AD89146D58 for ; Wed, 17 Apr 2024 15:38:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713368280; cv=none; b=mC6WNxwJJJLB7zZ9RUNoq0xizohF/Dg5Xuc2TImynaq5UyMLGsoH7y2mphmn7niZuc6DFYLAnUWGuNriltCQbhBFRscrAQWbhxxBbp8SfpggWh+bgjkIoKLabPFpGlaKVG8hG/8zG9xkDMcoPLbWor3Vy+Ya2WGsILoez+tF5+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713368280; c=relaxed/simple; bh=mh2+5wpHchabfjbCTzG60AEhghAUqGqsxHVVQfQv3e8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=jep5ojJY0W/2pgb6y621PbDu6qjm64tTtlbgR3pYUYYxBEHPl9zOl2TwkfJwYQEuBkzDZZ8hiRqUOfpP0FTJu6KVKfkYanlnfSdq26Wgqqf5IHmgGOXmK/vYNTecnFgIFXG1jYRZ5efgxRY3vqBGiFcDS7H1GM+1OgzGKO9uWUE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mbkUZ1SS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FC56C072AA; Wed, 17 Apr 2024 15:37:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713368279; bh=mh2+5wpHchabfjbCTzG60AEhghAUqGqsxHVVQfQv3e8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=mbkUZ1SS5u1kbyTwSgUOP9zj+xdYEzY/cTAOi0OJ1TkcG0MlHdReTLJSp7mVWQFWc Vp2khz55PEh0uWXJV5vpI5kW9IY8zjQSY7M8onw5UhB2Uo12JIOWHCe/I0vwXIFtAw 0ttP+cyFVHPQ8kw00TKum3NX1J236sK0myUoxCWELqjxZHBoDthG7mjIRdsSXXwNqq u5cLPKqo6iSxgH2n1shXWYS8F0KwbAppqJR1FhDXygWCqTw5axbbCjcerQmqRxAI1U AE0EfhmaXbu5Fv0l3o/mOONbRK231SLmVKOqDqB+pyAqKrTZqZJCJ0og5q0gTvk0Vy eFR7Jd1bnDabA== From: Pratyush Yadav To: "Michael Walle" Cc: "Pratyush Yadav" , "Tudor Ambarus" , "Miquel Raynal" , "Richard Weinberger" , "Vignesh Raghavendra" , , Subject: Re: [PATCH v1 3/6] mtd: spi-nor: get rid of SPI_NOR_NO_FR In-Reply-To: (Michael Walle's message of "Wed, 17 Apr 2024 16:43:15 +0200") References: <20240412134405.381832-1-mwalle@kernel.org> <20240412134405.381832-4-mwalle@kernel.org> Date: Wed, 17 Apr 2024 17:37:57 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Wed, Apr 17 2024, Michael Walle wrote: > Hi, > > On Wed Apr 17, 2024 at 3:39 PM CEST, Pratyush Yadav wrote: >> On Fri, Apr 12 2024, Michael Walle wrote: >> >> > The evervision FRAM devices are the only user of the NO_FR flag. Drop >> > the global flag and instead use a manufacturer fixup for the evervision >> > flashes to drop the fast read support. >> > >> > Signed-off-by: Michael Walle >> > --- >> > Please note, that the fast read opcode will still be set in >> > spi_nor_init_default_params(), but the selection of the read opcodes >> > just depends on the mask. >> >> Since that is the case now, might as well drop the >> >> if (params->hwcaps.mask & SNOR_HWCAPS_READ_FAST) >> >> in spi_nor_init_default_params(). > > I want to address that in another patch where I'll do that for all > the opcodes. Just doing it for the fast read looks odd. Okay. [...] >> > diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h >> > index 072c69b0d06c..9aa7d6399c8a 100644 >> > --- a/drivers/mtd/spi-nor/core.h >> > +++ b/drivers/mtd/spi-nor/core.h >> > @@ -479,7 +479,6 @@ struct spi_nor_id { >> > * Usually these will power-up in a write-protected >> > * state. >> > * SPI_NOR_NO_ERASE: no erase command needed. >> > - * SPI_NOR_NO_FR: can't do fastread. >> > * SPI_NOR_QUAD_PP: flash supports Quad Input Page Program. >> > * SPI_NOR_RWW: flash supports reads while write. >> > * >> > @@ -528,7 +527,6 @@ struct flash_info { >> > #define SPI_NOR_BP3_SR_BIT6 BIT(4) >> > #define SPI_NOR_SWP_IS_VOLATILE BIT(5) >> > #define SPI_NOR_NO_ERASE BIT(6) >> > -#define SPI_NOR_NO_FR BIT(7) >> > #define SPI_NOR_QUAD_PP BIT(8) >> > #define SPI_NOR_RWW BIT(9) >> >> Move the other bits up since the slot is now free. > > Mhh can't decide what's better here. On one hand I'd really like to > avoid too much code churn because it's already hard enough to follow > the development using git blame. OTOH, a new flag would need to be > added in between the existing flags. Not sure.. Or we if we run out > of free spots at the end we might get rid of the free slots. Filling this slot with the new deprecated flag should do the trick then. BTW, -M and -C options for git-blame can help you a bit. They can detect moved and copied lines, and look for the original one to blame. From man git-blame: -M[] Detect moved or copied lines within a file. When a commit moves or copies a block of lines (e.g. the original file has A and then B, and the commit changes it to B and then A), the traditional blame algorithm notices only half of the movement and typically blames the lines that were moved up (i.e. B) to the parent and assigns blame to the lines that were moved down (i.e. A) to the child commit. With this option, both groups of lines are blamed on the parent by running extra passes of inspection. is optional but it is the lower bound on the number of alphanumeric characters that Git must detect as moving/copying within a file for it to associate those lines with the parent commit. The default value is 20. -C[] In addition to -M, detect lines moved or copied from other files that were modified in the same commit. This is useful when you reorganize your program and move code around across files. When this option is given twice, the command additionally looks for copies from other files in the commit that creates the file. When this option is given three times, the command additionally looks for copies from other files in any commit. is optional but it is the lower bound on the number of alphanumeric characters that Git must detect as moving/copying between files for it to associate those lines with the parent commit. And the default value is 40. If there are more than one -C options given, the argument of the last -C will take effect. [...] -- Regards, Pratyush Yadav