开放固件设备树概述/参考手册
我正在尝试为嵌入式 PowerPC 板设置驱动程序,今天执行此操作的正确方法是使用 OpenFirmware 设备树数据结构(.dtb 文件,从 .dts 文件编译)。创建树非常简单,但是如何让我的设备驱动程序找到它的节点和其中的数据?我还没有找到任何关于这方面的好的参考资料,像《Linux Device Drivers》这样的书对 x86 领域的了解太多,对主要与基于 Power Architecture 的机器(Linux 内核中的 arch powerpc)相关的设备树没有太大帮助。术语)。
I am trying to setup a driver for an embedded PowerPC board, and the correct way to do this today is to use the OpenFirmware Device Tree datastructure (the .dtb file, compiled from a .dts file). Creating a tree is pretty easy, but how do I get my device driver to find its node and the data in it? I have not managed to find any good reference on this, and books like "Linux Device Drivers" are too much into x86 land to be of much help for device trees that mostly pertain to Power Architecture-based machines (arch powerpc in the Linux kernel terminology).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可用的文档似乎很少,尤其是在驱动程序方面。与我认识的一位长期的 Linux 内核开发人员交谈,他的建议本质上是查看其他驱动程序的代码。
我发现一些背景阅读: Grant Likely 演示文稿,Grant Likely Linux 研讨会论文,对数据结构的相当好的概述
开放固件系统最普遍的使用是在 Linux 内核的 arch/powerpc/ 树中的飞思卡尔 fsl_x.c 驱动程序中,更新于 2.6.16。
There seems to be very little documentation available, especially on the side of doing drivers. talked to a long-time Linux kernel developer I know, and his advice was essentially to look at the code of other drivers.
some background reading I found: Grant Likely presentation, Grant Likely Linux Symposium paper, a fairly good overview of the data structure
The most pervasive use of the open firmware system is found in the Freescale fsl_x.c drivers in the arch/powerpc/ tree in the Linux kernel, more recent than 2.6.16.