3
我正在編譯OpenWrt(基於Linux的無線路由器),我在OpenWrt源代碼中添加了一個板,我的板上有兩個uart端口,我可以聲明並啓用兩個uart端口,兩個uart端口分別命名爲'uartfull '和'uartlite'。如何在設備樹(.dts)文件中爲uart指定設備名稱?
'uartlite'被註冊到'/ dev/ttyS1','uartfull'被註冊到'/ dev/ttyS0'。但是我想要uartlite把'/ dev/ttyS0'和'uartfull'改爲'/ dev/ttyS1'。
[email protected] {
compatible = "ralink,rt5350-uart", "ralink,rt2880-uart", "ns16550a";
reg = <0xc00 0x100>;
resets = <&rstctrl 19>;
reset-names = "uartl";
interrupt-parent = <&intc>;
interrupts = <12>;
reg-shift = <2>;
};
[email protected] {
compatible = "ralink,rt5350-uart", "ralink,rt2880-uart", "ns16550a";
reg = <0x500 0x100>;
resets = <&rstctrl 12>;
reset-names = "uart";
interrupt-parent = <&intc>;
interrupts = <5>;
reg-shift = <2>;
status = "okay";
};
這是我的dts文件中的'uartfull'(名稱uart)和'uartlite'節點。我猜是什麼決定了設備名稱(/ dev/ttyS0/dev/ttyS1等),我可以強制這兩個uart節點的設備名稱。
更改塊的順序。 – VivekD