对于AM5728的EDMA该如何使用,参考了Documentation/devicetree/bindings/ti-edma.txt 和Documentation/devicetree/bindings/ti-dma-crossbar.txt文档设置了设备树,但好像对数据没任何影响,连续读取数据速度依然很慢
Nancy Wang:
请问使用的SDK版本是什么?EDMA是用于哪个接口上实现数据搬移的?相关配置代码贴出来一下。
,
mutang mutang:
内核是4.9.65
设备树配置如下:在应用层直接映射gpmc地址,读取数据,速度远达不到设备树约束的速度
edma: edma@43300000 {compatible = "ti,edma3-tpcc";ti,hwmods = "tpcc";reg = <0x43300000 0x100000>;reg-names = "edma3_cc";interrupts = <GIC_SPI 361 IRQ_TYPE_LEVEL_HIGH>,<GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>,<GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH>;interrupt-names = "edma3_ccint", "edma3_mperr","edma3_ccerrint";dma-requests = <64>;#dma-cells = <2>;
ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 0>;ti,edma-memcpy-channels = <20 21>;/** memcpy is disabled, can be enabled with:* ti,edma-memcpy-channels = <20 21>;* for example. Note that these channels need to be* masked in the xbar as well.*/};gpmc: gpmc@50000000 {compatible = "ti,am3352-gpmc";ti,hwmods = "gpmc";reg = <0x50000000 0x37c>;/* device IO registers */interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;dmas = <&edma_xbar 4 0>;dma-names = "rxtx";gpmc,num-cs = <8>;gpmc,num-waitpins = <2>;#address-cells = <2>;#size-cells = <1>;interrupt-controller;#interrupt-cells = <2>;gpio-controller;#gpio-cells = <2>;status = "disabled";};
&gpmc{depth = <1>;/* only create devices on depth 1 */status = "okay";
#address-cells = <2>;#size-cells = <1>;pinctrl-names = "default";pinctrl-0 = <&gpmc_pins_default>;
ranges = <0 0 0x01000000 0x01000000>;/* CSn0 0, addr 0x01000000, size 0x1000000 (16MiB) */gpmc_device0@0,0 {compatible = "cfi-flash";linux,mtd-name= "intel,pf48f6000m0y1be";status = "okay";reg = <0 0 0x01000000>;
/* CONFIG 1 */gpmc,sync-read= <1>;gpmc,sync-write= <1>;bank-width= <2>;/* GPMC_CONFIG1_DEVICESIZE(1) 2: 16bits */gpmc,mux-add-data= <0>;/* GPMC_CONFIG1_MUXTYPE(0) 2: address-data multiplexing mode */gpmc,burst-length= <16>;/** 16 **/gpmc,burst-read= <1>;gpmc,burst-write= <1>;gpmc,clk-activation-ns = <5>;/* GPMC 信号相对于 FCLK 到来的延时时间 */
/* CONFIG 2 */gpmc,sync-clk-ps= <7500>; /**15000**//*961514000 15000*/gpmc,cs-on-ns= <5>;/**15 0**/gpmc,cs-rd-off-ns= <60>;/** 108 **//*101*/gpmc,cs-wr-off-ns= <60>;/*101*/
/* CONFIG 3 */gpmc,adv-on-ns = <0>;/** 3 **//*0*//* control an address and byte-enable valid setup time */gpmc,adv-rd-off-ns = <9>;/** 21 **//*12*//* control an address and byte-enable valid hold time */gpmc,adv-wr-off-ns = <9>;/** 21 **//*12*//* control an address and byte-enable valid hold time */
// /* CONFIG 4 */gpmc,oe-on-ns= <9>;/** 34 **//** MAX = 56nsdepend on start get data time **/gpmc,oe-off-ns= <55>;/** 98 **/ gpmc,we-on-ns= <9>;/*27*/gpmc,we-off-ns= <55>;
/* CONFIG 5 */gpmc,rd-cycle-ns = <60>;/*101*/gpmc,wr-cycle-ns= <60>;/*101*/gpmc,access-ns= <40>;//读数据开始时间gpmc,page-burst-access-ns = <7>;//读一个数据的时间
/* CONFIG 6 */gpmc,bus-turnaround-ns= <0>; /* between two large different access deley time*/gpmc,cycle2cycle-delay-ns= <0>; /**0**/gpmc,wr-data-mux-bus-ns= <0>;gpmc,wr-access-ns = <50>;/*95*/
gpmc,cycle2cycle-samecsen;gpmc,cycle2cycle-diffcsen;};