Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/809477/?format=api
{ "id": 809477, "url": "http://patchwork.ozlabs.org/api/patches/809477/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-imx/patch/20170903224100.17893-8-stefan.bruens@rwth-aachen.de/", "project": { "id": 19, "url": "http://patchwork.ozlabs.org/api/projects/19/?format=api", "name": "Linux IMX development", "link_name": "linux-imx", "list_id": "linux-imx-kernel.lists.patchwork.ozlabs.org", "list_email": "linux-imx-kernel@lists.patchwork.ozlabs.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170903224100.17893-8-stefan.bruens@rwth-aachen.de>", "list_archive_url": null, "date": "2017-09-03T22:40:58", "name": "[07/10] dmaengine: sun6i: Retrieve channel count/max request from devicetree", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "e9c5ed1615d4f08cf7021d89db614ac5680890a1", "submitter": { "id": 67055, "url": "http://patchwork.ozlabs.org/api/people/67055/?format=api", "name": "Stefan Brüns", "email": "stefan.bruens@rwth-aachen.de" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-imx/patch/20170903224100.17893-8-stefan.bruens@rwth-aachen.de/mbox/", "series": [ { "id": 1284, "url": "http://patchwork.ozlabs.org/api/series/1284/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-imx/list/?series=1284", "date": "2017-09-03T22:40:55", "name": "dmaengine: sun6i: Fixes for H3/A83T, enable A64", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1284/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/809477/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/809477/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>", "X-Original-To": "incoming-imx@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming-imx@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"XfRFW4YL\"; dkim-atps=neutral" ], "Received": [ "from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xlp922D8rz9s8J\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tMon, 4 Sep 2017 08:50:30 +1000 (AEST)", "from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dodii-0005AZ-BP; Sun, 03 Sep 2017 22:50:24 +0000", "from mail-out-2.itc.rwth-aachen.de ([134.130.5.47])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dodaK-0006wF-TD for linux-arm-kernel@lists.infradead.org;\n\tSun, 03 Sep 2017 22:41:50 +0000", "from rwthex-w2-b.rwth-ad.de ([134.130.26.159])\n\tby mail-in-2.itc.rwth-aachen.de with ESMTP; 04 Sep 2017 00:41:13 +0200", "from pebbles.fritz.box (92.225.242.208) by rwthex-w2-b.rwth-ad.de\n\t(2002:8682:1a9f::8682:1a9f) with Microsoft SMTP Server (TLS) id\n\t15.0.1320.4; Mon, 4 Sep 2017 00:41:12 +0200" ], "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=SLL3VnFUWM3G6w88u3GMw7BebQIdwy83GlrJAmDWtzU=;\n\tb=XfRFW4YLu7++HW\n\tBTWK9/G4t7EzJbnVk1Vl/6MFgB8l4OLAcB0by5Ja/jsQJ0IbQZDH9lCaZk8EijRMDyMI3GdsSppoX\n\tZ5uqkeJkdd1GfWUGh3p12yMFUteeGDGjgColTJcD4u/cDazMTkB+t4vudclfeExlpjzGRoLEI/aE3\n\tQnQwprTFgy1GDdi8xJtc6vwkPa7t+GF4yCDUJ5+oKI4Eb5AcdBEF39eV5tOtBBwlFF/Uqyp6ccXDE\n\tHwvu+KjXRsgd+5lCXNYJJthecYZWSomqgfpcApM4lwewNZu33TxJSKJ4j+F7vFoHPhDr9PQdcfQ4r\n\t8apGgc8lklkenf3888IQ==;", "X-IronPort-AV": "E=Sophos;i=\"5.41,472,1498514400\"; d=\"scan'208\";a=\"11607794\"", "From": "=?utf-8?q?Stefan_Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>", "To": "<linux-sunxi@googlegroups.com>", "Subject": "[PATCH 07/10] dmaengine: sun6i: Retrieve channel count/max request\n\tfrom devicetree", "Date": "Mon, 4 Sep 2017 00:40:58 +0200", "Message-ID": "<20170903224100.17893-8-stefan.bruens@rwth-aachen.de>", "X-Mailer": "git-send-email 2.14.1", "In-Reply-To": "<20170903224100.17893-1-stefan.bruens@rwth-aachen.de>", "References": "<20170903224100.17893-1-stefan.bruens@rwth-aachen.de>", "MIME-Version": "1.0", "X-Originating-IP": "[92.225.242.208]", "X-ClientProxiedBy": "rwthex-w1-b.rwth-ad.de (2002:8682:1a9d::8682:1a9d) To\n\trwthex-w2-b.rwth-ad.de (2002:8682:1a9f::8682:1a9f)", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20170903_154145_715581_7EAA5AC7 ", "X-CRM114-Status": "GOOD ( 11.18 )", "X-Spam-Score": "-4.2 (----)", "X-Spam-Report": "SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details: (-4.2 points)\n\tpts rule name description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\n\tmedium trust [134.130.5.47 listed in list.dnswl.org]\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]", "X-BeenThere": "linux-arm-kernel@lists.infradead.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<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>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>", "Cc": "devicetree@vger.kernel.org, Vinod Koul <vinod.koul@intel.com>,\n\tAndre Przywara <andre.przywara@arm.com>, linux-kernel@vger.kernel.org,\n\tCode Kipper <codekipper@gmail.com>, Chen-Yu Tsai <wens@csie.org>,\n\tRob Herring <robh+dt@kernel.org>, dmaengine@vger.kernel.org,\n\tMaxime Ripard <maxime.ripard@free-electrons.com>,\n\tlinux-arm-kernel@lists.infradead.org", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Sender": "\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>", "Errors-To": "linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org", "List-Id": "linux-imx-kernel.lists.patchwork.ozlabs.org" }, "content": "To avoid introduction of a new compatible for each small SoC/DMA controller\nvariation, move the definition of the channel count to the devicetree.\n\nThe number of vchans is no longer explicit, but limited by the highest\nport/DMA request number. The result is a slight overallocation for SoCs\nwith a sparse port mapping.\n\nSigned-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>\n---\n drivers/dma/sun6i-dma.c | 35 ++++++++++++++++++++++++++++++++++-\n 1 file changed, 34 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c\nindex c69dadb853d2..bd4c2e4a759b 100644\n--- a/drivers/dma/sun6i-dma.c\n+++ b/drivers/dma/sun6i-dma.c\n@@ -42,6 +42,9 @@\n \n #define DMA_STAT\t\t0x30\n \n+/* Offset between DMA_IRQ_EN and DMA_IRQ_STAT limits number of channels */\n+#define DMA_MAX_CHANNELS\t(DMA_IRQ_CHAN_NR * 0x10 / 4)\n+\n /*\n * sun8i specific registers\n */\n@@ -65,7 +68,8 @@\n #define DMA_CHAN_LLI_ADDR\t0x08\n \n #define DMA_CHAN_CUR_CFG\t0x0c\n-#define DMA_CHAN_CFG_SRC_DRQ(x)\t\t((x) & 0x1f)\n+#define DMA_CHAN_MAX_DRQ\t\t0x1f\n+#define DMA_CHAN_CFG_SRC_DRQ(x)\t\t((x) & DMA_CHAN_MAX_DRQ)\n #define DMA_CHAN_CFG_SRC_IO_MODE\tBIT(5)\n #define DMA_CHAN_CFG_SRC_LINEAR_MODE\t(0 << 5)\n #define DMA_CHAN_CFG_SRC_BURST_A31(x)\t(((x) & 0x3) << 7)\n@@ -1173,6 +1177,35 @@ static int sun6i_dma_probe(struct platform_device *pdev)\n \tsdc->num_vchans = sdc->cfg->nr_max_vchans;\n \tsdc->max_request = sdc->cfg->nr_max_requests;\n \n+\tret = of_property_read_u32(np, \"dma-channels\", &sdc->num_pchans);\n+\tif (ret && !sdc->num_pchans) {\n+\t\tdev_err(&pdev->dev, \"Can't get dma-channels.\\n\");\n+\t\treturn ret;\n+\t}\n+\n+\tif (sdc->num_pchans > DMA_MAX_CHANNELS) {\n+\t\tdev_err(&pdev->dev, \"Number of dma-channels out of range.\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tret = of_property_read_u32(np, \"dma-requests\", &sdc->max_request);\n+\tif (ret && !sdc->max_request) {\n+\t\tdev_info(&pdev->dev, \"Missing dma-requests, using %u.\\n\",\n+\t\t\t DMA_CHAN_MAX_DRQ);\n+\t}\n+\n+\tif (sdc->max_request > DMA_CHAN_MAX_DRQ) {\n+\t\tdev_err(&pdev->dev, \"Value of dma-requests out of range.\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/*\n+\t * If the number of vchans is not specified, derive it from the\n+\t * highest port number, at most one channel per port and direction.\n+\t */\n+\tif (!sdc->num_vchans)\n+\t\tsdc->num_vchans = 2 * (sdc->max_request + 1);\n+\n \tsdc->pchans = devm_kcalloc(&pdev->dev, sdc->num_pchans,\n \t\t\t\t sizeof(struct sun6i_pchan), GFP_KERNEL);\n \tif (!sdc->pchans)\n", "prefixes": [ "07/10" ] }