From: Paul Mundt <lethal@linux-sh.org>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: spi-devel-general@lists.sourceforge.net,
linux-sh@vger.kernel.org,
Grant Likely <grant.likely@secretlab.ca>
Subject: Re: [PATCH 1/2] SPI: spi_sh_msiof: implement DMA support
Date: Mon, 05 Sep 2011 04:59:11 +0000 [thread overview]
Message-ID: <20110905045911.GE22142@linux-sh.org> (raw)
In-Reply-To: <Pine.LNX.4.64.1109021712180.4731@axis700.grange>
On Fri, Sep 02, 2011 at 05:13:31PM +0200, Guennadi Liakhovetski wrote:
> Use the sh_dma dmaengine driver to support DMA on MSIOF.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
No real opinion one way or the other, just a couple observations.
> +static void sh_msiof_request_dma(struct sh_msiof_spi_priv *p)
> +{
..
> + p->dummypage = alloc_page(GFP_KERNEL);
> + if (!p->dummypage)
> + return;
> +
..
> +echantx:
> + __free_pages(p->dummypage, 0);
> +}
> +
alloc_page() can be balanced out with __free_page().
> @@ -695,11 +1030,11 @@ static int sh_msiof_spi_remove(struct platform_device *pdev)
>
> ret = spi_bitbang_stop(&p->bitbang);
> if (!ret) {
> + sh_msiof_release_dma(p);
> pm_runtime_disable(&pdev->dev);
> free_irq(platform_get_irq(pdev, 0), p);
> iounmap(p->mapbase);
> clk_put(p->clk);
> - spi_master_put(p->bitbang.master);
> }
> return ret;
> }
You've also killed off the spi_master_put() here.
WARNING: multiple messages have this Message-ID (diff)
From: Paul Mundt <lethal@linux-sh.org>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: spi-devel-general@lists.sourceforge.net,
linux-sh@vger.kernel.org,
Grant Likely <grant.likely@secretlab.ca>
Subject: Re: [PATCH 1/2] SPI: spi_sh_msiof: implement DMA support
Date: Mon, 5 Sep 2011 13:59:11 +0900 [thread overview]
Message-ID: <20110905045911.GE22142@linux-sh.org> (raw)
In-Reply-To: <Pine.LNX.4.64.1109021712180.4731@axis700.grange>
On Fri, Sep 02, 2011 at 05:13:31PM +0200, Guennadi Liakhovetski wrote:
> Use the sh_dma dmaengine driver to support DMA on MSIOF.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
No real opinion one way or the other, just a couple observations.
> +static void sh_msiof_request_dma(struct sh_msiof_spi_priv *p)
> +{
..
> + p->dummypage = alloc_page(GFP_KERNEL);
> + if (!p->dummypage)
> + return;
> +
..
> +echantx:
> + __free_pages(p->dummypage, 0);
> +}
> +
alloc_page() can be balanced out with __free_page().
> @@ -695,11 +1030,11 @@ static int sh_msiof_spi_remove(struct platform_device *pdev)
>
> ret = spi_bitbang_stop(&p->bitbang);
> if (!ret) {
> + sh_msiof_release_dma(p);
> pm_runtime_disable(&pdev->dev);
> free_irq(platform_get_irq(pdev, 0), p);
> iounmap(p->mapbase);
> clk_put(p->clk);
> - spi_master_put(p->bitbang.master);
> }
> return ret;
> }
You've also killed off the spi_master_put() here.
next prev parent reply other threads:[~2011-09-05 4:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-02 15:13 [PATCH 0/2] SPI: spi-sh-msiof: add DMA support Guennadi Liakhovetski
2011-09-02 15:13 ` Guennadi Liakhovetski
2011-09-02 15:13 ` [PATCH 1/2] SPI: spi_sh_msiof: implement " Guennadi Liakhovetski
2011-09-02 15:13 ` Guennadi Liakhovetski
2011-09-05 4:59 ` Paul Mundt [this message]
2011-09-05 4:59 ` Paul Mundt
2011-09-05 7:26 ` Guennadi Liakhovetski
2011-09-05 7:26 ` Guennadi Liakhovetski
2011-09-06 22:16 ` Magnus Damm
2011-09-06 22:16 ` Magnus Damm
2011-09-12 9:27 ` [PATCH 0/2 v2] spi: MSIOF: unbalanced spi_master_put() + DMA Guennadi Liakhovetski
2011-09-12 9:27 ` Guennadi Liakhovetski
2011-09-12 9:27 ` [PATCH 1/2 v2] SPI: spi-sh-msiof: remove unbalanced spi_master_put() Guennadi Liakhovetski
2011-09-12 9:27 ` Guennadi Liakhovetski
2011-09-12 9:27 ` [PATCH 2/2 v2] SPI: spi_sh_msiof: implement DMA support Guennadi Liakhovetski
2011-09-12 9:27 ` Guennadi Liakhovetski
2011-09-02 15:13 ` [PATCH 2/2] sh: use DMA with MSIOF SPI on the sh7724 ecovec board Guennadi Liakhovetski
2011-09-02 15:13 ` Guennadi Liakhovetski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110905045911.GE22142@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=g.liakhovetski@gmx.de \
--cc=grant.likely@secretlab.ca \
--cc=linux-sh@vger.kernel.org \
--cc=spi-devel-general@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.