aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r--drivers/net/gianfar.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 33de25602b32..dadd08cd801b 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -164,6 +164,9 @@ static int gfar_of_init(struct net_device *dev)
164 struct gfar_private *priv = netdev_priv(dev); 164 struct gfar_private *priv = netdev_priv(dev);
165 struct device_node *np = priv->node; 165 struct device_node *np = priv->node;
166 char bus_name[MII_BUS_ID_SIZE]; 166 char bus_name[MII_BUS_ID_SIZE];
167 const u32 *stash;
168 const u32 *stash_len;
169 const u32 *stash_idx;
167 170
168 if (!np || !of_device_is_available(np)) 171 if (!np || !of_device_is_available(np))
169 return -ENODEV; 172 return -ENODEV;
@@ -193,6 +196,26 @@ static int gfar_of_init(struct net_device *dev)
193 } 196 }
194 } 197 }
195 198
199 stash = of_get_property(np, "bd-stash", NULL);
200
201 if(stash) {
202 priv->device_flags |= FSL_GIANFAR_DEV_HAS_BD_STASHING;
203 priv->bd_stash_en = 1;
204 }
205
206 stash_len = of_get_property(np, "rx-stash-len", NULL);
207
208 if (stash_len)
209 priv->rx_stash_size = *stash_len;
210
211 stash_idx = of_get_property(np, "rx-stash-idx", NULL);
212
213 if (stash_idx)
214 priv->rx_stash_index = *stash_idx;
215
216 if (stash_len || stash_idx)
217 priv->device_flags |= FSL_GIANFAR_DEV_HAS_BUF_STASHING;
218
196 mac_addr = of_get_mac_address(np); 219 mac_addr = of_get_mac_address(np);
197 if (mac_addr) 220 if (mac_addr)
198 memcpy(dev->dev_addr, mac_addr, MAC_ADDR_LEN); 221 memcpy(dev->dev_addr, mac_addr, MAC_ADDR_LEN);