Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fsldma: Remove CONFIG_FSL_DMA_SELFTEST, keep fsl_dma_self_test() running always.

Always enabling the fsl_dma_self_test() to ensure the DMA controller
should works well after the driver probed.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>

authored by

Zhang Wei and committed by
Dan Williams
411e23db 4b119e21

+3 -18
-8
drivers/dma/Kconfig
··· 46 46 MPC8560/40, MPC8555, MPC8548 and MPC8641 processors. 47 47 The MPC8349, MPC8360 is also supported. 48 48 49 - config FSL_DMA_SELFTEST 50 - bool "Enable the self test for each DMA channel" 51 - depends on FSL_DMA 52 - default y 53 - ---help--- 54 - Enable the self test for each DMA channel. A self test will be 55 - performed after the channel probed to ensure the DMA works well. 56 - 57 49 config DMA_ENGINE 58 50 bool 59 51
+3 -10
drivers/dma/fsldma.c
··· 776 776 fsl_chan_ld_cleanup(fsl_chan); 777 777 } 778 778 779 - #ifdef FSL_DMA_CALLBACKTEST 780 - static void fsl_dma_callback_test(struct fsl_dma_chan *fsl_chan) 779 + static void fsl_dma_callback_test(void *param) 781 780 { 781 + struct fsl_dma_chan *fsl_chan = param; 782 782 if (fsl_chan) 783 - dev_info(fsl_chan->dev, "selftest: callback is ok!\n"); 783 + dev_dbg(fsl_chan->dev, "selftest: callback is ok!\n"); 784 784 } 785 - #endif 786 785 787 - #ifdef CONFIG_FSL_DMA_SELFTEST 788 786 static int fsl_dma_self_test(struct fsl_dma_chan *fsl_chan) 789 787 { 790 788 struct dma_chan *chan; ··· 873 875 cookie = fsl_dma_tx_submit(tx3); 874 876 cookie = fsl_dma_tx_submit(tx2); 875 877 876 - #ifdef FSL_DMA_CALLBACKTEST 877 878 if (dma_has_cap(DMA_INTERRUPT, ((struct fsl_dma_device *) 878 879 dev_get_drvdata(fsl_chan->dev->parent))->common.cap_mask)) { 879 880 tx3->callback = fsl_dma_callback_test; 880 881 tx3->callback_param = fsl_chan; 881 882 } 882 - #endif 883 883 fsl_dma_memcpy_issue_pending(chan); 884 884 msleep(2); 885 885 ··· 902 906 kfree(src); 903 907 return err; 904 908 } 905 - #endif 906 909 907 910 static int __devinit of_fsl_dma_chan_probe(struct of_device *dev, 908 911 const struct of_device_id *match) ··· 992 997 } 993 998 } 994 999 995 - #ifdef CONFIG_FSL_DMA_SELFTEST 996 1000 err = fsl_dma_self_test(new_fsl_chan); 997 1001 if (err) 998 1002 goto err; 999 - #endif 1000 1003 1001 1004 dev_info(&dev->dev, "#%d (%s), irq %d\n", new_fsl_chan->id, 1002 1005 match->compatible, new_fsl_chan->irq);