sivaji wrote:
> Hai,
> 
> We have designed a MPC8641D based AMC card. As part of our customer
> requirement for a PCIe messaging driver for communicating between the
> MPC8641D AMC card as the PCIe target and the MPC8548E AMC card as the Host.
> 
> We are using the DMA for transferring data between the boards thru' PCIe.
> The DMA Interrupt on the target end is not getting registered and hence we
> face the issue (ie) No interrupt is generated after DMA transfer completion.
> 
> As per datasheet(Rev. 1, 05/2007) page no:445 interrupt number for
> DMAchannel 1 is 4. We are using linux kernel version :2.6.23-rc3. According
> to file (include/asm-powerpc/irq.h) line no:636 the interrupt number for DMA
> in linux is 20(decimal). When using this interrupt number 20 we are not able
> to registerd the DMA interrupts.

Since you're using 2.6.23, the IRQ for all devices is specified in the device 
tree, not some header file.  However, the device tree for the 8641 does not 
specify any DMA nodes, so you need to add that.  Here are the nodes for the 
8610 
that I'm going to add:

                 [EMAIL PROTECTED] {
                         #address-cells = <1>;
                         #size-cells = <1>;
                         compatible = "fsl,mpc8610-dma", "fsl,mpc8540-dma";
                         device-id = <0>;
                         reg = <21300 4>; /* DMA general status register */
                         ranges = <0 21100 200>;

                         [EMAIL PROTECTED] {
                                compatible = "fsl,mpc8610-dma-channel",
                                        "fsl,mpc8540-dma-channel";
                                device-id = <0>;
                                reg = <0 80>;
                                interrupt-parent = <&mpic>;
                                interrupts = <14 2>;
                         };
                         [EMAIL PROTECTED] {
                                compatible = "fsl,mpc8610-dma-channel",
                                        "fsl,mpc8540-dma-channel";
                                device-id = <1>;
                                reg = <80 80>;
                                interrupt-parent = <&mpic>;
                                interrupts = <15 2>;
                         };
                         [EMAIL PROTECTED] {
                                compatible = "fsl,mpc8610-dma-channel",
                                        "fsl,mpc8540-dma-channel";
                                device-id = <2>;
                                reg = <100 80>;
                                interrupt-parent = <&mpic>;
                                interrupts = <16 2>;
                         };
                         [EMAIL PROTECTED] {
                                compatible = "fsl,mpc8610-dma-channel",
                                        "fsl,mpc8540-dma-channel";
                                device-id = <3>;
                                reg = <180 80>;
                                interrupt-parent = <&mpic>;
                                interrupts = <17 2>;
                         };
                 };

                 [EMAIL PROTECTED] {
                         #address-cells = <1>;
                         #size-cells = <1>;
                         compatible = "fsl,mpc8610-dma", "fsl,mpc8540-dma";
                         device-id = <1>;
                         reg = <c300 4>; /* DMA general status register */
                         ranges = <0 c100 200>;

                         [EMAIL PROTECTED] {
                                compatible = "fsl,mpc8610-dma-channel",
                                        "fsl,mpc8540-dma-channel";
                                device-id = <0>;
                                reg = <0 80>;
                                interrupt-parent = <&mpic>;
                                interrupts = <3c 2>;
                         };
                         [EMAIL PROTECTED] {
                                compatible = "fsl,mpc8610-dma-channel",
                                        "fsl,mpc8540-dma-channel";
                                device-id = <1>;
                                reg = <80 80>;
                                interrupt-parent = <&mpic>;
                                interrupts = <3d 2>;
                         };
                         [EMAIL PROTECTED] {
                                compatible = "fsl,mpc8610-dma-channel",
                                        "fsl,mpc8540-dma-channel";
                                device-id = <2>;
                                reg = <100 80>;
                                interrupt-parent = <&mpic>;
                                interrupts = <3e 2>;
                         };
                         [EMAIL PROTECTED] {
                                compatible = "fsl,mpc8610-dma-channel",
                                        "fsl,mpc8540-dma-channel";
                                device-id = <3>;
                                reg = <180 80>;
                                interrupt-parent = <&mpic>;
                                interrupts = <3f 2>;
                         };
                 };

        };

Please note that there is no support in the kernel for generic PowerPC DMA 
transfers, so in addition to adding these nodes, you would also need to write 
all the code to do the DMA transfers.

-- 
Timur Tabi
Linux kernel developer at Freescale
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to