[PATCH v5 2/3] DMA: Freescale: add suspend resume functions for DMA driver

2014-05-21 Thread hongbo.zhang
From: Hongbo Zhang This patch adds suspend and resume functions for Freescale DMA driver. Signed-off-by: Hongbo Zhang --- drivers/dma/fsldma.c | 77 ++ drivers/dma/fsldma.h | 15 ++ 2 files changed, 92 insertions(+) diff --git

[PATCH v5 3/3] DMA: Freescale: change descriptor release process for supporting async_tx

2014-05-21 Thread hongbo.zhang
From: Hongbo Zhang Fix the potential risk when enable config NET_DMA and ASYNC_TX. Async_tx is lack of support in current release process of dma descriptor, all descriptors will be released whatever is acked or no-acked by async_tx, so there is a potential race condition when dma engine is uesd

[PATCH v5 0/3] DMA: Freescale: driver cleanups and enhancements

2014-05-21 Thread hongbo.zhang
From: Hongbo Zhang Hi Dan, Please have a look at this 3/3 as Vinod mentioned. Hi Vinod Koul, Please have a look at the v5 patch set. v4 -> v5 changes: - since previous 5 of 8 patches have been merged by Vinod, this iteration oly inludes the last 3 patches of v4. - patches order is changed

[PATCH v5 1/3] DMA: Freescale: use spin_lock_bh instead of spin_lock_irqsave

2014-05-21 Thread hongbo.zhang
From: Hongbo Zhang The usage of spin_lock_irqsave() is a stronger locking mechanism than is required throughout the driver. The minimum locking required should be used instead. Interrupts will be turned off and context will be saved, it is unnecessary to use irqsave. This patch changes all

[PATCH v5 1/3] DMA: Freescale: use spin_lock_bh instead of spin_lock_irqsave

2014-05-21 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com The usage of spin_lock_irqsave() is a stronger locking mechanism than is required throughout the driver. The minimum locking required should be used instead. Interrupts will be turned off and context will be saved, it is unnecessary to use irqsave.

[PATCH v5 0/3] DMA: Freescale: driver cleanups and enhancements

2014-05-21 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Hi Dan, Please have a look at this 3/3 as Vinod mentioned. Hi Vinod Koul, Please have a look at the v5 patch set. v4 - v5 changes: - since previous 5 of 8 patches have been merged by Vinod, this iteration oly inludes the last 3 patches of v4. -

[PATCH v5 3/3] DMA: Freescale: change descriptor release process for supporting async_tx

2014-05-21 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Fix the potential risk when enable config NET_DMA and ASYNC_TX. Async_tx is lack of support in current release process of dma descriptor, all descriptors will be released whatever is acked or no-acked by async_tx, so there is a potential race

[PATCH v5 2/3] DMA: Freescale: add suspend resume functions for DMA driver

2014-05-21 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com This patch adds suspend and resume functions for Freescale DMA driver. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com --- drivers/dma/fsldma.c | 77 ++ drivers/dma/fsldma.h | 15 ++

[PATCH v4 7/8] DMA: Freescale: use spin_lock_bh instead of spin_lock_irqsave

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang The usage of spin_lock_irqsave() is a stronger locking mechanism than is required throughout the driver. The minimum locking required should be used instead. Interrupts will be turned off and context will be saved, it is unnecessary to use irqsave. This patch changes all

[PATCH v4 2/8] DMA: Freescale: unify register access methods

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang Methods of accessing DMA controller registers are inconsistent, some registers are accessed by DMA_IN/OUT directly, while others are accessed by functions get/set_* which are wrappers of DMA_IN/OUT, and even for the BCR register, it is read by get_bcr but written by DMA_OUT.

[PATCH v4 6/8] DMA: Freescale: change descriptor release process for supporting async_tx

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang Fix the potential risk when enable config NET_DMA and ASYNC_TX. Async_tx is lack of support in current release process of dma descriptor, all descriptors will be released whatever is acked or no-acked by async_tx, so there is a potential race condition when dma engine is uesd

[PATCH v4 8/8] DMA: Freescale: add suspend resume functions for DMA driver

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang This patch adds suspend resume functions for Freescale DMA driver. .prepare callback is used to stop further descriptors from being added into the pending queue, and also issue pending queues into execution if there is any. .suspend callback makes sure all the pending jobs are

