Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 03E8AC05027 for ; Fri, 20 Jan 2023 12:25:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BECA6854CD; Fri, 20 Jan 2023 13:25:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="DZSNXpPx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5C4E2856CC; Fri, 20 Jan 2023 08:18:39 +0100 (CET) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E9901856C7 for ; Fri, 20 Jan 2023 08:18:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tudor.ambarus@linaro.org Received: by mail-wr1-x431.google.com with SMTP id b7so4011066wrt.3 for ; Thu, 19 Jan 2023 23:18:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Cz2Qku16ta0GEy1FduYGWCgDeSs7UBfaexXgVbc4uPc=; b=DZSNXpPxbFlTalNf9uBAwqJT2u/qV1dz+x5y5hAXtg/TT8lsopn+yatn60hMAo/TgM EN15LvlpbtbIfesTCmqdSiUci9dVLs32cOmTzWNCqbsR6qEj6HkkD81sYuuUJTQRhPmX 6wIXRdtjJjVWuYur4EzaM2m96/dF6NjaBRzJNtEehO32gfPh0ZNdvuyzS9gig4xsD4q6 bXsf88mMvQA3T6+rGXZDhlQgLi9J5DCIHHDMb58I0dX9DY4gvGrFJ28EYieNuvgsWMMA suPi7CYDj97jKzVSXcn+EQyWkJySCzqV3aDaJ/uOzM/kT5JOjfphukh4EnavHFQj8a9F e4tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Cz2Qku16ta0GEy1FduYGWCgDeSs7UBfaexXgVbc4uPc=; b=Dh8SMUEPUQD0/1o1B5uEt64J/hCF+vF78+4zqOOAuEdk0jUAKGtUETXnN7W3BiQQqY N2+v0fjl1kyzP2hKZmpZBDBXsd8QqDW1poot+eeNIOdL4X84g1gsHp7Yogwv4hIYdXdi ExCVgn7ZYJ5fSyn1s5h5xKwo4Oo6BS0cZIHRTP0z+xMgG9aOMd1Pc7sXXUs1eZCv4hx+ 6Gx6QfjPbm8nioohsofx1eeGM8ylIHAekyxd3HS2yPlR9UWlMxinsjWFjAwLOxcoz5TD PgirhSPKHAKZwDHfOTpOxfrZvAN1pxutJR33IDphFVZCuY2eExLqa5yC09ZIy5YCB8iZ d+Ow== X-Gm-Message-State: AFqh2kqNbwysRErmII9fMLSlTpTkxCLdxzfq8VxKMiCv0xeemW0DL/uG qEQVFY143h3ztkuj7O2Nk+B3eg== X-Google-Smtp-Source: AMrXdXsFjfZJXb3FRNNuWS3yCHQubs+qA+Fjs7pMqBhd9Yh/rH4KxABA4KcxM6sN7osgGubmooPh+g== X-Received: by 2002:a5d:608d:0:b0:2bd:bdad:4cd6 with SMTP id w13-20020a5d608d000000b002bdbdad4cd6mr11813492wrt.60.1674199110398; Thu, 19 Jan 2023 23:18:30 -0800 (PST) Received: from [192.168.2.104] ([79.115.63.215]) by smtp.gmail.com with ESMTPSA id c13-20020adffb0d000000b00241fde8fe04sm34935126wrr.7.2023.01.19.23.18.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Jan 2023 23:18:30 -0800 (PST) Message-ID: <74aee5dd-9a87-7803-6cde-e4b1332afc10@linaro.org> Date: Fri, 20 Jan 2023 07:18:28 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v2 1/2] mtd: spi-nor-core: Consider reserved bits in CFR5 register Content-Language: en-US To: tkuw584924@gmail.com, u-boot@lists.denx.de Cc: jagan@amarulasolutions.com, vigneshr@ti.com, d-gole@ti.com, pratyush@kernel.org, Bacem.Daassi@infineon.com, Takahiro Kuwano References: <768f00ff8dfbbf4e7e481ad7225cb1723d2799bb.1674182603.git.Takahiro.Kuwano@infineon.com> From: Tudor Ambarus In-Reply-To: <768f00ff8dfbbf4e7e481ad7225cb1723d2799bb.1674182603.git.Takahiro.Kuwano@infineon.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 20 Jan 2023 13:24:59 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 1/20/23 03:28, tkuw584924@gmail.com wrote: > From: Takahiro Kuwano > > CFR5[6] is reserved bit and must be always 1. Set it to comply with flash > requirements. While fixing SPINOR_REG_CYPRESS_CFR5V_OCT_DTR_EN definition, > stop using magic numbers and describe the missing bit fields in CFR5 > register. This is useful for both readability and future possible addition > of Octal STR mode support. > > Fixes: ea9a22f7e79c ("mtd: spi-nor-core: Add support for Cypress Semper flash") > Suggested-by: Tudor Ambarus > Signed-off-by: Takahiro Kuwano Reviewed-by: Tudor Ambarus > --- > include/linux/mtd/spi-nor.h | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h > index 30f15452aa68..2fb4595fc756 100644 > --- a/include/linux/mtd/spi-nor.h > +++ b/include/linux/mtd/spi-nor.h > @@ -194,7 +194,12 @@ > #define SPINOR_REG_CYPRESS_CFR3V_PGSZ BIT(4) /* Page size. */ > #define SPINOR_REG_CYPRESS_CFR3V_UNISECT BIT(3) /* Uniform sector mode */ > #define SPINOR_REG_CYPRESS_CFR5V 0x00800006 > -#define SPINOR_REG_CYPRESS_CFR5V_OCT_DTR_EN 0x3 > +#define SPINOR_REG_CYPRESS_CFR5_BIT6 BIT(6) > +#define SPINOR_REG_CYPRESS_CFR5_DDR BIT(1) > +#define SPINOR_REG_CYPRESS_CFR5_OPI BIT(0) > +#define SPINOR_REG_CYPRESS_CFR5V_OCT_DTR_EN \ > + (SPINOR_REG_CYPRESS_CFR5_BIT6 | SPINOR_REG_CYPRESS_CFR5_DDR | \ > + SPINOR_REG_CYPRESS_CFR5_OPI) > #define SPINOR_OP_CYPRESS_RD_FAST 0xee > > /* Supported SPI protocols */