Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14017860pxu; Mon, 4 Jan 2021 10:34:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/yN9YKwimT3AgCfNfiqPb4XVMjEgsYumutZdvwtACtHlyZ+OB9u265GCk0v2uGP0iT0nh X-Received: by 2002:a17:906:5952:: with SMTP id g18mr58538440ejr.506.1609785286962; Mon, 04 Jan 2021 10:34:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609785286; cv=none; d=google.com; s=arc-20160816; b=NHi0hZpe1LZ0aSqOFW5aUYEcNQRx4/uAFJ3tV5MFwQIb+huP92JbrKVkGn0MGPqsJo Feu0Q4jFAoOAfb4+WFniwRCLdYC0iu4IDuEU5Ng7uq1p8fIhbm0ypSf+1c3bmJ3JhbBp nwYQoFXcGNf1nalET5hgynJrZudjndtf6yEKs5KMX7+x7y9A2D29oOhTai4F/DPg9syT BV2VCBTNVsVscxOLzIhQd8uQVDiTS9wJRDLFDV8bD0GzKWxOEg5sMRzZurwcsPGrKDdW apt+zZrLMM5W/DcH+L/STD2g6kMRHynUwPry7AeuKgku1wmDWklIxkbUQ9XFTRfLON5+ 6L3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=kLVojgIAkxS3FTSSSrlcl6lfTcj0Gq8QZN/v07mm7fs=; b=xRox3Wd0vOG37JsCBm+WOUF2Lb8i1Y3KBMV2AZeQN0a/Pj+f3Frr98hYcIStxebGhg YP94LfSYYDpTkHFpuhkwPaDK4NgHeKvjlMayiFLZrvY+Bzebpt1lCG4jN6cJoVpA3Pdv HI9tScITOsFPBc+mcBiSSbhfbwLoyaDre+QR+hMAorfWpBvOl7kHZwesi3eZ0AbSjkmz FLk1cmPrD5JI9tnNQ7DuaHbAO3ydr+NpazJ+2WPw5COuHs/QsdoWy1nEfYPincRfITlO huIG4ZPi3mkgbKD3JIs67Y1Y8lf4nq2CipqrphFQjmYuqUPbaay1+z4bYZC9E7FpXJAg 3mlA== ARC-Authentication-Results: i=1; mx.google.com; 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 o2si28632796ejn.501.2021.01.04.10.34.23; Mon, 04 Jan 2021 10:34:46 -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; 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 S1727922AbhADScW (ORCPT + 99 others); Mon, 4 Jan 2021 13:32:22 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:54717 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727086AbhADScW (ORCPT ); Mon, 4 Jan 2021 13:32:22 -0500 Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 04 Jan 2021 10:31:42 -0800 X-QCInternal: smtphost Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/AES256-SHA; 04 Jan 2021 10:31:40 -0800 X-QCInternal: smtphost Received: from mdalam-linux.qualcomm.com ([10.201.2.71]) by ironmsg02-blr.qualcomm.com with ESMTP; 05 Jan 2021 00:01:23 +0530 Received: by mdalam-linux.qualcomm.com (Postfix, from userid 466583) id 2200421860; Tue, 5 Jan 2021 00:01:23 +0530 (IST) From: Md Sadre Alam To: miquel.raynal@bootlin.com, manivannan.sadhasivam@linaro.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, boris.brezillon@collabora.com, vigneshr@ti.com Cc: mdalam@codeaurora.org, sricharan@codeaurora.org Subject: [PATCH V2] mtd: rawnand: qcom: update last code word register Date: Tue, 5 Jan 2021 00:01:18 +0530 Message-Id: <1609785078-22310-1-git-send-email-mdalam@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From QPIC version 2.0 onwards new register got added to read last codeword. This change will update the same. For first three code word READ_LOCATION_n register will be use.For last code wrod READ_LOCATION_LAST_CW_n register will be use. Signed-off-by: Md Sadre Alam --- [V2] * Fixed alignment for NAND_READ_LOCATION_LAST_CW_n reg macro * Changed number of register write to 1 when NAND_READ_LOCATION_LAST_CW_n register will use drivers/mtd/nand/raw/qcom_nandc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c index eaef51d..9e89236 100644 --- a/drivers/mtd/nand/raw/qcom_nandc.c +++ b/drivers/mtd/nand/raw/qcom_nandc.c @@ -48,10 +48,10 @@ #define NAND_READ_LOCATION_1 0xf24 #define NAND_READ_LOCATION_2 0xf28 #define NAND_READ_LOCATION_3 0xf2c -#define NAND_READ_LOCATION_LAST_CW_0 0xf40 -#define NAND_READ_LOCATION_LAST_CW_1 0xf44 -#define NAND_READ_LOCATION_LAST_CW_2 0xf48 -#define NAND_READ_LOCATION_LAST_CW_3 0xf4c +#define NAND_READ_LOCATION_LAST_CW_0 0xf40 +#define NAND_READ_LOCATION_LAST_CW_1 0xf44 +#define NAND_READ_LOCATION_LAST_CW_2 0xf48 +#define NAND_READ_LOCATION_LAST_CW_3 0xf4c /* dummy register offsets, used by write_reg_dma */ #define NAND_DEV_CMD1_RESTORE 0xdead @@ -1125,7 +1125,7 @@ config_nand_cw_read(struct qcom_nand_controller *nandc, bool use_ecc) if (nandc->props->is_bam) { if (nandc->props->qpic_v2) write_reg_dma(nandc, NAND_READ_LOCATION_LAST_CW_0, - 4, NAND_BAM_NEXT_SGL); + 1, NAND_BAM_NEXT_SGL); write_reg_dma(nandc, NAND_READ_LOCATION_0, 4, NAND_BAM_NEXT_SGL); } -- 2.7.4