This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

am5728的mcasp驱动



大家好:

                 我把davinci-mcasp.c davinci-mcasp.h edma-pcm.c  edma-pcm.h 拷贝出来主要是修改davinci-mcasp.c文件

                 我的目的是想将mcasp7驱动起来--准备配置为采样--而且作为主

我是这样做的:

第一步:打开arch/arm/boot/dts/dra7.dtsi

   添加节点

 mcasp7: mcasp@48478000 {
1693             compatible = "ti,dra7-mcasp-audio";
1694             ti,hwmods = "mcasp7";
1695             reg = <0x48478000 0x2000>,
1696                   <0x48450000 0x1000>;
1697             reg-names = "mpu","dat";
1698             interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>,
1699                      <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>;
1700             interrupt-names = "tx", "rx";
1701             dmas = <&edma_xbar 141>, <&edma_xbar 140>;
1702             dma-names = "tx", "rx";
1703             clocks = <&mcasp7_ahclkx_mux>;
1704             clock-names = "fck";
1705             status = "enabled";
1706         };

第二步:修改驱动文件

/*定义平台驱动*/
1938 static struct platform_driver davinci_mcasp_driver = {
1939     .probe      = davinci_mcasp_probe,
1940     .remove     = davinci_mcasp_remove,
1941     .driver     = {
1942         /*驱动的名字*/
1943         .name   = "davinci-mcasp7",
1944         /*设备树*/
1945         .of_match_table = mcasp_dt_ids,                                    
1946     },
1947 };

1389 static const struct snd_soc_component_driver davinci_mcasp_component = {   
1390     .name       = "davinci-mcasp7",
1391 };

1639 static int davinci_mcasp_probe(struct platform_device *pdev)
1640 {
1641     struct snd_dmaengine_dai_dma_data *dma_data;
1642     struct resource *mem, *ioarea, *res, *dat;
1643     struct davinci_mcasp_pdata *pdata;
1644     struct davinci_mcasp *mcasp;
1645     char *irq_name;
1646     int *dma;
1647     int irq;
1648     int ret;                                                               
1649 
1650     printk(KERN_EMERG"davinci_mcasp_probe\n");

第三步:测试
我在ubuntu14.04下交叉编译为.ko文件,scp到开发板中
insmod后,发现没有执行 davinci_mcasp_probe函数,是设备没有匹配成功

问题: 1  想知道自己那里写错了
             2 在开发板中驱动mcasp7需要mknod吗?
             
我将驱动文件上传,渴望得到帮助,太谢谢了。