linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Daniel Mack <daniel@zonque.org>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	linux-arm-kernel@lists.infradead.org,
	Mark Brown <broonie@kernel.org>,
	linux-spi@vger.kernel.org
Subject: Re: [PATCH v2 1/2] spi: pxa2xx: Introduce DMA burst size support
Date: Mon, 4 Mar 2019 14:37:23 +0200	[thread overview]
Message-ID: <0ceb5c1f-d4c2-3bd6-5016-d1c579da19b6@linux.intel.com> (raw)
In-Reply-To: <20190226114921.48205-1-andriy.shevchenko@linux.intel.com>

On 2/26/19 1:49 PM, Andy Shevchenko wrote:
> Some masters may have different DMA burst size than hard coded default.
> In such case respect the value given by DMA burst size provided via
> platform data.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>   drivers/spi/spi-pxa2xx-dma.c   | 4 +++-
>   drivers/spi/spi-pxa2xx-pci.c   | 5 ++++-
>   drivers/spi/spi-pxa2xx.c       | 1 +
>   include/linux/spi/pxa2xx_spi.h | 1 +
>   4 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-pxa2xx-dma.c b/drivers/spi/spi-pxa2xx-dma.c
> index 2fa7f4b43492..3343fff81c7b 100644
> --- a/drivers/spi/spi-pxa2xx-dma.c
> +++ b/drivers/spi/spi-pxa2xx-dma.c
> @@ -239,13 +239,15 @@ int pxa2xx_spi_set_dma_burst_and_threshold(struct chip_data *chip,
>   					   u32 *threshold)
>   {
>   	struct pxa2xx_spi_chip *chip_info = spi->controller_data;
> +	struct driver_data *drv_data = spi_controller_get_devdata(spi->controller);
> +	u32 dma_burst_size = drv_data->master_info->dma_burst_size;
>   
>   	/*
>   	 * If the DMA burst size is given in chip_info we use that,
>   	 * otherwise we use the default. Also we use the default FIFO
>   	 * thresholds for now.
>   	 */
> -	*burst_code = chip_info ? chip_info->dma_burst_size : 1;
> +	*burst_code = chip_info ? chip_info->dma_burst_size : dma_burst_size;
>   	*threshold = SSCR1_RxTresh(RX_THRESH_DFLT)
>   		   | SSCR1_TxTresh(TX_THRESH_DFLT);
>   
> diff --git a/drivers/spi/spi-pxa2xx-pci.c b/drivers/spi/spi-pxa2xx-pci.c
> index d3de925892cb..3faef7335137 100644
> --- a/drivers/spi/spi-pxa2xx-pci.c
> +++ b/drivers/spi/spi-pxa2xx-pci.c
> @@ -5,7 +5,6 @@
>    */
>   #include <linux/clk-provider.h>
>   #include <linux/module.h>
> -#include <linux/of_device.h>

Minor note, no need to resend if ok to maintainers:
Unrelated change. Looks like already commit 0202775bc3a2 
("spi/pxa2xx-pci: switch to use pcim_* interfaces") made this needless.

Otherwise looks ok to me.

-- 
Jarkko

      parent reply	other threads:[~2019-03-04 12:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-26 11:49 [PATCH v2 1/2] spi: pxa2xx: Introduce DMA burst size support Andy Shevchenko
2019-02-26 11:49 ` [PATCH v2 2/2] spi: pxa2xx: Debug print DMA burst and threshold Andy Shevchenko
2019-03-04 12:28   ` Jarkko Nikula
2019-03-04 12:37 ` Jarkko Nikula [this message]

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=0ceb5c1f-d4c2-3bd6-5016-d1c579da19b6@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=daniel@zonque.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=robert.jarzmik@free.fr \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).