[PATCH v4 4/8] DMA: Freescale: add fsl_dma_free_descriptor() to reduce code duplication

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang There are several places where descriptors are freed using identical code. This patch puts this code into a function to reduce code duplication. Signed-off-by: Hongbo Zhang Signed-off-by: Qiang Liu --- drivers/dma/fsldma.c | 27 +-- 1 file

[PATCH v4 3/8] DMA: Freescale: remove attribute DMA_INTERRUPT of dmaengine

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang Delete attribute DMA_INTERRUPT because fsldma doesn't support this function, exception will be thrown if talitos is used to offload xor at the same time. Signed-off-by: Hongbo Zhang Signed-off-by: Qiang Liu --- drivers/dma/fsldma.c | 31 --- 1

[PATCH v4 5/8] DMA: Freescale: move functions to avoid forward declarations

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang These functions will be modified in the next patch in the series. By moving the function in a patch separate from the changes, it will make review easier. Signed-off-by: Hongbo Zhang Signed-off-by: Qiang Liu --- drivers/dma/fsldma.c | 190

[PATCH v4 0/8] DMA: Freescale: driver cleanups and enhancements

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang Hi Vinod Koul, Please have a look at the v4 patch set. v3 -> v4 changes: - Fixed a typo in [2/8] commit message. - There was a potential double call of list_del() when apply [4/8] only, although this defect is removed again in later [6/8]. This version eliminates

[PATCH v4 1/8] DMA: Freescale: remove the unnecessary FSL_DMA_LD_DEBUG

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang Some codes are calling chan_dbg with FSL_DMA_LD_DEBUG surrounded, it is really unnecessary to use such a macro because chan_dbg is a wrapper of dev_dbg, we do have corresponding DEBUG macro to switch on/off dev_dbg, and most of the other codes are also calling chan_dbg

[PATCH v4 1/8] DMA: Freescale: remove the unnecessary FSL_DMA_LD_DEBUG

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Some codes are calling chan_dbg with FSL_DMA_LD_DEBUG surrounded, it is really unnecessary to use such a macro because chan_dbg is a wrapper of dev_dbg, we do have corresponding DEBUG macro to switch on/off dev_dbg, and most of the other codes are

[PATCH v4 0/8] DMA: Freescale: driver cleanups and enhancements

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Hi Vinod Koul, Please have a look at the v4 patch set. v3 - v4 changes: - Fixed a typo in [2/8] commit message. - There was a potential double call of list_del() when apply [4/8] only, although this defect is removed again in later [6/8]. This

[PATCH v4 5/8] DMA: Freescale: move functions to avoid forward declarations

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com These functions will be modified in the next patch in the series. By moving the function in a patch separate from the changes, it will make review easier. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Signed-off-by: Qiang Liu

[PATCH v4 3/8] DMA: Freescale: remove attribute DMA_INTERRUPT of dmaengine

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Delete attribute DMA_INTERRUPT because fsldma doesn't support this function, exception will be thrown if talitos is used to offload xor at the same time. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Signed-off-by: Qiang Liu

[PATCH v4 4/8] DMA: Freescale: add fsl_dma_free_descriptor() to reduce code duplication

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com There are several places where descriptors are freed using identical code. This patch puts this code into a function to reduce code duplication. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Signed-off-by: Qiang Liu qiang@freescale.com

[PATCH v4 8/8] DMA: Freescale: add suspend resume functions for DMA driver

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com This patch adds suspend resume functions for Freescale DMA driver. .prepare callback is used to stop further descriptors from being added into the pending queue, and also issue pending queues into execution if there is any. .suspend callback makes

[PATCH v4 6/8] DMA: Freescale: change descriptor release process for supporting async_tx

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Fix the potential risk when enable config NET_DMA and ASYNC_TX. Async_tx is lack of support in current release process of dma descriptor, all descriptors will be released whatever is acked or no-acked by async_tx, so there is a potential race

[PATCH v4 7/8] DMA: Freescale: use spin_lock_bh instead of spin_lock_irqsave

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com The usage of spin_lock_irqsave() is a stronger locking mechanism than is required throughout the driver. The minimum locking required should be used instead. Interrupts will be turned off and context will be saved, it is unnecessary to use irqsave.

