diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-15 15:18:18 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-15 15:18:18 +0000 |
commit | a0720b558c3e2005c4573ea7b04586f078121541 (patch) | |
tree | b999a772126ae5335fce9d18aecc5c8d79f05440 /target/linux/imx6/patches-4.4/208-sky2-allow-mac-to-come-from-dt.patch | |
parent | 2144c554b6ee2947d80fdcccb33a00cff546bfad (diff) | |
download | master-187ad058-a0720b558c3e2005c4573ea7b04586f078121541.tar.gz master-187ad058-a0720b558c3e2005c4573ea7b04586f078121541.tar.bz2 master-187ad058-a0720b558c3e2005c4573ea7b04586f078121541.zip |
imx6: add 4.4 support
Build and boot tested on the following hardware:
* GW54xx
* GW53xx
* GW52xx
* GW51xx
* GW552x
* GW551x
Signed-off-by: Pushpal Sidhu <psidhu@gateworks.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48248 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/imx6/patches-4.4/208-sky2-allow-mac-to-come-from-dt.patch')
-rw-r--r-- | target/linux/imx6/patches-4.4/208-sky2-allow-mac-to-come-from-dt.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/imx6/patches-4.4/208-sky2-allow-mac-to-come-from-dt.patch b/target/linux/imx6/patches-4.4/208-sky2-allow-mac-to-come-from-dt.patch new file mode 100644 index 0000000000..9a94212235 --- /dev/null +++ b/target/linux/imx6/patches-4.4/208-sky2-allow-mac-to-come-from-dt.patch @@ -0,0 +1,28 @@ +--- a/drivers/net/ethernet/marvell/sky2.c ++++ b/drivers/net/ethernet/marvell/sky2.c +@@ -4812,7 +4812,24 @@ static struct net_device *sky2_init_netd + * 1) from device tree data + * 2) from internal registers set by bootloader + */ +- iap = of_get_mac_address(hw->pdev->dev.of_node); ++ ++ iap = NULL; ++ if (IS_ENABLED(CONFIG_OF)) { ++ struct device_node *np; ++ np = of_find_node_by_path("/aliases"); ++ if (np) { ++ const char *path = of_get_property(np, "sky2", NULL); ++ if (path) ++ np = of_find_node_by_path(path); ++ if (np) ++ path = of_get_mac_address(np); ++ if (path) ++ iap = (unsigned char *) path; ++ } ++ } ++ ++ if (!iap) ++ iap = of_get_mac_address(hw->pdev->dev.of_node); + if (iap) + memcpy(dev->dev_addr, iap, ETH_ALEN); + else |