aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/dma/at_hdmac_regs.h8
-rw-r--r--drivers/dma/iop-adma.c45
-rw-r--r--drivers/dma/mv_xor.c40
3 files changed, 42 insertions, 51 deletions
diff --git a/drivers/dma/at_hdmac_regs.h b/drivers/dma/at_hdmac_regs.h
index 116e4adffb08..0eb3c1388667 100644
--- a/drivers/dma/at_hdmac_regs.h
+++ b/drivers/dma/at_hdmac_regs.h
@@ -369,10 +369,10 @@ static void vdbg_dump_regs(struct at_dma_chan *atchan) {}
369 369
370static void atc_dump_lli(struct at_dma_chan *atchan, struct at_lli *lli) 370static void atc_dump_lli(struct at_dma_chan *atchan, struct at_lli *lli)
371{ 371{
372 dev_printk(KERN_CRIT, chan2dev(&atchan->chan_common), 372 dev_crit(chan2dev(&atchan->chan_common),
373 " desc: s0x%x d0x%x ctrl0x%x:0x%x l0x%x\n", 373 " desc: s0x%x d0x%x ctrl0x%x:0x%x l0x%x\n",
374 lli->saddr, lli->daddr, 374 lli->saddr, lli->daddr,
375 lli->ctrla, lli->ctrlb, lli->dscr); 375 lli->ctrla, lli->ctrlb, lli->dscr);
376} 376}
377 377
378 378
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c
index 9072e173b860..62a59fd65723 100644
--- a/drivers/dma/iop-adma.c
+++ b/drivers/dma/iop-adma.c
@@ -936,7 +936,7 @@ static irqreturn_t iop_adma_err_handler(int irq, void *data)
936 struct iop_adma_chan *chan = data; 936 struct iop_adma_chan *chan = data;
937 unsigned long status = iop_chan_get_status(chan); 937 unsigned long status = iop_chan_get_status(chan);
938 938
939 dev_printk(KERN_ERR, chan->device->common.dev, 939 dev_err(chan->device->common.dev,
940 "error ( %s%s%s%s%s%s%s)\n", 940 "error ( %s%s%s%s%s%s%s)\n",
941 iop_is_err_int_parity(status, chan) ? "int_parity " : "", 941 iop_is_err_int_parity(status, chan) ? "int_parity " : "",
942 iop_is_err_mcu_abort(status, chan) ? "mcu_abort " : "", 942 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)
1017 1017
1018 if (iop_adma_status(dma_chan, cookie, NULL) != 1018 if (iop_adma_status(dma_chan, cookie, NULL) !=
1019 DMA_SUCCESS) { 1019 DMA_SUCCESS) {
1020 dev_printk(KERN_ERR, dma_chan->device->dev, 1020 dev_err(dma_chan->device->dev,
1021 "Self-test copy timed out, disabling\n"); 1021 "Self-test copy timed out, disabling\n");
1022 err = -ENODEV; 1022 err = -ENODEV;
1023 goto free_resources; 1023 goto free_resources;
@@ -1027,7 +1027,7 @@ static int iop_adma_memcpy_self_test(struct iop_adma_device *device)
1027 dma_sync_single_for_cpu(&iop_chan->device->pdev->dev, dest_dma, 1027 dma_sync_single_for_cpu(&iop_chan->device->pdev->dev, dest_dma,
1028 IOP_ADMA_TEST_SIZE, DMA_FROM_DEVICE); 1028 IOP_ADMA_TEST_SIZE, DMA_FROM_DEVICE);
1029 if (memcmp(src, dest, IOP_ADMA_TEST_SIZE)) { 1029 if (memcmp(src, dest, IOP_ADMA_TEST_SIZE)) {
1030 dev_printk(KERN_ERR, dma_chan->device->dev, 1030 dev_err(dma_chan->device->dev,
1031 "Self-test copy failed compare, disabling\n"); 1031 "Self-test copy failed compare, disabling\n");
1032 err = -ENODEV; 1032 err = -ENODEV;
1033 goto free_resources; 1033 goto free_resources;
@@ -1117,7 +1117,7 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
1117 1117
1118 if (iop_adma_status(dma_chan, cookie, NULL) != 1118 if (iop_adma_status(dma_chan, cookie, NULL) !=
1119 DMA_SUCCESS) { 1119 DMA_SUCCESS) {
1120 dev_printk(KERN_ERR, dma_chan->device->dev, 1120 dev_err(dma_chan->device->dev,
1121 "Self-test xor timed out, disabling\n"); 1121 "Self-test xor timed out, disabling\n");
1122 err = -ENODEV; 1122 err = -ENODEV;
1123 goto free_resources; 1123 goto free_resources;
@@ -1129,7 +1129,7 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
1129 for (i = 0; i < (PAGE_SIZE / sizeof(u32)); i++) { 1129 for (i = 0; i < (PAGE_SIZE / sizeof(u32)); i++) {
1130 u32 *ptr = page_address(dest); 1130 u32 *ptr = page_address(dest);
1131 if (ptr[i] != cmp_word) { 1131 if (ptr[i] != cmp_word) {
1132 dev_printk(KERN_ERR, dma_chan->device->dev, 1132 dev_err(dma_chan->device->dev,
1133 "Self-test xor failed compare, disabling\n"); 1133 "Self-test xor failed compare, disabling\n");
1134 err = -ENODEV; 1134 err = -ENODEV;
1135 goto free_resources; 1135 goto free_resources;
@@ -1163,14 +1163,14 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
1163 msleep(8); 1163 msleep(8);
1164 1164
1165 if (iop_adma_status(dma_chan, cookie, NULL) != DMA_SUCCESS) { 1165 if (iop_adma_status(dma_chan, cookie, NULL) != DMA_SUCCESS) {
1166 dev_printk(KERN_ERR, dma_chan->device->dev, 1166 dev_err(dma_chan->device->dev,
1167 "Self-test zero sum timed out, disabling\n"); 1167 "Self-test zero sum timed out, disabling\n");
1168 err = -ENODEV; 1168 err = -ENODEV;
1169 goto free_resources; 1169 goto free_resources;
1170 } 1170 }
1171 1171
1172 if (zero_sum_result != 0) { 1172 if (zero_sum_result != 0) {
1173 dev_printk(KERN_ERR, dma_chan->device->dev, 1173 dev_err(dma_chan->device->dev,
1174 "Self-test zero sum failed compare, disabling\n"); 1174 "Self-test zero sum failed compare, disabling\n");
1175 err = -ENODEV; 1175 err = -ENODEV;
1176 goto free_resources; 1176 goto free_resources;
@@ -1187,7 +1187,7 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
1187 msleep(8); 1187 msleep(8);
1188 1188
1189 if (iop_adma_status(dma_chan, cookie, NULL) != DMA_SUCCESS) { 1189 if (iop_adma_status(dma_chan, cookie, NULL) != DMA_SUCCESS) {
1190 dev_printk(KERN_ERR, dma_chan->device->dev, 1190 dev_err(dma_chan->device->dev,
1191 "Self-test memset timed out, disabling\n"); 1191 "Self-test memset timed out, disabling\n");
1192 err = -ENODEV; 1192 err = -ENODEV;
1193 goto free_resources; 1193 goto free_resources;
@@ -1196,7 +1196,7 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
1196 for (i = 0; i < PAGE_SIZE/sizeof(u32); i++) { 1196 for (i = 0; i < PAGE_SIZE/sizeof(u32); i++) {
1197 u32 *ptr = page_address(dest); 1197 u32 *ptr = page_address(dest);
1198 if (ptr[i]) { 1198 if (ptr[i]) {
1199 dev_printk(KERN_ERR, dma_chan->device->dev, 1199 dev_err(dma_chan->device->dev,
1200 "Self-test memset failed compare, disabling\n"); 1200 "Self-test memset failed compare, disabling\n");
1201 err = -ENODEV; 1201 err = -ENODEV;
1202 goto free_resources; 1202 goto free_resources;
@@ -1219,14 +1219,14 @@ iop_adma_xor_val_self_test(struct iop_adma_device *device)
1219 msleep(8); 1219 msleep(8);
1220 1220
1221 if (iop_adma_status(dma_chan, cookie, NULL) != DMA_SUCCESS) { 1221 if (iop_adma_status(dma_chan, cookie, NULL) != DMA_SUCCESS) {
1222 dev_printk(KERN_ERR, dma_chan->device->dev, 1222 dev_err(dma_chan->device->dev,
1223 "Self-test non-zero sum timed out, disabling\n"); 1223 "Self-test non-zero sum timed out, disabling\n");
1224 err = -ENODEV; 1224 err = -ENODEV;
1225 goto free_resources; 1225 goto free_resources;
1226 } 1226 }
1227 1227
1228 if (zero_sum_result != 1) { 1228 if (zero_sum_result != 1) {
1229 dev_printk(KERN_ERR, dma_chan->device->dev, 1229 dev_err(dma_chan->device->dev,
1230 "Self-test non-zero sum failed compare, disabling\n"); 1230 "Self-test non-zero sum failed compare, disabling\n");
1231 err = -ENODEV; 1231 err = -ENODEV;
1232 goto free_resources; 1232 goto free_resources;
@@ -1579,15 +1579,14 @@ static int iop_adma_probe(struct platform_device *pdev)
1579 goto err_free_iop_chan; 1579 goto err_free_iop_chan;
1580 } 1580 }
1581 1581
1582 dev_printk(KERN_INFO, &pdev->dev, "Intel(R) IOP: " 1582 dev_info(&pdev->dev, "Intel(R) IOP: ( %s%s%s%s%s%s%s)\n",
1583 "( %s%s%s%s%s%s%s)\n", 1583 dma_has_cap(DMA_PQ, dma_dev->cap_mask) ? "pq " : "",
1584 dma_has_cap(DMA_PQ, dma_dev->cap_mask) ? "pq " : "", 1584 dma_has_cap(DMA_PQ_VAL, dma_dev->cap_mask) ? "pq_val " : "",
1585 dma_has_cap(DMA_PQ_VAL, dma_dev->cap_mask) ? "pq_val " : "", 1585 dma_has_cap(DMA_XOR, dma_dev->cap_mask) ? "xor " : "",
1586 dma_has_cap(DMA_XOR, dma_dev->cap_mask) ? "xor " : "", 1586 dma_has_cap(DMA_XOR_VAL, dma_dev->cap_mask) ? "xor_val " : "",
1587 dma_has_cap(DMA_XOR_VAL, dma_dev->cap_mask) ? "xor_val " : "", 1587 dma_has_cap(DMA_MEMSET, dma_dev->cap_mask) ? "fill " : "",
1588 dma_has_cap(DMA_MEMSET, dma_dev->cap_mask) ? "fill " : "", 1588 dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask) ? "cpy " : "",
1589 dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask) ? "cpy " : "", 1589 dma_has_cap(DMA_INTERRUPT, dma_dev->cap_mask) ? "intr " : "");
1590 dma_has_cap(DMA_INTERRUPT, dma_dev->cap_mask) ? "intr " : "");
1591 1590
1592 dma_async_device_register(dma_dev); 1591 dma_async_device_register(dma_dev);
1593 goto out; 1592 goto out;
@@ -1651,8 +1650,8 @@ static void iop_chan_start_null_memcpy(struct iop_adma_chan *iop_chan)
1651 /* run the descriptor */ 1650 /* run the descriptor */
1652 iop_chan_enable(iop_chan); 1651 iop_chan_enable(iop_chan);
1653 } else 1652 } else
1654 dev_printk(KERN_ERR, iop_chan->device->common.dev, 1653 dev_err(iop_chan->device->common.dev,
1655 "failed to allocate null descriptor\n"); 1654 "failed to allocate null descriptor\n");
1656 spin_unlock_bh(&iop_chan->lock); 1655 spin_unlock_bh(&iop_chan->lock);
1657} 1656}
1658 1657
@@ -1704,7 +1703,7 @@ static void iop_chan_start_null_xor(struct iop_adma_chan *iop_chan)
1704 /* run the descriptor */ 1703 /* run the descriptor */
1705 iop_chan_enable(iop_chan); 1704 iop_chan_enable(iop_chan);
1706 } else 1705 } else
1707 dev_printk(KERN_ERR, iop_chan->device->common.dev, 1706 dev_err(iop_chan->device->common.dev,
1708 "failed to allocate null descriptor\n"); 1707 "failed to allocate null descriptor\n");
1709 spin_unlock_bh(&iop_chan->lock); 1708 spin_unlock_bh(&iop_chan->lock);
1710} 1709}
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index ac71f555dd72..e26de4f680e1 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -210,7 +210,7 @@ static void mv_set_mode(struct mv_xor_chan *chan,
210 break; 210 break;
211 default: 211 default:
212 dev_err(mv_chan_to_devp(chan), 212 dev_err(mv_chan_to_devp(chan),
213 "error: unsupported operation %d.\n", 213 "error: unsupported operation %d\n",
214 type); 214 type);
215 BUG(); 215 BUG();
216 return; 216 return;
@@ -828,28 +828,22 @@ static void mv_dump_xor_regs(struct mv_xor_chan *chan)
828 u32 val; 828 u32 val;
829 829
830 val = __raw_readl(XOR_CONFIG(chan)); 830 val = __raw_readl(XOR_CONFIG(chan));
831 dev_err(mv_chan_to_devp(chan), 831 dev_err(mv_chan_to_devp(chan), "config 0x%08x\n", val);
832 "config 0x%08x.\n", val);
833 832
834 val = __raw_readl(XOR_ACTIVATION(chan)); 833 val = __raw_readl(XOR_ACTIVATION(chan));
835 dev_err(mv_chan_to_devp(chan), 834 dev_err(mv_chan_to_devp(chan), "activation 0x%08x\n", val);
836 "activation 0x%08x.\n", val);
837 835
838 val = __raw_readl(XOR_INTR_CAUSE(chan)); 836 val = __raw_readl(XOR_INTR_CAUSE(chan));
839 dev_err(mv_chan_to_devp(chan), 837 dev_err(mv_chan_to_devp(chan), "intr cause 0x%08x\n", val);
840 "intr cause 0x%08x.\n", val);
841 838
842 val = __raw_readl(XOR_INTR_MASK(chan)); 839 val = __raw_readl(XOR_INTR_MASK(chan));
843 dev_err(mv_chan_to_devp(chan), 840 dev_err(mv_chan_to_devp(chan), "intr mask 0x%08x\n", val);
844 "intr mask 0x%08x.\n", val);
845 841
846 val = __raw_readl(XOR_ERROR_CAUSE(chan)); 842 val = __raw_readl(XOR_ERROR_CAUSE(chan));
847 dev_err(mv_chan_to_devp(chan), 843 dev_err(mv_chan_to_devp(chan), "error cause 0x%08x\n", val);
848 "error cause 0x%08x.\n", val);
849 844
850 val = __raw_readl(XOR_ERROR_ADDR(chan)); 845 val = __raw_readl(XOR_ERROR_ADDR(chan));
851 dev_err(mv_chan_to_devp(chan), 846 dev_err(mv_chan_to_devp(chan), "error addr 0x%08x\n", val);
852 "error addr 0x%08x.\n", val);
853} 847}
854 848
855static void mv_xor_err_interrupt_handler(struct mv_xor_chan *chan, 849static 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,
862 } 856 }
863 857
864 dev_err(mv_chan_to_devp(chan), 858 dev_err(mv_chan_to_devp(chan),
865 "error on chan %d. intr cause 0x%08x.\n", 859 "error on chan %d. intr cause 0x%08x\n",
866 chan->idx, intr_cause); 860 chan->idx, intr_cause);
867 861
868 mv_dump_xor_regs(chan); 862 mv_dump_xor_regs(chan);
@@ -1052,9 +1046,8 @@ mv_xor_xor_self_test(struct mv_xor_chan *mv_chan)
1052 u32 *ptr = page_address(dest); 1046 u32 *ptr = page_address(dest);
1053 if (ptr[i] != cmp_word) { 1047 if (ptr[i] != cmp_word) {
1054 dev_err(dma_chan->device->dev, 1048 dev_err(dma_chan->device->dev,
1055 "Self-test xor failed compare, disabling." 1049 "Self-test xor failed compare, disabling. index %d, data %x, expected %x\n",
1056 " index %d, data %x, expected %x\n", i, 1050 i, ptr[i], cmp_word);
1057 ptr[i], cmp_word);
1058 err = -ENODEV; 1051 err = -ENODEV;
1059 goto free_resources; 1052 goto free_resources;
1060 } 1053 }
@@ -1194,12 +1187,11 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
1194 goto err_free_irq; 1187 goto err_free_irq;
1195 } 1188 }
1196 1189
1197 dev_info(&pdev->dev, "Marvell XOR: " 1190 dev_info(&pdev->dev, "Marvell XOR: ( %s%s%s%s)\n",
1198 "( %s%s%s%s)\n", 1191 dma_has_cap(DMA_XOR, dma_dev->cap_mask) ? "xor " : "",
1199 dma_has_cap(DMA_XOR, dma_dev->cap_mask) ? "xor " : "", 1192 dma_has_cap(DMA_MEMSET, dma_dev->cap_mask) ? "fill " : "",
1200 dma_has_cap(DMA_MEMSET, dma_dev->cap_mask) ? "fill " : "", 1193 dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask) ? "cpy " : "",
1201 dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask) ? "cpy " : "", 1194 dma_has_cap(DMA_INTERRUPT, dma_dev->cap_mask) ? "intr " : "");
1202 dma_has_cap(DMA_INTERRUPT, dma_dev->cap_mask) ? "intr " : "");
1203 1195
1204 dma_async_device_register(dma_dev); 1196 dma_async_device_register(dma_dev);
1205 return mv_chan; 1197 return mv_chan;
@@ -1253,7 +1245,7 @@ static int mv_xor_probe(struct platform_device *pdev)
1253 struct resource *res; 1245 struct resource *res;
1254 int i, ret; 1246 int i, ret;
1255 1247
1256 dev_notice(&pdev->dev, "Marvell XOR driver\n"); 1248 dev_notice(&pdev->dev, "Marvell shared XOR driver\n");
1257 1249
1258 xordev = devm_kzalloc(&pdev->dev, sizeof(*xordev), GFP_KERNEL); 1250 xordev = devm_kzalloc(&pdev->dev, sizeof(*xordev), GFP_KERNEL);
1259 if (!xordev) 1251 if (!xordev)