[PATCH v4 2/8] DMA: Freescale: unify register access methods

2014-04-18 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Methods of accessing DMA controller registers are inconsistent, some registers are accessed by DMA_IN/OUT directly, while others are accessed by functions get/set_* which are wrappers of DMA_IN/OUT, and even for the BCR register, it is read by get_bcr

[PATCH v3 0/8] DMA: Freescale: driver cleanups and enhancements

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang Hi Vinod Koul, Please have a look at the v3 patch set. v2 -> v3 change: Only add "chan->pm_state = RUNNING" for patch[8/8]. v1 -> v2 change: The only one change is introducing a new patch[1/7] to remove the unnecessary macro FSL_DMA_LD_DEBUG, thus the total patches number is

[PATCH v3 3/8] DMA: Freescale: remove attribute DMA_INTERRUPT of dmaengine

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang Delete attribute DMA_INTERRUPT because fsldma doesn't support this function, exception will be thrown if talitos is used to offload xor at the same time. Signed-off-by: Hongbo Zhang Signed-off-by: Qiang Liu --- drivers/dma/fsldma.c | 31 --- 1

[PATCH v3 2/8] DMA: Freescale: unify register access methods

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang Methods of accessing DMA contorller registers are inconsistent, some registers are accessed by DMA_IN/OUT directly, while others are accessed by functions get/set_* which are wrappers of DMA_IN/OUT, and even for the BCR register, it is read by get_bcr but written by DMA_OUT.

[PATCH v3 7/8] DMA: Freescale: use spin_lock_bh instead of spin_lock_irqsave

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang The usage of spin_lock_irqsave() is a stronger locking mechanism than is required throughout the driver. The minimum locking required should be used instead. Interrupts will be turned off and context will be saved, it is unnecessary to use irqsave. This patch changes all

[PATCH v3 4/8] DMA: Freescale: add fsl_dma_free_descriptor() to reduce code duplication

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang There are several places where descriptors are freed using identical code. This patch puts this code into a function to reduce code duplication. Signed-off-by: Hongbo Zhang Signed-off-by: Qiang Liu --- drivers/dma/fsldma.c | 30 ++ 1 file

[PATCH v3 1/8] DMA: Freescale: remove the unnecessary FSL_DMA_LD_DEBUG

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang Some codes are calling chan_dbg with FSL_DMA_LD_DEBUG surrounded, it is really unnecessary to use such a macro because chan_dbg is a wrapper of dev_dbg, we do have corresponding DEBUG macro to switch on/off dev_dbg, and most of the other codes are also calling chan_dbg

[PATCH v3 8/8] DMA: Freescale: add suspend resume functions for DMA driver

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang This patch adds suspend resume functions for Freescale DMA driver. .prepare callback is used to stop further descriptors from being added into the pending queue, and also issue pending queues into execution if there is any. .suspend callback makes sure all the pending jobs are

[PATCH v3 5/8] DMA: Freescale: move functions to avoid forward declarations

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang These functions will be modified in the next patch in the series. By moving the function in a patch separate from the changes, it will make review easier. Signed-off-by: Hongbo Zhang Signed-off-by: Qiang Liu --- drivers/dma/fsldma.c | 188

[PATCH v3 6/8] DMA: Freescale: change descriptor release process for supporting async_tx

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang Fix the potential risk when enable config NET_DMA and ASYNC_TX. Async_tx is lack of support in current release process of dma descriptor, all descriptors will be released whatever is acked or no-acked by async_tx, so there is a potential race condition when dma engine is uesd

[PATCH v3 5/8] DMA: Freescale: move functions to avoid forward declarations

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com These functions will be modified in the next patch in the series. By moving the function in a patch separate from the changes, it will make review easier. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Signed-off-by: Qiang Liu

[PATCH v3 6/8] DMA: Freescale: change descriptor release process for supporting async_tx

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Fix the potential risk when enable config NET_DMA and ASYNC_TX. Async_tx is lack of support in current release process of dma descriptor, all descriptors will be released whatever is acked or no-acked by async_tx, so there is a potential race

[PATCH v3 7/8] DMA: Freescale: use spin_lock_bh instead of spin_lock_irqsave

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com The usage of spin_lock_irqsave() is a stronger locking mechanism than is required throughout the driver. The minimum locking required should be used instead. Interrupts will be turned off and context will be saved, it is unnecessary to use irqsave.

