Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp393939imu; Fri, 7 Dec 2018 02:55:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/VdyvAS0x5mj/3bXllesDeOyjgVcoKkhd89mru5gKJ+FfoHf5n1aNLR+4kipqsCT6oKvt2K X-Received: by 2002:a62:8dd9:: with SMTP id p86mr1711705pfk.143.1544180104281; Fri, 07 Dec 2018 02:55:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544180104; cv=none; d=google.com; s=arc-20160816; b=AEPT2CCKdhulXgzQxdLIx+pZ5ajpVhMYQj87mRv/1pudR++uWVXxeJHv7eifxFmRIQ n70H+b42O7fjuP2WK6BsCqWvcfHg6JEZbDZTBiq7xG/W2O/vlHjrud0mridxvJsNO66v SNS/6EUJfp4+DHCuUoBLACw4HRzuOB6N4KpEA5Fb3S0dNTZ+bRLEVr+zCItgRoOVdbrc huLx6VmxNgk+D2a6NuN0PXmQ4MBh+6bGBBrraOTlC8lNZjFj1nNP+7vUJ/uMcS/0e3Fu T1dfr9igxuzXq6X5PzWH+I0SNd8cPl89bVhfHLTZ9bYKUTx4xZn1Sk78Rri1VRZ1Mzdf dQfQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=GqwiZNNfM0qONtHsw8gLHoIOplSt2bdqP+WYc6bVsjQ=; b=X8XHG61TM2GSTlJntEQFuHGfMhOgOQwevX27wtb6M8L9X0bNp3Jzm5ZNxB7bFcopJB j9Gg6sF6rMvpcTCb+zaaxJ4MdvezqX5dpe0iBr6Xn5gF1M3pYtUq4APFmuL4R71vjcJm JtVRFyHGtQ26SpLI7f9zPOeJ189LeGGl1hJv4NCpsREJI/54EPSqlKII13icTD8/3w0f QErdgVo7JsJxmDt+sHoqyESmoX4Qz4uUrMJ1Owll/EB8yAZ5rVaGku0UwYjv7imTH1Nh OuzeijrXBOGi50RFymtV52GIunP4ZOERn7Pd8UIfAf37nFwznfgoqDq1Ngu5xVMLdBdD XTjg== 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 bh12si2667138plb.353.2018.12.07.02.54.48; Fri, 07 Dec 2018 02:55:04 -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 S1726052AbeLGKyA (ORCPT + 99 others); Fri, 7 Dec 2018 05:54:00 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:19838 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725994AbeLGKx7 (ORCPT ); Fri, 7 Dec 2018 05:53:59 -0500 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id wB7ApFaX002996; Fri, 7 Dec 2018 11:53:13 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2p3uhna39j-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 07 Dec 2018 11:53:13 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2152431; Fri, 7 Dec 2018 10:53:12 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag6node2.st.com [10.75.127.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id E468F2AB7; Fri, 7 Dec 2018 10:53:11 +0000 (GMT) Received: from [10.201.23.29] (10.75.127.47) by SFHDAG6NODE2.st.com (10.75.127.17) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 7 Dec 2018 11:53:12 +0100 Subject: Re: [ v3 2/3] mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver To: Miquel Raynal CC: , , , , , , , , , , References: <1543509663-26128-1-git-send-email-christophe.kerello@st.com> <1543509663-26128-3-git-send-email-christophe.kerello@st.com> <20181207111808.144fc3f0@xps13> From: Christophe Kerello Message-ID: Date: Fri, 7 Dec 2018 11:53:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181207111808.144fc3f0@xps13> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG4NODE2.st.com (10.75.127.11) To SFHDAG6NODE2.st.com (10.75.127.17) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-12-07_03:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Miquèl, This patchset already takes into account new framework modifications done by Boris (3rd batch of cleanups). The select_chip hook is not used any more in this patchset and exec_op/setup_data_interface hooks have been moved to nand_controller_ops structure. static const struct nand_controller_ops stm32_fmc2_nand_controller_ops = { .attach_chip = stm32_fmc2_attach_chip, .exec_op = stm32_fmc2_exec_op, .setup_data_interface = stm32_fmc2_setup_interface, }; Regards, Christophe Kerello. On 12/7/18 11:18 AM, Miquel Raynal wrote: > 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 >