下面是设备树的一部分。
ps7_ethernet_0: ps7-ethernet@e000b000 {
#address-cells = <1>;
#size-cells = <0>;
clock-names = "ref_clk", "aper_clk";
clocks = <&clkc 13>, <&clkc 30>;
/* compatible = "xlnx,ps7-ethernet-1.00.a";*/
interrupt-parent = <&ps7_scugic_0>;
interrupts = <0 22 4>;
local-mac-address = [ 00 0a 35 00 6a 3e ];
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
reg = <0xe000b000 0x1000>;
xlnx,enet-reset = "MIO 11";
xlnx,eth-mode = <0x1>;
xlnx,has-mdio = <0x1>;
xlnx,ptp-enet-clock = <111111115>;
mdio {
#address-cells = <1>;
#size-cells = <0>;
phy0: phy@7 {
compatible = "marvell,88e1116r";
device_type = "ethernet-phy";
reg = <7>;
} ;
} ;
} ;
这表明操作系统将加载以太网驱动程序。我想阻止操作系统这样做。当我简单地评论整个块时,make报告错误。那么如何编辑设备树以便禁用以太网并且不加载 drievr?
答案1
您可以通过添加以下内容来禁用设备节点:
ps7_ethernet_0: ps7-ethernet@e000b000 {
...
status = "disabled";
};
根据您的设备树包含结构,您应该在板规范级别添加它。否则有可能被 status = "disabled";
某个地方覆盖status = "okay";
。