Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp366078imu; Fri, 7 Dec 2018 02:20:18 -0800 (PST) X-Google-Smtp-Source: AFSGD/WJcXGxl+nCron1EJL0tYfCMMS249otmn6IXWiYtxUOUu/qCcapej4j9msq23TSg4z+chNI X-Received: by 2002:a62:7e93:: with SMTP id z141mr1602395pfc.239.1544178017958; Fri, 07 Dec 2018 02:20:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544178017; cv=none; d=google.com; s=arc-20160816; b=BSIRvJXc/WLdkgOmB4ACkz1sXcgKVgXVHgmzVD2xVvMXFZl5nnwztUH6DM74s/MFls buZLTnCv2LZyNsRrxgZJ87PcQOP9JIJJT8m2FuNnl1gUngV958c8mAB/EpNr0Ft8lRm4 ijbKBCwqVcUZkgUvGXfybD5CzFKzqU4z+NFrExFaH62v3vpeK7ssX8VaV4DJ/3eixiJR 49r9/bA6ePatCH6fc+eN7I1PYfGP542zIaFYer6eM9udgLtnU9Q8ffE44RKmGYAH/Mst cfbVGgWNJY+Oj488EiEJLuWfbCzpzDHXjPDlLMlfZJ4pEGRyy5qUvzAzPR8tvQPmqydD 8KHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=8B3TqsrmXJcpA5msHHQgdna1CvabhwWSWoh5IS+JvH4=; b=ExZQOPnjV7LafVtgjDctYh7oKTdJwcSp1liGr/pIFqMNqJcUNe6Ajkp8cUDwNqMY8+ SGdIeDTyJLhZv493MJ/bUhwA6t30z+T2ZaCmjdNJ4bKaXZVQNGtr8A+fFhbM+r+/iufg +9jy30Fn6+i8p5+Dkg18fpaGVteqDQZWQUxqRtaREAcTBFfSOtbLws/fPAbsRaB1Pisd IAzUr+kh7F3cKeJm1syDyq7xK0ni21Fke6hwxDZ8AOGyJn5kc0uv0zV1fW7u+m4GbyOw t+aDt7bXSas4xDMF1qxlecocaZ2LC7+/AXPRGHB2Kdcw23+lio1ibblpQDGJcxIc69v7 sFHA== 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 61si2671494plz.117.2018.12.07.02.20.03; Fri, 07 Dec 2018 02:20:17 -0800 (PST) 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 S1726027AbeLGKSV convert rfc822-to-8bit (ORCPT + 99 others); Fri, 7 Dec 2018 05:18:21 -0500 Received: from mail.bootlin.com ([62.4.15.54]:50384 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725989AbeLGKSV (ORCPT ); Fri, 7 Dec 2018 05:18:21 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 2026920CC5; Fri, 7 Dec 2018 11:18:19 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from xps13 (aaubervilliers-681-1-79-44.w90-88.abo.wanadoo.fr [90.88.21.44]) by mail.bootlin.com (Postfix) with ESMTPSA id B4FA72073D; Fri, 7 Dec 2018 11:18:08 +0100 (CET) Date: Fri, 7 Dec 2018 11:18:08 +0100 From: Miquel Raynal To: Christophe Kerello Cc: , , , , , , , , , , Subject: Re: [ v3 2/3] mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver Message-ID: <20181207111808.144fc3f0@xps13> In-Reply-To: <1543509663-26128-3-git-send-email-christophe.kerello@st.com> References: <1543509663-26128-1-git-send-email-christophe.kerello@st.com> <1543509663-26128-3-git-send-email-christophe.kerello@st.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christophe, Christophe Kerello wrote on Thu, 29 Nov 2018 17:41:02 +0100: > The driver adds the support for the STMicroelectronics FMC2 NAND > Controller found on STM32MP SOCs. > > This patch is based on FMC2 command sequencer. > The purpose of the command sequencer is to facilitate the programming > and the reading of NAND flash pages with the ECC and to free the CPU > of sequencing tasks. > It requires one DMA channel for write and two DMA channels for read > operations. > > Only NAND_ECC_HW mode is actually supported. > The driver supports a maximum 8k page size. > The following ECC strength and step size are currently supported: > - nand-ecc-strength = <8>, nand-ecc-step-size = <512> (BCH8) > - nand-ecc-strength = <4>, nand-ecc-step-size = <512> (BCH4) > - nand-ecc-strength = <1>, nand-ecc-step-size = <512> (Extended ECC > based on Hamming) > > This patch has been tested on Micron MT29F8G08ABACAH4 and > MT29F8G16ABACAH4 > > Signed-off-by: Christophe Kerello > --- The driver look's good to me. However, Boris contributed new cleanups that I would like you to take into account before doing another 'deep' review. Please rebase on top of nand/next and have a look at the followingcommits. For the ->select_chip() hook, it should not be exposed anymore and switches should be handled locally by the driver (you have examples). 7a08dbaedd36 mtd: rawnand: Move ->setup_data_interface() to nand_controller_ops f2abfeb2078b mtd: rawnand: Move the ->exec_op() method to nand_controller_ops 7d6c37e90cf9 mtd: rawnand: Deprecate the ->select_chip() hook 1770022ffa85 mtd: rawnand: ams-delta: Stop implementing ->select_chip() 653c57c7da08 mtd: rawnand: vf610: Stop implementing ->select_chip() 2ace451cae22 mtd: rawnand: tegra: Stop implementing ->select_chip() b25251414f6e mtd: rawnand: marvell: Stop implementing ->select_chip() 550b9fc4e3af mtd: rawnand: fsmc: Stop implementing ->select_chip() 02b4a52604a4 mtd: rawnand: Make ->select_chip() optional when ->exec_op() is implemented ae2294b10b0f mtd: rawnand: Pass the CS line to be selected in struct nand_operation 1d0178593d14 mtd: rawnand: Add nand_[de]select_target() helpers While at it, could you also address Linus W. comments. Thanks, Miquèl