Received: by 10.213.65.68 with SMTP id h4csp3639500imn; Tue, 3 Apr 2018 08:20:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/FnQ2bgg+rUqdMun8tPqxJz6DuGwkXrHGFDn9eUBQEeqzOejwbJpL+FfYrfPffcO8eoxon X-Received: by 10.101.65.75 with SMTP id x11mr9513022pgp.203.1522768837059; Tue, 03 Apr 2018 08:20:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522768837; cv=none; d=google.com; s=arc-20160816; b=MbOQN8lPwEXLuHKrmIcDmIcrwCOIDm/pnAHqbrrQt6Q/C4aFVfAkVf9ICzgnVJKXlY 5KOSGRtHqht9po8hw3MuXbUQd6xZGb/qwjnCI2O2oYCStFX9T2yo7QJmY3fXZ4P4oLcE PAHp8J1V8qcZBzoAyjzLWDtfNdXyhqSbANtshgnfXbcv8nwEeNj4BW+6hSb3YOHbUXkg f67x69DWPLzKN5NHVuNQcKx7QUTKzi+xLHmpey964Uv+1wVAsgtl5Yvq2dxoNGcY2ya/ JqpSm5oS6czzeT2+QbaGba2y69ydxO42WaI4S6qWQWhtTcHPiWrovYe9cw18FOPBzIXg 0VzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from :arc-authentication-results; bh=8EwNno/B5qfNSyfKy9xbZ3VCE9n1t8Sjxog12Y9ijtM=; b=qQ2BJDCVDdV+kq8c1IxQzYzgOIzqVvQTsxhMaGnFsdXCtF7pl9GGPQJTrVi5P0sFKu vs/7alm6DBhxoov9fp3UHNVl1XQOzVVG89uVZsv94zu7lnoG3buEwBhogK53FW6XFr9k 1uxN64Ut+zxZJeKQNuufWZb9W3tN8h0CobxzC5zx1QxhcVFIpYSl9ygLd/rfHrWYAASm 3EffrSe5cgtnwHMmZLfSWfUmd9nuMpOxTUdgn7nVI9LvPNNiegJh9xKN7EBV7Dp1EvFP 9BToAegUvzAFtUEwgiHATL/b4Yq5wnT2J2yg+1mqDjjUybl350n4F3qIt3NcGvKJG69x 13IQ== 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 x16-v6si711244pln.303.2018.04.03.08.20.21; Tue, 03 Apr 2018 08:20:37 -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 S1752014AbeDCPTK (ORCPT + 99 others); Tue, 3 Apr 2018 11:19:10 -0400 Received: from smtp03.smtpout.orange.fr ([80.12.242.125]:40044 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751457AbeDCPTG (ORCPT ); Tue, 3 Apr 2018 11:19:06 -0400 Received: from belgarion ([86.201.130.131]) by mwinf5d38 with ME id VrJp1x00B2qEl8e03rJpQ5; Tue, 03 Apr 2018 17:19:04 +0200 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Tue, 03 Apr 2018 17:19:04 +0200 X-ME-IP: 86.201.130.131 From: Robert Jarzmik To: Arnd Bergmann Cc: Daniel Mack , Haojian Zhuang , Bartlomiej Zolnierkiewicz , Tejun Heo , Vinod Koul , Mauro Carvalho Chehab , Ulf Hansson , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Cyrille Pitchen , Nicolas Pitre , Samuel Ortiz , Greg Kroah-Hartman , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown , Russell King , Linux ARM , Linux Kernel Mailing List , IDE-ML , dmaengine@vger.kernel.org, Linux Media Mailing List , linux-mmc , linux-mtd , Networking , devel@driverdev.osuosl.org, alsa-devel@alsa-project.org Subject: Re: [PATCH 02/15] ARM: pxa: add dma slave map References: <20180402142656.26815-1-robert.jarzmik@free.fr> <20180402142656.26815-3-robert.jarzmik@free.fr> X-URL: http://belgarath.falguerolles.org/ Date: Tue, 03 Apr 2018 17:18:49 +0200 In-Reply-To: (Arnd Bergmann's message of "Tue, 3 Apr 2018 08:51:37 +0200") Message-ID: <87tvss48ti.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arnd Bergmann writes: >> + { "smc911x.0", "rx", PDMA_FILTER_PARAM(LOWEST, -1) }, >> + { "smc911x.0", "tx", PDMA_FILTER_PARAM(LOWEST, -1) }, >> + { "smc91x.0", "data", PDMA_FILTER_PARAM(LOWEST, -1) }, > > This one is interesting, as you are dealing with an off-chip device, > and the channel number is '-'1. How does this even work? Does it > mean This relies on pxa_dma, in which the "-1" for a requestor line means "no requestor" or said in another way "always requesting". As a consequence, as soon as the DMA descriptors are queued, the transfer begins, and it is supposed implicitely that the FIFO output availability is at least as quick as the system bus and the DMA size is perfectly fit for the FIFO available bytes. This is what has been the underlying of DMA transfers of smc91x(x) on the PXA platforms, where the smc91x(s) are directly wired on the system bus (the same bus having DRAM, SRAM, IO-mapped devices). > >> + /* PXA25x specific map */ >> + { "pxa25x-ssp.0", "rx", PDMA_FILTER_PARAM(LOWEST, 13) }, >> + { "pxa25x-ssp.0", "tx", PDMA_FILTER_PARAM(LOWEST, 14) }, >> + { "pxa25x-nssp.1", "rx", PDMA_FILTER_PARAM(LOWEST, 15) }, >> + { "pxa25x-nssp.1", "tx", PDMA_FILTER_PARAM(LOWEST, 16) }, >> + { "pxa25x-nssp.2", "rx", PDMA_FILTER_PARAM(LOWEST, 23) }, >> + { "pxa25x-nssp.2", "tx", PDMA_FILTER_PARAM(LOWEST, 24) }, >> + { "pxa-pcm-audio", "nssp2_rx", PDMA_FILTER_PARAM(LOWEST, 15) }, >> + { "pxa-pcm-audio", "nssp2_tx", PDMA_FILTER_PARAM(LOWEST, 16) }, >> + { "pxa-pcm-audio", "nssp3_rx", PDMA_FILTER_PARAM(LOWEST, 23) }, >> + { "pxa-pcm-audio", "nssp3_tx", PDMA_FILTER_PARAM(LOWEST, 24) }, >> + >> + /* PXA27x specific map */ >> + { "pxa-pcm-audio", "ssp3_rx", PDMA_FILTER_PARAM(LOWEST, 66) }, >> + { "pxa-pcm-audio", "ssp3_tx", PDMA_FILTER_PARAM(LOWEST, 67) }, >> + { "pxa27x-camera.0", "CI_Y", PDMA_FILTER_PARAM(HIGHEST, 68) }, >> + { "pxa27x-camera.0", "CI_U", PDMA_FILTER_PARAM(HIGHEST, 69) }, >> + { "pxa27x-camera.0", "CI_V", PDMA_FILTER_PARAM(HIGHEST, 70) }, >> + >> + /* PXA3xx specific map */ >> + { "pxa-pcm-audio", "ssp4_rx", PDMA_FILTER_PARAM(LOWEST, 2) }, >> + { "pxa-pcm-audio", "ssp4_tx", PDMA_FILTER_PARAM(LOWEST, 3) }, >> + { "pxa2xx-mci.1", "rx", PDMA_FILTER_PARAM(LOWEST, 93) }, >> + { "pxa2xx-mci.1", "tx", PDMA_FILTER_PARAM(LOWEST, 94) }, >> + { "pxa3xx-nand", "data", PDMA_FILTER_PARAM(LOWEST, 97) }, >> + { "pxa2xx-mci.2", "rx", PDMA_FILTER_PARAM(LOWEST, 100) }, >> + { "pxa2xx-mci.2", "tx", PDMA_FILTER_PARAM(LOWEST, 101) }, >> +}; > > Since more than half the entries in here are chip specific, maybe it would be > better to split that table into three and have a copy for each one in > arch/arm/mach-pxa/pxa{25x.27x.3xx}.c? Mmmh, today the split is : - 16 common entries - 10 pxa25x specific entries - 5 pxa27x specific entries - 7 pxa3xx specific entries => total of 38 lines After the split we'll have : - 26 pxa25x specific entries - 21 pxa27x specific entries - 23 pxa3xx specific entries => total of 70 lines That doubles the number of lines, not counting the declarations, and amending of pxa2xx_set_dmac_info(). If you think it's worth it, what is the driving benefit behind ? > Does that mean it's actually a memory-to-memory transfer with a device being > on the external SRAM interface? I'm taking this is the follow up to the "-1" question :0 Cheers. -- Robert