dma: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
dev_<level> calls take less code than dev_printk(KERN_<LEVEL> and reducing object size is good. Coalesce formats for easier grep. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
This commit is contained in:
parent
8be9e32b31
commit
1ba151cdf5
@ -369,10 +369,10 @@ static void vdbg_dump_regs(struct at_dma_chan *atchan) {}
|
|||||||
|
|
||||||
static void atc_dump_lli(struct at_dma_chan *atchan, struct at_lli *lli)
|
static void atc_dump_lli(struct at_dma_chan *atchan, struct at_lli *lli)
|
||||||
{
|
{
|
||||||
dev_printk(KERN_CRIT, chan2dev(&atchan->chan_common),
|
dev_crit(chan2dev(&atchan->chan_common),
|
||||||
" desc: s0x%x d0x%x ctrl0x%x:0x%x l0x%x\n",
|
" desc: s0x%x d0x%x ctrl0x%x:0x%x l0x%x\n",
|
||||||
lli->saddr, lli->daddr,
|
lli->saddr, lli->daddr,
|
||||||
lli->ctrla, lli->ctrlb, lli->dscr);
|
lli->ctrla, lli->ctrlb, lli->dscr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -936,7 +936,7 @@ static irqreturn_t iop_adma_err_handler(int irq, void *data)
|
|||||||
struct iop_adma_chan *chan = data;
|
struct iop_adma_chan *chan = data;
|
||||||
unsigned long status = iop_chan_get_status(chan);
|
unsigned long status = iop_chan_get_status(chan);
|
||||||
|
|
||||||
dev_printk(KERN_ERR, chan->device->common.dev,
|
dev_err(chan->device->common.dev,
|
||||||
"error ( %s%s%s%s%s%s%s)\n",
|
"error ( %s%s%s%s%s%s%s)\n",
|
||||||
iop_is_err_int_parity(status, chan) ? "int_parity " : "",
|
iop_is_err_int_parity(status, chan) ? "int_parity " : "",
|
||||||
iop_is_err_mcu_abort(status, chan) ? "mcu_abort " : "",
|
iop_is_err_mcu_abort(status, chan) ? "mcu_abort " : "",
|
||||||
@ -1017,7 +1017,7 @@ static int iop_adma_memcpy_self_test(struct iop_adma_device *device)
|
|||||||
|
|
||||||
if (iop_adma_status(dma_chan, cookie, NULL) !=
|
if (iop_adma_status(dma_chan, cookie, NULL) !=
|
||||||
DMA_SUCCESS) {
|
DMA_SUCCESS) {
|
||||||
dev_printk(KERN_ERR, dma_chan->device->dev,
|
dev_err(dma_chan->device->dev,
|
||||||
"Self-test copy timed out, disabling\n");
|
"Self-test copy timed out, disabling\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto free_resources;
|
goto free_resources;
|
||||||
@ -1027,7 +1027,7 @@ static int iop_adma_memcpy_self_test(struct iop_adma_device *device)
|
|||||||
dma_sync_single_for_cpu(&iop_chan->device->pdev->dev, dest_dma,
|
dma_sync_single_for_cpu(&iop_chan->device->pdev->dev, dest_dma,
|
||||||
IOP_ADMA_TEST_SIZE, DMA_FROM_DEVICE);
|
IOP_ADMA_TEST_SIZE, DMA_FROM_DEVICE);
|
||||||
if (memcmp(src, dest, IOP_ADMA_TEST_SIZE)) {
|
if (memcmp(src, dest, IOP_ADMA_TEST_SIZE)) {
|
||||||
dev_printk(KERN_ERR, dma_chan->device->dev,
|
dev_err(dma_chan->device->dev,
|
||||||
"Self-test copy failed compare, disabling\n");
|
"Self-test copy failed compare, disabling\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto free_resources;
|
goto free_resources;
|
||||||
@ -1117,7 +1117,7 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
|
|||||||
|
|
||||||
if (iop_adma_status(dma_chan, cookie, NULL) !=
|
if (iop_adma_status(dma_chan, cookie, NULL) !=
|
||||||
DMA_SUCCESS) {
|
DMA_SUCCESS) {
|
||||||
dev_printk(KERN_ERR, dma_chan->device->dev,
|
dev_err(dma_chan->device->dev,
|
||||||
"Self-test xor timed out, disabling\n");
|
"Self-test xor timed out, disabling\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto free_resources;
|
goto free_resources;
|
||||||
@ -1129,7 +1129,7 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
|
|||||||
for (i = 0; i < (PAGE_SIZE / sizeof(u32)); i++) {
|
for (i = 0; i < (PAGE_SIZE / sizeof(u32)); i++) {
|
||||||
u32 *ptr = page_address(dest);
|
u32 *ptr = page_address(dest);
|
||||||
if (ptr[i] != cmp_word) {
|
if (ptr[i] != cmp_word) {
|
||||||
dev_printk(KERN_ERR, dma_chan->device->dev,
|
dev_err(dma_chan->device->dev,
|
||||||
"Self-test xor failed compare, disabling\n");
|
"Self-test xor failed compare, disabling\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto free_resources;
|
goto free_resources;
|
||||||
@ -1163,14 +1163,14 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
|
|||||||
msleep(8);
|
msleep(8);
|
||||||
|
|
||||||
if (iop_adma_status(dma_chan, cookie, NULL) != DMA_SUCCESS) {
|
if (iop_adma_status(dma_chan, cookie, NULL) != DMA_SUCCESS) {
|
||||||
dev_printk(KERN_ERR, dma_chan->device->dev,
|
dev_err(dma_chan->device->dev,
|
||||||
"Self-test zero sum timed out, disabling\n");
|
"Self-test zero sum timed out, disabling\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto free_resources;
|
goto free_resources;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zero_sum_result != 0) {
|
if (zero_sum_result != 0) {
|
||||||
dev_printk(KERN_ERR, dma_chan->device->dev,
|
dev_err(dma_chan->device->dev,
|
||||||
"Self-test zero sum failed compare, disabling\n");
|
"Self-test zero sum failed compare, disabling\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto free_resources;
|
goto free_resources;
|
||||||
@ -1187,7 +1187,7 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
|
|||||||
msleep(8);
|
msleep(8);
|
||||||
|
|
||||||
if (iop_adma_status(dma_chan, cookie, NULL) != DMA_SUCCESS) {
|
if (iop_adma_status(dma_chan, cookie, NULL) != DMA_SUCCESS) {
|
||||||
dev_printk(KERN_ERR, dma_chan->device->dev,
|
dev_err(dma_chan->device->dev,
|
||||||
"Self-test memset timed out, disabling\n");
|
"Self-test memset timed out, disabling\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto free_resources;
|
goto free_resources;
|
||||||
@ -1196,7 +1196,7 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
|
|||||||
for (i = 0; i < PAGE_SIZE/sizeof(u32); i++) {
|
for (i = 0; i < PAGE_SIZE/sizeof(u32); i++) {
|
||||||
u32 *ptr = page_address(dest);
|
u32 *ptr = page_address(dest);
|
||||||
if (ptr[i]) {
|
if (ptr[i]) {
|
||||||
dev_printk(KERN_ERR, dma_chan->device->dev,
|
dev_err(dma_chan->device->dev,
|
||||||
"Self-test memset failed compare, disabling\n");
|
"Self-test memset failed compare, disabling\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto free_resources;
|
goto free_resources;
|
||||||
@ -1219,14 +1219,14 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
|
|||||||
msleep(8);
|
msleep(8);
|
||||||
|
|
||||||
if (iop_adma_status(dma_chan, cookie, NULL) != DMA_SUCCESS) {
|
if (iop_adma_status(dma_chan, cookie, NULL) != DMA_SUCCESS) {
|
||||||
dev_printk(KERN_ERR, dma_chan->device->dev,
|
dev_err(dma_chan->device->dev,
|
||||||
"Self-test non-zero sum timed out, disabling\n");
|
"Self-test non-zero sum timed out, disabling\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto free_resources;
|
goto free_resources;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zero_sum_result != 1) {
|
if (zero_sum_result != 1) {
|
||||||
dev_printk(KERN_ERR, dma_chan->device->dev,
|
dev_err(dma_chan->device->dev,
|
||||||
"Self-test non-zero sum failed compare, disabling\n");
|
"Self-test non-zero sum failed compare, disabling\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto free_resources;
|
goto free_resources;
|
||||||
@ -1579,15 +1579,14 @@ static int iop_adma_probe(struct platform_device *pdev)
|
|||||||
goto err_free_iop_chan;
|
goto err_free_iop_chan;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_printk(KERN_INFO, &pdev->dev, "Intel(R) IOP: "
|
dev_info(&pdev->dev, "Intel(R) IOP: ( %s%s%s%s%s%s%s)\n",
|
||||||
"( %s%s%s%s%s%s%s)\n",
|
dma_has_cap(DMA_PQ, dma_dev->cap_mask) ? "pq " : "",
|
||||||
dma_has_cap(DMA_PQ, dma_dev->cap_mask) ? "pq " : "",
|
dma_has_cap(DMA_PQ_VAL, dma_dev->cap_mask) ? "pq_val " : "",
|
||||||
dma_has_cap(DMA_PQ_VAL, dma_dev->cap_mask) ? "pq_val " : "",
|
dma_has_cap(DMA_XOR, dma_dev->cap_mask) ? "xor " : "",
|
||||||
dma_has_cap(DMA_XOR, dma_dev->cap_mask) ? "xor " : "",
|
dma_has_cap(DMA_XOR_VAL, dma_dev->cap_mask) ? "xor_val " : "",
|
||||||
dma_has_cap(DMA_XOR_VAL, dma_dev->cap_mask) ? "xor_val " : "",
|
dma_has_cap(DMA_MEMSET, dma_dev->cap_mask) ? "fill " : "",
|
||||||
dma_has_cap(DMA_MEMSET, dma_dev->cap_mask) ? "fill " : "",
|
dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask) ? "cpy " : "",
|
||||||
dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask) ? "cpy " : "",
|
dma_has_cap(DMA_INTERRUPT, dma_dev->cap_mask) ? "intr " : "");
|
||||||
dma_has_cap(DMA_INTERRUPT, dma_dev->cap_mask) ? "intr " : "");
|
|
||||||
|
|
||||||
dma_async_device_register(dma_dev);
|
dma_async_device_register(dma_dev);
|
||||||
goto out;
|
goto out;
|
||||||
@ -1651,8 +1650,8 @@ static void iop_chan_start_null_memcpy(struct iop_adma_chan *iop_chan)
|
|||||||
/* run the descriptor */
|
/* run the descriptor */
|
||||||
iop_chan_enable(iop_chan);
|
iop_chan_enable(iop_chan);
|
||||||
} else
|
} else
|
||||||
dev_printk(KERN_ERR, iop_chan->device->common.dev,
|
dev_err(iop_chan->device->common.dev,
|
||||||
"failed to allocate null descriptor\n");
|
"failed to allocate null descriptor\n");
|
||||||
spin_unlock_bh(&iop_chan->lock);
|
spin_unlock_bh(&iop_chan->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1704,7 +1703,7 @@ static void iop_chan_start_null_xor(struct iop_adma_chan *iop_chan)
|
|||||||
/* run the descriptor */
|
/* run the descriptor */
|
||||||
iop_chan_enable(iop_chan);
|
iop_chan_enable(iop_chan);
|
||||||
} else
|
} else
|
||||||
dev_printk(KERN_ERR, iop_chan->device->common.dev,
|
dev_err(iop_chan->device->common.dev,
|
||||||
"failed to allocate null descriptor\n");
|
"failed to allocate null descriptor\n");
|
||||||
spin_unlock_bh(&iop_chan->lock);
|
spin_unlock_bh(&iop_chan->lock);
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ static void mv_set_mode(struct mv_xor_chan *chan,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dev_err(mv_chan_to_devp(chan),
|
dev_err(mv_chan_to_devp(chan),
|
||||||
"error: unsupported operation %d.\n",
|
"error: unsupported operation %d\n",
|
||||||
type);
|
type);
|
||||||
BUG();
|
BUG();
|
||||||
return;
|
return;
|
||||||
@ -828,28 +828,22 @@ static void mv_dump_xor_regs(struct mv_xor_chan *chan)
|
|||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
val = __raw_readl(XOR_CONFIG(chan));
|
val = __raw_readl(XOR_CONFIG(chan));
|
||||||
dev_err(mv_chan_to_devp(chan),
|
dev_err(mv_chan_to_devp(chan), "config 0x%08x\n", val);
|
||||||
"config 0x%08x.\n", val);
|
|
||||||
|
|
||||||
val = __raw_readl(XOR_ACTIVATION(chan));
|
val = __raw_readl(XOR_ACTIVATION(chan));
|
||||||
dev_err(mv_chan_to_devp(chan),
|
dev_err(mv_chan_to_devp(chan), "activation 0x%08x\n", val);
|
||||||
"activation 0x%08x.\n", val);
|
|
||||||
|
|
||||||
val = __raw_readl(XOR_INTR_CAUSE(chan));
|
val = __raw_readl(XOR_INTR_CAUSE(chan));
|
||||||
dev_err(mv_chan_to_devp(chan),
|
dev_err(mv_chan_to_devp(chan), "intr cause 0x%08x\n", val);
|
||||||
"intr cause 0x%08x.\n", val);
|
|
||||||
|
|
||||||
val = __raw_readl(XOR_INTR_MASK(chan));
|
val = __raw_readl(XOR_INTR_MASK(chan));
|
||||||
dev_err(mv_chan_to_devp(chan),
|
dev_err(mv_chan_to_devp(chan), "intr mask 0x%08x\n", val);
|
||||||
"intr mask 0x%08x.\n", val);
|
|
||||||
|
|
||||||
val = __raw_readl(XOR_ERROR_CAUSE(chan));
|
val = __raw_readl(XOR_ERROR_CAUSE(chan));
|
||||||
dev_err(mv_chan_to_devp(chan),
|
dev_err(mv_chan_to_devp(chan), "error cause 0x%08x\n", val);
|
||||||
"error cause 0x%08x.\n", val);
|
|
||||||
|
|
||||||
val = __raw_readl(XOR_ERROR_ADDR(chan));
|
val = __raw_readl(XOR_ERROR_ADDR(chan));
|
||||||
dev_err(mv_chan_to_devp(chan),
|
dev_err(mv_chan_to_devp(chan), "error addr 0x%08x\n", val);
|
||||||
"error addr 0x%08x.\n", val);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mv_xor_err_interrupt_handler(struct mv_xor_chan *chan,
|
static void mv_xor_err_interrupt_handler(struct mv_xor_chan *chan,
|
||||||
@ -862,7 +856,7 @@ static void mv_xor_err_interrupt_handler(struct mv_xor_chan *chan,
|
|||||||
}
|
}
|
||||||
|
|
||||||
dev_err(mv_chan_to_devp(chan),
|
dev_err(mv_chan_to_devp(chan),
|
||||||
"error on chan %d. intr cause 0x%08x.\n",
|
"error on chan %d. intr cause 0x%08x\n",
|
||||||
chan->idx, intr_cause);
|
chan->idx, intr_cause);
|
||||||
|
|
||||||
mv_dump_xor_regs(chan);
|
mv_dump_xor_regs(chan);
|
||||||
@ -1052,9 +1046,8 @@ mv_xor_xor_self_test(struct mv_xor_chan *mv_chan)
|
|||||||
u32 *ptr = page_address(dest);
|
u32 *ptr = page_address(dest);
|
||||||
if (ptr[i] != cmp_word) {
|
if (ptr[i] != cmp_word) {
|
||||||
dev_err(dma_chan->device->dev,
|
dev_err(dma_chan->device->dev,
|
||||||
"Self-test xor failed compare, disabling."
|
"Self-test xor failed compare, disabling. index %d, data %x, expected %x\n",
|
||||||
" index %d, data %x, expected %x\n", i,
|
i, ptr[i], cmp_word);
|
||||||
ptr[i], cmp_word);
|
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto free_resources;
|
goto free_resources;
|
||||||
}
|
}
|
||||||
@ -1194,12 +1187,11 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
|
|||||||
goto err_free_irq;
|
goto err_free_irq;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_info(&pdev->dev, "Marvell XOR: "
|
dev_info(&pdev->dev, "Marvell XOR: ( %s%s%s%s)\n",
|
||||||
"( %s%s%s%s)\n",
|
dma_has_cap(DMA_XOR, dma_dev->cap_mask) ? "xor " : "",
|
||||||
dma_has_cap(DMA_XOR, dma_dev->cap_mask) ? "xor " : "",
|
dma_has_cap(DMA_MEMSET, dma_dev->cap_mask) ? "fill " : "",
|
||||||
dma_has_cap(DMA_MEMSET, dma_dev->cap_mask) ? "fill " : "",
|
dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask) ? "cpy " : "",
|
||||||
dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask) ? "cpy " : "",
|
dma_has_cap(DMA_INTERRUPT, dma_dev->cap_mask) ? "intr " : "");
|
||||||
dma_has_cap(DMA_INTERRUPT, dma_dev->cap_mask) ? "intr " : "");
|
|
||||||
|
|
||||||
dma_async_device_register(dma_dev);
|
dma_async_device_register(dma_dev);
|
||||||
return mv_chan;
|
return mv_chan;
|
||||||
@ -1253,7 +1245,7 @@ static int mv_xor_probe(struct platform_device *pdev)
|
|||||||
struct resource *res;
|
struct resource *res;
|
||||||
int i, ret;
|
int i, ret;
|
||||||
|
|
||||||
dev_notice(&pdev->dev, "Marvell XOR driver\n");
|
dev_notice(&pdev->dev, "Marvell shared XOR driver\n");
|
||||||
|
|
||||||
xordev = devm_kzalloc(&pdev->dev, sizeof(*xordev), GFP_KERNEL);
|
xordev = devm_kzalloc(&pdev->dev, sizeof(*xordev), GFP_KERNEL);
|
||||||
if (!xordev)
|
if (!xordev)
|
||||||
|
Loading…
Reference in New Issue
Block a user