From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753598AbeDKPeQ (ORCPT ); Wed, 11 Apr 2018 11:34:16 -0400 Received: from mail.bootlin.com ([62.4.15.54]:55572 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752211AbeDKPeO (ORCPT ); Wed, 11 Apr 2018 11:34:14 -0400 Date: Wed, 11 Apr 2018 17:34:11 +0200 From: Boris Brezillon To: Peter Rosin Cc: Nicolas Ferre , Alexandre Belloni , Richard Weinberger , Josh Wu , linux-kernel@vger.kernel.org, Marek Vasut , linux-mtd@lists.infradead.org, Cyrille Pitchen , Brian Norris , David Woodhouse , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] mtd: nand: raw: atmel: add module param to avoid using dma Message-ID: <20180411173411.201765ee@bbrezillon> In-Reply-To: References: <20180329131054.22506-1-peda@axentia.se> <20180329153322.5e2fc1e7@bbrezillon> <20180329154416.5c1a0013@bbrezillon> <20180402142249.7e076a64@bbrezillon> <20180402212843.164d5d21@bbrezillon> <20180402222020.1d344c14@bbrezillon> <20180403091813.5fb5c18c@bbrezillon> <20180411165925.2be0d45b@bbrezillon> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Apr 2018 17:10:43 +0200 Peter Rosin wrote: > On 2018-04-11 16:59, Boris Brezillon wrote: > > On Wed, 11 Apr 2018 16:44:10 +0200 > > Peter Rosin wrote: > > > >> Hi Nicolas, > >> > >> Boris asked for your input on this (the datasheet difference appears to > >> have no bearing on the issue) elsewhere in the tree of messages. It's > >> now been a week or so and I'm starting to wonder if you missed this > >> altogether or if you are simply out of office or something? > > > > I was wondering if you had given up on this problem, it seems you did > > not. > > I have my local patch to disable dma for the flash, but local patches > are always a disappointment. I understand that. > > > Did you try forcing the HLCDC to use the 2nd interface (ahb_id=1) > > instead of the first one? > > Just tried, and it's better that way, but the problem still exist and is > very visible on some (but apparently not all) flash accesses. Then your problems are unlikely to go away even with the priority adjustments because the DMAC do not use port 3, and priority stuff are only useful to enforce priority between masters accessing the same slave. I guess the real limitation comes the DRAM link, and asking the CPU to copy data from the NFC SRAM to the the DRAM is probably slowing things enough to let the HLCDC go through with its data transfers. Or maybe it has to do with the CPU data caches that are not immediately flushed to the DRAM when you copy things through the CPU. From mboxrd@z Thu Jan 1 00:00:00 1970 From: boris.brezillon@bootlin.com (Boris Brezillon) Date: Wed, 11 Apr 2018 17:34:11 +0200 Subject: [PATCH] mtd: nand: raw: atmel: add module param to avoid using dma In-Reply-To: References: <20180329131054.22506-1-peda@axentia.se> <20180329153322.5e2fc1e7@bbrezillon> <20180329154416.5c1a0013@bbrezillon> <20180402142249.7e076a64@bbrezillon> <20180402212843.164d5d21@bbrezillon> <20180402222020.1d344c14@bbrezillon> <20180403091813.5fb5c18c@bbrezillon> <20180411165925.2be0d45b@bbrezillon> Message-ID: <20180411173411.201765ee@bbrezillon> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, 11 Apr 2018 17:10:43 +0200 Peter Rosin wrote: > On 2018-04-11 16:59, Boris Brezillon wrote: > > On Wed, 11 Apr 2018 16:44:10 +0200 > > Peter Rosin wrote: > > > >> Hi Nicolas, > >> > >> Boris asked for your input on this (the datasheet difference appears to > >> have no bearing on the issue) elsewhere in the tree of messages. It's > >> now been a week or so and I'm starting to wonder if you missed this > >> altogether or if you are simply out of office or something? > > > > I was wondering if you had given up on this problem, it seems you did > > not. > > I have my local patch to disable dma for the flash, but local patches > are always a disappointment. I understand that. > > > Did you try forcing the HLCDC to use the 2nd interface (ahb_id=1) > > instead of the first one? > > Just tried, and it's better that way, but the problem still exist and is > very visible on some (but apparently not all) flash accesses. Then your problems are unlikely to go away even with the priority adjustments because the DMAC do not use port 3, and priority stuff are only useful to enforce priority between masters accessing the same slave. I guess the real limitation comes the DRAM link, and asking the CPU to copy data from the NFC SRAM to the the DRAM is probably slowing things enough to let the HLCDC go through with its data transfers. Or maybe it has to do with the CPU data caches that are not immediately flushed to the DRAM when you copy things through the CPU.