linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 3/4] spi: s3c64xx: add dma maxburst size initialization
@ 2013-02-22  8:09 Boojin Kim
       [not found] ` <001b01ce10d3$e9f78620$bde69260$%kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2013-03-02 22:26 ` Grant Likely
  0 siblings, 2 replies; 4+ messages in thread
From: Boojin Kim @ 2013-02-22  8:09 UTC (permalink / raw)
  To: linux-kernel, linux-samsung-soc, linux-arm-kernel,
	spi-devel-general, alsa-devel
  Cc: 'Vinod Koul', 'Dan Williams',
	'Russell King', 'Kukjin Kim',
	'Grant Likely', 'Mark Brown',
	'Rob Herring', 'Sangbeom Kim'

This patch adds dma maxburst size initialization.
The maxburst should be set by MODE_CFGn.DMA_TYPE,
because the pl330 dma driver supports burst mode.

Signed-off-by: Hyeonkook Kim <hk619.kim@samsung.com>
---
 drivers/spi/spi-s3c64xx.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index e862ab8..5e6cafe 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -287,10 +287,20 @@ static void prepare_dma(struct s3c64xx_spi_dma_data *dma,
 	struct s3c64xx_spi_driver_data *sdd;
 	struct samsung_dma_prep info;
 	struct samsung_dma_config config;
+	void __iomem *regs;
+	unsigned int mode_cfg;

 	if (dma->direction == DMA_DEV_TO_MEM) {
 		sdd = container_of((void *)dma,
 			struct s3c64xx_spi_driver_data, rx_dma);
+
+		regs = sdd->regs;
+		mode_cfg = readl(regs + S3C64XX_SPI_MODE_CFG);
+		if (mode_cfg & S3C64XX_SPI_MODE_4BURST)
+			config.maxburst = 4;
+		else
+			config.maxburst = 1;
+
 		config.direction = sdd->rx_dma.direction;
 		config.fifo = sdd->sfr_start + S3C64XX_SPI_RX_DATA;
 		config.width = sdd->cur_bpw / 8;
@@ -298,6 +308,14 @@ static void prepare_dma(struct s3c64xx_spi_dma_data *dma,
 	} else {
 		sdd = container_of((void *)dma,
 			struct s3c64xx_spi_driver_data, tx_dma);
+
+		regs = sdd->regs;
+		mode_cfg = readl(regs + S3C64XX_SPI_MODE_CFG);
+		if (mode_cfg & S3C64XX_SPI_MODE_4BURST)
+			config.maxburst = 4;
+		else
+			config.maxburst = 1;
+
 		config.direction =  sdd->tx_dma.direction;
 		config.fifo = sdd->sfr_start + S3C64XX_SPI_TX_DATA;
 		config.width = sdd->cur_bpw / 8;
--
1.7.5.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 3/4] spi: s3c64xx: add dma maxburst size initialization
       [not found] ` <001b01ce10d3$e9f78620$bde69260$%kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2013-03-02 22:23   ` Grant Likely
  2013-03-02 22:27   ` Grant Likely
  1 sibling, 0 replies; 4+ messages in thread
From: Grant Likely @ 2013-03-02 22:23 UTC (permalink / raw)
  To: Boojin Kim, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw
  Cc: 'Kukjin Kim', 'Russell King',
	'Vinod Koul', 'Mark Brown', 'Rob Herring',
	'Sangbeom Kim', 'Dan Williams'

On Fri, 22 Feb 2013 17:09:18 +0900, Boojin Kim <boojin.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
> This patch adds dma maxburst size initialization.
> The maxburst should be set by MODE_CFGn.DMA_TYPE,
> because the pl330 dma driver supports burst mode.
> 
> Signed-off-by: Hyeonkook Kim <hk619.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

Applied, thanks.

g.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 3/4] spi: s3c64xx: add dma maxburst size initialization
  2013-02-22  8:09 [PATCH v2 3/4] spi: s3c64xx: add dma maxburst size initialization Boojin Kim
       [not found] ` <001b01ce10d3$e9f78620$bde69260$%kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2013-03-02 22:26 ` Grant Likely
  1 sibling, 0 replies; 4+ messages in thread
From: Grant Likely @ 2013-03-02 22:26 UTC (permalink / raw)
  To: Boojin Kim, linux-kernel, linux-samsung-soc, linux-arm-kernel,
	spi-devel-general, alsa-devel
  Cc: 'Kukjin Kim', 'Russell King',
	'Vinod Koul', 'Mark Brown', 'Rob Herring',
	'Sangbeom Kim', 'Dan Williams'

On Fri, 22 Feb 2013 17:09:18 +0900, Boojin Kim <boojin.kim@samsung.com> wrote:
> This patch adds dma maxburst size initialization.
> The maxburst should be set by MODE_CFGn.DMA_TYPE,
> because the pl330 dma driver supports burst mode.
> 
> Signed-off-by: Hyeonkook Kim <hk619.kim@samsung.com>

Hello Hyeonkook,

I applied this patch but then discovered that it relys on the previous
patches that you've posted. When patched depend on each other like this
please post them as a series with [PATCH x/4] in the subject line.
'git send-email' will format this correctly for you.

g.

> ---
>  drivers/spi/spi-s3c64xx.c |   18 ++++++++++++++++++
>  1 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> index e862ab8..5e6cafe 100644
> --- a/drivers/spi/spi-s3c64xx.c
> +++ b/drivers/spi/spi-s3c64xx.c
> @@ -287,10 +287,20 @@ static void prepare_dma(struct s3c64xx_spi_dma_data *dma,
>  	struct s3c64xx_spi_driver_data *sdd;
>  	struct samsung_dma_prep info;
>  	struct samsung_dma_config config;
> +	void __iomem *regs;
> +	unsigned int mode_cfg;
> 
>  	if (dma->direction == DMA_DEV_TO_MEM) {
>  		sdd = container_of((void *)dma,
>  			struct s3c64xx_spi_driver_data, rx_dma);
> +
> +		regs = sdd->regs;
> +		mode_cfg = readl(regs + S3C64XX_SPI_MODE_CFG);
> +		if (mode_cfg & S3C64XX_SPI_MODE_4BURST)
> +			config.maxburst = 4;
> +		else
> +			config.maxburst = 1;
> +
>  		config.direction = sdd->rx_dma.direction;
>  		config.fifo = sdd->sfr_start + S3C64XX_SPI_RX_DATA;
>  		config.width = sdd->cur_bpw / 8;
> @@ -298,6 +308,14 @@ static void prepare_dma(struct s3c64xx_spi_dma_data *dma,
>  	} else {
>  		sdd = container_of((void *)dma,
>  			struct s3c64xx_spi_driver_data, tx_dma);
> +
> +		regs = sdd->regs;
> +		mode_cfg = readl(regs + S3C64XX_SPI_MODE_CFG);
> +		if (mode_cfg & S3C64XX_SPI_MODE_4BURST)
> +			config.maxburst = 4;
> +		else
> +			config.maxburst = 1;
> +
>  		config.direction =  sdd->tx_dma.direction;
>  		config.fifo = sdd->sfr_start + S3C64XX_SPI_TX_DATA;
>  		config.width = sdd->cur_bpw / 8;
> --
> 1.7.5.4
> 
> 
> 
> --
> 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/

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 3/4] spi: s3c64xx: add dma maxburst size initialization
       [not found] ` <001b01ce10d3$e9f78620$bde69260$%kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2013-03-02 22:23   ` Grant Likely
@ 2013-03-02 22:27   ` Grant Likely
  1 sibling, 0 replies; 4+ messages in thread
From: Grant Likely @ 2013-03-02 22:27 UTC (permalink / raw)
  To: Boojin Kim, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw
  Cc: 'Kukjin Kim', 'Russell King',
	'Vinod Koul', 'Mark Brown', 'Rob Herring',
	'Sangbeom Kim', 'Dan Williams'

On Fri, 22 Feb 2013 17:09:18 +0900, Boojin Kim <boojin.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
> This patch adds dma maxburst size initialization.
> The maxburst should be set by MODE_CFGn.DMA_TYPE,
> because the pl330 dma driver supports burst mode.
> 
> Signed-off-by: Hyeonkook Kim <hk619.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

Acked-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>

This series probably needs to be merged together through the arm-soc
tree.

g.

> ---
>  drivers/spi/spi-s3c64xx.c |   18 ++++++++++++++++++
>  1 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> index e862ab8..5e6cafe 100644
> --- a/drivers/spi/spi-s3c64xx.c
> +++ b/drivers/spi/spi-s3c64xx.c
> @@ -287,10 +287,20 @@ static void prepare_dma(struct s3c64xx_spi_dma_data *dma,
>  	struct s3c64xx_spi_driver_data *sdd;
>  	struct samsung_dma_prep info;
>  	struct samsung_dma_config config;
> +	void __iomem *regs;
> +	unsigned int mode_cfg;
> 
>  	if (dma->direction == DMA_DEV_TO_MEM) {
>  		sdd = container_of((void *)dma,
>  			struct s3c64xx_spi_driver_data, rx_dma);
> +
> +		regs = sdd->regs;
> +		mode_cfg = readl(regs + S3C64XX_SPI_MODE_CFG);
> +		if (mode_cfg & S3C64XX_SPI_MODE_4BURST)
> +			config.maxburst = 4;
> +		else
> +			config.maxburst = 1;
> +
>  		config.direction = sdd->rx_dma.direction;
>  		config.fifo = sdd->sfr_start + S3C64XX_SPI_RX_DATA;
>  		config.width = sdd->cur_bpw / 8;
> @@ -298,6 +308,14 @@ static void prepare_dma(struct s3c64xx_spi_dma_data *dma,
>  	} else {
>  		sdd = container_of((void *)dma,
>  			struct s3c64xx_spi_driver_data, tx_dma);
> +
> +		regs = sdd->regs;
> +		mode_cfg = readl(regs + S3C64XX_SPI_MODE_CFG);
> +		if (mode_cfg & S3C64XX_SPI_MODE_4BURST)
> +			config.maxburst = 4;
> +		else
> +			config.maxburst = 1;
> +
>  		config.direction =  sdd->tx_dma.direction;
>  		config.fifo = sdd->sfr_start + S3C64XX_SPI_TX_DATA;
>  		config.width = sdd->cur_bpw / 8;
> --
> 1.7.5.4
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-02 22:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-22  8:09 [PATCH v2 3/4] spi: s3c64xx: add dma maxburst size initialization Boojin Kim
     [not found] ` <001b01ce10d3$e9f78620$bde69260$%kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-03-02 22:23   ` Grant Likely
2013-03-02 22:27   ` Grant Likely
2013-03-02 22:26 ` Grant Likely

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).