Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2053864lqt; Sun, 21 Apr 2024 23:00:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVGLXjKEDoYftHDJgsHjUrMzKN/y+Nf/98LXwfVUCu0as5R0gDqpq6klR4sC09hFS4fCqKbDHNvpAkTmWlCEwFcMpnrYQ8dOL+Z8k2X4w== X-Google-Smtp-Source: AGHT+IEGoEADEvub3kINbOebv5exfIC3JnvvpJ1d2eUcoOzyBQ3nH8VYvJaplKuBFnRyar5dOgXH X-Received: by 2002:a9d:6294:0:b0:6ea:1a67:4019 with SMTP id x20-20020a9d6294000000b006ea1a674019mr9535848otk.12.1713765609378; Sun, 21 Apr 2024 23:00:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713765609; cv=pass; d=google.com; s=arc-20160816; b=BHZegW+g6CyoD0xdNsTlEIj3Ym2HXpx8oN66qz3gookG5Jq8gNWjHxHSxDUyfxtCbD wfYyeoZPyHc0pgdeKbpljp2udR80xHgEuvquVSKYRqu0d6hUfQ9EBqQi5dFVWAqWZtIi UVcPfhP4aU6xk9FzpuasyGzM8f6WCRIxp8WqtqLMtt0mKFGnJ2U8MZm5fM5LoQLG2ag+ w+ig0RQHNSp05+e+Ml9RR8YV/qK6rh8cGLjPyrv1HysDk0YR1QfmAogLtNh/eazxaY3Y 4kHyZsM4ugOZAMqZ7OyhC+aAtL2ngriD9YFgRbpY8Yh/CGUdIzC7NkjAUbkErcI90cxu DdgA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=mTIk2hkxt9Gsft4fGJNtwxU+haKYdo2o58nLmGxDOIE=; fh=2HsHZjGNBerPVUGIJ2WY4gR5l77CBvNqO5rFEsGPHBQ=; b=K11dfbdSavMXKQkGl8fBerflJ2jPHCGRH+x0TryAmSKNa5Fs5NmSDdiU35FcSbC3zk RxNmdFrrkJ8HQHbZirqHoB13/Gix/87STFSj4GKPrPNxRRJqpughfdsHtoI/p9rbX0gs EA47L0gpzgaSEUazdWoJ51baQ59nby61mNtxKuvzklFRvcScnrNkR53P2n+IG0rWGUhk gZnbBtc7v/ptu+j2G/f6QtYhmDssu62Y3Hx83+IDx3qWwyUL9/nMZpfLpF4PV10Rq9fT dn6r3mSazFhnHnoAweg6KLlC8sjjCjfNuUINmlH44ZMHMFU8R1DXyMIopsZPuX5suj0g LzLw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kmIieH3s; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-152765-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152765-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c3-20020a631c43000000b005dc8554d4f6si7168926pgm.49.2024.04.21.23.00.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Apr 2024 23:00:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-152765-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kmIieH3s; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-152765-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-152765-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E6A6F28288B for ; Mon, 22 Apr 2024 06:00:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3D8118654; Mon, 22 Apr 2024 06:00:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kmIieH3s" Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31EFB1759F for ; Mon, 22 Apr 2024 06:00:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713765602; cv=none; b=iIYTvIZzG5RA6Dzhn/LuheIPKwv/JLmrHXrGqugRP9e4lyLpejcguqlx+Loi++upJaODh7qLW2a78GyOnTXbBjebH4b8DcDV25Eczv8ts/vq8dCB//u26XgvUHMnO1QDe77J2gHWXub5oouA7i7Fr74C8UZd57WmVVJw9gSYR94= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713765602; c=relaxed/simple; bh=5QrXklVTcuj9DlPCXZ0d2CTRpnsxXaYqy3W+YWV5oT0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MkVRpvPRkKpP3jA7kjCnT6/RLlN6IN4nLzRKcw0etuux+lwwL4N3SSls2dB42qgbm5xx/Ovyi1uyg71lO8qinPrcAMSrMoBJqX42Tg4FKDA2IQstp1vY28l5VPROzucDl4sQ0i2b1x+TP+RPRpTO3b5ngIm3PLlSeA4TRwM91EQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=kmIieH3s; arc=none smtp.client-ip=209.85.218.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a51a7d4466bso419831066b.2 for ; Sun, 21 Apr 2024 23:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713765599; x=1714370399; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=mTIk2hkxt9Gsft4fGJNtwxU+haKYdo2o58nLmGxDOIE=; b=kmIieH3s81KkT+ehq2/vq6JSuz4u1ca9VPWxXb8OyEAjy/Yx+/Iv1P9sh4opiUVmaR hdESp+coSSkFgWONPN8zlscFfJIsbSSEUXub74TG7DxLPT5p/6EPah1luAw3a/WuqYZc DVZTwMDLAmxzu58poU7hvP2QAMn/PEcGZFeepCQfyWvX1TK4unwObnASrlxXPR0D6zbV YYOg8bdYnJ4bh9zx4otrG0WHHahcld3KyWK4DuOwCkEfoTa2RXc2NAC0mCS7UTQJFnDn v/pMtde8ZPFidBmKeItJcaG6Hk3kvVERIpd6fZ6qDuayiUgfUo9jbvMXG6OA7pq3F82L TWpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713765599; x=1714370399; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mTIk2hkxt9Gsft4fGJNtwxU+haKYdo2o58nLmGxDOIE=; b=azmtmTaLolw9fZAx8pwIze4XTi3fGvrPZLgmREDrc3x5XVXXFg4QY+/9rE9vWGvP42 WLacCZlJP7vYI7PhA/cTkPZujTivNiIxVkdbDoMvmwRMDPJtPUwZC4PaUdsqaxj8qDuU nJm2FCxnTI5Cv+QVBqqLZY4+oRr0BGWx30HvGQ3N6Elvjx6sA2LTvDFjd7T3OZAcerVO 8Bgw7ZP5wd3dzipjYap0wp43nZsOL5VimV2gFYlLGLYpgR/HwTnwGmRYBngfPD+lAn3D xUIANZoBtakv/LTgufkG/RRb4NA7SEZ1O34nHkd8Q3jLTBoEZaYjdoGW50NBSr9td3O8 wUKg== X-Forwarded-Encrypted: i=1; AJvYcCU5PwCIsxWrEusAPSTvVbwYDI8npve08P6hqFlx74iISyFmXRU9d4/r2XWWm1jra/xrw7sGj66gOoUkZ21ZH2WxcLCVWC7o/PcR/pvm X-Gm-Message-State: AOJu0Yx1UzViBf78QhHqxUMzIAxLozb4CcTLkXj1tDCL3D/HFLfqpk1s ffBi872+ujd8Etf0btgQMdgVIoPoUq59PYJ0oJKMrtiqS/1rF+igHnGeg/wyucM= X-Received: by 2002:a17:906:2a4b:b0:a52:1770:965 with SMTP id k11-20020a1709062a4b00b00a5217700965mr4928859eje.42.1713765599507; Sun, 21 Apr 2024 22:59:59 -0700 (PDT) Received: from [192.168.2.107] ([79.115.63.100]) by smtp.gmail.com with ESMTPSA id bi14-20020a170907368e00b00a5588ed8fa2sm3785331ejc.113.2024.04.21.22.59.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Apr 2024 22:59:59 -0700 (PDT) Message-ID: <494daaab-a93c-44cd-a437-d306a8269251@linaro.org> Date: Mon, 22 Apr 2024 06:59:56 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 4/6] mtd: spi-nor: get rid of SPI_NOR_NO_FR To: Michael Walle , Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: Ricardo Ribalda , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org References: <20240419141249.609534-1-mwalle@kernel.org> <20240419141249.609534-5-mwalle@kernel.org> Content-Language: en-US From: Tudor Ambarus In-Reply-To: <20240419141249.609534-5-mwalle@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4/19/24 15:12, Michael Walle wrote: > The evervision FRAM devices are the only user of the NO_FR flag. Dro everspin is evervision? > 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. > > That is also something I want to fix soon: the opcodes can always > be set and the drivers/SFDP will only set the mask. Opcodes then can be > switched between 3b and 4b ones if necessary. > --- > drivers/mtd/spi-nor/core.c | 9 ++------- > drivers/mtd/spi-nor/core.h | 2 -- > drivers/mtd/spi-nor/everspin.c | 19 +++++++++++++++---- > 3 files changed, 17 insertions(+), 13 deletions(-) > > diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c > index f4c0b5185818..4e2ae6642d4c 100644 > --- a/drivers/mtd/spi-nor/core.c > +++ b/drivers/mtd/spi-nor/core.c > @@ -2923,15 +2923,10 @@ static void spi_nor_init_default_params(struct spi_nor *nor) > params->page_size = info->page_size ?: SPI_NOR_DEFAULT_PAGE_SIZE; > params->n_banks = info->n_banks ?: SPI_NOR_DEFAULT_N_BANKS; > > - if (!(info->flags & SPI_NOR_NO_FR)) { > - /* Default to Fast Read for DT and non-DT platform devices. */ > + /* Default to Fast Read for non-DT and enable it if requested by DT. */ > + if (!np || of_property_read_bool(np, "m25p,fast-read")) > params->hwcaps.mask |= SNOR_HWCAPS_READ_FAST; > > - /* Mask out Fast Read if not requested at DT instantiation. */ > - if (np && !of_property_read_bool(np, "m25p,fast-read")) > - params->hwcaps.mask &= ~SNOR_HWCAPS_READ_FAST; > - } > - You could do this in a dedicated patch, but I'm fine either way. Reviewed-by: Tudor Ambarus