Lines Matching refs:gphy_fw
277 struct gswip_gphy_fw *gphy_fw; member
1872 static int gswip_gphy_fw_load(struct gswip_priv *priv, struct gswip_gphy_fw *gphy_fw) in gswip_gphy_fw_load() argument
1882 ret = clk_prepare_enable(gphy_fw->clk_gate); in gswip_gphy_fw_load()
1886 reset_control_assert(gphy_fw->reset); in gswip_gphy_fw_load()
1894 ret = request_firmware(&fw, gphy_fw->fw_name, dev); in gswip_gphy_fw_load()
1897 gphy_fw->fw_name, ret); in gswip_gphy_fw_load()
1919 ret = regmap_write(priv->rcu_regmap, gphy_fw->fw_addr_offset, dev_addr); in gswip_gphy_fw_load()
1923 reset_control_deassert(gphy_fw->reset); in gswip_gphy_fw_load()
1929 struct gswip_gphy_fw *gphy_fw, in gswip_gphy_fw_probe() argument
1939 gphy_fw->clk_gate = devm_clk_get(dev, gphyname); in gswip_gphy_fw_probe()
1940 if (IS_ERR(gphy_fw->clk_gate)) { in gswip_gphy_fw_probe()
1942 return PTR_ERR(gphy_fw->clk_gate); in gswip_gphy_fw_probe()
1945 ret = of_property_read_u32(gphy_fw_np, "reg", &gphy_fw->fw_addr_offset); in gswip_gphy_fw_probe()
1956 gphy_fw->fw_name = priv->gphy_fw_name_cfg->fe_firmware_name; in gswip_gphy_fw_probe()
1959 gphy_fw->fw_name = priv->gphy_fw_name_cfg->ge_firmware_name; in gswip_gphy_fw_probe()
1966 gphy_fw->reset = of_reset_control_array_get_exclusive(gphy_fw_np); in gswip_gphy_fw_probe()
1967 if (IS_ERR(gphy_fw->reset)) { in gswip_gphy_fw_probe()
1968 if (PTR_ERR(gphy_fw->reset) != -EPROBE_DEFER) in gswip_gphy_fw_probe()
1970 return PTR_ERR(gphy_fw->reset); in gswip_gphy_fw_probe()
1973 return gswip_gphy_fw_load(priv, gphy_fw); in gswip_gphy_fw_probe()
1977 struct gswip_gphy_fw *gphy_fw) in gswip_gphy_fw_remove() argument
1982 if (!gphy_fw->fw_name) in gswip_gphy_fw_remove()
1985 ret = regmap_write(priv->rcu_regmap, gphy_fw->fw_addr_offset, 0); in gswip_gphy_fw_remove()
1989 clk_disable_unprepare(gphy_fw->clk_gate); in gswip_gphy_fw_remove()
1991 reset_control_put(gphy_fw->reset); in gswip_gphy_fw_remove()
2039 priv->gphy_fw = devm_kmalloc_array(dev, priv->num_gphy_fw, in gswip_gphy_fw_list()
2040 sizeof(*priv->gphy_fw), in gswip_gphy_fw_list()
2042 if (!priv->gphy_fw) in gswip_gphy_fw_list()
2046 err = gswip_gphy_fw_probe(priv, &priv->gphy_fw[i], in gswip_gphy_fw_list()
2067 gswip_gphy_fw_remove(priv, &priv->gphy_fw[i]); in gswip_gphy_fw_list()
2178 gswip_gphy_fw_remove(priv, &priv->gphy_fw[i]); in gswip_probe()
2201 gswip_gphy_fw_remove(priv, &priv->gphy_fw[i]); in gswip_remove()