Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3654330imm; Tue, 29 May 2018 10:59:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqZ1g0QKcAJjq0pH1DR8nUsGDEhWV2CkCYhzN6yvYxJ7bkMWSIiBZy/era11dcEZ1gp5kNh X-Received: by 2002:a63:a557:: with SMTP id r23-v6mr14670434pgu.336.1527616745358; Tue, 29 May 2018 10:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527616745; cv=none; d=google.com; s=arc-20160816; b=K0bsJiiRzUaWlprgKeeh1eeEbpIhG/1G2iVBwTGO6c0YFP5EVkJy4xPX5viimNFkeA aAjydS4mrEQHgyW3qfRe7oG4ct7+zaLKuIPwEq4tYF5KPFEi6GJisaVcBYlxQrudqelc S0yoyv4Yl7r91JnPjcU7xSTFjokC2uEtWU6bgFltktVLfrkCZ1ae6Ve/7wufpIq3htlB NBIz4z35q3RNCWib0q+vGGKINqZezFessLfeFXPYGoM9g37lgL31Dthh2/zoNv6fIhQn /i54VuKfJjbMzRMK4+wiyYhcXgz5db9v2VTnTb4JSGDvUAja5qzL+WuluQg7p0y6zpLN 6+8g== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=yULXLOTV/VeBphvG9ToTt51x2K8z6kHLRQlgsGGYvAo=; b=IWt7EFNK24LPqt6VFji+pwCaBw2A/pb1vMOSfRMPXMOsC+vn7EU4dCMiCw79TZUA9z ncOQ0AWS5pt6UyZcByiFkvxKqAMYajeiLFnDwlRaN5sHegcyK05LGt6JCVa5Hp3OfUHZ zDfX7fymumZu/71/qZRIBrUckJw3yK+QqEcF0N8LsKOOdQW9Wj/Q3fXvZB0dG6k87wB3 +/KlYLmjjf0e1seqKIBiRTfNsserRTqbZ/ohCx3P4CUAGnjg1Z3NyQV/hXjKAljjV0ub 8RxgJr/Cduwl7yZxOZ7v7FFNo/PSCy7o2MZDqcPaTYXsB48L4ctTSnT00I9Z7qcpQNuX kCow== 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 d30-v6si32945967pld.528.2018.05.29.10.58.51; Tue, 29 May 2018 10:59:05 -0700 (PDT) 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 S965759AbeE2R5N (ORCPT + 99 others); Tue, 29 May 2018 13:57:13 -0400 Received: from mail.bootlin.com ([62.4.15.54]:43279 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965453AbeE2R5L (ORCPT ); Tue, 29 May 2018 13:57:11 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 558E52072C; Tue, 29 May 2018 19:57:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id E1E22203B7; Tue, 29 May 2018 19:57:09 +0200 (CEST) Date: Tue, 29 May 2018 19:57:08 +0200 From: Boris Brezillon To: Eugen Hristev Cc: Peter Rosin , Tudor Ambarus , Nicolas Ferre , Ludovic Desroches , Alexandre Belloni , Marek Vasut , Josh Wu , Cyrille Pitchen , , , Richard Weinberger , Brian Norris , David Woodhouse , Subject: Re: [PATCH] mtd: nand: raw: atmel: add module param to avoid using dma Message-ID: <20180529195708.1fa41027@bbrezillon> In-Reply-To: <20180529174621.50a9001a@bbrezillon> References: <20180329131054.22506-1-peda@axentia.se> <20180329154416.5c1a0013@bbrezillon> <20180402142249.7e076a64@bbrezillon> <20180402212843.164d5d21@bbrezillon> <20180402222020.1d344c14@bbrezillon> <20180403091813.5fb5c18c@bbrezillon> <959d826d-1a98-ca22-acee-a4548427fcd3@microchip.com> <024079cb-77ad-9c48-e370-e6e8f2de171b@axentia.se> <9c496531-f7b6-4b9d-dd51-0bfb68ead303@axentia.se> <19d68279-072e-7646-6fdd-8649578229ea@microchip.com> <20180529164911.29820e07@bbrezillon> <20180529171555.19dd723f@bbrezillon> <1affd186-7f78-8bb0-050e-da82143c2982@microchip.com> <20180529174621.50a9001a@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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 29 May 2018 17:46:21 +0200 Boris Brezillon wrote: > On Tue, 29 May 2018 18:21:40 +0300 > Eugen Hristev wrote: > > > On 29.05.2018 18:15, Boris Brezillon wrote: > > > On Tue, 29 May 2018 18:01:40 +0300 > > > Eugen Hristev wrote: > > > > > >> [...] > > >> > > >> > > >>> > > >>> I think you're missing something here. We use the DMA engine in memcpy > > >>> mode (SRAM -> DRAM), not in device mode (dev -> DRAM or DRAM -> dev). > > >>> So there's no dmas prop defined in the DT and there should not be. > > >>> > > >>> Regards, > > >>> > > >>> Boris > > >>> > > >> > > >> Ok, so the memcpy SRAM <-> DRAM will hog the transfer between DRAM and > > >> LCD if my understanding is correct. That's the DMA that Peter wants to > > >> disable with his patch ? > > >> > > >> Then we can then try to force NFC SRAM DMA channels to use just DDR port > > >> 1 or 2 for memcpy ? > > > > > > You mean the dmaengine? According to "14.1.3 Master to Slave Access" > > > that's already the case. > > > > > > Only DMAC0 can access the NFC SRAM and it's done through DMAC0:IF0, > > > then access to DDR is going through port DDR port 1 (DMAC0:IF1) or 2 > > > (DMAC0:IF0). > > > > If we can make NFC use port 1 only, then HLCDC could have two ports as > > master 8 & 9, maybe a better bandwidth. > > Peter, can you try with the following patch? Actually that won't work because all SRAMs are on IF0, and here we use DMA memcpy to copy things from/to the SRAM to/from the DRAM. I have no simple solution to force usage of IF1 when accessing the DRAM but I'm also not sure this will solve Peter's problem since forcing LCDC to use DDR port 3 did not make things better. > > --->8--- > diff --git a/drivers/dma/at_hdmac_regs.h b/drivers/dma/at_hdmac_regs.h > index ef3f227ce3e6..2a48e870f292 100644 > --- a/drivers/dma/at_hdmac_regs.h > +++ b/drivers/dma/at_hdmac_regs.h > @@ -124,8 +124,8 @@ > #define ATC_SIF(i) (0x3 & (i)) /* Src tx done via AHB-Lite Interface i */ > #define ATC_DIF(i) ((0x3 & (i)) << 4) /* Dst tx done via AHB-Lite Interface i */ > /* Specify AHB interfaces */ > -#define AT_DMA_MEM_IF 0 /* interface 0 as memory interface */ > -#define AT_DMA_PER_IF 1 /* interface 1 as peripheral interface */ > +#define AT_DMA_MEM_IF 1 /* interface 0 as memory interface */ > +#define AT_DMA_PER_IF 0 /* interface 1 as peripheral interface */ > > #define ATC_SRC_PIP (0x1 << 8) /* Source Picture-in-Picture enabled */ > #define ATC_DST_PIP (0x1 << 12) /* Destination Picture-in-Picture enabled */