摘要: 在U-boot中引入驱动模型(driver model),为驱动的定义和范文接口提供统一的方法,提高驱动间的兼容性以及访问的标准性,u-boot中的驱动模型(DM)和kernel中的设备驱动模型类似,但是也有所区别 通过宏定义CONFIG_DM使能驱动模型,对应的实际驱动设备则需要通过使能CONFI 阅读全文
posted @ 2022-02-23 21:10 liujunhuasd 阅读(1227) 评论(0) 推荐(0) 编辑
摘要: 函数位置在dirver/core/ofnode.c文件 bool ofnode_pre_reloc(ofnode node) { #if defined(CONFIG_SPL_BUILD) || defined(CONFIG_TPL_BUILD) /* for SPL and TPL the rem 阅读全文
posted @ 2022-02-23 21:08 liujunhuasd 阅读(87) 评论(0) 推荐(0) 编辑
摘要: /* * Translate an address from the device-tree into a CPU physical address, * this walks up the tree and applies the various bus mappings on the * way 阅读全文
posted @ 2022-02-23 21:07 liujunhuasd 阅读(195) 评论(0) 推荐(0) 编辑
摘要: const void *fdt_getprop(const void *fdt, int nodeoffset, const char *name, int *lenp) { return fdt_getprop_namelen(fdt, nodeoffset, name, strlen(name) 阅读全文
posted @ 2022-02-23 19:42 liujunhuasd 阅读(588) 评论(0) 推荐(0) 编辑
摘要: fdt_addr_t devfdt_get_addr_index(const struct udevice *dev, int index) { #if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) fdt_addr 阅读全文
posted @ 2022-02-23 13:06 liujunhuasd 阅读(259) 评论(0) 推荐(0) 编辑
摘要: uclass_get_device_by_seq //通过序号从uclass的设备链表中获取udevice,进行probe int uclass_get_device_by_seq(enum uclass_id id, int seq, struct udevice **devp) int ucla 阅读全文
posted @ 2022-02-22 21:55 liujunhuasd 阅读(630) 评论(0) 推荐(0) 编辑
摘要: // 获得device,进行probe// 调用uclass_get_device_tail进行设备的get,最终会调用device_probe来对设备进行probe int uclass_get_device_tail(struct udevice *dev, int ret, struct ud 阅读全文
posted @ 2022-02-22 20:42 liujunhuasd 阅读(299) 评论(0) 推荐(0) 编辑
摘要: #if CONFIG_IS_ENABLED(SERIAL_PRESENT) static int serial_check_stdout(const void *blob, struct udevice **devp) { int node = -1; const char *str, *p, *n 阅读全文
posted @ 2022-02-22 15:48 liujunhuasd 阅读(129) 评论(0) 推荐(0) 编辑
摘要: /** * of_live_active() - check if livetree is active * * @returns true if livetree is active, false it not */ static inline bool of_live_active(void) 阅读全文
posted @ 2022-02-22 15:37 liujunhuasd 阅读(115) 评论(0) 推荐(0) 编辑
摘要: // /** * pinctrl_select_state_full() - full implementation of pinctrl_select_state * * @dev: peripheral device * @statename: state name, like "default 阅读全文
posted @ 2022-02-22 15:35 liujunhuasd 阅读(391) 评论(0) 推荐(0) 编辑