Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1192983lqb; Thu, 18 Apr 2024 02:58:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUeLoj6DRvJs+MeQ7b1/WWojUhxR+fv0N74V9Qmeyu7QbMiWO3U1ncJaZb0f2XBAvmWzfRlMdiUbqoKn5CuGPYMNBwy1c0J17CRJ9zQMg== X-Google-Smtp-Source: AGHT+IE6bCxl5PHF52HyE3k8rpZUoO2MeD0LTBOqexIdJu79ecc/M0WHRSACUGl5WqIUzkgRzBdE X-Received: by 2002:a50:ab4c:0:b0:56e:2e4d:884e with SMTP id t12-20020a50ab4c000000b0056e2e4d884emr1748380edc.0.1713434287018; Thu, 18 Apr 2024 02:58:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713434287; cv=pass; d=google.com; s=arc-20160816; b=Cd7AJv1to8suogTi6EEbS2AUQWZyVe5H7XXsQfTawaKKnUMMNPNble8lWOlHazH3ZT JY+xiDrtty1Nm38GhaBZGxZddEdVtjxGB3miGpFXjHzvgDb//kwSBGQSME3teWAQ/p+q BK/5QXW7FedjMouzyGzALQ/Xkwge+PPyAY7Jna04sSyE+Pl0X4LdB4L5/B0xZTg+vn+f 0s7OdKNaiQcbe7Y+CY3L8nFXU+2AqPShiLRn1m+eBVTyKdQ9K01zsfg0+gTsIvg0C/3h zWOtqiglbvacvIMcPUC5i+8TgKvxm3jgj4QaJeK7mAxRSRAyhBzpl8sEqKzd6HC7wONn gsBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to :references:to:from:cc:subject:message-id:date:dkim-signature; bh=gD3AkuQ6vRE3fSfqY2EDZsDFNd3uj5dL0HzrTR7vbBA=; fh=9ri30RoKMKDLnIocqJ7zbRUlH1g7wOpNkAy5jMOgGvc=; b=qVoyvcutLdKtGt5q3qXfF8mY3Fi84gXjGCGtNAwl+w4Tq9TZwOoO2A9V9yqxzr0Ez9 HcYq6lWn5ggD7phY+9HaSNZhW1PoKL4Gl5I0zjdWR/krEqBsAo9Ci8K3rKn9RagBoVSb iCzO3O5doH3rYN2NBdl7QqWpRMirTaxdKzRDJaTe6Avw9bx2KHBqFVLuIS3lyAQ8ttUr AdDrvpKcMUgUY6RcTMbgfkrL3QXj8VVYq91BXlqWV4euf8nloREG6W7aoYLOV4opssBv d5W+BPjbjuk2hOquwIQ9qvVyQDylENs8fO0xet/Uy4ZnNm8aVdif1kHy3N0s7xmFYY/f mOxA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EfTBw90L; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-149854-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149854-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 y12-20020aa7c24c000000b0056c38f7295fsi640601edo.602.2024.04.18.02.58.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 02:58:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149854-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=EfTBw90L; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-149854-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149854-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 BC56D1F21E87 for ; Thu, 18 Apr 2024 09:58:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 02F4F15B96E; Thu, 18 Apr 2024 09:57:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EfTBw90L" 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 2CCA115B15B for ; Thu, 18 Apr 2024 09:57:47 +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=1713434267; cv=none; b=aBLt7qsB5pIX83ne8caMb1ekza3GR/4uu21RwW4onAIrWipcZ0faXMUmd0vS1T/SSt0zrhYtq53em+xiWANFIld/RNEPCXrw+HhH/iELgqZwEtZMcEfesbHi1MQCpihiwYhHC3D5NSI7p5idoSeaJpwu7clFWpPOn7+0cuASJEg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713434267; c=relaxed/simple; bh=FnO7O/LAw4UD9EIKQqffhjBWzBF2/WXbWWY5ME5kBNo=; h=Content-Type:Date:Message-Id:Subject:Cc:From:To:References: In-Reply-To; b=C8tLhp0LfjJwF6IILpkdObLU+79XWsd+UtArPoCVPi5Izgmx3lupeVX50k0zoIkaoyxWWXK17BAUi58k5m5A2e56SR2awsmQ+BsvESxK+eHpa34NofNnrkYdW3x4zk2+7qm8JHLTvEHdE2PAf3Rbunmb3gEtD7xZuQ13Lwhtos0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EfTBw90L; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E80EC113CC; Thu, 18 Apr 2024 09:57:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713434266; bh=FnO7O/LAw4UD9EIKQqffhjBWzBF2/WXbWWY5ME5kBNo=; h=Date:Subject:Cc:From:To:References:In-Reply-To:From; b=EfTBw90L4vECvMjY6fgUro/CI+kPMmubR9J4aZTL+VlxjrFBHSjNeLq5nAVOEa0ys CtUi6dSbl0AK9PtokwZkqOxh+zO+z/wu0s5olR17H4MUgOXFcb+thnZSUngjFnPeiw P8wEIgmjVLS98FHbCqoGgK8CFB+fkeXNFuFwj4Y7hR7ZmG3RsLiv/IYaq4mNgCDhr/ YFjebODwdUd4aaUikgkd0jPHz05PcC1a0O93ikHC0tD5aPjDUJXwCaoi8FTUbjm704 T4l/M5LUEX2qPR1N/13nqkxeSqmHu1yxu4HnroeBAYq5JslItN+Muxt5zlh/CI5ikG ueLSdRJG7J42A== Content-Type: multipart/signed; boundary=d634570c1f6a4a1796182749624c4b5d93dc5a4862d7079e44e41056bc8b; micalg=pgp-sha384; protocol="application/pgp-signature" Date: Thu, 18 Apr 2024 11:57:27 +0200 Message-Id: Subject: Re: [RFC PATCH v1 6/6] mtd: spi-nor: introduce support for displaying deprecation message Cc: "Tudor Ambarus" , "Miquel Raynal" , "Richard Weinberger" , "Vignesh Raghavendra" , , From: "Michael Walle" To: "Pratyush Yadav" X-Mailer: aerc 0.16.0 References: <20240412134405.381832-1-mwalle@kernel.org> <20240412134405.381832-7-mwalle@kernel.org> In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: --d634570c1f6a4a1796182749624c4b5d93dc5a4862d7079e44e41056bc8b Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Hi, On Wed Apr 17, 2024 at 5:52 PM CEST, Pratyush Yadav wrote: > On Wed, Apr 17 2024, Michael Walle wrote: > > On Wed Apr 17, 2024 at 4:36 PM CEST, Pratyush Yadav wrote: > >> On Fri, Apr 12 2024, Michael Walle wrote: > >> > >> > SPI-NOR will automatically detect the attached flash device most of = the > >> > time. We cannot easily find out if boards are using a given flash. > >> > Therefore, introduce a (temporary) flag to display a message on boot= if > >> > >> Why temporary? There will always be a need to deprecate one flash or > >> another. Might as well keep the flag around. > > > > Mh, yes I agree. That also means that this flag will not have any > > users (most) of the time (hopefully ;) ). > > > >> Also, this patch/series does not add any users of the deprecated flag. > >> If you have some flashes in mind, it would be good to add them to the > >> patch/series. > > > > This is just an RFC to see if whether you Tudor agree with me :) But > > I was about to add it to the evervision/cypress FRAMs. > > > >> I like the idea in general. Do you think we should also print a rough > >> date for the deprecation as well? > > > > Might make sense, any suggestions? > > How about a simple string to flash_info? Ahh, I was rather asking if you already had a time frame in mind. Besides that, should it be a date or a (future) kernel version? Roughly about two/three kernel releases? > /** > * struct flash_info - SPI NOR flash_info entry. > * @id: pointer to struct spi_nor_id or NULL, which means "no ID" (most= ly > * older chips). > * @name: (obsolete) the name of the flash. Do not set it for new additio= ns. > * @size: the size of the flash in bytes. > * @deprecation_date: The date after which the support for this flash wil= l be > * removed. > * [...] > */ > struct flash_info { > char *name; > const struct spi_nor_id *id; > char *deprecation_date; > [...] > } > > And then in everspin.c for example, > > { > .name =3D "mr25h128", > .size =3D SZ_16K, > .sector_size =3D SZ_16K, > .addr_nbytes =3D 2, > .flags =3D SPI_NOR_NO_ERASE | SPI_NOR_NO_FR, > .deprecation_date =3D "2025-01-01", > }, { > > And in spi_nor_get_flash_info() (changed some wording of the message): > > info =3D jinfo ?: info; > > if (info->deprecation_date) > pr_warn("Your board or device tree is using a SPI NOR flash (%s) with\n= " > "deprecated driver support. It can be removed in any kernel\n" > "version after %s. If you feel this shouldn't be the case, please cont= act\n" > "us at linux-mtd@lists.infradead.org\n", info->name, > info->deprecation_date); > > return info; > > This would also remove the need for SPI_NOR_DEPRECATED. But it would > make the flash_info 4 or 8 bytes larger. > > What do you think? Looks good. -michael --d634570c1f6a4a1796182749624c4b5d93dc5a4862d7079e44e41056bc8b Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iKcEABMJADAWIQTIVZIcOo5wfU/AngkSJzzuPgIf+AUCZiDuhxIcbXdhbGxlQGtl cm5lbC5vcmcACgkQEic87j4CH/gX8QF44ntSYBOpUzOrXjd2P5ZKnbh5928I1t36 JOjjpnwFUrSpmcnSrtzO6TzpDxJSeYABgNW3ep68DS04VArOFpAeXNmTKp9a5w91 TagrJH8qrhzlzkJ+eVJiDIkY8Q2Z0LNYyQ== =4HSX -----END PGP SIGNATURE----- --d634570c1f6a4a1796182749624c4b5d93dc5a4862d7079e44e41056bc8b--