Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1098292imm; Tue, 3 Jul 2018 05:36:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeqfLuuP+M3RrHOGmDM+PKXlno1twTy+tMfPwnE2xx1Unk4HpmzT+BJp3GZny0b/KX5C5mQ X-Received: by 2002:a62:6882:: with SMTP id d124-v6mr29512835pfc.122.1530621363085; Tue, 03 Jul 2018 05:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530621363; cv=none; d=google.com; s=arc-20160816; b=RqDjJ8qkuV7gAm4qiPuKe2eoispQa+6lOMb0Bv0538kPpCra1DVhc2T4vUQ200/YsH zYjSd+wFLOxd2Lxbzxhh6nB+/lLN5but1/Rsat4QNbf647JqWtt/B1D1SGmaRpFNSS3r 1TFINe2d3RF+kjxaJ8l3kR35UQ7absFghEJErY5QdrmrUm9eCHyvyiogYmxhjsY8Pvhl g+kbLB6zcn7cMwAHs8RbCHhlouwEH8fn+hit/8GLtjsS97EcJ/jQy5khKMvwkPJcvb9g NtjiZo7ggKlvCdtubuMjiGGSC6SasOs6a5vbQlNuGfb/xkELohnoSBraCihYaPhFNjez 8Ncg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=3A57Tphh16JtBqx4iFmY3oVLDPbKp4B9P61Ul8WrKnc=; b=Ipll0lxbkJH7Qd0oXVL/XlAU1iv+DP5UMCCzUk+7hWr2wuqeSmpUaF/skF2n1GTb8J msfauMGzSMCkEd4ZD8De4d7zLmg753RFFJ5jVBOLJdbTOitDDjfQ5mKC+P/IDysBQIDt 0ez7rWrvCfVcyATx9EYythkKJVadBrp+nEN4NQk2w2mvCQd8QzVyD/LtP87PBwukj0KD jNjMJYqOug0hzlqJVsh7z4CMWiUKJ8CzoWIFQvMbuvGcYQ/CMugB6TB7agnkgkwT/UMH +a1XtHxXMbtkQkT652vSRgVoAm50quogIuw6sCl3BDbMW3buerCM02lBtI6h5qHUKoB+ Pesg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=I3JhKZNa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u29-v6si1009154pga.29.2018.07.03.05.35.48; Tue, 03 Jul 2018 05:36:03 -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; dkim=pass header.i=@crapouillou.net header.s=mail header.b=I3JhKZNa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753476AbeGCMec (ORCPT + 99 others); Tue, 3 Jul 2018 08:34:32 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:46646 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753345AbeGCMcf (ORCPT ); Tue, 3 Jul 2018 08:32:35 -0400 From: Paul Cercueil To: Vinod Koul , Rob Herring , Mark Rutland , Ralf Baechle , Paul Burton , James Hogan , Zubair Lutfullah Kakakhel Cc: Mathieu Malaterre , Daniel Silsby , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, Paul Cercueil Subject: [PATCH 05/14] dmaengine: dma-jz4780: Add support for the JZ4740 SoC Date: Tue, 3 Jul 2018 14:32:05 +0200 Message-Id: <20180703123214.23090-6-paul@crapouillou.net> In-Reply-To: <20180703123214.23090-1-paul@crapouillou.net> References: <20180703123214.23090-1-paul@crapouillou.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1530621153; bh=3A57Tphh16JtBqx4iFmY3oVLDPbKp4B9P61Ul8WrKnc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=I3JhKZNaQAgxLH27OhxamVAAL2rP4dtgxd7TwmOZ+B2sRIquCn1L8jmfUaALeRKcN3gJjqHoT83EwFp08TEKJG4SMkY6UxYP6Dtuhzvwq+fwpm2OtbHW/jYAAWndSX2KlxX+toOgG1mtK1GRnOx2WgGUgyY41eEI1vsnswvz7JY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The JZ4740 SoC has a single DMA core starring six DMA channels. Signed-off-by: Paul Cercueil --- Documentation/devicetree/bindings/dma/jz4780-dma.txt | 1 + drivers/dma/Kconfig | 2 +- drivers/dma/dma-jz4780.c | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/dma/jz4780-dma.txt b/Documentation/devicetree/bindings/dma/jz4780-dma.txt index 0fd0759053be..d7ca3f925fdf 100644 --- a/Documentation/devicetree/bindings/dma/jz4780-dma.txt +++ b/Documentation/devicetree/bindings/dma/jz4780-dma.txt @@ -5,6 +5,7 @@ Required properties: - compatible: Should be one of: * ingenic,jz4780-dma * ingenic,jz4770-dma + * ingenic,jz4740-dma - reg: Should contain the DMA channel registers location and length, followed by the DMA controller registers location and length. - interrupts: Should contain the interrupt specifier of the DMA controller. diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index 48d25dccedb7..a935d15ec581 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -143,7 +143,7 @@ config DMA_JZ4740 config DMA_JZ4780 tristate "JZ4780 DMA support" - depends on MACH_JZ4780 || MACH_JZ4770 || COMPILE_TEST + depends on MACH_INGENIC || COMPILE_TEST select DMA_ENGINE select DMA_VIRTUAL_CHANNELS help diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c index 7b8b2dcd119e..ccadbe61dde7 100644 --- a/drivers/dma/dma-jz4780.c +++ b/drivers/dma/dma-jz4780.c @@ -133,6 +133,7 @@ struct jz4780_dma_chan { }; enum jz_version { + ID_JZ4740, ID_JZ4770, ID_JZ4780, }; @@ -247,6 +248,7 @@ static void jz4780_dma_desc_free(struct virt_dma_desc *vdesc) } static const unsigned int jz4780_dma_ord_max[] = { + [ID_JZ4740] = 5, [ID_JZ4770] = 6, [ID_JZ4780] = 7, }; @@ -801,11 +803,13 @@ static struct dma_chan *jz4780_of_dma_xlate(struct of_phandle_args *dma_spec, } static const unsigned int jz4780_dma_nb_channels[] = { + [ID_JZ4740] = 6, [ID_JZ4770] = 6, [ID_JZ4780] = 32, }; static const struct of_device_id jz4780_dma_dt_match[] = { + { .compatible = "ingenic,jz4740-dma", .data = (void *)ID_JZ4740 }, { .compatible = "ingenic,jz4770-dma", .data = (void *)ID_JZ4770 }, { .compatible = "ingenic,jz4780-dma", .data = (void *)ID_JZ4780 }, {}, -- 2.18.0