[PATCH v3 8/8] DMA: Freescale: add suspend resume functions for DMA driver

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com This patch adds suspend resume functions for Freescale DMA driver. .prepare callback is used to stop further descriptors from being added into the pending queue, and also issue pending queues into execution if there is any. .suspend callback makes

[PATCH v3 4/8] DMA: Freescale: add fsl_dma_free_descriptor() to reduce code duplication

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com There are several places where descriptors are freed using identical code. This patch puts this code into a function to reduce code duplication. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Signed-off-by: Qiang Liu qiang@freescale.com

[PATCH v3 1/8] DMA: Freescale: remove the unnecessary FSL_DMA_LD_DEBUG

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Some codes are calling chan_dbg with FSL_DMA_LD_DEBUG surrounded, it is really unnecessary to use such a macro because chan_dbg is a wrapper of dev_dbg, we do have corresponding DEBUG macro to switch on/off dev_dbg, and most of the other codes are

[PATCH v3 2/8] DMA: Freescale: unify register access methods

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Methods of accessing DMA contorller registers are inconsistent, some registers are accessed by DMA_IN/OUT directly, while others are accessed by functions get/set_* which are wrappers of DMA_IN/OUT, and even for the BCR register, it is read by get_bcr

[PATCH v3 3/8] DMA: Freescale: remove attribute DMA_INTERRUPT of dmaengine

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Delete attribute DMA_INTERRUPT because fsldma doesn't support this function, exception will be thrown if talitos is used to offload xor at the same time. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Signed-off-by: Qiang Liu

[PATCH v3 0/8] DMA: Freescale: driver cleanups and enhancements

2014-04-10 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@linaro.org Hi Vinod Koul, Please have a look at the v3 patch set. v2 - v3 change: Only add chan-pm_state = RUNNING for patch[8/8]. v1 - v2 change: The only one change is introducing a new patch[1/7] to remove the unnecessary macro FSL_DMA_LD_DEBUG, thus the total

[PATCH v2 0/8] DMA: Freescale: driver cleanups and enhancements

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang Hi Vinod Koul, Please have a look at the v2 patch set. v1 -> v2 change: The only one change is introducing a new patch[1/7] to remove the unnecessary macro FSL_DMA_LD_DEBUG, thus the total patches number is 8 now (was 7) Hongbo Zhang (8): DMA: Freescale: remove the

[PATCH v2 4/8] DMA: Freescale: add fsl_dma_free_descriptor() to reduce code duplication

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang There are several places where descriptors are freed using identical code. This patch puts this code into a function to reduce code duplication. Signed-off-by: Hongbo Zhang Signed-off-by: Qiang Liu --- drivers/dma/fsldma.c | 30 ++ 1 file

[PATCH v2 7/8] DMA: Freescale: use spin_lock_bh instead of spin_lock_irqsave

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang The usage of spin_lock_irqsave() is a stronger locking mechanism than is required throughout the driver. The minimum locking required should be used instead. Interrupts will be turned off and context will be saved, it is unnecessary to use irqsave. This patch changes all

[PATCH v2 6/8] DMA: Freescale: change descriptor release process for supporting async_tx

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang Fix the potential risk when enable config NET_DMA and ASYNC_TX. Async_tx is lack of support in current release process of dma descriptor, all descriptors will be released whatever is acked or no-acked by async_tx, so there is a potential race condition when dma engine is uesd

[PATCH v2 5/8] DMA: Freescale: move functions to avoid forward declarations

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang These functions will be modified in the next patch in the series. By moving the function in a patch separate from the changes, it will make review easier. Signed-off-by: Hongbo Zhang Signed-off-by: Qiang Liu --- drivers/dma/fsldma.c | 188

[PATCH v2 8/8] DMA: Freescale: add suspend resume functions for DMA driver

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang This patch adds suspend resume functions for Freescale DMA driver. .prepare callback is used to stop further descriptors from being added into the pending queue, and also issue pending queues into execution if there is any. .suspend callback makes sure all the pending jobs are

[PATCH v2 3/8] DMA: Freescale: remove attribute DMA_INTERRUPT of dmaengine

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang Delete attribute DMA_INTERRUPT because fsldma doesn't support this function, exception will be thrown if talitos is used to offload xor at the same time. Signed-off-by: Hongbo Zhang Signed-off-by: Qiang Liu --- drivers/dma/fsldma.c | 31 --- 1

