* [PATCH 0/1] omap-sham: use prefetch mechanism to increase transfer speed
@ 2010-09-02 14:17 Dmitry Kasatkin
2010-09-02 14:17 ` [PATCH 1/1] crypto: omap-sham: Adjust DMA parameters Dmitry Kasatkin
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Kasatkin @ 2010-09-02 14:17 UTC (permalink / raw)
To: herbert; +Cc: linux-crypto, linux-omap
Samu Onkalo (1):
crypto: omap-sham: Adjust DMA parameters
drivers/crypto/omap-sham.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] crypto: omap-sham: Adjust DMA parameters
2010-09-02 14:17 [PATCH 0/1] omap-sham: use prefetch mechanism to increase transfer speed Dmitry Kasatkin
@ 2010-09-02 14:17 ` Dmitry Kasatkin
2010-09-03 11:20 ` Herbert Xu
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Kasatkin @ 2010-09-02 14:17 UTC (permalink / raw)
To: herbert; +Cc: linux-crypto, linux-omap, Samu Onkalo
From: Samu Onkalo <samu.p.onkalo@nokia.com>
DMA is set to use burst mode also for source channel. It should
descrease memory bandwidth needs.
DMA synchronization is set to use prefetch mechanism. SHAM block is behind
L4 bus and it doesn't have fifo. SHAM block is stalling as long as the new
data is available. It takes time to fetch data from memory and transfer it
via L4 bus. With prefetch enabled, data is waiting in DMA fifo and SHAM block
receives new data block faster.
This increases SHA processing speed up to 30 percent depending on the
bus / memory load.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
---
drivers/crypto/omap-sham.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index 7d14856..a081c7c 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -311,7 +311,8 @@ static int omap_sham_xmit_dma(struct omap_sham_dev *dd, dma_addr_t dma_addr,
len32 = DIV_ROUND_UP(length, sizeof(u32));
omap_set_dma_transfer_params(dd->dma_lch, OMAP_DMA_DATA_TYPE_S32, len32,
- 1, OMAP_DMA_SYNC_PACKET, dd->dma, OMAP_DMA_DST_SYNC);
+ 1, OMAP_DMA_SYNC_PACKET, dd->dma,
+ OMAP_DMA_DST_SYNC_PREFETCH);
omap_set_dma_src_params(dd->dma_lch, 0, OMAP_DMA_AMODE_POST_INC,
dma_addr, 0, 0);
@@ -1072,6 +1073,9 @@ static int omap_sham_dma_init(struct omap_sham_dev *dd)
omap_set_dma_dest_burst_mode(dd->dma_lch,
OMAP_DMA_DATA_BURST_16);
+ omap_set_dma_src_burst_mode(dd->dma_lch,
+ OMAP_DMA_DATA_BURST_4);
+
return 0;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] crypto: omap-sham: Adjust DMA parameters
2010-09-02 14:17 ` [PATCH 1/1] crypto: omap-sham: Adjust DMA parameters Dmitry Kasatkin
@ 2010-09-03 11:20 ` Herbert Xu
0 siblings, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2010-09-03 11:20 UTC (permalink / raw)
To: Dmitry Kasatkin; +Cc: linux-crypto, linux-omap, Samu Onkalo
On Thu, Sep 02, 2010 at 05:17:35PM +0300, Dmitry Kasatkin wrote:
> From: Samu Onkalo <samu.p.onkalo@nokia.com>
>
> DMA is set to use burst mode also for source channel. It should
> descrease memory bandwidth needs.
>
> DMA synchronization is set to use prefetch mechanism. SHAM block is behind
> L4 bus and it doesn't have fifo. SHAM block is stalling as long as the new
> data is available. It takes time to fetch data from memory and transfer it
> via L4 bus. With prefetch enabled, data is waiting in DMA fifo and SHAM block
> receives new data block faster.
> This increases SHA processing speed up to 30 percent depending on the
> bus / memory load.
>
> Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
> Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
Patch applied. Thanks!
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-03 11:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-02 14:17 [PATCH 0/1] omap-sham: use prefetch mechanism to increase transfer speed Dmitry Kasatkin
2010-09-02 14:17 ` [PATCH 1/1] crypto: omap-sham: Adjust DMA parameters Dmitry Kasatkin
2010-09-03 11:20 ` Herbert Xu
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).