From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757294AbcLSKyS (ORCPT ); Mon, 19 Dec 2016 05:54:18 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:52828 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755001AbcLSKyR (ORCPT ); Mon, 19 Dec 2016 05:54:17 -0500 Subject: Re: [PATCH 12/12] dma: Flexcard DMA ringbuffer demux driver To: Vinod Koul References: <1481674313-30378-1-git-send-email-dengler@linutronix.de> <1481674313-30378-13-git-send-email-dengler@linutronix.de> <20161215043851.GH25795@localhost> Cc: Lee Jones , Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, Thomas Gleixner , Sebastian Siewior , Juergen Bubeck , Peter Mahler , Benedikt Spranger From: Holger Dengler X-Enigmail-Draft-Status: N1110 Organization: linutronix GmbH Message-ID: <0d27301c-a9b1-4189-37b8-d7d07160ff25@linutronix.de> Date: Mon, 19 Dec 2016 11:54:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161215043851.GH25795@localhost> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="T0lg0miCl4N5TVwp9glTuNBvH0mcVvchb" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --T0lg0miCl4N5TVwp9glTuNBvH0mcVvchb Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 12/15/2016 05:38 AM, Vinod Koul wrote: > On Wed, Dec 14, 2016 at 01:11:53AM +0100, Holger Dengler wrote: >> The Flexcard interface design split packet receive and transmit. All >> received packets and card status information are multiplexed with a >> Flexcard specific protocol and handled through a DMA capable ringbuffe= r. >> The TX path has to poke each available component separate. >> >> Add a Flexcard DMA ringbuffer driver and packet demultiplexer. >=20 > so the dma driver should only provide service and not do demuxing... The Flexcard can be equipped with multiple functional modules (so called = Tinys). Unfortunately, the RX traffic of all Tinys is handled by the base= card in a single DMA-ringbuffer. No separate channels, no scatter-gather= -lists. So RX-demuxing must be done by one single instance per base card.= The TX-path is _not_ handled via DMA, the data goes directly to the Tiny= registers. >> +#define FLEXCARD_DMA_STAT_BUSY (1 << 15) >> +#define FLEXCARD_DMA_STAT_OFL (1 << 31) >> + >> +#define FLEXCARD_MAX_PAKET_SIZE 0x200 >> + >> +#define FLEXCARD_BUF_HEADER_LEN_SHIFT 15 >> +#define FLEXCARD_BUF_HEADER_LEN_MASK 0xfe >> + >> +#define FLEXCARD_CANIF_OFFSET 0x20 >=20 > Okay I have skipped over the parser and other stuff and still looking f= or > the dmaengine APIs.=20 >=20 > This driver _doesn't_ do that, and am not sure why. The main reason, why we do not used the dmaengine interfaces, is, that th= e Flexcard DMA engine is not as flexible as normal DMA engines are. It is= only used for the receive path, it does not support separate channels pe= r Tiny and it uses a single ring-buffer instead of scatter-gather-lists. = If we would use the dmaengine interfaces, we would end up with a solution= , that accepts only one client per card, and the client must always be th= e parser (because of the demuxing). Therefore, I do not see any advantage= in using the dmaengine interfaces. > Anyway, if this driver doesnt need dmaengine APIs it doesnt belong in > drivers/dma/. Otherwise please port to dmanegine APIs, possibly use par= ser > as a client. You cna use virt-channels as well for managing the transfe= rs. Ok, I can follow your argumentation, that the driver for the Flexcard "DM= A" does not belong to drivers/dma. In our second post [1], we had it in d= rivers/mfd, but Lee mentioned, that it is not a mfd driver and asked us t= o move it to drivers/dma [2]. But if it is neither a mfd nor a dmaengine = driver, what kind of driver is it? What is the right place for this drive= r? (Maybe the naming of the driver is too confusing. Although the Flexcar= d use DMA (from a technically point of view), this function is more a RX-= demux-engine...) @Lee:=20 with Vinods comments, the information above and (optionally) a renaming, = do you see any possibility to re-include it in drivers/mfd? [1] http://www.spinics.net/lists/kernel/msg1954282.html [2] http://www.spinics.net/lists/kernel/msg1957525.html >=20 > So I am not considering this submission >=20 > Thanks >=20 --=20 Gru=DF, Holger Dengler -- phone: +49 7556 25 999 14; fax: +49 7556 25 999 99 --T0lg0miCl4N5TVwp9glTuNBvH0mcVvchb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYV7xSAAoJEGQVTbcqiI75zRoP/0jwlbJ7eV9QxbkPLHAyu/bh 06Cndhlt/OM8k91U/NhkNIljMS1hPqiIWQ68vOvc/4JW0aEsKAnuKhJZdoYnsLE3 l64nNXQvttoVc4mQ8PkV3nhoXgc0zOVSLFYJ06zeCvSDwnNu+iiPqcfleWgYD3G2 Uqb3WfVV9tQHPp8I9QcNmPVAeg3i8EqsRq67ZbKLS89xpUam4zrwrmtVoU8mvo0V +Mop25FG87nEtTZCSx+H7qpqbjli4c7VpWfUzfNqBagDuFboln4Qbml+/1Sumkrg lcVeP7N1gtF6aBBCSUr6yiLswzl0jsS+uOGYYcaFCJYDjw7SXX7S6kip1TugYpUJ vO4gTEXXjyxzhw5+XNpZeLia+lqJskGgWgQwVJegTp8JfU7pSRoRU4Lygk+azJk/ tCSyIEhFRlkE2uY1W2gcSZBerheczKRQX5yEo8kaYXDELiqavGC6tJ8vLFfGAsv8 sgW+/mBB8kSDg+batFvDbceRrJyb2UdQnIZirCHkb8c1nkc0TYLnO4hSMiQ9LrbO 2Kf7oAKkojXiVaJ0nky9KL54YNES7DCGCRjknbm8wGeFRQch2KhCemEwaa1eLaku /9ZjZ18heZbXpJYwOpGJ7gESKtYpGe0nImxboehTb5dYq5NtQP/wf1EvxwWRaUb8 kSA1B7UqZKfNuf5f6UdR =PC9D -----END PGP SIGNATURE----- --T0lg0miCl4N5TVwp9glTuNBvH0mcVvchb--