Pan*_*shi 5 linux-device-driver linux-kernel device-tree
设备树中的address-cell
和size-cells
是什么?难道reg
是与address-cell
和size-cell
?如果是,那么如何?
例如:
memory: memory@20000000 {
#address-cells = <1>;
#size-cells = <1>;
device_type = "memory";
reg = <0x20000000 0x80000000>;
};
Run Code Online (Sandbox Code Playgroud)
什么是 0x20000000 ?我们从哪里可以得到这个?
reg 的含义取决于设备所连接的总线类型,并记录在总线的设备树绑定中。
这里,内存直接映射到CPU地址空间,reg是<address size>
。
因此,这意味着您的 DDR 从地址开始,0x20000000
大小为 2GB。
这个地址应该记录在 SoC 数据表中,如果你能得到它,在名为内存或内存映射的部分中。
归档时间: |
|
查看次数: |
2061 次 |
最近记录: |