aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
index 826626e870d5..03b11f191c26 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
@@ -288,10 +288,7 @@ static int ipq806x_gmac_probe(struct platform_device *pdev)
288 val &= ~NSS_COMMON_GMAC_CTL_PHY_IFACE_SEL; 288 val &= ~NSS_COMMON_GMAC_CTL_PHY_IFACE_SEL;
289 break; 289 break;
290 default: 290 default:
291 dev_err(&pdev->dev, "Unsupported PHY mode: \"%s\"\n", 291 goto err_unsupported_phy;
292 phy_modes(gmac->phy_mode));
293 err = -EINVAL;
294 goto err_remove_config_dt;
295 } 292 }
296 regmap_write(gmac->nss_common, NSS_COMMON_GMAC_CTL(gmac->id), val); 293 regmap_write(gmac->nss_common, NSS_COMMON_GMAC_CTL(gmac->id), val);
297 294
@@ -308,10 +305,7 @@ static int ipq806x_gmac_probe(struct platform_device *pdev)
308 NSS_COMMON_CLK_SRC_CTRL_OFFSET(gmac->id); 305 NSS_COMMON_CLK_SRC_CTRL_OFFSET(gmac->id);
309 break; 306 break;
310 default: 307 default:
311 dev_err(&pdev->dev, "Unsupported PHY mode: \"%s\"\n", 308 goto err_unsupported_phy;
312 phy_modes(gmac->phy_mode));
313 err = -EINVAL;
314 goto err_remove_config_dt;
315 } 309 }
316 regmap_write(gmac->nss_common, NSS_COMMON_CLK_SRC_CTRL, val); 310 regmap_write(gmac->nss_common, NSS_COMMON_CLK_SRC_CTRL, val);
317 311
@@ -328,8 +322,7 @@ static int ipq806x_gmac_probe(struct platform_device *pdev)
328 NSS_COMMON_CLK_GATE_GMII_TX_EN(gmac->id); 322 NSS_COMMON_CLK_GATE_GMII_TX_EN(gmac->id);
329 break; 323 break;
330 default: 324 default:
331 /* We don't get here; the switch above will have errored out */ 325 goto err_unsupported_phy;
332 unreachable();
333 } 326 }
334 regmap_write(gmac->nss_common, NSS_COMMON_CLK_GATE, val); 327 regmap_write(gmac->nss_common, NSS_COMMON_CLK_GATE, val);
335 328
@@ -351,6 +344,8 @@ static int ipq806x_gmac_probe(struct platform_device *pdev)
351 plat_dat->bsp_priv = gmac; 344 plat_dat->bsp_priv = gmac;
352 plat_dat->fix_mac_speed = ipq806x_gmac_fix_mac_speed; 345 plat_dat->fix_mac_speed = ipq806x_gmac_fix_mac_speed;
353 plat_dat->multicast_filter_bins = 0; 346 plat_dat->multicast_filter_bins = 0;
347 plat_dat->tx_fifo_size = 8192;
348 plat_dat->rx_fifo_size = 8192;
354 349
355 err = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); 350 err = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
356 if (err) 351 if (err)
@@ -358,6 +353,11 @@ static int ipq806x_gmac_probe(struct platform_device *pdev)
358 353
359 return 0; 354 return 0;
360 355
356err_unsupported_phy:
357 dev_err(&pdev->dev, "Unsupported PHY mode: \"%s\"\n",
358 phy_modes(gmac->phy_mode));
359 err = -EINVAL;
360
361err_remove_config_dt: 361err_remove_config_dt:
362 stmmac_remove_config_dt(pdev, plat_dat); 362 stmmac_remove_config_dt(pdev, plat_dat);
363 363