在335x的设备树中,找到了下面两句,然后再sourceinsight中把/arch/arm目录下的所有文件都包含进来,分别搜索了一下 ti-am335x-evm,ti,am33xx。为什么找不到板级文件? 内核是4.15的应该,也没有在/arch/arm/mach-omap2下找到board-am335xevm.c,难道是335x不需用板级文件?
model = "TI AM335x EVM";
compatible = "ti,am335x-evm", "ti,am33xx";
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
找到了,原来是匹配的“ti.am33xx",在arch/arm/mach-omap2的board-generic.c中,有这么几行代码
#ifdef CONFIG_SOC_AM33XX
static const char *const am33xx_boards_compat[] __initconst = {
"ti,am33xx",
NULL,
};
DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
.reserve = omap_reserve,
.map_io = am33xx_map_io,
.init_early = am33xx_init_early,
.init_machine = omap_generic_init,
.init_late = am33xx_init_late,
.init_time = omap3_gptimer_timer_init,
.dt_compat = am33xx_boards_compat,
.restart = am33xx_restart,
MACHINE_END
#endif
匹配的是DT_MACHINE_START,而不是MACHINE_START。