Tool/software: Linux
I want to use XDMA_EVENT_INTR0 to trigger a DMA to read GPMC data .In the 3.2 kernel I have easy to achieve and good use, but in the latest RT-LINUX 4.4.12 try to use a variety of methods are unable to achieve this function.I do not quite understand the new kernel, can you help me? thank you very much
Here is my code..
&gpmc {
status = "okay";
ranges = <0 0 0x08000000 0x10000000>, /* CS0: 16MB for NAND */
<1 0 0x18000000 0x08000000>,
<2 0 0x20000000 0x08000000>,
<3 0 0x28000000 0x08000000>,
<4 0 0x30000000 0x08000000>,
<5 0 0x38000000 0x04000000>,
<6 0 0x3c000000 0x04000000>;
nand@0,0 {
compatible = "ti,omap2-nand";
....
};
fpga@1,0 {
compatible = "fpga";
pinctrl-names = "default";
pinctrl-0 = <&fpga_pins>;
status = "okay";
reg = <1 0 0x01000000>; /* CS1, offset 0, IO size 4 */
bank-width = <2>; /* GPMC_CONFIG1_DEVICESIZE(1) */
/*gpmc,burst-write;*/
/*gpmc,burst-read;*/
/*gpmc,burst-wrap;*/
......
.......
/* these are on the crossbar and are outlined in the
xbar-event-map element */
dmas = <&edma_xbar 20 0 28>; /*XDMA_EVENT_INTR0*/
dma-names = "fpga";
interrupt-parent = <&gpio0>;
interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
/* reset */
reset-gpio = <&gpio0 20 GPIO_ACTIVE_HIGH>;
};
};
In the driver C file, I use "dma_request_chan (& pdev-> dev," fpga ");" Request DMA interrupt, the results can not be used to trigger this event through XDMA_EVENT_INTR0, I try to use "dma_request_channel (mask, NULL, NULL); "I can start DMA but I did not expect results