Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp220853lqo; Thu, 16 May 2024 04:36:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV1bgqbneR5TXdGbzc52Llrb2a7Qak6MKrtbrA7XF4e/ijEIvXEZcbf9VS3E20Qgh8lg60m5sDkofEuaUPUDb0jiGVkKOvJwQShOjGiuA== X-Google-Smtp-Source: AGHT+IEOzQiorFEV/0+MEEAm55hXUZy0wNwzxi5S2E40uex+k6PQ5RhctUP2pbXIBKrbPaWIB4QT X-Received: by 2002:a50:c358:0:b0:574:ebfb:6d9c with SMTP id 4fb4d7f45d1cf-574ebfb6e3emr4169241a12.40.1715859417097; Thu, 16 May 2024 04:36:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715859417; cv=pass; d=google.com; s=arc-20160816; b=f7LbrDdmGECiZQuKgrd/nZfDYFbz6R3BDN0MW96U4AcMqUICH6pMizJH471UrF2glI lngJFIG4kXJ5mtKRAc5Rti1KcQ/L/vahlearVLlFhsxSAMY3uUa7qly24oedvCbtNoow hMeYvikLVNdRUjQ0wWk3F2FuSLhAEJHeTlMNJQfuT9HRsht9pk2W/GXP4pdaBVduHhyK nE6fohrMh3ef0FWvsKXCifgcE0bdbAV/NKnckq5XG9/M+B9M5D0ZkKC/Wtl4oyfQXkxq LpMcQGWmThBt7G5iRQ95ASKlV7lprdFyg1axhOo4H51QEIGjvQG4Ju5nJvaQCNtQ+EVW PZCw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=AI26gXHusQnpibE0q11hchFvnS9q9vCRPguVN0Zpg/g=; fh=J2WUQeL4Z9/Law5EDxuI4ZJklK367A/QTZaeg2R0E6Y=; b=v4suP6w9mQsKFC3PvuOOLupVRUCpGhfHTvZ8ncDJkQbus09UGCElMMDV5EP/7hJjku sF2HssEmBQz8pnusTF0v8bjdImWDC+AKh8sY06jp4bhWxG7tE/phBpuq4WO0TS9WBvBd T50/jXpk98NKvUu8BuAjE3L0EXoBIsjtwptjpIUuVFWARphBhhptICg8lS5nyNAtyPpH OfPy/bYAXKR7+RkaHpKviBcDOPfV4ASoC4bFl1CYU4b83jrFPunu+gNYANkSInCipYPl UPUeqmss5AHAqOnOceYv9mJaF1efUzGZPQwElXLHKkGlncQ2ZyHLHzodLUW350z0wGUl Sw4w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-180951-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180951-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733beac59esi8686829a12.33.2024.05.16.04.36.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 04:36:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180951-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-180951-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180951-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id B83DC1F2156A for ; Thu, 16 May 2024 11:36:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68739145A02; Thu, 16 May 2024 11:36:50 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 6C03F145A05 for ; Thu, 16 May 2024 11:36:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715859409; cv=none; b=IiKjq1ZJozANQUqjAVc/Qpz3W9pTEUjKyE68rmiB1R21SM9UM58ZeeRhYrfphNr1ozwZmWwV74p+kW/yJvi4MtRRCX/9/VOlUDSs6MwiyobYC5PzCOnwd2b2+R0NoVdTQppGviciS113fsy1zn2bOImy1rbu0wUpUzwq3JjzkSo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715859409; c=relaxed/simple; bh=CTavtiGpG7ILOOHp9yowuOhIXoFP2hGxQnS1LKNpHSM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DSt7pWFTePKMheVjtGKSfsgeq1KUs30iM0ZpRBFVDrFIBh8TfkNusn1dU/cXqYZ66u0RK/CyzAYUcfRso9Wced60HBk+aacZZl66a1NT6HqydMUtLqE1e7KGchWriTwN9PHiB112ytk+gyXg9SCXvnGSC8xwudthreHx8j1s518= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s7ZPf-0007gw-Mt; Thu, 16 May 2024 13:36:43 +0200 Received: from [2a0a:edc0:2:b01:1d::c5] (helo=pty.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s7ZPe-001hfo-Fw; Thu, 16 May 2024 13:36:42 +0200 Received: from sha by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1s7ZPe-00Eqac-1I; Thu, 16 May 2024 13:36:42 +0200 Date: Thu, 16 May 2024 13:36:42 +0200 From: Sascha Hauer To: Miquel Raynal Cc: Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/3] mtd: nand: mxc_nand: implement exec_op Message-ID: References: <20240514-mtd-nand-mxc-nand-exec-op-v3-0-3e6f45fd3d82@pengutronix.de> <20240514-mtd-nand-mxc-nand-exec-op-v3-2-3e6f45fd3d82@pengutronix.de> <20240516103214.57a8ce33@xps-13> <20240516124405.2da1aa23@xps-13> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240516124405.2da1aa23@xps-13> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org On Thu, May 16, 2024 at 12:44:05PM +0200, Miquel Raynal wrote: > Hi Sascha, > > s.hauer@pengutronix.de wrote on Thu, 16 May 2024 12:25:43 +0200: > > > On Thu, May 16, 2024 at 10:32:14AM +0200, Miquel Raynal wrote: > > > Hi Sascha, > > > > > > > +static const struct nand_op_parser mxcnd_op_parser = NAND_OP_PARSER( > > > > + NAND_OP_PARSER_PATTERN(mxcnd_do_exec_op, > > > > + NAND_OP_PARSER_PAT_CMD_ELEM(false), > > > > + NAND_OP_PARSER_PAT_ADDR_ELEM(true, 7), > > > > + NAND_OP_PARSER_PAT_CMD_ELEM(true), > > > > + NAND_OP_PARSER_PAT_WAITRDY_ELEM(true), > > > > + NAND_OP_PARSER_PAT_DATA_IN_ELEM(true, MAX_DATA_SIZE)), > > > > > > CMD, ADDR, CMD, DATA is the RNDOUT pattern. So it is now working fine? > > > > Yes, RNDOUT is working now. > > Excellent! > > > > Or did you forget to adapt the patterns to your use case? > > > > Although it looks like the patterns from the pl35x-nand-controller.c, > > there is one slight difference. The 'false' in the NAND_OP_PARSER_PAT_CMD_ELEM > > above has the effect that a plain NAND_OP_PARSER_PAT_DATA_IN_ELEM is > > disallowed. > > I'm not sure I follow, the above pattern means: a single command cycle > is supported, no? A single command cycle indeed is and shall be supported. The pl35x-nand-controller.c I copied this from has NAND_OP_PARSER_PAT_CMD_ELEM(true). With all elements being optional this also allows a single NAND_OP_PARSER_PAT_DATA_IN_ELEM() (supported_op.data_only_read becomes true). I can't support that, so I made the CMD mandatory. Sascha > > Miqu?l > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |