Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1157629pxu; Fri, 27 Nov 2020 00:44:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJzFT6/EicOrzlCAE2oRocwqvR3kKnmq1e2jQNxTUCpgUx5gjhae2GZRR55clRxgXMWEDiuu X-Received: by 2002:a50:9fc5:: with SMTP id c63mr6409411edf.224.1606466699224; Fri, 27 Nov 2020 00:44:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606466699; cv=none; d=google.com; s=arc-20160816; b=FCG1knNSNvQTgyD+iR/hhoeR6KljAhhmfwtg376BooHlKEIx/1yDrlJBt78nij8mXp fntZRPRFh0sehs/Z8WvZ9eN9/mWKRT4ZUtt5KxlqbNoUK/spYpBA5G1ui7BJjYbusRQS 4mqK/vo11Ujp1MeopZIlODxPPBT98Sw7rIdUrdqDL0UyTQxr6bE/rGLBzqKzUF9V8GsT GM/32I72zELSJEzGete7mHYx+W6bJTo0y202CI/5n0ILiq7gFaOLX+BAmsU6s2XAXxe8 9MTjQRsIgTahJU+o+KZK/bExVph8Aj1UJOo4Lt3tbtt9/ptY/OlpdMkGuHfAyb49g66F VFHQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FXRp8EO9EzQHnV4EoMHG5nuEzVXMEmzONm7dcDbt3H0=; b=CLvzf5MYdCQligUfduP0gjCSl6mhbln2wFRYNlYdbwD3hBTQHRIyhFwB6dkCZmyVnc YodPIo9eJpNsm/Fft4mWS+tZp9oigW0Z0KOyHw9vhX3q5wAUxomM15+N86r9n6nM/bTP EpF1PTFttT/a8vlHDhwhR/AQUulMlutRQSvareWwy/ZL+HvG3wX80iNcIKjkBwGFhfHT ZZABZ+4FRnTzIe7QF679d5IHr9MFSU4ePv3oXNH9xbnb78ubaSDqzZb8I/V/OSKOC4M5 LD7p+Sxz1w+fmKqGQxpdrClS9ZAG3Z+WtpfLXzLjEuP5Fo/vVivPDbPUeJF3OK/n5aTH Iiag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b="lqTB/lJZ"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x18si5220310ejd.397.2020.11.27.00.44.36; Fri, 27 Nov 2020 00:44:59 -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=@walle.cc header.s=mail2016061301 header.b="lqTB/lJZ"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390304AbgKZU0l (ORCPT + 99 others); Thu, 26 Nov 2020 15:26:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389958AbgKZU0k (ORCPT ); Thu, 26 Nov 2020 15:26:40 -0500 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6489C0617A7 for ; Thu, 26 Nov 2020 12:26:39 -0800 (PST) Received: from apollo.fritz.box (unknown [IPv6:2a02:810c:c200:2e91:6257:18ff:fec4:ca34]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id B110423E60; Thu, 26 Nov 2020 21:26:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1606422396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FXRp8EO9EzQHnV4EoMHG5nuEzVXMEmzONm7dcDbt3H0=; b=lqTB/lJZrY7hs31qFbLMeawi3L4fjub+pozUsBS7lFMHODwWu5RMsZpdigAmP6A11DbvkX 8CZ4Z2e7JcpfV65AwRI9vpcGWsjixsrYVJJzUlrFUxa61YlLnATjq6EKlxsJ9nfYfW0YQr YLn9jc1KyArdSGuGljUA/yt67G//1ms= From: Michael Walle To: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , Boris Brezillon , Michael Walle Subject: [PATCH v6 3/5] mtd: spi-nor: intel: remove global protection flag Date: Thu, 26 Nov 2020 21:26:12 +0100 Message-Id: <20201126202614.5710-4-michael@walle.cc> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201126202614.5710-1-michael@walle.cc> References: <20201126202614.5710-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For the Atmel and SST parts this flag was already moved to individual flash parts because it is considered bad esp. because newer flash chips will automatically inherit the "has locking" support. While this won't likely be the case for the Intel parts, we do it for consistency reasons. Signed-off-by: Michael Walle --- changes since v5 - new patch drivers/mtd/spi-nor/intel.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/mtd/spi-nor/intel.c b/drivers/mtd/spi-nor/intel.c index d8196f101368..6c31bef3fc60 100644 --- a/drivers/mtd/spi-nor/intel.c +++ b/drivers/mtd/spi-nor/intel.c @@ -10,23 +10,13 @@ static const struct flash_info intel_parts[] = { /* Intel/Numonyx -- xxxs33b */ - { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, - { "320s33b", INFO(0x898912, 0, 64 * 1024, 64, 0) }, - { "640s33b", INFO(0x898913, 0, 64 * 1024, 128, 0) }, -}; - -static void intel_default_init(struct spi_nor *nor) -{ - nor->flags |= SNOR_F_HAS_LOCK; -} - -static const struct spi_nor_fixups intel_fixups = { - .default_init = intel_default_init, + { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, SPI_NOR_HAS_LOCK) }, + { "320s33b", INFO(0x898912, 0, 64 * 1024, 64, SPI_NOR_HAS_LOCK) }, + { "640s33b", INFO(0x898913, 0, 64 * 1024, 128, SPI_NOR_HAS_LOCK) }, }; const struct spi_nor_manufacturer spi_nor_intel = { .name = "intel", .parts = intel_parts, .nparts = ARRAY_SIZE(intel_parts), - .fixups = &intel_fixups, }; -- 2.20.1