Message ID | 1483970598-6191-4-git-send-email-m.szyprowski@samsung.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp95713qgi; Mon, 9 Jan 2017 06:04:14 -0800 (PST) X-Received: by 10.84.175.3 with SMTP id s3mr191542356plb.66.1483970654111; Mon, 09 Jan 2017 06:04:14 -0800 (PST) Return-Path: <linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org> Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id u2si65157624plm.263.2017.01.09.06.04.13 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2017 06:04:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cQaYU-0000j5-7L; Mon, 09 Jan 2017 14:04:10 +0000 Received: from mailout4.w1.samsung.com ([210.118.77.14]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cQaYE-0008Q9-Uf for linux-arm-kernel@lists.infradead.org; Mon, 09 Jan 2017 14:03:56 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OJI002JUN1RG170@mailout4.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 09 Jan 2017 14:03:27 +0000 (GMT) Received: from eusmges3.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170109140327eucas1p16216bbd37cd1bb3f189d878fc47de90a~YH2el9tog2901929019eucas1p1c; Mon, 9 Jan 2017 14:03:27 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3.samsung.com (EUCPMTA) with SMTP id 10.06.09557.E2893785; Mon, 9 Jan 2017 14:03:26 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170109140326eucas1p29d3e54da58845589e2adf70db854d996~YH2d8qMKJ1318513185eucas1p2X; Mon, 9 Jan 2017 14:03:26 +0000 (GMT) X-AuditID: cbfec7f2-f790f6d000002555-6e-5873982e7527 Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 4F.2D.06687.06893785; Mon, 9 Jan 2017 14:04:16 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OJI005JBN1K8V20@eusync3.samsung.com>; Mon, 09 Jan 2017 14:03:26 +0000 (GMT) From: Marek Szyprowski <m.szyprowski@samsung.com> To: linux-samsung-soc@vger.kernel.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH v2 3/4] dmaengine: pl330: Store pointer to slave device Date: Mon, 09 Jan 2017 15:03:17 +0100 Message-id: <1483970598-6191-4-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1483970598-6191-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMIsWRmVeSWpSXmKPExsWy7djP87p6M4ojDL5OtbHYOGM9q8XqqX9Z LSbdn8Bicf78BnaLTY+vsVp87j3CaDHj/D4mi7VH7rJbnDl9idXi+Npwi5d9+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iDPyAANODgHuAcr6dsluGW0nDrGWNDNVbH6yhSWBsYV HF2MnBwSAiYS+35PZYSwxSQu3FvP1sXIxSEksIRRovP5RVYIp4lJ4nLrMSaQKjYBQ4mut11s ILaIQBOjxMFfHiBFzALLmSS2TL/A3sXIwSEs4C6x51EoSA2LgKpE3+UXzCA2L1D4+tk37BDb 5CROHpvMCmJzCnhIfF4xkwXEFgKq6Xj7nH0CI+8CRoZVjCKppcW56bnFhnrFibnFpXnpesn5 uZsYgVGw7djPzTsYL20MPsQowMGoxMO7YVJxhBBrYllxZe4hRgkOZiUR3htTgEK8KYmVValF +fFFpTmpxYcYTYGOmsgsJZqcD4zQvJJ4QxNDc0tDI2MLC3MjIyVx3pIPV8KFBNITS1KzU1ML Uotg+pg4OKUaGGUu7kiKbefaMP3lu/z1Br8WHT/W9uv04mmLJS1XpeyJ9o3c9rG5vcPl8xTj pzME5mxjnsqS6XT9aERo+7nOfSuLk+YcCNHUtvPXaeE6u+eeUNvPljXPV60NEjs0N5Qxffni Jdo7nUW0dJh4IzlZj+xs/r77T1fOLNMoHs5/f5a80GjTTan8s1CJpTgj0VCLuag4EQAti/30 mAIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170109140326eucas1p29d3e54da58845589e2adf70db854d996 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170109140326eucas1p29d3e54da58845589e2adf70db854d996 X-RootMTR: 20170109140326eucas1p29d3e54da58845589e2adf70db854d996 References: <1483970598-6191-1-git-send-email-m.szyprowski@samsung.com> <CGME20170109140326eucas1p29d3e54da58845589e2adf70db854d996@eucas1p2.samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170109_060355_188384_B26533BA X-CRM114-Status: GOOD ( 14.53 ) X-Spam-Score: -10.1 (----------) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-10.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [210.118.77.14 listed in wl.mailspike.net] -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [210.118.77.14 listed in list.dnswl.org] -3.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Ulf Hansson <ulf.hansson@linaro.org>, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>, Vinod Koul <vinod.koul@intel.com>, "Rafael J. Wysocki" <rjw@rjwysocki.net>, Krzysztof Kozlowski <krzk@kernel.org>, Inki Dae <inki.dae@samsung.com>, Marek Szyprowski <m.szyprowski@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org |
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 3c80e71271a2..9c72f535739c 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -450,6 +450,7 @@ struct dma_pl330_chan { /* for runtime pm tracking */ bool active; + struct device *slave; }; struct pl330_dmac { @@ -2113,6 +2114,14 @@ static struct dma_chan *of_dma_pl330_xlate(struct of_phandle_args *dma_spec, if (chan_id >= pl330->num_peripherals) return NULL; + if (!pl330->peripherals[chan_id].slave) + pl330->peripherals[chan_id].slave = slave; + else if (pl330->peripherals[chan_id].slave != slave) { + dev_err(pl330->ddma.dev, + "Can't use same channel with multiple slave devices!\n"); + return NULL; + } + return dma_get_slave_channel(&pl330->peripherals[chan_id].chan); }
Store the pointer to slave device, which requested our channel. It will be later used to implement runtime PM of PL330 DMA controller. Although DMA channels might be requested many times, each DMA peripheral channel is physically dedicated only for specific hardware, so there should be only one slave device for each channel. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- drivers/dma/pl330.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel