Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp230524pxb; Sat, 18 Sep 2021 00:54:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzpOQohhWYxQ3Geb2LId0YVdsH9BITLJW1FqlGykRhOfRANL34zupwCYOv2za3OHYQMisU X-Received: by 2002:a17:906:700f:: with SMTP id n15mr16564817ejj.319.1631951699094; Sat, 18 Sep 2021 00:54:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631951699; cv=none; d=google.com; s=arc-20160816; b=MTAAUXY/Vk1KTHBQV7khRRvHOzlgQwN8DavuQEFOVau0Mh7uNCL5IQsWrQ0B/WfClJ pLgJxEKq4zp/czXYcNrcLQ4wzJy/M4Ms2HCkWkW4YyCDpU47BriNi/zQ9gFUlt0UfLzB H9IYCzNuICKCk3w5PWjomH9mdMcdSJpuvnbjmhyyEfUqQlDQcAz7042AsPp0EVEVOx2u Lh8FObB1FSdCbM/9hoEPAZjzzQmmTPq49yjwK080YUjwxKcslE4wpzTiQroBKRKUOji5 aZoWW2bqJy1wW1nO9DSbLamo5K5iyP+E2s8eg+33XLitV2zZQuH8PmJFqQd4YCZhZd9R t99w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=oqNPsDz02/6qge8H1B83qQiGgy0SDWYRP0Dm0qaZcXo=; b=VXEhDAgZm6Ut4EdOkQ9WRusS9OOuyrSQAFE3IcWm38ewRNjEL78btdN67y150OFc3p RCZ4Dy8DKh7J6yafH7e3ImOt0odDKMtZV1WDgFtZwRPoiRByF0VR10cXUuDU37npdgb+ SfNm1o60TlwYHMo6lU++b5S7GISn+f9Q5rbfARE4lYh5ypGGp+1dXjm3z4r5tNL4eiNv +0zcwgyxT+D4mdjk/cvjJFg3GA9atl6NbEn4dsSY6GveC8e4yeSSSBilq/qCx36LZ3v2 ABODLloYs3CX9763jICLqIZ5lPeTLDTVjo9vfFqfltK1q44U66LAm3GtcwmFjEvZHcPj Pf3Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b15si11680504edm.218.2021.09.18.00.54.25; Sat, 18 Sep 2021 00:54:59 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235979AbhIQTeW convert rfc822-to-8bit (ORCPT + 99 others); Fri, 17 Sep 2021 15:34:22 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:39875 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234669AbhIQTeM (ORCPT ); Fri, 17 Sep 2021 15:34:12 -0400 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id D87EE1BF209; Fri, 17 Sep 2021 19:32:47 +0000 (UTC) Date: Fri, 17 Sep 2021 21:32:46 +0200 From: Miquel Raynal To: Jan Hoffmann Cc: Daniel Kestrel , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mtd: rawnand: xway: No hardcoded ECC engine, use device tree setting Message-ID: <20210917213246.319e60cb@xps13> In-Reply-To: References: <20210808072643.GA5084@ubuntu> <51f2ebf4-6df1-eba5-99f1-1ec88e475d20@3e8.eu> <20210917190154.76203a9a@xps13> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jan, jan@3e8.eu wrote on Fri, 17 Sep 2021 19:45:33 +0200: > Hi Miquèl, > > > I am not sure to understand your message as answer to this thread. > > There are two problems here: > > 1/ The DT values not being taken into account > > This is the issue I'm referring to. > > > 1/ Has already been fixed (at least that is what I think) > > This is not fixed in kernel 5.10. And unless I am missing something > there also doesn't seem be a fix in more recent kernels. > > I am aware of commit 33d974e76e21 ("mtd: rawnand: xway: Do not force a > particular software ECC engine"), but that only fixes the ECC > algorithm. The ECC engine type is still hard-coded in xway_attach_chip. Yes this was my understanding, that only software ECC engine was supported. The mainline driver shows absolutely no signs of hardware ECC engine support. Perhaps however you mean that on-die ECC engine are not supported anymore because of the engine_type being set in attach_chip()? If yes then indeed there is something to do, perhaps checking if an engine has been already set is enough? You can try something like: if (engine_type == unknown) engine_type = soft; Thanks, Miquèl