Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3287834pxx; Mon, 2 Nov 2020 05:13:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwKW/4r4Ln8N5G2EMFk0yQ94hoZM3ii5IZSKDAxnQ5YEGnADuJ4wMUykWD1oeD//RZX10OE X-Received: by 2002:aa7:da13:: with SMTP id r19mr16430287eds.20.1604322813043; Mon, 02 Nov 2020 05:13:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604322813; cv=none; d=google.com; s=arc-20160816; b=y3mozR21ijsPO+YNFYOgNaToViz30w15/mhKMlsDy0cZ8TmxNpGxLwpAorjv7+Nrzf Rf1sv5ByHHBHow/dkVZznc7moDDkzi66pI1gfpQp8vLWDyRyroIC7mk+8/cdwx4MmIpu xoWTgMMreynnYS01u/kPfAZZEZirOdAWZiacslosNOerOgYYdFCtb/c8Uo81w2OZNpyF ScD4iOt4fshizApdNQ+GMLkdKiuVjpTi+DXtB+j714UR4O3nAjDcMFhWV6Yyle1ikGgf n5PP9A4KLkFGf/+KCTFMtp4ygWjd84CIDPsPa8qd8VdjRm/BC14P1ADYvOSAx7rmNEYS M3ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=/RkXN4OFo+W9SVpTQ7rTjG1Jc2YrNCnjrHWcZHJNoak=; b=V2zKTLTwRZUB6/ZsrVx7G7M1lwJTxf179mEoLWPgRZtHr89ZZMFiB2FkYB+mXI5x6Y 2N3MZDqQF17neE+cf06CUcLS/ow54glM1kBVbg7b6eSPupX5dRigMSGFLk5yyAhs2QVh 5znGCaLJ7IhZHmVUlXVcYXOvA+tJpAOmioKGWV2fCExu0QmmUCWqS4DxOEVLgeR7GBdO lJQbYY11VFWwkxR6n9PonDagW7fsBJDhOLPatNqniYH5EUmI3HC7PybGHwhpCeHDsvH0 Pg4MCbU5ESuAykIbkDPWsHDdgtinZMT442lBEqZFt7wvs0HUsd8OzwRcN4ALmJAHXzIo BsSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HeiW3q+D; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ef7si9363398ejb.146.2020.11.02.05.13.09; Mon, 02 Nov 2020 05:13:33 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HeiW3q+D; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728511AbgKBNLi (ORCPT + 99 others); Mon, 2 Nov 2020 08:11:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728253AbgKBNLh (ORCPT ); Mon, 2 Nov 2020 08:11:37 -0500 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65940C0617A6; Mon, 2 Nov 2020 05:11:37 -0800 (PST) Received: by mail-ej1-x644.google.com with SMTP id oq3so16957155ejb.7; Mon, 02 Nov 2020 05:11:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/RkXN4OFo+W9SVpTQ7rTjG1Jc2YrNCnjrHWcZHJNoak=; b=HeiW3q+D4q/dUP81vDVW90V67wNYM2TbE9aabOW4o/LsEfTM9Glle15KCmRWW3H4cf PkJYIFzrBXbkWMhc4vSiPicfo0JkfxceUEWyFU/c4hwiLryOCAeD+SG9IFIyhEae5Jad FYGKgCk8L6SH7fNx8QYiu0DsX4wKm6YMC1pj702LxmIHhni2kLBlucJjxQZqdL6M1jVI F5CJi3GEdhyU09s5tebgmQuWFlGyUm6Pac4BYisf2yQScTOcys6cQflmkrpEmcs610lH Gz1EQeiC8A66G7zhKl7HBz2JfOVle+arsrAW7pM/wOrkYPkRRl12LaNHdQlPzTAlPYUF 0SJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/RkXN4OFo+W9SVpTQ7rTjG1Jc2YrNCnjrHWcZHJNoak=; b=TcyaX+LyRqSsZf8BrX807sihySt8kQZSE9M1jyLKz/xq/VjS3YxMIAVdKsdq+JFSUB qcuGfFapcVAARh51IYxEUlVCEFbVDeJEWT8e0jyo5hWlFW/o4osdKRMx32h5qjLCQNhj DkPZ178j/X16K+tdy8U2IEPVsaWeGQOJ53EkaMCAm7AxAqfmj4woJFnyxVTQ/NhdbAMx kkBOT87krS+F6X8mLq6Zz26cd7IxXFJaYS+PYWefFMo9hT1Gqwh3itE9g0NDrbbpiOnI wNJRcdiI133RpPBd29Qq0RzpoCJGimD8VlCctQkxf2yHkGnVKknAjjtOYmW6HtCfvEJ5 h+8A== X-Gm-Message-State: AOAM530i+l/2ABDrX1gw1b1R9P+Bgl+PvKLcwjatZK8pyxD2P8TyURZh OE1xuponT/3VLQ8TYqaCtF8= X-Received: by 2002:a17:907:2089:: with SMTP id pv9mr1845201ejb.34.1604322696126; Mon, 02 Nov 2020 05:11:36 -0800 (PST) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id b8sm7282438ejx.11.2020.11.02.05.11.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Nov 2020 05:11:35 -0800 (PST) Subject: Re: [PATCH v13 2/8] mtd: rawnand: rockchip: NFC drivers for RK3308, RK2928 and others To: Miquel Raynal Cc: Yifeng , richard@nod.at, vigneshr@ti.com, robh+dt@kernel.org, devicetree@vger.kernel.org, heiko@sntech.de, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org References: <20201028095326.15562-1-yifeng.zhao@rock-chips.com> <20201028095326.15562-3-yifeng.zhao@rock-chips.com> <0b417fc2-3503-9bf6-914d-0f8b38df1914@gmail.com> <20201102140725.66e7dcb1@xps13> From: Johan Jonker Message-ID: <5ad70fa0-05a9-e1e7-32cc-32933ff25ae9@gmail.com> Date: Mon, 2 Nov 2020 14:11:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20201102140725.66e7dcb1@xps13> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 11/2/20 2:07 PM, Miquel Raynal wrote: > Hi Johan, Yifeng > > Johan Jonker wrote on Mon, 2 Nov 2020 13:57:56 > +0100: > >> Hi Yifeng, >> >> Don't poke with "ecc->bytes" ones it is set in rk_nfc_ecc_init(). It >> will not be noted by the MTD frame work or userspace. I think there's >> currently no way to let the user know that a different ECC must be used. >> Neither can the user set ECC on the fly. >> >> Example R/W flow: >> >> nand_select_target() >> chip->ecc.write_page_raw() >> chip->ecc.write_page() >> >> [..] >> >> chip->ecc.read_page_raw() >> chip->ecc.read_page() >> nand_deselect_target() >> >> A write/read with: >> >> rk_nfc_read_page_hwecc() >> rk_nfc_write_page_hwecc() >> >> or >> >> rk_nfc_read_page_raw() >> rk_nfc_write_page_raw() >> >> must end up with the same result. If we can't archive that, then we >> shouldn't offer RAW mode to the user for now. If Miquel agrees you >> should just get the driver ready now without these 2 functions and round >> things up. > > What about just not supporting the BootROM area if it was marked > "reserved" by the BRom in the DT? Should we just fill the buffers with '0xff' for boot blocks? > > Raw accessors is really a nice and basic feature that I would like to > have in every new driver. > > Thanks, > Miquèl >