Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1285491imm; Wed, 26 Sep 2018 15:09:12 -0700 (PDT) X-Google-Smtp-Source: ACcGV61l7MCOkLNTg67Fqt1UNLyynF4BksGsFOMqJq8WtWDsa4QtZ0y4d3Eem7Cjwy5xRFi7loyL X-Received: by 2002:a62:18a:: with SMTP id 132-v6mr8215389pfb.207.1537999752474; Wed, 26 Sep 2018 15:09:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537999752; cv=none; d=google.com; s=arc-20160816; b=WEY7hupJOfsPqzZcVZVsZkNJxVG1E/9X3Bav6JmKwdDEYC/zNIRBmN2H1n9MW66iBw J13rclPitbQn9/lQzuslXc5e24Zs4+xJ0cZPKJcTDlcPHT4o2ci2jZisGG2a77DFshmO d2x/FkIeHScrd9V4iS2MluGLEt2Kg8RB70G09eRjdXDY0WFGK36NToAr33x43cvbCNpx bAK6wL06YGkp2gLwwmT7G1HcPJmhjxo+suNB3NZCQUrlHCbq4oTCoI6sVX9IgZzL3y4X nntMsPFWnAZXrS3lpC2s5/7Th/wGCv5AVAGEu0+AIGZ5ubM6aVZHVBBVWaj8JG9VKM+9 tdbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=FUB5GuKnOLSqz96S1WfzDG8R+Q3d97eIs9c52699K0g=; b=XNC2HSIv+pqx+z1Y7j3mc/NriibIhpl3XsjiUDHuPfJYxmqo3JB9OmY++PO68+fz0J 4hWDu299ibBEPxG4lHE7a9gKiTebwVOLfqSOh76yvYA3TkQmIwsNnOluNdeJU6gS/ANb xjfIryj0r4yM0DF8+ZcBzlXCzibiMG8XfaJeIBrfDZxmoOjvcXN9Tu4Fx8MJwbRxhtqG FqbzbEX4FcFw9Lyq7FEfbqtzqOILMkftp5FYI9rmS27/tXEKVVjcgwyuidh8H9RKLUop ZWg/Wv5YjQFkGm21tpIkGke7BGgIFQi+jB216mQOJ/mKDMVS3W1kUFV7gwQEQF0ZJKYL C2AA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p4-v6si190795pls.53.2018.09.26.15.08.57; Wed, 26 Sep 2018 15:09:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727108AbeI0EXR (ORCPT + 99 others); Thu, 27 Sep 2018 00:23:17 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:57982 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727026AbeI0EXP (ORCPT ); Thu, 27 Sep 2018 00:23:15 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 42LBs63tdjz1qxy2; Thu, 27 Sep 2018 00:08:10 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 42LBs63QBxz1qql9; Thu, 27 Sep 2018 00:08:10 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Xw99BNNE2cJ7; Thu, 27 Sep 2018 00:08:08 +0200 (CEST) X-Auth-Info: RTW0KObLlgTB2RenOxqEUUWGX3ReabjVPGTaVElirp0= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 27 Sep 2018 00:08:08 +0200 (CEST) From: Lukasz Majewski To: Frieder Schrempf , boris.brezillon@bootlin.com, Mark Rutland Cc: linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, yogeshnarayan.gaur@nxp.com, richard@nod.at, Stefan Agner , Fabio Estevam , Fabio Estevam , prabhakar.kushwaha@nxp.com, han.xu@nxp.com, broonie@kernel.org, david.wolfe@nxp.com, computersforpeace@gmail.com, dwmw2@infradead.org, albert.aribaud@3adev.fr, Lukasz Majewski Subject: [RFC/RFT PATCH v1 5/9] mtd: spi: Provide LUT entry to perform DUAL read Date: Thu, 27 Sep 2018 00:07:35 +0200 Message-Id: <20180926220739.620-6-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180926220739.620-1-lukma@denx.de> References: <20180926220739.620-1-lukma@denx.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This commit adds LUT sequence to perform DUAL read (as opposite to the default QUAD for this controller). Signed-off-by: Lukasz Majewski --- drivers/mtd/spi-nor/fsl-quadspi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c index 4f0c78ba6fcb..0c381cdfb39f 100644 --- a/drivers/mtd/spi-nor/fsl-quadspi.c +++ b/drivers/mtd/spi-nor/fsl-quadspi.c @@ -207,6 +207,7 @@ #define SEQID_RDCR 9 #define SEQID_EN4B 10 #define SEQID_BRWR 11 +#define SEQID_DUAL_READ 12 #define QUADSPI_MIN_IOMAP SZ_4M @@ -482,6 +483,15 @@ static void fsl_qspi_init_lut(struct fsl_qspi *q) qspi_writel(q, LUT0(CMD, PAD1, SPINOR_OP_BRWR), base + QUADSPI_LUT(lut_base)); + /* Dual Read */ + lut_base = SEQID_DUAL_READ * 4; + + qspi_writel(q, LUT0(CMD, PAD1, SPINOR_OP_READ_1_1_2) | + LUT1(ADDR, PAD1, addrlen), base + QUADSPI_LUT(lut_base)); + qspi_writel(q, LUT0(DUMMY, PAD1, read_dm) | + LUT1(FSL_READ, PAD2, rxfifo), + base + QUADSPI_LUT(lut_base + 1)); + fsl_qspi_lock_lut(q); } @@ -513,6 +523,8 @@ static int fsl_qspi_get_seqid(struct fsl_qspi *q, u8 cmd) return SEQID_EN4B; case SPINOR_OP_BRWR: return SEQID_BRWR; + case SPINOR_OP_READ_1_1_2: + return SEQID_DUAL_READ; default: if (cmd == q->nor[0].erase_opcode) return SEQID_SE; -- 2.11.0