From patchwork Tue Feb 18 23:43:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 13981077 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 333831DED4B; Tue, 18 Feb 2025 23:43:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739922214; cv=none; b=q85dTNB6dh54JbKvOAZb2unDsIvkCVLJLOmA6dz4kOuF5M6pqNvg+koshYmOrGQY4K8VtXF5fMLp6xcqZae4hgEc4ocPi56pkl7ehuja2pwSuEknNLO9oINm7Vix2jYQIsdEE+r0Ye4FMRyV/1PM0n4mkz/k45C3ki3OmDOS4EY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739922214; c=relaxed/simple; bh=Yi6gBIXvCl6FN9fcU6uELVRQhvKsvjEo73JAgKYTWBo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TqSw1mzSSX3JjzBp9T2jtAkHuGk13og27HGdDuOgXh0yrhaa/2bqN78enZACF4P1umv/6+PyneSUJnn+EAHh4A1evhJAG6GDhHWjxGiLdf8D7vHx44e2qE8OJfscl796zGbh3N/1DGnK9pkDbxiWovzCjxFfFZlUmpGB6rtAkO4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com X-CSE-ConnectionGUID: ZPkOvpgBRVWrg/KaoayOYg== X-CSE-MsgGUID: NBo76h0GQ8SVtzi6DDCKuw== Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 19 Feb 2025 08:43:32 +0900 Received: from mulinux.example.org (unknown [10.226.92.65]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id E0DCB40FDD99; Wed, 19 Feb 2025 08:43:28 +0900 (JST) From: Fabrizio Castro To: Vinod Koul , Geert Uytterhoeven Cc: Fabrizio Castro , Biju Das , Wolfram Sang , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Lad Prabhakar , linux-renesas-soc@vger.kernel.org Subject: [PATCH v3 5/7] dmaengine: sh: rz-dmac: Allow for multiple DMACs Date: Tue, 18 Feb 2025 23:43:02 +0000 Message-Id: <20250218234305.700317-6-fabrizio.castro.jz@renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250218234305.700317-1-fabrizio.castro.jz@renesas.com> References: <20250218234305.700317-1-fabrizio.castro.jz@renesas.com> Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 dma_request_channel() calls into __dma_request_channel() with NULL as value for np, which won't allow for the selection of the correct DMAC when multiple DMACs are available. Switch to using __dma_request_channel() directly so that we can choose the desired DMA for the channel. This is in preparation of adding DMAC support for the Renesas RZ/V2H(P) and similar SoCs. Signed-off-by: Fabrizio Castro --- v2->v3: * Added () for calls in changelog. v1->v2: * No change. --- drivers/dma/sh/rz-dmac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dma/sh/rz-dmac.c b/drivers/dma/sh/rz-dmac.c index 9235db551026..d7a4ce28040b 100644 --- a/drivers/dma/sh/rz-dmac.c +++ b/drivers/dma/sh/rz-dmac.c @@ -748,7 +748,8 @@ static struct dma_chan *rz_dmac_of_xlate(struct of_phandle_args *dma_spec, dma_cap_zero(mask); dma_cap_set(DMA_SLAVE, mask); - return dma_request_channel(mask, rz_dmac_chan_filter, dma_spec); + return __dma_request_channel(&mask, rz_dmac_chan_filter, dma_spec, + ofdma->of_node); } /*