Message ID | 20240203002834.171462-11-william.zhang@broadcom.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-50784-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp802761dyc; Fri, 2 Feb 2024 17:50:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IFCiTAxluFqVUJnHmZc/92kpISUu2P9gbo1LiOlJMfBNfr64tzRA0zdjUK+Ancqp06tXFh2 X-Received: by 2002:a05:6808:23ca:b0:3bf:bf81:c700 with SMTP id bq10-20020a05680823ca00b003bfbf81c700mr3967528oib.16.1706925010892; Fri, 02 Feb 2024 17:50:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706925010; cv=pass; d=google.com; s=arc-20160816; b=AN+CqOD3R2WoQOXQPlt+GDVmoO0AvyhxzUZ6SgLH2hwRGxwt3BrtWH/4RhCmK3Dl3W fL0aSbS9lJC4+Ay6TZTELfu0ZUB7L9VOtlo9Hx4xrkafiLnQ3zcVmb3Y+ux+wyXB9JKz M84WTEal/b/A9yU2YZS/J4Ag5M9uAm0DwaGeKvgTlLcKEM3ypzeLlr30bD/kZJz9EmOS Th0R6fgqzjHv1U8VTEBDLi5NI5SySTRynxhXKA5vkqGJspuykI8ncZdk4qKt1xVjLQd5 EM41fXo9IKPja0nkSkz1qIU00Ec+WWeRrrYs0fwg/M0v1JRmXaMArRcjdAdj1bu91Q9+ Z5NQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-filter; bh=JbJskgU16IKX1o+zwN+em6SbRZySqO1hl82127p0go8=; fh=nWCXKtwYKp0J41m+3C2RO6XWKb+rEGGhA40ds+ImUnQ=; b=s54IKLkcwTW+dajcTOy9ap7YBRhu1O8uR3T7/Ay8gqHdl8HutE1UZpRJ0dS2U6/Gj8 8MYa8D06SfZC/Hb6OY21uAq5IRC9daFN1f/VEdto/nzFLzUfDy19SiP6Ia5iLGRTdIeu wnEj6SijEr2Ox3qBwTEd7F7N6hAUmeQ9okclDqqeGenoaoOv7wB9qjFIcRtgoC7PkQj9 X4Mg35drl+9kUcWcdSVPfKSS6DmACVEr7udqdM3by7F3N5MdDIgTJOasYdT6q7+o4+GW LX3YrYzYZYxh3CRdStYKUgDXvMwOtaZPW5D8sILpnWgMP4HpoTuIYttx2zmuXy2CtP2S c+Rg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=AlOW1xN+; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-50784-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50784-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com X-Forwarded-Encrypted: i=1; AJvYcCVCQoPEojv6p7qwvJM1jmq2EqxHDatDzb19On3wDzIbNHlFLQQ2cYqnlJrvzSnHuvIFJZL/1n+DrJ6dwSEo4HRB7XLVVw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a14-20020a05620a02ee00b0078403334a6fsi3351751qko.733.2024.02.02.17.50.09 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 17:50:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50784-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=dkimrelay header.b=AlOW1xN+; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-50784-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50784-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 999671C24FD4 for <ouuuleilei@gmail.com>; Sat, 3 Feb 2024 00:31:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D73253AC; Sat, 3 Feb 2024 00:29:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="AlOW1xN+" Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.144.205]) (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 51DB7111A1 for <linux-kernel@vger.kernel.org>; Sat, 3 Feb 2024 00:29:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.19.144.205 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706920183; cv=none; b=g8+TgSXPRjGgIm3cG7wjB5zpzNWsTV04VO58rVm16TJ5I2cgq4Mkw8m8yeHRtPMs87ZPssX5R0LsW43Rs4YNn++jSELrpDQRHdwWo2LYOSLkdZCS2j5dzqxoTTC8+OJlf0EcHjIUjaK/t15PDi0/Qt3y8hg/HqwTJUIpGY4ne60= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706920183; c=relaxed/simple; bh=UPiy9NotMMhw6RetrVpXpgqiL4XDR2ya1PJkJ281Hf8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Dli//m7Gj3r6LAd2YliPiLzDBD8QJnfnaSH24U6bhwT8Urw5kzO1/2zaj0nNp5yxgGn5zJIgagmTbIaOmXeORJmRsNH+dlQVU8yEuhKJr9pm0fsSGy0mSrkKpxARcGiNlmptDtlYlBK8w2kHHUQz1+QpKi3Z8eFLOHLJ1+N14BU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=AlOW1xN+; arc=none smtp.client-ip=192.19.144.205 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 63CA3C0000EC; Fri, 2 Feb 2024 16:29:41 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 63CA3C0000EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1706920181; bh=UPiy9NotMMhw6RetrVpXpgqiL4XDR2ya1PJkJ281Hf8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AlOW1xN+lDL5uGwFqHKc4uMARbK5v94zuXoKF0hP1LhOT+WAHAL7MkoSU+zbEHFxx VtPNJTcVDwzuxLCnN0z/yyw6F1YD8Ewj79abbz4NboHDpX5i6UaYD4IblJ7qnGCTXA COFjVniYLx4GhQvguR6/bT08YNL4ksYPLVdDrm/k= Received: from bcacpedev-irv-3.lvn.broadcom.net (bcacpedev-irv-3.lvn.broadcom.net [10.173.232.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id BE1E518041CAC4; Fri, 2 Feb 2024 16:29:39 -0800 (PST) From: William Zhang <william.zhang@broadcom.com> To: Linux MTD List <linux-mtd@lists.infradead.org>, Linux ARM List <linux-arm-kernel@lists.infradead.org>, Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com> Cc: f.fainelli@gmail.com, kursad.oney@broadcom.com, joel.peshkin@broadcom.com, anand.gore@broadcom.com, dregan@mail.com, kamal.dasu@broadcom.com, tomer.yacoby@broadcom.com, dan.beygelman@broadcom.com, William Zhang <william.zhang@broadcom.com>, Florian Fainelli <florian.fainelli@broadcom.com>, David Regan <dregan@broadcom.com>, Miquel Raynal <miquel.raynal@bootlin.com>, linux-kernel@vger.kernel.org, Vignesh Raghavendra <vigneshr@ti.com>, Brian Norris <computersforpeace@gmail.com>, Richard Weinberger <richard@nod.at> Subject: [PATCH v4 10/12] mtd: rawnand: brcmnand: Support write protection setting from dts Date: Fri, 2 Feb 2024 16:28:31 -0800 Message-Id: <20240203002834.171462-11-william.zhang@broadcom.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20240203002834.171462-1-william.zhang@broadcom.com> References: <20240203002834.171462-1-william.zhang@broadcom.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789840599145211996 X-GMAIL-MSGID: 1789840599145211996 |
Series |
dt-bindings: mtd: brcmnand: Updates for bcmbca SoCs
|
|
Commit Message
William Zhang
Feb. 3, 2024, 12:28 a.m. UTC
The write protection feature is controlled by the module parameter wp_on with default set to enabled. But not all the board use this feature especially in BCMBCA broadband board. And module parameter is not sufficient as different board can have different option. Add a device tree property and allow this feature to be configured through the board dts on per board basis. Signed-off-by: William Zhang <william.zhang@broadcom.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Reviewed-by: Kamal Dasu <kamal.dasu@broadcom.com> Reviewed-by: David Regan <dregan@broadcom.com> --- Changes in v4: - Use the new brcm,wp-not-connected property based on the dts binding change Changes in v3: None Changes in v2: None drivers/mtd/nand/raw/brcmnand/brcmnand.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index efeee9e80213..8c1489ff7bd6 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -3218,6 +3218,10 @@ int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc) /* Disable XOR addressing */ brcmnand_rmw_reg(ctrl, BRCMNAND_CS_XOR, 0xff, 0, 0); + /* Check if the board connects the WP pin */ + if (of_property_read_bool(dn, "brcm,wp-not-connected")) + wp_on = 0; + if (ctrl->features & BRCMNAND_HAS_WP) { /* Permanently disable write protection */ if (wp_on == 2)