mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 06:57:57 +00:00
mpc85xx: replace user space MAC with nvmem
Possible now that NVMEM supports ASCII. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
ddbe732357
commit
931fcf6189
@ -8,11 +8,6 @@ preinit_set_mac_address() {
|
|||||||
ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr)
|
ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr)
|
||||||
ip link set dev eth1 address $(mtd_get_mac_ascii cfg1 eth1addr)
|
ip link set dev eth1 address $(mtd_get_mac_ascii cfg1 eth1addr)
|
||||||
;;
|
;;
|
||||||
watchguard,firebox-t10)
|
|
||||||
ip link set dev eth0 address "$(mtd_get_mac_text "device_id" 0x1830)"
|
|
||||||
ip link set dev eth1 address "$(mtd_get_mac_text "device_id" 0x1844)"
|
|
||||||
ip link set dev eth2 address "$(mtd_get_mac_text "device_id" 0x1858)"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,6 +103,24 @@
|
|||||||
reg = <0xc0000 0x40000>;
|
reg = <0xc0000 0x40000>;
|
||||||
label = "device_id";
|
label = "device_id";
|
||||||
read-only;
|
read-only;
|
||||||
|
|
||||||
|
nvmem-layout {
|
||||||
|
compatible = "fixed-layout";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_device_id_1830: mac-address-hex@1830 {
|
||||||
|
reg = <0x1830 0xc>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_device_id_1844: mac-address-hex@1844 {
|
||||||
|
reg = <0x1844 0xc>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_device_id_1858: mac-address-hex@1858 {
|
||||||
|
reg = <0x1858 0xc>;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -147,18 +165,27 @@
|
|||||||
enet0: ethernet@b0000 {
|
enet0: ethernet@b0000 {
|
||||||
phy-handle = <&phy1>;
|
phy-handle = <&phy1>;
|
||||||
phy-connection-type = "rgmii-id";
|
phy-connection-type = "rgmii-id";
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_device_id_1830>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
};
|
};
|
||||||
|
|
||||||
enet1: ethernet@b1000 {
|
enet1: ethernet@b1000 {
|
||||||
tbi-handle = <&tbi_phy1>;
|
tbi-handle = <&tbi_phy1>;
|
||||||
phy-handle = <&phy2>;
|
phy-handle = <&phy2>;
|
||||||
phy-connection-type = "sgmii";
|
phy-connection-type = "sgmii";
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_device_id_1844>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
};
|
};
|
||||||
|
|
||||||
enet2: ethernet@b2000 {
|
enet2: ethernet@b2000 {
|
||||||
tbi-handle = <&tbi_phy2>;
|
tbi-handle = <&tbi_phy2>;
|
||||||
phy-handle = <&phy3>;
|
phy-handle = <&phy3>;
|
||||||
phy-connection-type = "sgmii";
|
phy-connection-type = "sgmii";
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_device_id_1858>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
};
|
};
|
||||||
|
|
||||||
sdhc@2e000 {
|
sdhc@2e000 {
|
||||||
|
Loading…
Reference in New Issue
Block a user