Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp501406lqp; Thu, 4 Apr 2024 23:13:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWXt/CaFl5d4yDMcIaczZ/y+UIijqexJESeCZoRSRUnWn77M7sS7jkbnwbXbQNqrrPw42vkE7pFuHEicM6PT2QdNeIu0R0VZ9eRjtrZSQ== X-Google-Smtp-Source: AGHT+IGUYBzPczdeEM8J11zlno+3o0lzm4+fCfc7WwVhUFrJBaNqEq28a6OBCrnUn4poBveaKLna X-Received: by 2002:a05:6870:95a0:b0:22e:8406:5bc4 with SMTP id k32-20020a05687095a000b0022e84065bc4mr562326oao.32.1712297583054; Thu, 04 Apr 2024 23:13:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712297583; cv=pass; d=google.com; s=arc-20160816; b=QF1SlNLY2gYO0fp9FsCAEFvPfoaKl0oCR8O7+JEeXoMsavYFYeELz3P0TvmGS6BCjz QmCVOKhyFGLINqWKQySslXulxox1eiEzW6VYvdzIdHJ/jamdWj2yuzcFLBsbytZXg93i DTIT7KCj11c/9vkeefPfRoe0LUECH36sQfD46dOxw5qbn/NtwfB16wCVcYfftXLcmgnf 9wykAgfVtojxMkgXcRkQ/ErgOZS6RlEWlQ4LOJK/VzvDSZ+TMW4kGEeGqLWxMtNjZ1T/ mTGaxTmV4pvyV6TOeEbDhAj4JBCIANtxsKEqwgDJzsDsvUQhg2UrWc5oTAQN4RVdaT37 8I+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=uFbT90iF9kUEG7yLOqQtF0dHrAqdiZCTxJNJK/dfusY=; fh=1YNwm5KBWetjB3qGkhgLqh/dZnCTsWuqRk83JW6hjgE=; b=N/07eMufbylVgW1lKwZXg91jWYuKYUSUn/foCs17YeZHCGUN4t00nHQvvT+Lan7abi IaEw+RlwfqrNrtIC5tmpjYM/0yTi7o5/Qss3R8UNDbebezPdP/eZfJWaUplMl3z5Fuf7 Lix46PKT4yk7LUp3aYL4L626ZCu4cSzI9TXm3PUN6PM/4y/d6wt9MI+PVTR2soQGFs1r b+La9oUINGfHHpjrxfdls90f+KQg6F2/3FNMDUIgNLEuyVnaioXdUif4QTbbVbIloogy qIkakElpOpCkX1StftVQSuiB1pB1fyNrkFRBdkVQecC2J8cmSOclZ8zp+deiID6fo8pI /YEg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LbDDSfzx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-132446-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132446-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q22-20020aa79836000000b006ecfd3e5f65si772983pfl.318.2024.04.04.23.13.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 23:13:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132446-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LbDDSfzx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-132446-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132446-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A218AB25E17 for ; Fri, 5 Apr 2024 06:10:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 76BA6381C7; Fri, 5 Apr 2024 06:08:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LbDDSfzx" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90A94376EB; Fri, 5 Apr 2024 06:08:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712297337; cv=none; b=h563A0COi9Jwh33twqJdWsj5Lw31mplpgmyymQlOktJU18/ue+bsspZ17XAxTd4s6nqSM0G+zYkyNqXNcl6UA4GDQrGxJvF0zfOOji2CeinJuripuko13c6jH5SdXmOUDCms1G4t+3KQ1OOksQ+n1LOB97/T8HVBvBMLOxikCRc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712297337; c=relaxed/simple; bh=9yRltj2u1toAe8XDEiaX+4QhmVeUjmlStdgTFG4DGqc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HD4NWaEsxjoJwV+qgvj9WgVA4RqcN7yDsOIqPtLiA4ZRfGt36Q6ilIwddpGBrCy5Msyg0IKTrEJ67l6115vBNqjQf8zS+xanhGiG3DZZFGWaL8uT6B2KmM/r7YuZM4DerMCb9pR3aBvSD89M9nmF/oLXE569VoC3AgsAhuitChk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LbDDSfzx; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13B07C43394; Fri, 5 Apr 2024 06:08:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712297337; bh=9yRltj2u1toAe8XDEiaX+4QhmVeUjmlStdgTFG4DGqc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LbDDSfzxn7F3lnVzDaUTXIw2aKkkIBEu1KBz6DFaj0AthhKa3sKXcIHkSzxrdWbYD UJjOXQCoYBNbphO8qZmCJt5hQ8JNiBKTXOsY8577LaIZiitSD4YMbeEiuPJb2Pv8g3 bwLBWTRR6HAbSJ7BhhneGNb4lgz6QMXuTNwSlXhhaMRNYxgcQ38SEDV3AeABQiVq+E tJ6XW3wakruYAXniYFc4d5xTRT/+9eM2ItmdnQ43a5kzuC9MvNPk9/bqBSJbhlaziN MwIO/aBjFR9Sdw7Ecczr7wBCwctFK7ANgYcnQtyF0+u8E2esHYlysNO56h9/Cp+LO3 DS4yZm7YQ9oCg== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 10/15] tty: 8250_omap: use dmaengine_prep_slave_sg() Date: Fri, 5 Apr 2024 08:08:21 +0200 Message-ID: <20240405060826.2521-11-jirislaby@kernel.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240405060826.2521-1-jirislaby@kernel.org> References: <20240405060826.2521-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This is a preparatory for the serial-to-kfifo switch. kfifo understands only scatter-gatter approach, so switch to that. No functional change intended, it's just dmaengine_prep_slave_single() inline expanded. Signed-off-by: Jiri Slaby (SUSE) --- drivers/tty/serial/8250/8250_omap.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index 66901d93089a..879e77b30701 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -1140,6 +1140,7 @@ static int omap_8250_tx_dma(struct uart_8250_port *p) struct omap8250_priv *priv = p->port.private_data; struct circ_buf *xmit = &p->port.state->xmit; struct dma_async_tx_descriptor *desc; + struct scatterlist sg; unsigned int skip_byte = 0; int ret; @@ -1191,9 +1192,11 @@ static int omap_8250_tx_dma(struct uart_8250_port *p) skip_byte = 1; } - desc = dmaengine_prep_slave_single(dma->txchan, - dma->tx_addr + xmit->tail + skip_byte, - dma->tx_size - skip_byte, DMA_MEM_TO_DEV, + sg_init_table(&sg, 1); + sg_dma_address(&sg) = dma->tx_addr + xmit->tail + skip_byte; + sg_dma_len(&sg) = dma->tx_size - skip_byte; + + desc = dmaengine_prep_slave_sg(dma->txchan, &sg, 1, DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); if (!desc) { ret = -EBUSY; -- 2.44.0