[PATCH v2 2/8] DMA: Freescale: unify register access methods

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang Methods of accessing DMA contorller registers are inconsistent, some registers are accessed by DMA_IN/OUT directly, while others are accessed by functions get/set_* which are wrappers of DMA_IN/OUT, and even for the BCR register, it is read by get_bcr but written by DMA_OUT.

[PATCH v2 1/8] DMA: Freescale: remove the unnecessary FSL_DMA_LD_DEBUG

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang Some codes are calling chan_dbg with FSL_DMA_LD_DEBUG surrounded, it is really unnecessary to use such a macro because chan_dbg is a wrapper of dev_dbg, we do have corresponding DEBUG macro to switch on/off dev_dbg, and most of the other codes are also calling chan_dbg

[PATCH v2 3/8] DMA: Freescale: remove attribute DMA_INTERRUPT of dmaengine

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Delete attribute DMA_INTERRUPT because fsldma doesn't support this function, exception will be thrown if talitos is used to offload xor at the same time. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Signed-off-by: Qiang Liu

[PATCH v2 2/8] DMA: Freescale: unify register access methods

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Methods of accessing DMA contorller registers are inconsistent, some registers are accessed by DMA_IN/OUT directly, while others are accessed by functions get/set_* which are wrappers of DMA_IN/OUT, and even for the BCR register, it is read by get_bcr

[PATCH v2 1/8] DMA: Freescale: remove the unnecessary FSL_DMA_LD_DEBUG

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Some codes are calling chan_dbg with FSL_DMA_LD_DEBUG surrounded, it is really unnecessary to use such a macro because chan_dbg is a wrapper of dev_dbg, we do have corresponding DEBUG macro to switch on/off dev_dbg, and most of the other codes are

[PATCH v2 5/8] DMA: Freescale: move functions to avoid forward declarations

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com These functions will be modified in the next patch in the series. By moving the function in a patch separate from the changes, it will make review easier. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Signed-off-by: Qiang Liu

[PATCH v2 6/8] DMA: Freescale: change descriptor release process for supporting async_tx

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Fix the potential risk when enable config NET_DMA and ASYNC_TX. Async_tx is lack of support in current release process of dma descriptor, all descriptors will be released whatever is acked or no-acked by async_tx, so there is a potential race

[PATCH v2 8/8] DMA: Freescale: add suspend resume functions for DMA driver

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com This patch adds suspend resume functions for Freescale DMA driver. .prepare callback is used to stop further descriptors from being added into the pending queue, and also issue pending queues into execution if there is any. .suspend callback makes

[PATCH v2 7/8] DMA: Freescale: use spin_lock_bh instead of spin_lock_irqsave

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com The usage of spin_lock_irqsave() is a stronger locking mechanism than is required throughout the driver. The minimum locking required should be used instead. Interrupts will be turned off and context will be saved, it is unnecessary to use irqsave.

[PATCH v2 0/8] DMA: Freescale: driver cleanups and enhancements

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Hi Vinod Koul, Please have a look at the v2 patch set. v1 - v2 change: The only one change is introducing a new patch[1/7] to remove the unnecessary macro FSL_DMA_LD_DEBUG, thus the total patches number is 8 now (was 7) Hongbo Zhang (8): DMA:

[PATCH v2 4/8] DMA: Freescale: add fsl_dma_free_descriptor() to reduce code duplication

2014-04-03 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com There are several places where descriptors are freed using identical code. This patch puts this code into a function to reduce code duplication. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Signed-off-by: Qiang Liu qiang@freescale.com

[PATCH resend 1/2] Documentation: move all DMA documentations into Documentaion/dma

2014-01-16 Thread hongbo.zhang
From: Hongbo Zhang Since there are already seven DMA documentations under the top Documentation/, it is better to create one dedicated directory for them. Signed-off-by: Hongbo Zhang Cc: David S. Miller Cc: Richard Henderson Cc: Jakub Jelinek Cc: James E.J. Bottomley Cc: Arthur Kepner Cc:

[PATCH resend 2/2] Documentation: update some DMA document texts due to relocation

