Lines Matching +full:dwmac +full:- +full:4
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Adaptrum Anarion DWMAC glue layer
18 #define GMAC_SW_CONFIG_REG 4
29 return readl(gmac->ctl_block + reg); in gmac_read_reg()
34 writel(val, gmac->ctl_block + reg); in gmac_write_reg()
47 sw_config |= (gmac->phy_intf_sel & GMAC_CONFIG_INTF_SEL_MASK); in anarion_gmac_init()
72 dev_err(&pdev->dev, "Cannot get reset region (%d)!\n", err); in anarion_config_dt()
76 gmac = devm_kzalloc(&pdev->dev, sizeof(*gmac), GFP_KERNEL); in anarion_config_dt()
78 return ERR_PTR(-ENOMEM); in anarion_config_dt()
80 gmac->ctl_block = ctl_block; in anarion_config_dt()
82 err = of_get_phy_mode(pdev->dev.of_node, &phy_mode); in anarion_config_dt()
92 gmac->phy_intf_sel = GMAC_CONFIG_INTF_RGMII; in anarion_config_dt()
95 dev_err(&pdev->dev, "Unsupported phy-mode (%d)\n", in anarion_config_dt()
97 return ERR_PTR(-ENOTSUPP); in anarion_config_dt()
122 plat_dat->init = anarion_gmac_init; in anarion_dwmac_probe()
123 plat_dat->exit = anarion_gmac_exit; in anarion_dwmac_probe()
125 plat_dat->bsp_priv = gmac; in anarion_dwmac_probe()
127 return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); in anarion_dwmac_probe()
131 { .compatible = "adaptrum,anarion-gmac" },
140 .name = "anarion-dwmac",
147 MODULE_DESCRIPTION("Adaptrum Anarion DWMAC specific glue layer");