usbphyc 60 drivers/phy/st/phy-stm32-usbphyc.c struct stm32_usbphyc *usbphyc; usbphyc 113 drivers/phy/st/phy-stm32-usbphyc.c static int stm32_usbphyc_pll_init(struct stm32_usbphyc *usbphyc) usbphyc 116 drivers/phy/st/phy-stm32-usbphyc.c u32 clk_rate = clk_get_rate(usbphyc->clk); usbphyc 122 drivers/phy/st/phy-stm32-usbphyc.c dev_err(usbphyc->dev, "input clk freq (%dHz) out of range\n", usbphyc 136 drivers/phy/st/phy-stm32-usbphyc.c writel_relaxed(usbphyc_pll, usbphyc->base + STM32_USBPHYC_PLL); usbphyc 138 drivers/phy/st/phy-stm32-usbphyc.c dev_dbg(usbphyc->dev, "input clk freq=%dHz, ndiv=%lu, frac=%lu\n", usbphyc 145 drivers/phy/st/phy-stm32-usbphyc.c static bool stm32_usbphyc_has_one_phy_active(struct stm32_usbphyc *usbphyc) usbphyc 149 drivers/phy/st/phy-stm32-usbphyc.c for (i = 0; i < usbphyc->nphys; i++) usbphyc 150 drivers/phy/st/phy-stm32-usbphyc.c if (usbphyc->phys[i]->active) usbphyc 156 drivers/phy/st/phy-stm32-usbphyc.c static int stm32_usbphyc_pll_enable(struct stm32_usbphyc *usbphyc) usbphyc 158 drivers/phy/st/phy-stm32-usbphyc.c void __iomem *pll_reg = usbphyc->base + STM32_USBPHYC_PLL; usbphyc 163 drivers/phy/st/phy-stm32-usbphyc.c if (pllen && stm32_usbphyc_has_one_phy_active(usbphyc)) usbphyc 172 drivers/phy/st/phy-stm32-usbphyc.c ret = stm32_usbphyc_pll_init(usbphyc); usbphyc 182 drivers/phy/st/phy-stm32-usbphyc.c dev_err(usbphyc->dev, "PLLEN not set\n"); usbphyc 189 drivers/phy/st/phy-stm32-usbphyc.c static int stm32_usbphyc_pll_disable(struct stm32_usbphyc *usbphyc) usbphyc 191 drivers/phy/st/phy-stm32-usbphyc.c void __iomem *pll_reg = usbphyc->base + STM32_USBPHYC_PLL; usbphyc 194 drivers/phy/st/phy-stm32-usbphyc.c if (stm32_usbphyc_has_one_phy_active(usbphyc)) usbphyc 202 drivers/phy/st/phy-stm32-usbphyc.c dev_err(usbphyc->dev, "PLL not reset\n"); usbphyc 212 drivers/phy/st/phy-stm32-usbphyc.c struct stm32_usbphyc *usbphyc = usbphyc_phy->usbphyc; usbphyc 215 drivers/phy/st/phy-stm32-usbphyc.c ret = stm32_usbphyc_pll_enable(usbphyc); usbphyc 227 drivers/phy/st/phy-stm32-usbphyc.c struct stm32_usbphyc *usbphyc = usbphyc_phy->usbphyc; usbphyc 231 drivers/phy/st/phy-stm32-usbphyc.c return stm32_usbphyc_pll_disable(usbphyc); usbphyc 256 drivers/phy/st/phy-stm32-usbphyc.c static void stm32_usbphyc_switch_setup(struct stm32_usbphyc *usbphyc, usbphyc 260 drivers/phy/st/phy-stm32-usbphyc.c stm32_usbphyc_clr_bits(usbphyc->base + STM32_USBPHYC_MISC, usbphyc 263 drivers/phy/st/phy-stm32-usbphyc.c stm32_usbphyc_set_bits(usbphyc->base + STM32_USBPHYC_MISC, usbphyc 265 drivers/phy/st/phy-stm32-usbphyc.c usbphyc->switch_setup = utmi_switch; usbphyc 271 drivers/phy/st/phy-stm32-usbphyc.c struct stm32_usbphyc *usbphyc = dev_get_drvdata(dev); usbphyc 276 drivers/phy/st/phy-stm32-usbphyc.c for (port = 0; port < usbphyc->nphys; port++) { usbphyc 277 drivers/phy/st/phy-stm32-usbphyc.c if (phynode == usbphyc->phys[port]->phy->dev.of_node) { usbphyc 278 drivers/phy/st/phy-stm32-usbphyc.c usbphyc_phy = usbphyc->phys[port]; usbphyc 296 drivers/phy/st/phy-stm32-usbphyc.c if (usbphyc->switch_setup < 0) { usbphyc 297 drivers/phy/st/phy-stm32-usbphyc.c stm32_usbphyc_switch_setup(usbphyc, args->args[0]); usbphyc 299 drivers/phy/st/phy-stm32-usbphyc.c if (args->args[0] != usbphyc->switch_setup) { usbphyc 311 drivers/phy/st/phy-stm32-usbphyc.c struct stm32_usbphyc *usbphyc; usbphyc 319 drivers/phy/st/phy-stm32-usbphyc.c usbphyc = devm_kzalloc(dev, sizeof(*usbphyc), GFP_KERNEL); usbphyc 320 drivers/phy/st/phy-stm32-usbphyc.c if (!usbphyc) usbphyc 322 drivers/phy/st/phy-stm32-usbphyc.c usbphyc->dev = dev; usbphyc 323 drivers/phy/st/phy-stm32-usbphyc.c dev_set_drvdata(dev, usbphyc); usbphyc 326 drivers/phy/st/phy-stm32-usbphyc.c usbphyc->base = devm_ioremap_resource(dev, res); usbphyc 327 drivers/phy/st/phy-stm32-usbphyc.c if (IS_ERR(usbphyc->base)) usbphyc 328 drivers/phy/st/phy-stm32-usbphyc.c return PTR_ERR(usbphyc->base); usbphyc 330 drivers/phy/st/phy-stm32-usbphyc.c usbphyc->clk = devm_clk_get(dev, 0); usbphyc 331 drivers/phy/st/phy-stm32-usbphyc.c if (IS_ERR(usbphyc->clk)) { usbphyc 332 drivers/phy/st/phy-stm32-usbphyc.c ret = PTR_ERR(usbphyc->clk); usbphyc 337 drivers/phy/st/phy-stm32-usbphyc.c ret = clk_prepare_enable(usbphyc->clk); usbphyc 343 drivers/phy/st/phy-stm32-usbphyc.c usbphyc->rst = devm_reset_control_get(dev, 0); usbphyc 344 drivers/phy/st/phy-stm32-usbphyc.c if (!IS_ERR(usbphyc->rst)) { usbphyc 345 drivers/phy/st/phy-stm32-usbphyc.c reset_control_assert(usbphyc->rst); usbphyc 347 drivers/phy/st/phy-stm32-usbphyc.c reset_control_deassert(usbphyc->rst); usbphyc 350 drivers/phy/st/phy-stm32-usbphyc.c usbphyc->switch_setup = -EINVAL; usbphyc 351 drivers/phy/st/phy-stm32-usbphyc.c usbphyc->nphys = of_get_child_count(np); usbphyc 352 drivers/phy/st/phy-stm32-usbphyc.c usbphyc->phys = devm_kcalloc(dev, usbphyc->nphys, usbphyc 353 drivers/phy/st/phy-stm32-usbphyc.c sizeof(*usbphyc->phys), GFP_KERNEL); usbphyc 354 drivers/phy/st/phy-stm32-usbphyc.c if (!usbphyc->phys) { usbphyc 394 drivers/phy/st/phy-stm32-usbphyc.c if (ret || index > usbphyc->nphys) { usbphyc 399 drivers/phy/st/phy-stm32-usbphyc.c usbphyc->phys[port] = usbphyc_phy; usbphyc 403 drivers/phy/st/phy-stm32-usbphyc.c usbphyc->phys[port]->phy = phy; usbphyc 404 drivers/phy/st/phy-stm32-usbphyc.c usbphyc->phys[port]->usbphyc = usbphyc; usbphyc 405 drivers/phy/st/phy-stm32-usbphyc.c usbphyc->phys[port]->index = index; usbphyc 406 drivers/phy/st/phy-stm32-usbphyc.c usbphyc->phys[port]->active = false; usbphyc 419 drivers/phy/st/phy-stm32-usbphyc.c version = readl_relaxed(usbphyc->base + STM32_USBPHYC_VERSION); usbphyc 428 drivers/phy/st/phy-stm32-usbphyc.c clk_disable_unprepare(usbphyc->clk); usbphyc 435 drivers/phy/st/phy-stm32-usbphyc.c struct stm32_usbphyc *usbphyc = dev_get_drvdata(&pdev->dev); usbphyc 437 drivers/phy/st/phy-stm32-usbphyc.c clk_disable_unprepare(usbphyc->clk);