Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3814872ybl; Mon, 3 Feb 2020 07:04:40 -0800 (PST) X-Google-Smtp-Source: APXvYqxaFQ15oFvksJtlgmxFudrIHp61ESwbr9KhKT875rHJC8PbnH0lwN4RlCHeZSEhtT+9q86U X-Received: by 2002:a9d:68da:: with SMTP id i26mr18373499oto.65.1580742280028; Mon, 03 Feb 2020 07:04:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580742280; cv=none; d=google.com; s=arc-20160816; b=DdJ2k8DORVcCJU7p9U3yvimhYdEiRioYHEKJ5QSxUpdKIu+OQ8CyL8/1k2JommWo8L im7O8QzZQgidpHk183fpTdyzpxnl0U1sdRuesQuRXHmcpYGC82StC0bRDUOPIY0pW3Ig uQlno9DiriTCURlZrKi3rlqm2UgMW/sJv4xTPkOV2fRbjvc6ELnv2jc/7BldCUJv+aSD fBi0bZ1ARABj3IHOdmQfr+BkL406LAhj7YfEyhNyRTMRy5OpyzqE4DdFNkML6k3olAQn gkqDkwiqOJyjSZ+YMHptYRTdwcX+9t5curHBgWFSe7qWhCRHyR/w77Ktte6zYom5y/Gt RgQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=j8a77+R58LAe2xXbMwZGt5F1KqF29qhEEgIiu5hvCV0=; b=NE+6wapiwCuhZJSqznvdEune3701MtsQGgAvfwgPppJjD9x8Y9LgEJ+sPM21dkT2Mu jewyd0vRKpPZKwU95RUHobeh/lLLxrK7SyWQhh+uH/rElz6hYV2Wqxn2dx4Wcww3fkw6 YIXLzaaenpChOcvm4n+GxoROG2t3vqJfqyaXkB7S0cEU1wg2DqmruFTgCV7zquWy1tYt CAtSP3F8TpSUWVjmqtfZ0Ot4iJoA3+ohAxQ/3NBeCtldY+9IEhQa5VbbwoDSL7blJ86v GK9TFe3e5iy6gvIYjA6s/Gv7VD6J562F610PcmaqFjTj73rz+lhUIXBa2XNMiDMRHFkl TeEw== 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 d20si9834951otq.157.2020.02.03.07.04.28; Mon, 03 Feb 2020 07:04:40 -0800 (PST) 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 S1728274AbgBCNcs (ORCPT + 99 others); Mon, 3 Feb 2020 08:32:48 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:38693 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727257AbgBCNcs (ORCPT ); Mon, 3 Feb 2020 08:32:48 -0500 Received: by mail-oi1-f196.google.com with SMTP id l9so10890529oii.5; Mon, 03 Feb 2020 05:32:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=j8a77+R58LAe2xXbMwZGt5F1KqF29qhEEgIiu5hvCV0=; b=IKZjN3TyHGpqzNf2xzFfp2+EkVgfU3rNJIMOXhZLcjIqnKMB/+xsakj5Igol8nv5To wFF6YdYXH0JN9YuqQDEnpjH+nrpBq3VujbwL0/IIGBMvJwEy0Uw2i2bb9F1a4fBeDVgf HD199wQNEyF6kV6FX/5hZ2TE5bXlUZDAfD1MD+n3EjGr9t9yhADVt6IYq1+2fj34b4Dy iXQRuynJpuui0hFdv6fjiSwqLCSyGMmyx/andR9yHBtZAu2IqY8r6y2b1IKW4dB1ZYEp XkURyqYnsrjA/n4Js0+C2gDo38lEYc8CbbvFr+yfJhqvwS9Am6YcMniIOOPKUhmVj8cK 8UgQ== X-Gm-Message-State: APjAAAWmoe61y0oqFpbP3IOA8qYJxthrK66ZkBnF94BObr7XtM/A+4i3 8xe+scESk5WSpSFY5ApOlsYLtpXYgi2gSZt/RVM= X-Received: by 2002:aca:1a06:: with SMTP id a6mr14052076oia.148.1580736767514; Mon, 03 Feb 2020 05:32:47 -0800 (PST) MIME-Version: 1.0 References: <20200203101806.2441-1-peter.ujfalusi@ti.com> <701ab186-c240-3c37-2c0b-8ac195f8073f@ti.com> In-Reply-To: <701ab186-c240-3c37-2c0b-8ac195f8073f@ti.com> From: Geert Uytterhoeven Date: Mon, 3 Feb 2020 14:32:35 +0100 Message-ID: Subject: Re: [PATCH 0/3] dmaengine: Stear users towards dma_request_slave_chan() To: Peter Ujfalusi Cc: Andy Shevchenko , Vinod Koul , dmaengine , Linux Kernel Mailing List , Dan Williams , Linux-sh list , Linux-Renesas Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On Mon, Feb 3, 2020 at 1:49 PM Peter Ujfalusi wrote: > On 03/02/2020 13.16, Andy Shevchenko wrote: > > On Mon, Feb 3, 2020 at 12:59 PM Peter Ujfalusi wrote: > >> On 03/02/2020 12.37, Andy Shevchenko wrote: > >>> On Mon, Feb 3, 2020 at 12:32 PM Peter Ujfalusi wrote: > >>>> Advise users of dma_request_slave_channel() and > >>>> dma_request_slave_channel_compat() to move to dma_request_slave_chan() > >>> > >>> How? There are legacy ARM boards you have to care / remove before. > >>> DMAengine subsystem makes a p*s off decisions > >> > >> The dma_slave_map support is added few years back for the legacy ARM > >> boards, because we do care. > >> daVinci, OMAP1, pxa, s3cx4xx and even m68k/coldfire moved over. > > > > Then why simple not to convert (start converting) those few drivers to > > new API and simple remove the old one? > > _if_ the dma_request_slave_channel_compat() is really falling back after > dma_request_chan() - this is what it calls first, then it is not a > simple convert to a new API. > 1. The arch needs to define the dma_slave_map for the SoC. > 2. The dma driver needs few lines to add it to DMAengine core (+pdata > change). > After this the _compat() can be replaced with dma_request_chan() > > In most cases I do not have access to documentation and boards to test. > > Looking at the output of 'git grep dma_request_slave_channel_compat': > drivers/mmc/host/renesas_sdhi_sys_dmac.c > drivers/spi/spi-pxa2xx-dma.c > drivers/spi/spi-rspi.c > drivers/spi/spi-sh-msiof.c > drivers/tty/serial/8250/8250_dma.c > > From these rspi boots only in DT and I'm not sure about the others. Both rspi and sh-msiof have users on legacy SH (i.e. without DT): arch/sh/kernel/cpu/sh4a/setup-sh7757.c: .name = "rspi", arch/sh/boards/mach-ecovec24/setup.c: .name = "spi_sh_msiof", The former seems to be used with drivers/dma/sh/shdmac.c: arch/sh/include/cpu-sh4/cpu/sh7757.h: SHDMA_SLAVE_RSPI_TX, arch/sh/include/cpu-sh4/cpu/sh7757.h: SHDMA_SLAVE_RSPI_RX, arch/sh/kernel/cpu/sh4a/setup-sh7757.c: .slave_id = SHDMA_SLAVE_RSPI_TX, arch/sh/kernel/cpu/sh4a/setup-sh7757.c: .slave_id = SHDMA_SLAVE_RSPI_RX, but I have no idea if it still works (and no hardware). The latter doesn't seem to be used with DMA on ecovec24/sh7724, so probably we can just drop the _compat() from sh-sh-msiof.c. BTW, we no longer support non-legacy DMA in drivers/tty/serial/sh-sci.c (DMA was completely broken in that driver when I added DT suppport), but it seems it was used at some point on various SH, cfr. e.g. arch/sh/kernel/cpu/sh4a/setup-sh7724.c still setting up the channels. Which might be a motivation for just dropping _compat() from spi-rspi.c, too? ;-) Anyone who cares for DMA on SuperH? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds