From: Robin Gong <b38343@freescale.com>
To: Varka Bhadram <varkabhadram@gmail.com>
Cc: <linux-arm-kernel@lists.infradead.org>, <broonie@kernel.org>,
<linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<marex@denx.de>, <shawn.guo@linaro.org>, <Frank.Li@freescale.com>
Subject: Re: [PATCH v5] spi: spi-imx: add DMA support
Date: Wed, 10 Sep 2014 13:46:22 +0800 [thread overview]
Message-ID: <20140910054621.GA29307@Robin-OptiPlex-780> (raw)
In-Reply-To: <540FD084.6000805@gmail.com>
On Wed, Sep 10, 2014 at 09:46:04AM +0530, Varka Bhadram wrote:
> On 09/10/2014 07:00 AM, Robin Gong wrote:
> >Enable DMA support on i.mx6. The read speed can increase from 600KB/s
> >to 1.2MB/s on i.mx6q. You can disable or enable dma function in dts.
>
> (...)
>
> >+
> >+static int spi_imx_sdma_init(struct device *dev, struct spi_imx_data *spi_imx,
> >+ struct spi_master *master,
> >+ const struct resource *res)
> >+{
> >+ struct dma_slave_config slave_config = {};
> >+ int ret;
> >+
> >+ /* Prepare for TX DMA: */
> >+ master->dma_tx = dma_request_slave_channel(dev, "tx");
> >+ if (!master->dma_tx) {
> >+ dev_err(dev, "cannot get the TX DMA channel!\n");
> >+ ret = -EINVAL;
> >+ goto err;
> >+ }
> >+
> >+ slave_config.direction = DMA_MEM_TO_DEV;
> >+ slave_config.dst_addr = res->start + MXC_CSPITXDATA;
> >+ slave_config.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
> >+ slave_config.dst_maxburst = spi_imx_get_fifosize(spi_imx) / 2;
> >+ ret = dmaengine_slave_config(master->dma_tx, &slave_config);
> >+ if (ret) {
> >+ dev_err(dev, "error in TX dma configuration.");
> >+
>
> Missed terminating new line..
>
You mean lack "\n" in the print info? If yes, I can improve it in v6.
> --
> Regards,
> Varka Bhadram.
>
WARNING: multiple messages have this Message-ID (diff)
From: Robin Gong <b38343-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: Varka Bhadram <varkabhadram-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: <linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
<broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
<linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<marex-ynQEQJNshbs@public.gmane.org>,
<shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
<Frank.Li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Subject: Re: [PATCH v5] spi: spi-imx: add DMA support
Date: Wed, 10 Sep 2014 13:46:22 +0800 [thread overview]
Message-ID: <20140910054621.GA29307@Robin-OptiPlex-780> (raw)
In-Reply-To: <540FD084.6000805-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Wed, Sep 10, 2014 at 09:46:04AM +0530, Varka Bhadram wrote:
> On 09/10/2014 07:00 AM, Robin Gong wrote:
> >Enable DMA support on i.mx6. The read speed can increase from 600KB/s
> >to 1.2MB/s on i.mx6q. You can disable or enable dma function in dts.
>
> (...)
>
> >+
> >+static int spi_imx_sdma_init(struct device *dev, struct spi_imx_data *spi_imx,
> >+ struct spi_master *master,
> >+ const struct resource *res)
> >+{
> >+ struct dma_slave_config slave_config = {};
> >+ int ret;
> >+
> >+ /* Prepare for TX DMA: */
> >+ master->dma_tx = dma_request_slave_channel(dev, "tx");
> >+ if (!master->dma_tx) {
> >+ dev_err(dev, "cannot get the TX DMA channel!\n");
> >+ ret = -EINVAL;
> >+ goto err;
> >+ }
> >+
> >+ slave_config.direction = DMA_MEM_TO_DEV;
> >+ slave_config.dst_addr = res->start + MXC_CSPITXDATA;
> >+ slave_config.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
> >+ slave_config.dst_maxburst = spi_imx_get_fifosize(spi_imx) / 2;
> >+ ret = dmaengine_slave_config(master->dma_tx, &slave_config);
> >+ if (ret) {
> >+ dev_err(dev, "error in TX dma configuration.");
> >+
>
> Missed terminating new line..
>
You mean lack "\n" in the print info? If yes, I can improve it in v6.
> --
> Regards,
> Varka Bhadram.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: b38343@freescale.com (Robin Gong)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5] spi: spi-imx: add DMA support
Date: Wed, 10 Sep 2014 13:46:22 +0800 [thread overview]
Message-ID: <20140910054621.GA29307@Robin-OptiPlex-780> (raw)
In-Reply-To: <540FD084.6000805@gmail.com>
On Wed, Sep 10, 2014 at 09:46:04AM +0530, Varka Bhadram wrote:
> On 09/10/2014 07:00 AM, Robin Gong wrote:
> >Enable DMA support on i.mx6. The read speed can increase from 600KB/s
> >to 1.2MB/s on i.mx6q. You can disable or enable dma function in dts.
>
> (...)
>
> >+
> >+static int spi_imx_sdma_init(struct device *dev, struct spi_imx_data *spi_imx,
> >+ struct spi_master *master,
> >+ const struct resource *res)
> >+{
> >+ struct dma_slave_config slave_config = {};
> >+ int ret;
> >+
> >+ /* Prepare for TX DMA: */
> >+ master->dma_tx = dma_request_slave_channel(dev, "tx");
> >+ if (!master->dma_tx) {
> >+ dev_err(dev, "cannot get the TX DMA channel!\n");
> >+ ret = -EINVAL;
> >+ goto err;
> >+ }
> >+
> >+ slave_config.direction = DMA_MEM_TO_DEV;
> >+ slave_config.dst_addr = res->start + MXC_CSPITXDATA;
> >+ slave_config.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
> >+ slave_config.dst_maxburst = spi_imx_get_fifosize(spi_imx) / 2;
> >+ ret = dmaengine_slave_config(master->dma_tx, &slave_config);
> >+ if (ret) {
> >+ dev_err(dev, "error in TX dma configuration.");
> >+
>
> Missed terminating new line..
>
You mean lack "\n" in the print info? If yes, I can improve it in v6.
> --
> Regards,
> Varka Bhadram.
>
next prev parent reply other threads:[~2014-09-10 5:39 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 1:30 [PATCH v5] spi: spi-imx: add DMA support Robin Gong
2014-09-10 1:30 ` Robin Gong
2014-09-10 4:16 ` Varka Bhadram
2014-09-10 4:16 ` Varka Bhadram
2014-09-10 5:46 ` Robin Gong [this message]
2014-09-10 5:46 ` Robin Gong
2014-09-10 5:46 ` Robin Gong
2014-09-10 8:17 ` Arnd Bergmann
2014-09-10 8:17 ` Arnd Bergmann
2014-09-10 8:17 ` Arnd Bergmann
2014-09-10 8:28 ` Robin Gong
2014-09-10 8:28 ` Robin Gong
2014-09-10 8:28 ` Robin Gong
2014-09-10 10:21 ` Mark Brown
2014-09-10 10:21 ` Mark Brown
2014-09-10 11:22 ` Robin Gong
2014-09-10 11:22 ` Robin Gong
2014-09-10 11:22 ` Robin Gong
2014-09-10 11:45 ` Mark Brown
2014-09-10 11:45 ` Mark Brown
2014-09-10 11:45 ` Mark Brown
2014-09-10 15:18 ` Robin Gong
2014-09-10 15:18 ` Robin Gong
2014-09-10 15:18 ` Robin Gong
2014-09-10 15:52 ` Mark Brown
2014-09-10 15:52 ` Mark Brown
2014-09-10 15:52 ` Mark Brown
2014-09-11 1:37 ` Robin Gong
2014-09-11 1:37 ` Robin Gong
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=20140910054621.GA29307@Robin-OptiPlex-780 \
--to=b38343@freescale.com \
--cc=Frank.Li@freescale.com \
--cc=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=marex@denx.de \
--cc=shawn.guo@linaro.org \
--cc=varkabhadram@gmail.com \
/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.