1 dtb文件解析,生成资源单项列表。
start_kernel à setup_arch à unflatten_device_tree
该函数可以解析dtb文件,构建一个由device_node结构连接而成的单项链表。如下在此函数执行过后,在内存中会存在一个如下的链表:
后面所有的函数,如果需要从of tree结构上读取设备资料的,都将从这个链表中遍历并读取。
2 Of_platform总线的注册:
Arch/powerpc/kernel/of_platform.c
postcore_initcall(of_bus_driver_init);
of_bus_type_init(&of_platform_bus_type, "of_platform")
à bus_register(of_platform_bus_type)
同时:bus->match = of_platform_bus_match;
bus->probe = of_platform_device_probe;
of_platform_bus_type总线注册完毕。
3 mdio总线的注册
/driver/net/Phy_device.c