* [PATCH 1/3] dmaengine: at_hdmac/trivial: correct typo in comment
@ 2013-05-10 13:19 ` Nicolas Ferre
0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Ferre @ 2013-05-10 13:19 UTC (permalink / raw)
To: Vinod Koul, linux-arm-kernel
Cc: linux-kernel, Ludovic Desroches,
Jean-Christophe PLAGNIOL-VILLARD, Nicolas Ferre
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
drivers/dma/at_hdmac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index e923cda..cd49420 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1120,7 +1120,7 @@ static int atc_alloc_chan_resources(struct dma_chan *chan)
*/
BUG_ON(!atslave->dma_dev || atslave->dma_dev != atdma->dma_common.dev);
- /* if cfg configuration specified take it instad of default */
+ /* if cfg configuration specified take it instead of default */
if (atslave->cfg)
cfg = atslave->cfg;
}
--
1.8.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 1/3] dmaengine: at_hdmac/trivial: correct typo in comment
@ 2013-05-10 13:19 ` Nicolas Ferre
0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Ferre @ 2013-05-10 13:19 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
drivers/dma/at_hdmac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index e923cda..cd49420 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1120,7 +1120,7 @@ static int atc_alloc_chan_resources(struct dma_chan *chan)
*/
BUG_ON(!atslave->dma_dev || atslave->dma_dev != atdma->dma_common.dev);
- /* if cfg configuration specified take it instad of default */
+ /* if cfg configuration specified take it instead of default */
if (atslave->cfg)
cfg = atslave->cfg;
}
--
1.8.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] dmaengine: at_hdmac: extend hardware handshaking interface identification
2013-05-10 13:19 ` Nicolas Ferre
@ 2013-05-10 13:19 ` Nicolas Ferre
-1 siblings, 0 replies; 8+ messages in thread
From: Nicolas Ferre @ 2013-05-10 13:19 UTC (permalink / raw)
To: Vinod Koul, linux-arm-kernel
Cc: linux-kernel, Ludovic Desroches,
Jean-Christophe PLAGNIOL-VILLARD, Nicolas Ferre
Peripheral handshaking identification numbers can be bigger than 15, so new
fields have been created in the CFG register.
Add macros to take this modification into account and use them in
at_dma_xlate() function.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
drivers/dma/at_hdmac.c | 2 ++
include/linux/platform_data/dma-atmel.h | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index cd49420..78c3fb4 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1230,6 +1230,8 @@ static struct dma_chan *at_dma_xlate(struct of_phandle_args *dma_spec,
per_id = dma_spec->args[1];
atslave->cfg = ATC_FIFOCFG_HALFFIFO | ATC_DST_H2SEL_HW
| ATC_SRC_H2SEL_HW | ATC_DST_PER(per_id)
+ | ATC_DST_PER_MSB(per_id)
+ | ATC_SRC_PER_MSB(per_id)
| ATC_SRC_PER(per_id);
atslave->dma_dev = &dmac_pdev->dev;
diff --git a/include/linux/platform_data/dma-atmel.h b/include/linux/platform_data/dma-atmel.h
index cab0997..e95f19c 100644
--- a/include/linux/platform_data/dma-atmel.h
+++ b/include/linux/platform_data/dma-atmel.h
@@ -35,16 +35,20 @@ struct at_dma_slave {
/* Platform-configurable bits in CFG */
+#define ATC_PER_MSB(h) ((0x30U & (h)) >> 4) /* Extract most significant bits of a handshaking identifier */
+
#define ATC_SRC_PER(h) (0xFU & (h)) /* Channel src rq associated with periph handshaking ifc h */
#define ATC_DST_PER(h) ((0xFU & (h)) << 4) /* Channel dst rq associated with periph handshaking ifc h */
#define ATC_SRC_REP (0x1 << 8) /* Source Replay Mod */
#define ATC_SRC_H2SEL (0x1 << 9) /* Source Handshaking Mod */
#define ATC_SRC_H2SEL_SW (0x0 << 9)
#define ATC_SRC_H2SEL_HW (0x1 << 9)
+#define ATC_SRC_PER_MSB(h) (ATC_PER_MSB(h) << 10) /* Channel src rq (most significant bits) */
#define ATC_DST_REP (0x1 << 12) /* Destination Replay Mod */
#define ATC_DST_H2SEL (0x1 << 13) /* Destination Handshaking Mod */
#define ATC_DST_H2SEL_SW (0x0 << 13)
#define ATC_DST_H2SEL_HW (0x1 << 13)
+#define ATC_DST_PER_MSB(h) (ATC_PER_MSB(h) << 14) /* Channel dst rq (most significant bits) */
#define ATC_SOD (0x1 << 16) /* Stop On Done */
#define ATC_LOCK_IF (0x1 << 20) /* Interface Lock */
#define ATC_LOCK_B (0x1 << 21) /* AHB Bus Lock */
--
1.8.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] dmaengine: at_hdmac: extend hardware handshaking interface identification
@ 2013-05-10 13:19 ` Nicolas Ferre
0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Ferre @ 2013-05-10 13:19 UTC (permalink / raw)
To: linux-arm-kernel
Peripheral handshaking identification numbers can be bigger than 15, so new
fields have been created in the CFG register.
Add macros to take this modification into account and use them in
at_dma_xlate() function.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
drivers/dma/at_hdmac.c | 2 ++
include/linux/platform_data/dma-atmel.h | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index cd49420..78c3fb4 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1230,6 +1230,8 @@ static struct dma_chan *at_dma_xlate(struct of_phandle_args *dma_spec,
per_id = dma_spec->args[1];
atslave->cfg = ATC_FIFOCFG_HALFFIFO | ATC_DST_H2SEL_HW
| ATC_SRC_H2SEL_HW | ATC_DST_PER(per_id)
+ | ATC_DST_PER_MSB(per_id)
+ | ATC_SRC_PER_MSB(per_id)
| ATC_SRC_PER(per_id);
atslave->dma_dev = &dmac_pdev->dev;
diff --git a/include/linux/platform_data/dma-atmel.h b/include/linux/platform_data/dma-atmel.h
index cab0997..e95f19c 100644
--- a/include/linux/platform_data/dma-atmel.h
+++ b/include/linux/platform_data/dma-atmel.h
@@ -35,16 +35,20 @@ struct at_dma_slave {
/* Platform-configurable bits in CFG */
+#define ATC_PER_MSB(h) ((0x30U & (h)) >> 4) /* Extract most significant bits of a handshaking identifier */
+
#define ATC_SRC_PER(h) (0xFU & (h)) /* Channel src rq associated with periph handshaking ifc h */
#define ATC_DST_PER(h) ((0xFU & (h)) << 4) /* Channel dst rq associated with periph handshaking ifc h */
#define ATC_SRC_REP (0x1 << 8) /* Source Replay Mod */
#define ATC_SRC_H2SEL (0x1 << 9) /* Source Handshaking Mod */
#define ATC_SRC_H2SEL_SW (0x0 << 9)
#define ATC_SRC_H2SEL_HW (0x1 << 9)
+#define ATC_SRC_PER_MSB(h) (ATC_PER_MSB(h) << 10) /* Channel src rq (most significant bits) */
#define ATC_DST_REP (0x1 << 12) /* Destination Replay Mod */
#define ATC_DST_H2SEL (0x1 << 13) /* Destination Handshaking Mod */
#define ATC_DST_H2SEL_SW (0x0 << 13)
#define ATC_DST_H2SEL_HW (0x1 << 13)
+#define ATC_DST_PER_MSB(h) (ATC_PER_MSB(h) << 14) /* Channel dst rq (most significant bits) */
#define ATC_SOD (0x1 << 16) /* Stop On Done */
#define ATC_LOCK_IF (0x1 << 20) /* Interface Lock */
#define ATC_LOCK_B (0x1 << 21) /* AHB Bus Lock */
--
1.8.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] dmaengine: at_hdmac/trivial: rearrange CFG register bits assignment
2013-05-10 13:19 ` Nicolas Ferre
@ 2013-05-10 13:19 ` Nicolas Ferre
-1 siblings, 0 replies; 8+ messages in thread
From: Nicolas Ferre @ 2013-05-10 13:19 UTC (permalink / raw)
To: Vinod Koul, linux-arm-kernel
Cc: linux-kernel, Ludovic Desroches,
Jean-Christophe PLAGNIOL-VILLARD, Nicolas Ferre
No modification in CFG register configuration, just rearrange
bits directives to group logically and make it more readable.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
drivers/dma/at_hdmac.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index 78c3fb4..9e1ad73 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1228,11 +1228,10 @@ static struct dma_chan *at_dma_xlate(struct of_phandle_args *dma_spec,
* ignored depending on DMA transfer direction.
*/
per_id = dma_spec->args[1];
- atslave->cfg = ATC_FIFOCFG_HALFFIFO | ATC_DST_H2SEL_HW
- | ATC_SRC_H2SEL_HW | ATC_DST_PER(per_id)
- | ATC_DST_PER_MSB(per_id)
- | ATC_SRC_PER_MSB(per_id)
- | ATC_SRC_PER(per_id);
+ atslave->cfg = ATC_FIFOCFG_HALFFIFO
+ | ATC_DST_H2SEL_HW | ATC_SRC_H2SEL_HW
+ | ATC_DST_PER_MSB(per_id) | ATC_DST_PER(per_id)
+ | ATC_SRC_PER_MSB(per_id) | ATC_SRC_PER(per_id);
atslave->dma_dev = &dmac_pdev->dev;
chan = dma_request_channel(mask, at_dma_filter, atslave);
--
1.8.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] dmaengine: at_hdmac/trivial: rearrange CFG register bits assignment
@ 2013-05-10 13:19 ` Nicolas Ferre
0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Ferre @ 2013-05-10 13:19 UTC (permalink / raw)
To: linux-arm-kernel
No modification in CFG register configuration, just rearrange
bits directives to group logically and make it more readable.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
drivers/dma/at_hdmac.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index 78c3fb4..9e1ad73 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1228,11 +1228,10 @@ static struct dma_chan *at_dma_xlate(struct of_phandle_args *dma_spec,
* ignored depending on DMA transfer direction.
*/
per_id = dma_spec->args[1];
- atslave->cfg = ATC_FIFOCFG_HALFFIFO | ATC_DST_H2SEL_HW
- | ATC_SRC_H2SEL_HW | ATC_DST_PER(per_id)
- | ATC_DST_PER_MSB(per_id)
- | ATC_SRC_PER_MSB(per_id)
- | ATC_SRC_PER(per_id);
+ atslave->cfg = ATC_FIFOCFG_HALFFIFO
+ | ATC_DST_H2SEL_HW | ATC_SRC_H2SEL_HW
+ | ATC_DST_PER_MSB(per_id) | ATC_DST_PER(per_id)
+ | ATC_SRC_PER_MSB(per_id) | ATC_SRC_PER(per_id);
atslave->dma_dev = &dmac_pdev->dev;
chan = dma_request_channel(mask, at_dma_filter, atslave);
--
1.8.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] dmaengine: at_hdmac/trivial: correct typo in comment
2013-05-10 13:19 ` Nicolas Ferre
@ 2013-05-10 14:20 ` Jean-Christophe PLAGNIOL-VILLARD
-1 siblings, 0 replies; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-10 14:20 UTC (permalink / raw)
To: Nicolas Ferre
Cc: Vinod Koul, linux-arm-kernel, linux-kernel, Ludovic Desroches
on all
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
On 15:19 Fri 10 May , Nicolas Ferre wrote:
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> drivers/dma/at_hdmac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
> index e923cda..cd49420 100644
> --- a/drivers/dma/at_hdmac.c
> +++ b/drivers/dma/at_hdmac.c
> @@ -1120,7 +1120,7 @@ static int atc_alloc_chan_resources(struct dma_chan *chan)
> */
> BUG_ON(!atslave->dma_dev || atslave->dma_dev != atdma->dma_common.dev);
>
> - /* if cfg configuration specified take it instad of default */
> + /* if cfg configuration specified take it instead of default */
> if (atslave->cfg)
> cfg = atslave->cfg;
> }
> --
> 1.8.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] dmaengine: at_hdmac/trivial: correct typo in comment
@ 2013-05-10 14:20 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-10 14:20 UTC (permalink / raw)
To: linux-arm-kernel
on all
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
On 15:19 Fri 10 May , Nicolas Ferre wrote:
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> drivers/dma/at_hdmac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
> index e923cda..cd49420 100644
> --- a/drivers/dma/at_hdmac.c
> +++ b/drivers/dma/at_hdmac.c
> @@ -1120,7 +1120,7 @@ static int atc_alloc_chan_resources(struct dma_chan *chan)
> */
> BUG_ON(!atslave->dma_dev || atslave->dma_dev != atdma->dma_common.dev);
>
> - /* if cfg configuration specified take it instad of default */
> + /* if cfg configuration specified take it instead of default */
> if (atslave->cfg)
> cfg = atslave->cfg;
> }
> --
> 1.8.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-05-10 14:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-10 13:19 [PATCH 1/3] dmaengine: at_hdmac/trivial: correct typo in comment Nicolas Ferre
2013-05-10 13:19 ` Nicolas Ferre
2013-05-10 13:19 ` [PATCH 2/3] dmaengine: at_hdmac: extend hardware handshaking interface identification Nicolas Ferre
2013-05-10 13:19 ` Nicolas Ferre
2013-05-10 13:19 ` [PATCH 3/3] dmaengine: at_hdmac/trivial: rearrange CFG register bits assignment Nicolas Ferre
2013-05-10 13:19 ` Nicolas Ferre
2013-05-10 14:20 ` [PATCH 1/3] dmaengine: at_hdmac/trivial: correct typo in comment Jean-Christophe PLAGNIOL-VILLARD
2013-05-10 14:20 ` Jean-Christophe PLAGNIOL-VILLARD
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.