cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Newbie
Newbie
1,798 Views
Registered: ‎12-02-2013

I am having a problem with CDMA driver. Crash due to irq value of zero

I generated a new device tree from the sdk which includes cdma and bram blocks connected in slave mode to the arm cores. Using interrupt 28. The sdk device tree did not generate the section for the interrupt. I had to add it. Here it is:

                axi_cdma_1: axicdma@4e200000 {
                        #address-cells = <1>;
                        #interrupt-cells = <1>;
                        #size-cells = <1>;
                        compatible = "xlnx,axi-cdma";
                        interrupt-parent = <&ps7_scugic_0>;
                        interrupts = <0 28 0>;
                        ranges = <0x4e200000 0x4e200000 0x10000>;
                        reg = <0x4e200000 0x10000>;
                        dma-channel@4e200000 {
                                compatible = "xlnx,axi-cdma-channel";
                                xlnx,datawidth = <0x20>;
                                xlnx,device-id = <0x0>;
                                xlnx,max-burst-len = <0x10>;
                        } ;
                } ;
                bram_ctrl_1: axi-bram-ctrl@40000000 {
                        compatible = "xlnx,axi-bram-ctrl-3.0", "xlnx,xps-bram-if-cntlr-1.00.a";
                        reg = <0x40000000 0x1000>;
                        xlnx,bram-addr-width = <0xa>;
                        xlnx,bram-inst-mode = "EXTERNAL";
                        xlnx,ecc = <0x0>;
                        xlnx,ecc-onoff-reset-value = <0x0>;
                        xlnx,fault-inject = <0x0>;
                        xlnx,memory-depth = <0x400>;
                        xlnx,s-axi-ctrl-addr-width = <0x20>;
                        xlnx,s-axi-ctrl-data-width = <0x20>;
                        xlnx,s-axi-id-width = <0xc>;
                        xlnx,s-axi-supports-narrow-burst = <0x0>;
                        xlnx,single-port-bram = <0x1>;
                } ;
The manual adition is striked. The driver loads then crashes in:

        chan->irq = irq_of_parse_and_map(node, 0);
        err = devm_request_irq(xdev->dev, chan->irq, cdma_intr_handler,
                               IRQF_SHARED,
                               "xilinx-cdma-controller", chan);
        if (err) {
                dev_err(xdev->dev, "unable to request IRQ, %d\n", chan->irq);
                return err;
        }

The reason chan->irq == 0. I added debug statement to make sure that what I added to the device tree works.

====> creating irq mapping of axicdma                                                                              
of_irq_map_raw: par=/amba@0/ps7-scugic@f8f01000,intspec=[0x00000000 0x0000001c...],ointsize=3                      
of_irq_map_raw: ipar=/amba@0/ps7-scugic@f8f01000, size=3                                                           
 -> addrsize=2                                                                                                     
 -> got it !                                                                                                                                                                                     
====> creating irq mapping of axicdma                                                                              
of_irq_map_raw: par=/amba@0/ps7-scugic@f8f01000,intspec=[0x00000000 0x0000001c...],ointsize=3                      
of_irq_map_raw: ipar=/amba@0/ps7-scugic@f8f01000, size=3                                                           
 -> addrsize=2                                                                                                     
 -> got it !                                                                                                       
             

Then crash:

xilinx-cdma 4e200000.axicdma: unable to request IRQ, 0                                                             
xilinx-cdma 4e200000.axicdma: Probing channels failed                                                              
Unable to handle kernel NULL pointer dereference at virtual address 00000004                                       
pgd = c0004000                                                                                                     
[00000004] *pgd=00000000 

 

Your help is appreciated. Thanks

 

Nidal                                                 

0 Kudos
0 Replies