How to build LTIB with DMA support for MPC8306-KIT?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to build LTIB with DMA support for MPC8306-KIT?

1,400 Views
leopoldogomez
Contributor II

After building LTIB with DMA support (Selected only "Freescale Elo and Eloplus DMA suport"  (* or M) option in "DMA Engine support" menu), Kernel crashes at boot (Oops: Machine check, sig: 7 [#1])

Following description for the DMA had been included in mpc8306som.dts file:

                dma2: dma@82a8 {
                        #address-cells = <1>;
                        #size-cells = <1>;
                        compatible = "fsl,mpc8349-dma", "fsl,elo-dma";
                        reg = <0x82a8 4>;
                        ranges = <0 0x8100 0x1a8>;
                        interrupt-parent = <&ipic>;
                        interrupts = <71 8>;
                        cell-index = <0>;

                        dma-channel@0 {
                                compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
                                reg = <0 0x80>;
                                cell-index = <0>;
                                interrupt-parent = <&ipic>;
                                interrupts = <71 8>;

                        };
                        dma-channel@80 {
                                compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
                                reg = <0x80 0x80>;
                                cell-index = <1>;
                                interrupt-parent = <&ipic>;
                                interrupts = <71 8>;
                        };
                        dma-channel@100 {
                                compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
                                reg = <0x100 0x80>;
                                cell-index = <2>;
                                interrupt-parent = <&ipic>;
                                interrupts = <71 8>;
                        };
                        dma-channel@180 {
                                compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel";
                                reg = <0x180 0x28>;
                                cell-index = <3>;
                                interrupt-parent = <&ipic>;
                                interrupts = <71 8>;
                        };

        };

Being dma@82a8 a child node of immr@e0000000

What should I do to build LTIB with DMA support and, additionally, to use the DMA Test client?

2 Replies

976 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please check Kernel configuration file and make sure the followings are configured.

CONFIG_FSL_DMA=y

CONFIG_DMA_ENGINE=y

And DMA test client is defined as CONFIG_DMATEST in Kernel source.


Have a great day,
Yiping Wang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

976 Views
leopoldogomez
Contributor II

Thank you for your answer but I affraid the problem is not the LTIB GUI

Building the DMA as a loadable kernel module, when the module inits, the clock of DMA Engine 2 is disabled. I suspect that after power up / reset the MPC8306,  that clock is disabled (SCCR) and the BSP does not enable it. If that clock is enabled (modifying fsl_dma.c. for instance), dmatest seems to work properly.

Related to this, it seems that there is a contradiction in the MPC8306 Reference Manual: In section  "4.5.2.3 System Clock Control Register" says that after reset DMA Engine 2 clock is enabled but in section "A.11 Clock Configuration" says that it is disabled.

Regards

Leopoldo

0 Kudos
Reply