aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-07-06 14:32:27 -0400
committerVinod Koul <vinod.koul@intel.com>2014-07-15 12:31:03 -0400
commit1b446d2a61c436f7ad542fcdb212d4e51845ac28 (patch)
tree40c63dc47043054c158426deebb37294ac507457 /drivers/dma
parent65ad60600f5a3bf4c4edfbb95992af6ff2dfc18a (diff)
dmaengine: pl330: Remove uneccessary ccr validation
We know that we do not create invalid ccr settings in this driver. There is no need to validate them. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/pl330.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index f0e9f47e7dc6..0209823ca77f 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -1420,21 +1420,6 @@ static inline u32 _prepare_ccr(const struct pl330_reqcfg *rqc)
1420 return ccr; 1420 return ccr;
1421} 1421}
1422 1422
1423static inline bool _is_valid(u32 ccr)
1424{
1425 enum pl330_cachectrl dcctl;
1426 enum pl330_cachectrl scctl;
1427
1428 dcctl = (ccr >> CC_DSTCCTRL_SHFT) & CC_DRCCCTRL_MASK;
1429 scctl = (ccr >> CC_SRCCCTRL_SHFT) & CC_SRCCCTRL_MASK;
1430
1431 if (dcctl == INVALID1 || dcctl == INVALID2
1432 || scctl == INVALID1 || scctl == INVALID2)
1433 return false;
1434 else
1435 return true;
1436}
1437
1438/* 1423/*
1439 * Submit a list of xfers after which the client wants notification. 1424 * Submit a list of xfers after which the client wants notification.
1440 * Client is not notified after each xfer unit, just once after all 1425 * Client is not notified after each xfer unit, just once after all
@@ -1495,14 +1480,6 @@ static int pl330_submit_req(struct pl330_thread *thrd, struct pl330_req *r)
1495 ccr = readl(regs + CC(thrd->id)); 1480 ccr = readl(regs + CC(thrd->id));
1496 } 1481 }
1497 1482
1498 /* If this req doesn't have valid xfer settings */
1499 if (!_is_valid(ccr)) {
1500 ret = -EINVAL;
1501 dev_info(thrd->dmac->pinfo->dev, "%s:%d Invalid CCR(%x)!\n",
1502 __func__, __LINE__, ccr);
1503 goto xfer_exit;
1504 }
1505
1506 idx = IS_FREE(&thrd->req[0]) ? 0 : 1; 1483 idx = IS_FREE(&thrd->req[0]) ? 0 : 1;
1507 1484
1508 xs.ccr = ccr; 1485 xs.ccr = ccr;