treewide: backport support for nvmem on non platform devices
[openwrt/openwrt.git] / target / linux / layerscape / patches-5.4 / 701-net-0286-staging-fsl_ppfe-eth-introduce-pfe-driver.patch
index 230238f9a03648e1c815089a9671d4087901d351..13fd4f90d1faebdaf90fc8ec576832a8eddee2f4 100644 (file)
@@ -6638,7 +6638,7 @@ Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi@nxp.com>
 +}
 --- /dev/null
 +++ b/drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c
-@@ -0,0 +1,394 @@
+@@ -0,0 +1,388 @@
 +/*
 + * Copyright 2015-2016 Freescale Semiconductor, Inc.
 + * Copyright 2017 NXP
@@ -6680,7 +6680,6 @@ Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi@nxp.com>
 +      int size;
 +      int ii = 0, phy_id = 0;
 +      const u32 *addr;
-+      const void *mac_addr;
 +
 +      for (ii = 0; ii < if_cnt; ii++) {
 +              gem = of_get_next_child(parent, gem);
@@ -6699,12 +6698,7 @@ Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi@nxp.com>
 +
 +      pdata->ls1012a_eth_pdata[port].gem_id = port;
 +
-+      mac_addr = of_get_mac_address(gem);
-+
-+      if (mac_addr) {
-+              memcpy(pdata->ls1012a_eth_pdata[port].mac_addr, mac_addr,
-+                     ETH_ALEN);
-+      }
++      of_get_mac_address(gem, pdata->ls1012a_eth_pdata[port].mac_addr);
 +
 +      pdata->ls1012a_eth_pdata[port].mii_config = of_get_phy_mode(gem);
 +