我为我的custom_hardware开发了一个工作驱动程序,它依赖于设备树。因为我的驱动程序可能会发展,所以我不希望我的驱动程序成为内核的一部分(当我说“成为内核的一部分”时,我的意思是在内核创建期间与内核一起编译)
这是我的dts的一瞥:
custom_hardware: custom_hardware@0x41006000 {
compatible = "mfg,custom";
reg = <0x41006000 0x1000>;
#interrupt-cells = <0x1>;
interrupt-controller;
};
existing_hardware: existing_hardward@41004000 {
compatible = "mfg,existing";
reg = <0x41004000 0x1000>;
interrupt-parent = <&custom_hardware>;
interrupts = <0>;
};
existing_hardware的驱动程序已经与内核一起编译(existing_hardware的驱动程序在内核创建期间已与内核一起编译)。
我想做的是将我的custom_hardware的驱动程序附加到 ramfs 并让内核在 existing_hardware 的驱动程序之前加载 custom_hardware的驱动程序。
这很重要,因为existing_hardware的驱动程序从custom_hardware的驱动程序的irq_domain请求一个virq。为了获得irq_domain,必须首先加载custom_hardware的驱动程序。
请注意,existing_hardware的驱动程序在设备树的探测过程中被加载,这似乎发生在内核启动序列的早期阶段。