大大们好,
我的板子是MIZ7035FD,跑的是论坛里面的debian虚拟机制作的buildroot的系统,最近在修改设备树,希望可以为外设保留一块存储空间,修改设备树如下:
/ {
amba_pl: amba_pl {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges ;
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
ranges;
mydev_dma: drm-dma@30000000 {
no-map;
reg = <0x30000000 0x8000000>;
};
};
mydev_v1_0_0: mydev_v1_0@43c00000 {
compatible = "mydev,simple";
interrupt-names = "dla_intr";
interrupt-parent = <&intc>;
interrupts = <0 29 4>;
reg = <0x43c00000 0x40000>;
memory-region = <&mydev_dma>;
};
};
};
但是我的系统启动之后,
# cat /proc/iomem
00000000-3fffffff : System RAM
00008000-008fffff : Kernel code
00a00000-00a62683 : Kernel data
在System RAM里面依然能看到整个1G空间,我查看启动时候打印的信息,也没有提到reserved-memory,不知道为啥会失败,请不吝指教。
我的理解是,这个失败,导致我的驱动中:
dma = dma_declare_coherent_memory(drm->dev, 0x30000000, 0x30000000,
0x2000, DMA_MEMORY_EXCLUSIVE);
返回失败了.....
谢谢意见。 |