Commit 77fc3976 authored by Mario Six's avatar Mario Six Committed by Vinod Koul

dmaengine: mpc512x: Fix code style

Signed-off-by: default avatarMario Six <mario.six@gdsys.cc>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 899ed9dd
...@@ -251,6 +251,7 @@ static inline struct mpc_dma_chan *dma_chan_to_mpc_dma_chan(struct dma_chan *c) ...@@ -251,6 +251,7 @@ static inline struct mpc_dma_chan *dma_chan_to_mpc_dma_chan(struct dma_chan *c)
static inline struct mpc_dma *dma_chan_to_mpc_dma(struct dma_chan *c) static inline struct mpc_dma *dma_chan_to_mpc_dma(struct dma_chan *c)
{ {
struct mpc_dma_chan *mchan = dma_chan_to_mpc_dma_chan(c); struct mpc_dma_chan *mchan = dma_chan_to_mpc_dma_chan(c);
return container_of(mchan, struct mpc_dma, channels[c->chan_id]); return container_of(mchan, struct mpc_dma, channels[c->chan_id]);
} }
...@@ -258,9 +259,9 @@ static inline struct mpc_dma *dma_chan_to_mpc_dma(struct dma_chan *c) ...@@ -258,9 +259,9 @@ static inline struct mpc_dma *dma_chan_to_mpc_dma(struct dma_chan *c)
* Execute all queued DMA descriptors. * Execute all queued DMA descriptors.
* *
* Following requirements must be met while calling mpc_dma_execute(): * Following requirements must be met while calling mpc_dma_execute():
* a) mchan->lock is acquired, * a) mchan->lock is acquired,
* b) mchan->active list is empty, * b) mchan->active list is empty,
* c) mchan->queued list contains at least one entry. * c) mchan->queued list contains at least one entry.
*/ */
static void mpc_dma_execute(struct mpc_dma_chan *mchan) static void mpc_dma_execute(struct mpc_dma_chan *mchan)
{ {
...@@ -450,20 +451,15 @@ static void mpc_dma_tasklet(unsigned long data) ...@@ -450,20 +451,15 @@ static void mpc_dma_tasklet(unsigned long data)
if (es & MPC_DMA_DMAES_SAE) if (es & MPC_DMA_DMAES_SAE)
dev_err(mdma->dma.dev, "- Source Address Error\n"); dev_err(mdma->dma.dev, "- Source Address Error\n");
if (es & MPC_DMA_DMAES_SOE) if (es & MPC_DMA_DMAES_SOE)
dev_err(mdma->dma.dev, "- Source Offset" dev_err(mdma->dma.dev, "- Source Offset Configuration Error\n");
" Configuration Error\n");
if (es & MPC_DMA_DMAES_DAE) if (es & MPC_DMA_DMAES_DAE)
dev_err(mdma->dma.dev, "- Destination Address" dev_err(mdma->dma.dev, "- Destination Address Error\n");
" Error\n");
if (es & MPC_DMA_DMAES_DOE) if (es & MPC_DMA_DMAES_DOE)
dev_err(mdma->dma.dev, "- Destination Offset" dev_err(mdma->dma.dev, "- Destination Offset Configuration Error\n");
" Configuration Error\n");
if (es & MPC_DMA_DMAES_NCE) if (es & MPC_DMA_DMAES_NCE)
dev_err(mdma->dma.dev, "- NBytes/Citter" dev_err(mdma->dma.dev, "- NBytes/Citter Configuration Error\n");
" Configuration Error\n");
if (es & MPC_DMA_DMAES_SGE) if (es & MPC_DMA_DMAES_SGE)
dev_err(mdma->dma.dev, "- Scatter/Gather" dev_err(mdma->dma.dev, "- Scatter/Gather Configuration Error\n");
" Configuration Error\n");
if (es & MPC_DMA_DMAES_SBE) if (es & MPC_DMA_DMAES_SBE)
dev_err(mdma->dma.dev, "- Source Bus Error\n"); dev_err(mdma->dma.dev, "- Source Bus Error\n");
if (es & MPC_DMA_DMAES_DBE) if (es & MPC_DMA_DMAES_DBE)
...@@ -522,8 +518,8 @@ static int mpc_dma_alloc_chan_resources(struct dma_chan *chan) ...@@ -522,8 +518,8 @@ static int mpc_dma_alloc_chan_resources(struct dma_chan *chan)
for (i = 0; i < MPC_DMA_DESCRIPTORS; i++) { for (i = 0; i < MPC_DMA_DESCRIPTORS; i++) {
mdesc = kzalloc(sizeof(struct mpc_dma_desc), GFP_KERNEL); mdesc = kzalloc(sizeof(struct mpc_dma_desc), GFP_KERNEL);
if (!mdesc) { if (!mdesc) {
dev_notice(mdma->dma.dev, "Memory allocation error. " dev_notice(mdma->dma.dev,
"Allocated only %u descriptors\n", i); "Memory allocation error. Allocated only %u descriptors\n", i);
break; break;
} }
...@@ -925,7 +921,6 @@ static int mpc_dma_probe(struct platform_device *op) ...@@ -925,7 +921,6 @@ static int mpc_dma_probe(struct platform_device *op)
mdma = devm_kzalloc(dev, sizeof(struct mpc_dma), GFP_KERNEL); mdma = devm_kzalloc(dev, sizeof(struct mpc_dma), GFP_KERNEL);
if (!mdma) { if (!mdma) {
dev_err(dev, "Memory exhausted!\n");
retval = -ENOMEM; retval = -ENOMEM;
goto err; goto err;
} }
...@@ -1049,7 +1044,8 @@ static int mpc_dma_probe(struct platform_device *op) ...@@ -1049,7 +1044,8 @@ static int mpc_dma_probe(struct platform_device *op)
out_be32(&mdma->regs->dmaerrl, 0xFFFF); out_be32(&mdma->regs->dmaerrl, 0xFFFF);
} else { } else {
out_be32(&mdma->regs->dmacr, MPC_DMA_DMACR_EDCG | out_be32(&mdma->regs->dmacr, MPC_DMA_DMACR_EDCG |
MPC_DMA_DMACR_ERGA | MPC_DMA_DMACR_ERCA); MPC_DMA_DMACR_ERGA |
MPC_DMA_DMACR_ERCA);
/* Disable hardware DMA requests */ /* Disable hardware DMA requests */
out_be32(&mdma->regs->dmaerqh, 0); out_be32(&mdma->regs->dmaerqh, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment