|
@@ -109,16 +109,9 @@ static int oxnas_dwmac_probe(struct platform_device *pdev)
|
|
{
|
|
{
|
|
struct plat_stmmacenet_data *plat_dat;
|
|
struct plat_stmmacenet_data *plat_dat;
|
|
struct stmmac_resources stmmac_res;
|
|
struct stmmac_resources stmmac_res;
|
|
- struct device_node *sysctrl;
|
|
|
|
struct oxnas_dwmac *dwmac;
|
|
struct oxnas_dwmac *dwmac;
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
- sysctrl = of_parse_phandle(pdev->dev.of_node, "oxsemi,sys-ctrl", 0);
|
|
|
|
- if (!sysctrl) {
|
|
|
|
- dev_err(&pdev->dev, "failed to get sys-ctrl node\n");
|
|
|
|
- return -EINVAL;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
ret = stmmac_get_platform_resources(pdev, &stmmac_res);
|
|
ret = stmmac_get_platform_resources(pdev, &stmmac_res);
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
@@ -134,7 +127,8 @@ static int oxnas_dwmac_probe(struct platform_device *pdev)
|
|
dwmac->dev = &pdev->dev;
|
|
dwmac->dev = &pdev->dev;
|
|
plat_dat->bsp_priv = dwmac;
|
|
plat_dat->bsp_priv = dwmac;
|
|
|
|
|
|
- dwmac->regmap = syscon_node_to_regmap(sysctrl);
|
|
|
|
|
|
+ dwmac->regmap = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
|
|
|
|
+ "oxsemi,sys-ctrl");
|
|
if (IS_ERR(dwmac->regmap)) {
|
|
if (IS_ERR(dwmac->regmap)) {
|
|
dev_err(&pdev->dev, "failed to have sysctrl regmap\n");
|
|
dev_err(&pdev->dev, "failed to have sysctrl regmap\n");
|
|
return PTR_ERR(dwmac->regmap);
|
|
return PTR_ERR(dwmac->regmap);
|