+module_exit(dpa_ptp_unload);
--- /dev/null
+++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac-api.c
-@@ -0,0 +1,907 @@
+@@ -0,0 +1,909 @@
+/* Copyright 2008-2012 Freescale Semiconductor, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+};
--- /dev/null
+++ b/drivers/net/ethernet/freescale/sdk_dpaa/mac.c
-@@ -0,0 +1,489 @@
+@@ -0,0 +1,486 @@
+/* Copyright 2008-2012 Freescale Semiconductor, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ mac_dev->cell_index -= 8;
+
+ /* Get the MAC address */
-+ of_get_mac_address(mac_node, mac_dev->addr);
-+ if (unlikely(!is_valid_ether_addr(mac_dev->addr))) {
++ _errno = of_get_mac_address(mac_node, mac_dev->addr);
++ if (unlikely(_errno)) {
+ dev_err(dev, "of_get_mac_address(%s) failed\n",
+ mac_node->full_name);
-+ _errno = -EINVAL;
+ goto _return_dev_set_drvdata;
+ }
+
struct dsa_switch_driver {
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
-@@ -325,6 +325,10 @@ static int dsa_port_setup(struct dsa_por
+@@ -323,6 +323,10 @@ static int dsa_port_setup(struct dsa_por
if (err)
break;
--- a/drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c
+++ b/drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c
-@@ -89,11 +89,12 @@ static int pfe_get_gemac_if_proprties(st
+@@ -83,11 +83,12 @@ static int pfe_get_gemac_if_proprties(st
}
addr = of_get_property(gem, "fsl,mdio-mux-val", &size);
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/clk.h>
-@@ -124,6 +126,8 @@ static int pfe_get_gemac_if_proprties(st
+@@ -118,6 +120,8 @@ static int pfe_get_gemac_if_proprties(st
pdata->ls1012a_mdio_pdata[port].irq[0] = PHY_POLL;
done:
addr = of_get_property(gem, "fsl,gemac-bus-id", &size);
if (!addr)
pr_err("%s:%d Invalid gemac-bus-id....\n", __func__,
-@@ -68,16 +61,55 @@ static int pfe_get_gemac_if_proprties(st
+@@ -62,16 +56,55 @@ static int pfe_get_gemac_if_proprties(st
else
pdata->ls1012a_eth_pdata[port].bus_id = be32_to_cpup(addr);
addr = of_get_property(gem, "fsl,mdio-mux-val", &size);
if (!addr) {
pr_err("%s: Invalid mdio-mux-val....\n", __func__);
-@@ -90,33 +122,10 @@ static int pfe_get_gemac_if_proprties(st
+@@ -84,33 +117,10 @@ static int pfe_get_gemac_if_proprties(st
pfe->mdio_muxval[pdata->ls1012a_eth_pdata[port].phy_id] =
pdata->ls1012a_eth_pdata[port].mdio_muxval;
return 0;
err:
-@@ -218,8 +227,8 @@ static int pfe_platform_probe(struct pla
+@@ -212,8 +222,8 @@ static int pfe_platform_probe(struct pla
pfe_platform_data.ls1012a_mdio_pdata[0].phy_mask = 0xffffffff;
for (ii = 0; ii < interface_count; ii++) {
struct ls1012a_pfe_platform_data pfe_platform_data;
static int pfe_get_gemac_if_properties(struct device_node *parent, int port, int
-@@ -64,8 +65,10 @@ static int pfe_get_gemac_if_properties(s
+@@ -59,8 +60,10 @@ static int pfe_get_gemac_if_properties(s
phy_node = of_parse_phandle(gem, "phy-handle", 0);
pdata->ls1012a_eth_pdata[port].phy_node = phy_node;
if (phy_node) {
if (of_phy_register_fixed_link(gem) < 0) {
pr_err("broken fixed-link specification\n");
goto err;
-@@ -73,6 +76,7 @@ static int pfe_get_gemac_if_properties(s
+@@ -68,6 +71,7 @@ static int pfe_get_gemac_if_properties(s
phy_node = of_node_get(gem);
pdata->ls1012a_eth_pdata[port].phy_node = phy_node;
} else if (of_get_property(gem, "fsl,pfe-phy-if-flags", &size)) {
u8 mac_addr[ETH_ALEN];
--- a/drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c
+++ b/drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c
-@@ -55,13 +55,6 @@ static int pfe_get_gemac_if_properties(s
- ETH_ALEN);
- }
+@@ -50,13 +50,6 @@ static int pfe_get_gemac_if_properties(s
+
+ of_get_mac_address(gem, pdata->ls1012a_eth_pdata[port].mac_addr);
- addr = of_get_property(gem, "fsl,gemac-bus-id", &size);
- if (!addr)
int pfe_eth_suspend(struct net_device *dev);
--- a/drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c
+++ b/drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c
-@@ -21,31 +21,18 @@
+@@ -21,30 +21,17 @@
extern bool pfe_use_old_dts_phy;
struct ls1012a_pfe_platform_data pfe_platform_data;
- int ii = 0, phy_id = 0;
+ int phy_id = 0;
const u32 *addr;
- const void *mac_addr;
- for (ii = 0; ii < if_cnt; ii++) {
- gem = of_get_next_child(parent, gem);
pdata->ls1012a_eth_pdata[port].gem_id = port;
-@@ -88,14 +75,6 @@ static int pfe_get_gemac_if_properties(s
+@@ -83,14 +70,6 @@ static int pfe_get_gemac_if_properties(s
if (pdata->ls1012a_eth_pdata[port].phy_flags & GEMAC_NO_PHY)
goto done;
} else {
pr_info("%s: No PHY or fixed-link\n", __func__);
return 0;
-@@ -140,7 +119,7 @@ static int pfe_platform_probe(struct pla
+@@ -135,7 +114,7 @@ static int pfe_platform_probe(struct pla
struct resource res;
int ii, rc, interface_count = 0, size = 0;
const u32 *prop;
struct clk *pfe_clk;
np = pdev->dev.of_node;
-@@ -224,8 +203,13 @@ static int pfe_platform_probe(struct pla
+@@ -219,8 +198,13 @@ static int pfe_platform_probe(struct pla
pfe_platform_data.ls1012a_mdio_pdata[0].phy_mask = 0xffffffff;
for (ii = 0; ii < interface_count; ii++) {
}
pfe->dev = &pdev->dev;
-@@ -347,8 +331,8 @@ static int pfe_platform_resume(struct de
+@@ -342,8 +326,8 @@ static int pfe_platform_resume(struct de
for (i = 0; i < (NUM_GEMAC_SUPPORT); i++) {
netdev = pfe->eth.eth_priv[i]->ndev;
--- a/drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c
+++ b/drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c
-@@ -148,9 +148,10 @@ static int pfe_platform_probe(struct pla
+@@ -143,9 +143,10 @@ static int pfe_platform_probe(struct pla
pfe->ddr_phys_baseaddr = res.start;
pfe->ddr_size = resource_size(&res);
rc = -ENOMEM;
goto err_ddr;
}
-@@ -240,7 +241,7 @@ err_hif_irq:
+@@ -235,7 +236,7 @@ err_hif_irq:
iounmap(pfe->cbus_baseaddr);
err_axi:
err_ddr:
platform_set_drvdata(pdev, NULL);
-@@ -264,7 +265,8 @@ static int pfe_platform_remove(struct pl
+@@ -259,7 +260,8 @@ static int pfe_platform_remove(struct pl
rc = pfe_remove(pfe);
iounmap(pfe->cbus_baseaddr);
--- a/drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c
+++ b/drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c
-@@ -29,15 +29,19 @@ static int pfe_get_gemac_if_properties(s
- int size;
- int phy_id = 0;
+@@ -31,7 +31,11 @@ static int pfe_get_gemac_if_properties(s
const u32 *addr;
-- const void *mac_addr;
-+ const u8 *mac_addr;
addr = of_get_property(gem, "reg", &size);
- port = be32_to_cpup(addr);