드라이버 로딩을 비활성화하려면 장치 트리를 편집하세요.

드라이버 로딩을 비활성화하려면 장치 트리를 편집하세요.

아래는 장치 트리의 일부입니다.

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>;
            } ;
    } ;
} ;

이는 운영 체제가 이더넷 드라이버를 로드한다는 것을 나타냅니다. 운영체제가 이런 일을 하는 것을 방지하고 싶습니다. 단순히 전체 블록에 주석을 달면 오류를 보고하게 됩니다. 그렇다면 이더넷이 비활성화되고 드라이버가 로드되지 않도록 장치 트리를 어떻게 편집합니까?

답변1

다음을 추가하여 장치 노드를 비활성화할 수 있습니다.

ps7_ethernet_0: ps7-ethernet@e000b000 {
    ...
    status = "disabled";
};

장치 트리 포함 구조에 따라 보드 사양 수준에서 추가해야 합니다. 그렇지 않으면 status = "disabled";어딘가에 덮어 쓸 수 있습니다 status = "okay";.

관련 정보