摘要: Device Tree常用方法解析Device Tree在Linux内核驱动中的使用源于2011年3月17日Linus Torvalds在ARM Linux邮件列表中的一封邮件,他宣称“this whole ARM thing is a f*cking pain in the ass”,并提倡学习P... 阅读全文
posted @ 2014-10-29 15:01 Magnum Programm Life 阅读(578) 评论(0) 推荐(0) 编辑
摘要: 转载:http://blog.csdn.net/21cnbao/article/details/84575461. ARM Device Tree起源Linus Torvalds在2011年3月17日的ARM Linux邮件列表宣称“this whole ARM thing is a f*cking... 阅读全文
posted @ 2014-10-29 14:56 Magnum Programm Life 阅读(486) 评论(0) 推荐(0) 编辑
摘要: 电源管理芯片可以为多设备供电,且这些设备电压电流有所不同。为这些设备提供的稳压器代码模型即为regulator。说白了regulator就是稳压器,它提供电源供给.简单的可以gpio操作,高电平开电,低电平关电.一般的还包括电流值,电压值等.一般regulator有两种不同的电源,即:ldo和sd.... 阅读全文
posted @ 2014-10-29 14:12 Magnum Programm Life 阅读(5119) 评论(0) 推荐(1) 编辑
摘要: devicetree中数据和structdevice有什么关系总体来说,devicetree与structdevice的关系应该还是在其生成platformdevice的时候,一直传递的structdevice *parent参数。下面先把其源码中传递过程描述如下(仍以At91rm9200为例):1... 阅读全文
posted @ 2014-10-28 18:15 Magnum Programm Life 阅读(1203) 评论(0) 推荐(0) 编辑
摘要: Linux kernel 是怎么将 devicetree中的内容生成plateform_device1,实现场景(以Versatile Express V2M为例说明其过程)以arch/arm/mach-vexpress/v2m.c 为例,在该文件中的v2m_dt_init函数的作用就是利用 dt(... 阅读全文
posted @ 2014-10-28 18:14 Magnum Programm Life 阅读(2603) 评论(0) 推荐(0) 编辑
摘要: 本文以At91rm9200平台为例,从源码实现的角度来分析驱动加载时,Device tree的属性是如何取得的。一:系统级初始化DT_MACHINE_START 主要是定义"struct machine_desc"的类型,放在 section(".arch.info.init"),是初始化数据,Ke... 阅读全文
posted @ 2014-10-28 18:13 Magnum Programm Life 阅读(2015) 评论(1) 推荐(1) 编辑
摘要: 一,主要问题:系统在启动的时候,是怎么加载 dts的;Lk,kernel中都应调查。二:参考文字dts加载流程如下图所示:启动过程中,bootloader(默认是bootable/bootloader/lk)会根据机器硬件信息选择合适的devicetree装入内存,把地址等相关信息传给kernel。... 阅读全文
posted @ 2014-10-28 18:10 Magnum Programm Life 阅读(3945) 评论(0) 推荐(1) 编辑
摘要: devicetree的书写规范下面从节点,属性,reg,ranges,中断控制器等几个方面叙述devicetree的书写规范。1,dts的基本元素:节点.dts(或者其include的.dtsi)基本元素为结点和属性。举例说明节点的概念:/ { node1 { a-string-... 阅读全文
posted @ 2014-10-28 18:08 Magnum Programm Life 阅读(1753) 评论(0) 推荐(0) 编辑
摘要: DTS结构及其编译方法一:主要问题1,需要了解dtsi与dts的关系2,dts的结构模型3,dts是如何被编译的,以及编译后会生成一个什么文件.二:参考文字1,DTS(device tree source).dts文件是一种ASCII文本格式的DeviceTree描述。基本上,在ARMLinux内,... 阅读全文
posted @ 2014-10-28 18:07 Magnum Programm Life 阅读(5254) 评论(0) 推荐(0) 编辑
摘要: container_of宏剖析//该宏位于include/linux/kernel.h1.定义格式/** * container_of - cast a member of a structure out to the containing structure * * @ptr: th... 阅读全文
posted @ 2014-10-28 17:55 Magnum Programm Life 阅读(245) 评论(0) 推荐(0) 编辑