Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp410081pxu; Tue, 1 Dec 2020 14:34:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJy4StOzt5UXOlHQshatl1lYtSGzDk73XdpouWR3R+MXAHJ727bN11tPRGsoXInai/9RnOuR X-Received: by 2002:a17:906:2a0a:: with SMTP id j10mr5229349eje.307.1606862073830; Tue, 01 Dec 2020 14:34:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606862073; cv=none; d=google.com; s=arc-20160816; b=lGYoN/sKrZ5bxGAjZ6RVmsqUrT7LkiM5PTJrdm188CmlbC8hJanqz1mfckv9vBDyAw dJYD6BW6UxQLKHnGmcXeBbKFdUKlyx8m2QIby0PtcBiBQL2TwCRkU5kuDyJwKq2P6llr StrMGhU5oXXJ2nap7gLfycemFemOjH4YqW/yXwEJGmZAh61j5Vh62cGYptpw3DU++QOF yjFvWsoai1ZuW5nVygxj2NCgaAyMc4/8fzw2gQhQIOf3kl+Lh+eR2xEfNWUyYTiERX0M +KqPnO3J62JFlVqB7a3rORgOk+KFHF7lWnjFALeMi7jBTw3PdxoEWCEGE3/Jr040M3pH M2CQ== 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=/Bx4dPRtGekE5t4BCcSHdS8meYGSR/c3Qd7aQPPMvlw=; b=tLxQKeM+2GGiVnkyGkAcPgIGM3hQZ58+JLOI2cghRDfh0G8e8MDNIShxmUmmBJCtDG RXGI0CDCtdeiqW1owc02EfbfTz+98kHzLjcG69AIx9DMFCHiilJrrFtr44uXV7PXRom0 N9xn4hWRkX1A2kIEgvMir7CPzzCubX4JhEGemVf67IHFZLF7JZ/3nar2TPu4GjArgZnm Opir9V3h/fYlSb2VRZReIXqaOG5eATDdVFZWISjyOaiaOE0pPcHFuGjSAuLz8B09r1is XsQAMWD+YFVCtuPPrZvSX8jjyez5vRKuNvOen+x00Vp7qTrHZQW4Jpu2BjcfT9gMVLkG T4fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=EcSRTsq6; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a20si807777ejd.75.2020.12.01.14.34.10; Tue, 01 Dec 2020 14:34:33 -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=@ti.com header.s=ti-com-17Q1 header.b=EcSRTsq6; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729803AbgLAK2W (ORCPT + 99 others); Tue, 1 Dec 2020 05:28:22 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:42216 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729748AbgLAK2U (ORCPT ); Tue, 1 Dec 2020 05:28:20 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0B1ARM7W046696; Tue, 1 Dec 2020 04:27:22 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1606818442; bh=/Bx4dPRtGekE5t4BCcSHdS8meYGSR/c3Qd7aQPPMvlw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=EcSRTsq6Cp4fUfBzloDGKMtJ/jTNPWmMbqvqatA8gd28kWaq43+4f6e0f07Sv0wG0 AyMMsgM4Jtk+za5l/jZmJojyE3fy5DGkOLKyo5W3JrZ7HISjeaLzt6+vj03lDDMDn4 6iJyvjHaqe4+dTr3r4qDOW1Td3YpmLOX7lVVQbKM= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0B1ARMSe095974 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 1 Dec 2020 04:27:22 -0600 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Tue, 1 Dec 2020 04:27:22 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Tue, 1 Dec 2020 04:27:22 -0600 Received: from pratyush-OptiPlex-790.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0B1ARCub080862; Tue, 1 Dec 2020 04:27:20 -0600 From: Pratyush Yadav To: Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , , CC: Pratyush Yadav Subject: [PATCH v3 3/3] mtd: spi-nor: spansion: Set ECC block size Date: Tue, 1 Dec 2020 15:57:11 +0530 Message-ID: <20201201102711.8727-4-p.yadav@ti.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201201102711.8727-1-p.yadav@ti.com> References: <20201201102711.8727-1-p.yadav@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The S28 flash family uses 2-bit ECC by default with each ECC block being 16 bytes. Under this scheme multi-pass programming to an ECC block is not allowed. Set the writesize to make sure multi-pass programming is not attempted on the flash. Signed-off-by: Pratyush Yadav Reviewed-by: Tudor Ambarus --- Notes: No changes in v3 New in v2. drivers/mtd/spi-nor/spansion.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c index e487fd341a56..b0c5521c1e27 100644 --- a/drivers/mtd/spi-nor/spansion.c +++ b/drivers/mtd/spi-nor/spansion.c @@ -109,6 +109,7 @@ static int spi_nor_cypress_octal_dtr_enable(struct spi_nor *nor, bool enable) static void s28hs512t_default_init(struct spi_nor *nor) { nor->params->octal_dtr_enable = spi_nor_cypress_octal_dtr_enable; + nor->params->writesize = 16; } static void s28hs512t_post_sfdp_fixup(struct spi_nor *nor) -- 2.28.0