2014-01-16 Thread hongbo.zhang
From: Hongbo Zhang Some references to "Documentation/*" in the moved documentations should be updated to "Documentation/dma/*" accordingly. Signed-off-by: Hongbo Zhang Cc: James E.J. Bottomley Cc: Pierre Ossman --- Documentation/dma/DMA-API.txt |6 +++---

[PATCH 2/2] Documentation: update some DMA document texts due to relocation

2014-01-16 Thread hongbo.zhang
From: Hongbo Zhang Some references to "Documentation/*" in the moved documentations should be updated to "Documentation/dma/*" accordingly. Signed-off-by: Hongbo Zhang Cc: James E.J. Bottomley Cc: Pierre Ossman --- Documentation/dma/DMA-API.txt |6 +++---

[PATCH 2/2] Documentation: update some DMA document texts due to relocation

2014-01-16 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Some references to Documentation/* in the moved documentations should be updated to Documentation/dma/* accordingly. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Cc: James E.J. Bottomley james.bottom...@hansenpartnership.com Cc: Pierre

[PATCH resend 1/2] Documentation: move all DMA documentations into Documentaion/dma

2014-01-16 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Since there are already seven DMA documentations under the top Documentation/, it is better to create one dedicated directory for them. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Cc: David S. Miller da...@redhat.com Cc: Richard Henderson

[PATCH resend 2/2] Documentation: update some DMA document texts due to relocation

2014-01-16 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Some references to Documentation/* in the moved documentations should be updated to Documentation/dma/* accordingly. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Cc: James E.J. Bottomley james.bottom...@hansenpartnership.com Cc: Pierre

[PATCH] DMA: Freescale: change BWC from 256 bytes to 1024 bytes

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang Freescale DMA has a feature of BandWidth Control (ab. BWC), which is currently 256 bytes and should be changed to 1024 bytes for best DMA throughput. Changing BWC from 256 to 1024 will improve DMA performance much, in cases whatever one channel is running or multi channels are

[PATCH 0/7] DMA: Freescale: driver cleanups and enhancements

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang Hi Vinod Koul and Dan Williams, Please have a look at these patches. Note that patch 2~6 had beed sent out for upstream before, but were together with other storage patches at that time, that was not easy for being reviewed and merged, so I send them separately this time.

[PATCH 2/7] DMA: Freescale: remove attribute DMA_INTERRUPT of dmaengine

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang Delete attribute DMA_INTERRUPT because fsldma doesn't support this function, exception will be thrown if talitos is used to offload xor at the same time. Signed-off-by: Hongbo Zhang Signed-off-by: Qiang Liu --- drivers/dma/fsldma.c | 31 --- 1

[PATCH 1/7] DMA: Freescale: unify register access methods

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang Methods of accessing DMA contorller registers are inconsistent, some registers are accessed by DMA_IN/OUT directly, while others are accessed by functions get/set_* which are wrappers of DMA_IN/OUT, and even for the BCR register, it is read by get_bcr but written by DMA_OUT.

[PATCH 3/7] DMA: Freescale: add fsl_dma_free_descriptor() to reduce code duplication

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang There are several places where descriptors are freed using identical code. This patch puts this code into a function to reduce code duplication. Signed-off-by: Hongbo Zhang Signed-off-by: Qiang Liu --- drivers/dma/fsldma.c | 38 -- 1

[PATCH 4/7] DMA: Freescale: move functions to avoid forward declarations

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang These functions will be modified in the next patch in the series. By moving the function in a patch separate from the changes, it will make review easier. Signed-off-by: Hongbo Zhang Signed-off-by: Qiang Liu --- drivers/dma/fsldma.c | 192

[PATCH 6/7] DMA: Freescale: use spin_lock_bh instead of spin_lock_irqsave

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang The usage of spin_lock_irqsave() is a stronger locking mechanism than is required throughout the driver. The minimum locking required should be used instead. Interrupts will be turned off and context will be saved, it is unnecessary to use irqsave. This patch changes all

[PATCH 7/7] DMA: Freescale: add suspend resume functions for DMA driver

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang This patch adds suspend resume functions for Freescale DMA driver. .prepare callback is used to stop further descriptors from being added into the pending queue, and also issue pending queues into execution if there is any. .suspend callback makes sure all the pending jobs are

[PATCH 5/7] DMA: Freescale: change descriptor release process for supporting async_tx

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang Fix the potential risk when enable config NET_DMA and ASYNC_TX. Async_tx is lack of support in current release process of dma descriptor, all descriptors will be released whatever is acked or no-acked by async_tx, so there is a potential race condition when dma engine is uesd

[PATCH 5/7] DMA: Freescale: change descriptor release process for supporting async_tx

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Fix the potential risk when enable config NET_DMA and ASYNC_TX. Async_tx is lack of support in current release process of dma descriptor, all descriptors will be released whatever is acked or no-acked by async_tx, so there is a potential race

[PATCH 4/7] DMA: Freescale: move functions to avoid forward declarations

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com These functions will be modified in the next patch in the series. By moving the function in a patch separate from the changes, it will make review easier. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Signed-off-by: Qiang Liu

[PATCH 6/7] DMA: Freescale: use spin_lock_bh instead of spin_lock_irqsave

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com The usage of spin_lock_irqsave() is a stronger locking mechanism than is required throughout the driver. The minimum locking required should be used instead. Interrupts will be turned off and context will be saved, it is unnecessary to use irqsave.

[PATCH 7/7] DMA: Freescale: add suspend resume functions for DMA driver

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com This patch adds suspend resume functions for Freescale DMA driver. .prepare callback is used to stop further descriptors from being added into the pending queue, and also issue pending queues into execution if there is any. .suspend callback makes

[PATCH 2/7] DMA: Freescale: remove attribute DMA_INTERRUPT of dmaengine

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Delete attribute DMA_INTERRUPT because fsldma doesn't support this function, exception will be thrown if talitos is used to offload xor at the same time. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Signed-off-by: Qiang Liu

[PATCH 1/7] DMA: Freescale: unify register access methods

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Methods of accessing DMA contorller registers are inconsistent, some registers are accessed by DMA_IN/OUT directly, while others are accessed by functions get/set_* which are wrappers of DMA_IN/OUT, and even for the BCR register, it is read by get_bcr

[PATCH 3/7] DMA: Freescale: add fsl_dma_free_descriptor() to reduce code duplication

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com There are several places where descriptors are freed using identical code. This patch puts this code into a function to reduce code duplication. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com Signed-off-by: Qiang Liu qiang@freescale.com

[PATCH 0/7] DMA: Freescale: driver cleanups and enhancements

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Hi Vinod Koul and Dan Williams, Please have a look at these patches. Note that patch 2~6 had beed sent out for upstream before, but were together with other storage patches at that time, that was not easy for being reviewed and merged, so I send them

[PATCH] DMA: Freescale: change BWC from 256 bytes to 1024 bytes

2014-01-15 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Freescale DMA has a feature of BandWidth Control (ab. BWC), which is currently 256 bytes and should be changed to 1024 bytes for best DMA throughput. Changing BWC from 256 to 1024 will improve DMA performance much, in cases whatever one channel is

[PATCH] DTS: DMA: Fix DMA3 interrupts

2013-11-29 Thread hongbo.zhang
From: Hongbo Zhang MPIC registers for internal interrupts is non-continous in address, any internal interrupt number greater than 159 should be added (16+208) to work. 16 is due to external interrupts as usual, 208 is due to the non-continous MPIC register space. Tested on T4240 rev2 with SRIO2

[PATCH] DTS: DMA: Fix DMA3 interrupts

2013-11-29 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com MPIC registers for internal interrupts is non-continous in address, any internal interrupt number greater than 159 should be added (16+208) to work. 16 is due to external interrupts as usual, 208 is due to the non-continous MPIC register space. Tested

[PATCH v11 1/3] DMA: Freescale: revise device tree binding document

2013-09-26 Thread hongbo.zhang
From: Hongbo Zhang This patch updates the discription of each type of DMA controller and its channels, it is preparation for adding another new DMA controller binding, it also fixes some defects of indent for text alignment at the same time. Signed-off-by: Hongbo Zhang Acked-by: Mark Rutland

[PATCH v11 2/3] DMA: Freescale: Add new 8-channel DMA engine device tree nodes

2013-09-26 Thread hongbo.zhang
From: Hongbo Zhang Freescale QorIQ T4 and B4 introduce new 8-channel DMA engines, this patch adds the device tree nodes for them. Signed-off-by: Hongbo Zhang --- .../devicetree/bindings/powerpc/fsl/dma.txt| 70 + arch/powerpc/boot/dts/fsl/b4si-post.dtsi |

[PATCH v11 3/3] DMA: Freescale: update driver to support 8-channel DMA engine

2013-09-26 Thread hongbo.zhang
From: Hongbo Zhang This patch adds support to 8-channel DMA engine, thus the driver works for both the new 8-channel and the legacy 4-channel DMA engines. Signed-off-by: Hongbo Zhang --- drivers/dma/Kconfig |9 + drivers/dma/fsldma.c |9 ++--- drivers/dma/fsldma.h |2

[PATCH v11 0/3] DMA: Freescale: Add support for 8-channel DMA engine

2013-09-26 Thread hongbo.zhang
From: Hongbo Zhang Hi DMA and DT maintainers, please have a look at these V11 patches. Freescale QorIQ T4 and B4 introduce new 8-channel DMA engines, this patch set adds support this DMA engine. V10->V11 changes: - add "contains two entries" for reg description in patch [2/3] V9->V10 changes:

[PATCH v11 0/3] DMA: Freescale: Add support for 8-channel DMA engine

2013-09-26 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Hi DMA and DT maintainers, please have a look at these V11 patches. Freescale QorIQ T4 and B4 introduce new 8-channel DMA engines, this patch set adds support this DMA engine. V10-V11 changes: - add contains two entries for reg description in patch

[PATCH v11 2/3] DMA: Freescale: Add new 8-channel DMA engine device tree nodes

2013-09-26 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com Freescale QorIQ T4 and B4 introduce new 8-channel DMA engines, this patch adds the device tree nodes for them. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com --- .../devicetree/bindings/powerpc/fsl/dma.txt| 70 +

[PATCH v11 3/3] DMA: Freescale: update driver to support 8-channel DMA engine

2013-09-26 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com This patch adds support to 8-channel DMA engine, thus the driver works for both the new 8-channel and the legacy 4-channel DMA engines. Signed-off-by: Hongbo Zhang hongbo.zh...@freescale.com --- drivers/dma/Kconfig |9 +

[PATCH v11 1/3] DMA: Freescale: revise device tree binding document

2013-09-26 Thread hongbo.zhang
From: Hongbo Zhang hongbo.zh...@freescale.com This patch updates the discription of each type of DMA controller and its channels, it is preparation for adding another new DMA controller binding, it also fixes some defects of indent for text alignment at the same time. Signed-off-by: Hongbo Zhang

[PATCH v10 2/3] DMA: Freescale: Add new 8-channel DMA engine device tree nodes

2013-09-18 Thread hongbo.zhang
From: Hongbo Zhang Freescale QorIQ T4 and B4 introduce new 8-channel DMA engines, this patch adds the device tree nodes for them. Signed-off-by: Hongbo Zhang --- .../devicetree/bindings/powerpc/fsl/dma.txt| 69 arch/powerpc/boot/dts/fsl/b4si-post.dtsi |

[PATCH v10 0/3] DMA: Freescale: Add support for 8-channel DMA engine

2013-09-18 Thread hongbo.zhang
From: Hongbo Zhang Hi DMA and DT maintainers, please have a look at these V10 patches. Freescale QorIQ T4 and B4 introduce new 8-channel DMA engines, this patch set adds support this DMA engine. V9->V10 changes: - update binding description text, mainly about the reg property and also Elo3

[PATCH v10 1/3] DMA: Freescale: revise device tree binding document

2013-09-18 Thread hongbo.zhang
From: Hongbo Zhang This patch updates the discription of each type of DMA controller and its channels, it is preparation for adding another new DMA controller binding, it also fixes some defects of indent for text alignment at the same time. Signed-off-by: Hongbo Zhang Acked-by: Mark Rutland

[PATCH v10 3/3] DMA: Freescale: update driver to support 8-channel DMA engine

2013-09-18 Thread hongbo.zhang
From: Hongbo Zhang This patch adds support to 8-channel DMA engine, thus the driver works for both the new 8-channel and the legacy 4-channel DMA engines. Signed-off-by: Hongbo Zhang --- drivers/dma/Kconfig |9 + drivers/dma/fsldma.c |9 ++--- drivers/dma/fsldma.h |2

  1   2   3   >