[v2,2/2] spi: pxa2xx: Debug print DMA burst and threshold
diff mbox series

Message ID 20190226114921.48205-2-andriy.shevchenko@linux.intel.com
State New
Headers show
Series
  • [v2,1/2] spi: pxa2xx: Introduce DMA burst size support
Related show

Commit Message

Andy Shevchenko Feb. 26, 2019, 11:49 a.m. UTC
It's useful during debug to see what DMA burst and threshold sizes are.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-pxa2xx.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Jarkko Nikula March 4, 2019, 12:28 p.m. UTC | #1
On 2/26/19 1:49 PM, Andy Shevchenko wrote:
> It's useful during debug to see what DMA burst and threshold sizes are.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>   drivers/spi/spi-pxa2xx.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
> index 7a86654045fc..7cc4e85290b0 100644
> --- a/drivers/spi/spi-pxa2xx.c
> +++ b/drivers/spi/spi-pxa2xx.c
> @@ -1338,6 +1338,9 @@ static int setup(struct spi_device *spi)
>   			dev_warn(&spi->dev,
>   				 "in setup: DMA burst size reduced to match bits_per_word\n");
>   		}
> +		dev_dbg(&spi->dev,
> +			"in setup: DMA burst and threshold set to %u, %u\n",
> +			chip->dma_burst_size, chip->dma_threshold);

Printing chip->dma_threshold is not very informal here just after the 
pxa2xx_spi_set_dma_burst_and_threshold() call which sets it to
(8 - 1 ) << 10 | (8 - 1) << 6 = 7616.

Patch
diff mbox series

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 7a86654045fc..7cc4e85290b0 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1338,6 +1338,9 @@  static int setup(struct spi_device *spi)
 			dev_warn(&spi->dev,
 				 "in setup: DMA burst size reduced to match bits_per_word\n");
 		}
+		dev_dbg(&spi->dev,
+			"in setup: DMA burst and threshold set to %u, %u\n",
+			chip->dma_burst_size, chip->dma_threshold);
 	}
 
 	switch (drv_data->ssp_type) {