Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1206558
| Path | csiph.com!goblin3!goblin2!goblin.stu.neva.ru!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Rameshwar Sahu <rsahu@apm.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] dmaengine: xgene-dma: Add ACPI support for X-Gene DMA engine driver |
| Date | Thu, 13 Aug 2015 09:20:03 +0200 |
| Message-ID | <pWUXV-4He-29@gated-at.bofh.it> (permalink) |
| References | <pOFCG-Xc-7@gated-at.bofh.it> |
| X-Original-To | Vinod Koul <vinod.koul@intel.com>, dan.j.williams@intel.com |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=a+bTrwzuLII0EMvonPWRWH+LFaqH31V/v6z8XjDctXQ=; b=OEv5pfQ5wHRsSLqOjaZMjnNkXNo1R5+koIUygr0u2YfAheaeXRdznGqptwraDU0CQt QJJP5QU4EM7H6dC89EmLdTGvgP9Xl//NMO+SO4hDcWKrmR6szB53chmQPML+azXNkhkI tWJQv4PsO0JvpkVlPFfSx1QQ1Og1eUPfbahe4= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=a+bTrwzuLII0EMvonPWRWH+LFaqH31V/v6z8XjDctXQ=; b=e/rOgzXhRN5e1YoGFB8q3tuoxz1BE26QF1bVxZTrqWa5zyS+Hed7Hcns0XYEX8rUkN a0tKHpE3+4fNwfmQMicwEkgCDxRThEU56znXQT71QpwVUuflqyyffaEwL7DnZakVguNR zQF2JlFuNgmAZjFIGHaZibp93ZX3z2xTvDogwD3xXRMC/boCq1gUQ0oW52tHKPWaZJLI 6CkDubYZDALD2H03DgqzGVdbm2XaRN2gxbzdlBayAiKMVRQvWe/zlruDiq2/KIHzA/oJ MYr65m9CwosI1leHYPPlBKcCV/yd3i4+tD5dqSfzjzjf25Tu5e8l8N4gGM1j3DRaRFFV tTJA== |
| X-Gm-Message-State | ALoCoQmnhu8hFSJEcHbTCzPXuJu7ISKhL16qyccousyUrHe9MmYeclxKerJuIYA6mevYUdx2tNKn |
| MIME-Version | 1.0 |
| X-Received | by 10.50.80.19 with SMTP id n19mr1451944igx.30.1439450308969; Thu, 13 Aug 2015 00:18:28 -0700 (PDT) |
| Content-Type | text/plain; charset=UTF-8 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 96 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | dmaengine@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jcm@redhat.com, patches@apm.com, Rameshwar Prasad Sahu <rsahu@apm.com> |
| X-Original-Date | Thu, 13 Aug 2015 12:48:28 +0530 |
| X-Original-Message-ID | <CAFd313zR468nZN+CZZ+efr9eKoY4N72jQ8+cF=iH+vkZEZ=7Xg@mail.gmail.com> |
| X-Original-References | <1437484479-2822-1-git-send-email-rsahu@apm.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1206558 |
Show key headers only | View raw
Hi Vinod,
On Tue, Jul 21, 2015 at 6:44 PM, Rameshwar Prasad Sahu <rsahu@apm.com> wrote:
> This patch adds ACPI support for the APM X-Gene DMA engine driver.
>
> Signed-off-by: Rameshwar Prasad Sahu <rsahu@apm.com>
> ---
> drivers/dma/xgene-dma.c | 28 +++++++++++++++++++++-------
> 1 file changed, 21 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/dma/xgene-dma.c b/drivers/dma/xgene-dma.c
> index dff22ab..d0a148d 100644
> --- a/drivers/dma/xgene-dma.c
> +++ b/drivers/dma/xgene-dma.c
> @@ -21,6 +21,7 @@
> * NOTE: PM support is currently not available.
> */
>
> +#include <linux/acpi.h>
> #include <linux/clk.h>
> #include <linux/delay.h>
> #include <linux/dma-mapping.h>
> @@ -1944,16 +1945,18 @@ static int xgene_dma_probe(struct platform_device *pdev)
> return ret;
>
> pdma->clk = devm_clk_get(&pdev->dev, NULL);
> - if (IS_ERR(pdma->clk)) {
> + if (IS_ERR(pdma->clk) && !ACPI_COMPANION(&pdev->dev)) {
> dev_err(&pdev->dev, "Failed to get clk\n");
> return PTR_ERR(pdma->clk);
> }
>
> /* Enable clk before accessing registers */
> - ret = clk_prepare_enable(pdma->clk);
> - if (ret) {
> - dev_err(&pdev->dev, "Failed to enable clk %d\n", ret);
> - return ret;
> + if (!IS_ERR(pdma->clk)) {
> + ret = clk_prepare_enable(pdma->clk);
> + if (ret) {
> + dev_err(&pdev->dev, "Failed to enable clk %d\n", ret);
> + return ret;
> + }
> }
>
> /* Remove DMA RAM out of shutdown */
> @@ -1998,7 +2001,8 @@ err_request_irq:
>
> err_dma_mask:
> err_clk_enable:
> - clk_disable_unprepare(pdma->clk);
> + if (!IS_ERR(pdma->clk))
> + clk_disable_unprepare(pdma->clk);
>
> return ret;
> }
> @@ -2022,11 +2026,20 @@ static int xgene_dma_remove(struct platform_device *pdev)
> xgene_dma_delete_chan_rings(chan);
> }
>
> - clk_disable_unprepare(pdma->clk);
> + if (!IS_ERR(pdma->clk))
> + clk_disable_unprepare(pdma->clk);
>
> return 0;
> }
>
> +#ifdef CONFIG_ACPI
> +static const struct acpi_device_id xgene_dma_acpi_match_ptr[] = {
> + {"APMC0D43", 0},
> + {},
> +};
> +MODULE_DEVICE_TABLE(acpi, xgene_dma_acpi_match_ptr);
> +#endif
> +
> static const struct of_device_id xgene_dma_of_match_ptr[] = {
> {.compatible = "apm,xgene-storm-dma",},
> {},
> @@ -2039,6 +2052,7 @@ static struct platform_driver xgene_dma_driver = {
> .driver = {
> .name = "X-Gene-DMA",
> .of_match_table = xgene_dma_of_match_ptr,
> + .acpi_match_table = ACPI_PTR(xgene_dma_acpi_match_ptr),
> },
> };
>
> --
> 1.8.2.1
Any Comments on the above patch ??
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] dmaengine: xgene-dma: Add ACPI support for X-Gene DMA engine driver Rameshwar Sahu <rsahu@apm.com> - 2015-08-13 09:20 +0200
csiph-web