Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9423424pxu; Mon, 28 Dec 2020 16:02:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxWDuS1LVgS7OtNHh/45EOZycaRUox4fplsqLYRt3nfg4xixqxC3+cZUWE/8LAVjQst9GO7 X-Received: by 2002:a17:906:2c54:: with SMTP id f20mr43989099ejh.318.1609200151657; Mon, 28 Dec 2020 16:02:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609200151; cv=none; d=google.com; s=arc-20160816; b=F+lOpBXJkiVcJdb5KwF+qI5mjhNNQHlmBc0OXrXk72s3BOKZr72ouZfoLOr9NrBd/P cBCNp5/XSor2M0WCKpEnFCM8tHqNW/1YeQYzOJAGHvSvjgosS/5V+SAOTyTAS8uv9QV2 cpmgXgC4opoOS6YiSTJ5PXeryvb2eEpxop6IxkVHTffOiDnG0u7ZlkISGfM5nfM/1lJq J4T95ArkCitv06CDKN57ckgBIyZJXuvgrdyB0IgEu/o/NVqztZQ7EvJ9z+irte6MixbO 7IoxRVEbea8bFYtqcMJTVZChKdMe6Rok7zPSCjERuKG9DVequCxcwhqc8uk4T/yJmVTo 1o2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xQ+qByeY0r8dQSnx/tPrdRUmqX/gNb6ELAx1txyFgBI=; b=TGKKLX1pYZi7FirX3v8BphcQCrQrGTfEmEs/eFmi7jj+ww4EiyHXwUCq8W/CHWOQy/ 8jpUN/kYzSGK1wRvTJ0XroVHb5IeSiHNLUKCAyJfMOUGuTriiuoguuvoDjyCYQmMRalq vjKw8O992bXPinFu1HuYmLH27DeaZBBKgPUHr3X0Ox5ZFAAUkyDa6hhW29ObEqonm7Ke GgOrl4O3BhGp3UZhiVlb+070nrrF9MNvoHlk2lTjByA5hJmNPD7XBp0f8BA9tDC5DOaY Gbw4t15ucomOQG58PLSC1wedSKHoIeFo1XPnrnHLW579ckFzAMd+aGZqtPEyBu7rIfB1 fQjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y3uCfk5F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd3si20625399edb.558.2020.12.28.16.02.08; Mon, 28 Dec 2020 16:02:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y3uCfk5F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408095AbgL1Ozi (ORCPT + 99 others); Mon, 28 Dec 2020 09:55:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:51948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2441329AbgL1ORB (ORCPT ); Mon, 28 Dec 2020 09:17:01 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 301C4207B2; Mon, 28 Dec 2020 14:16:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165005; bh=xb0Uv21e94yMnrikOM3ZpNUJhYWgw2Lpwh5CLNix+K8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y3uCfk5FMKGJuwV9x6FCIi7hK0uHwydQCHNEgxBaEnyex7jMTamqzHKkuStqSO9Hu E1PjZY89J1V31vHAk6l0jPz7gWUWWL8azQtCH9Q9SwOAY4lVTPdOgHzvu7ffr1MzjB qa/7rOKbzegnFrEHQ5vcfqjZn0heNAyjqWPYnNkg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tudor Ambarus , Michael Walle , Vignesh Raghavendra , Sasha Levin Subject: [PATCH 5.10 346/717] mtd: spi-nor: sst: fix BPn bits for the SST25VF064C Date: Mon, 28 Dec 2020 13:45:44 +0100 Message-Id: <20201228125037.603931498@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Walle [ Upstream commit 989d4b72bae3b05c1564d38e71e18f65b12734fb ] This flash part actually has 4 block protection bits. Please note, that this patch is just based on information of the datasheet of the datasheet and wasn't tested. Fixes: 3e0930f109e7 ("mtd: spi-nor: Rework the disabling of block write protection") Reported-by: Tudor Ambarus Signed-off-by: Michael Walle Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20201203162959.29589-2-michael@walle.cc Signed-off-by: Sasha Levin --- drivers/mtd/spi-nor/sst.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor/sst.c b/drivers/mtd/spi-nor/sst.c index e0af6d25d573b..0ab07624fb73f 100644 --- a/drivers/mtd/spi-nor/sst.c +++ b/drivers/mtd/spi-nor/sst.c @@ -18,7 +18,8 @@ static const struct flash_info sst_parts[] = { SECT_4K | SST_WRITE) }, { "sst25vf032b", INFO(0xbf254a, 0, 64 * 1024, 64, SECT_4K | SST_WRITE) }, - { "sst25vf064c", INFO(0xbf254b, 0, 64 * 1024, 128, SECT_4K) }, + { "sst25vf064c", INFO(0xbf254b, 0, 64 * 1024, 128, + SECT_4K | SPI_NOR_4BIT_BP) }, { "sst25wf512", INFO(0xbf2501, 0, 64 * 1024, 1, SECT_4K | SST_WRITE) }, { "sst25wf010", INFO(0xbf2502, 0, 64 * 1024, 2, -- 2.27.0