设备树中根节点的模型字段

model field of root node in device tree

我正在探索设备树。看着 imx6l-sabresd.dts

/dts-v1/;

#include "imx6dl.dtsi"
#include "imx6qdl-sabresd.dtsi"

/ {
        model = "Freescale i.MX6 DualLite SABRE Smart Device Board";
        compatible = "fsl,imx6dl-sabresd", "fsl,imx6dl";
};

根节点中有"model"字段。这个字段几乎存在于每个设备树中,但是当我 grep 查找谁在阅读这个模型时。只有 Freescale CPU 机器代码正在访问它。这个字段不是强制性的吗?

jamal@jamal:~/rpi/rpi-build/tmp/work-shared/raspberrypi3/kernel-source$ grep -nr "of_property_read_string(root,"
arch/arm/mach-imx/cpu.c:91: ret = of_property_read_string(root, "model", &soc_dev_attr->machine);
arch/arm/mach-mxs/mach-mxs.c:469:   ret = of_property_read_string(root, "model", &soc_dev_attr->machine); 

谁能解释一下这个字段的意义。

搜索 Linux 源代码找到了内核使用模型字段的位置。它正在控制台上打印值。

./arch/arm/kernel/devtree.c:236:       
 model = of_get_flat_dt_prop(dt_root, "model", NULL);
 pr_info("Machine: %s, model: %s\n", mdesc_best->name, model);