xvcu 294 drivers/soc/xilinx/xlnx_vcu.c static int xvcu_set_vcu_pll_info(struct xvcu_device *xvcu) xvcu 303 drivers/soc/xilinx/xlnx_vcu.c inte = xvcu_read(xvcu->logicore_reg_ba, VCU_PLL_CLK); xvcu 304 drivers/soc/xilinx/xlnx_vcu.c deci = xvcu_read(xvcu->logicore_reg_ba, VCU_PLL_CLK_DEC); xvcu 305 drivers/soc/xilinx/xlnx_vcu.c coreclk = xvcu_read(xvcu->logicore_reg_ba, VCU_CORE_CLK) * MHZ; xvcu 306 drivers/soc/xilinx/xlnx_vcu.c mcuclk = xvcu_read(xvcu->logicore_reg_ba, VCU_MCU_CLK) * MHZ; xvcu 308 drivers/soc/xilinx/xlnx_vcu.c dev_err(xvcu->dev, "Invalid mcu and core clock data\n"); xvcu 313 drivers/soc/xilinx/xlnx_vcu.c dev_dbg(xvcu->dev, "Ref clock from logicoreIP is %uHz\n", refclk); xvcu 314 drivers/soc/xilinx/xlnx_vcu.c dev_dbg(xvcu->dev, "Core clock from logicoreIP is %uHz\n", coreclk); xvcu 315 drivers/soc/xilinx/xlnx_vcu.c dev_dbg(xvcu->dev, "Mcu clock from logicoreIP is %uHz\n", mcuclk); xvcu 317 drivers/soc/xilinx/xlnx_vcu.c clk_disable_unprepare(xvcu->pll_ref); xvcu 318 drivers/soc/xilinx/xlnx_vcu.c ret = clk_set_rate(xvcu->pll_ref, refclk); xvcu 320 drivers/soc/xilinx/xlnx_vcu.c dev_warn(xvcu->dev, "failed to set logicoreIP refclk rate\n"); xvcu 322 drivers/soc/xilinx/xlnx_vcu.c ret = clk_prepare_enable(xvcu->pll_ref); xvcu 324 drivers/soc/xilinx/xlnx_vcu.c dev_err(xvcu->dev, "failed to enable pll_ref clock source\n"); xvcu 328 drivers/soc/xilinx/xlnx_vcu.c refclk = clk_get_rate(xvcu->pll_ref); xvcu 335 drivers/soc/xilinx/xlnx_vcu.c vcu_pll_ctrl = xvcu_read(xvcu->vcu_slcr_ba, VCU_PLL_CTRL); xvcu 339 drivers/soc/xilinx/xlnx_vcu.c dev_err(xvcu->dev, "clkoutdiv value is invalid\n"); xvcu 373 drivers/soc/xilinx/xlnx_vcu.c dev_err(xvcu->dev, "Invalid clock combination.\n"); xvcu 377 drivers/soc/xilinx/xlnx_vcu.c xvcu->coreclk = pll_clk / divisor_core; xvcu 379 drivers/soc/xilinx/xlnx_vcu.c dev_dbg(xvcu->dev, "Actual Ref clock freq is %uHz\n", refclk); xvcu 380 drivers/soc/xilinx/xlnx_vcu.c dev_dbg(xvcu->dev, "Actual Core clock freq is %uHz\n", xvcu->coreclk); xvcu 381 drivers/soc/xilinx/xlnx_vcu.c dev_dbg(xvcu->dev, "Actual Mcu clock freq is %uHz\n", mcuclk); xvcu 394 drivers/soc/xilinx/xlnx_vcu.c xvcu_write(xvcu->vcu_slcr_ba, VCU_PLL_CTRL, vcu_pll_ctrl); xvcu 397 drivers/soc/xilinx/xlnx_vcu.c ctrl = xvcu_read(xvcu->vcu_slcr_ba, VCU_ENC_CORE_CTRL); xvcu 403 drivers/soc/xilinx/xlnx_vcu.c xvcu_write(xvcu->vcu_slcr_ba, VCU_ENC_CORE_CTRL, ctrl); xvcu 405 drivers/soc/xilinx/xlnx_vcu.c ctrl = xvcu_read(xvcu->vcu_slcr_ba, VCU_DEC_CORE_CTRL); xvcu 411 drivers/soc/xilinx/xlnx_vcu.c xvcu_write(xvcu->vcu_slcr_ba, VCU_DEC_CORE_CTRL, ctrl); xvcu 413 drivers/soc/xilinx/xlnx_vcu.c ctrl = xvcu_read(xvcu->vcu_slcr_ba, VCU_ENC_MCU_CTRL); xvcu 418 drivers/soc/xilinx/xlnx_vcu.c xvcu_write(xvcu->vcu_slcr_ba, VCU_ENC_MCU_CTRL, ctrl); xvcu 420 drivers/soc/xilinx/xlnx_vcu.c ctrl = xvcu_read(xvcu->vcu_slcr_ba, VCU_DEC_MCU_CTRL); xvcu 425 drivers/soc/xilinx/xlnx_vcu.c xvcu_write(xvcu->vcu_slcr_ba, VCU_DEC_MCU_CTRL, ctrl); xvcu 433 drivers/soc/xilinx/xlnx_vcu.c xvcu_write(xvcu->vcu_slcr_ba, VCU_PLL_CFG, cfg_val); xvcu 447 drivers/soc/xilinx/xlnx_vcu.c static int xvcu_set_pll(struct xvcu_device *xvcu) xvcu 453 drivers/soc/xilinx/xlnx_vcu.c ret = xvcu_set_vcu_pll_info(xvcu); xvcu 455 drivers/soc/xilinx/xlnx_vcu.c dev_err(xvcu->dev, "failed to set pll info\n"); xvcu 459 drivers/soc/xilinx/xlnx_vcu.c xvcu_write_field_reg(xvcu->vcu_slcr_ba, VCU_PLL_CTRL, xvcu 462 drivers/soc/xilinx/xlnx_vcu.c xvcu_write_field_reg(xvcu->vcu_slcr_ba, VCU_PLL_CTRL, xvcu 465 drivers/soc/xilinx/xlnx_vcu.c xvcu_write_field_reg(xvcu->vcu_slcr_ba, VCU_PLL_CTRL, xvcu 474 drivers/soc/xilinx/xlnx_vcu.c lock_status = xvcu_read(xvcu->vcu_slcr_ba, VCU_PLL_STATUS); xvcu 476 drivers/soc/xilinx/xlnx_vcu.c xvcu_write_field_reg(xvcu->vcu_slcr_ba, VCU_PLL_CTRL, xvcu 484 drivers/soc/xilinx/xlnx_vcu.c dev_err(xvcu->dev, "PLL is not locked\n"); xvcu 500 drivers/soc/xilinx/xlnx_vcu.c struct xvcu_device *xvcu; xvcu 503 drivers/soc/xilinx/xlnx_vcu.c xvcu = devm_kzalloc(&pdev->dev, sizeof(*xvcu), GFP_KERNEL); xvcu 504 drivers/soc/xilinx/xlnx_vcu.c if (!xvcu) xvcu 507 drivers/soc/xilinx/xlnx_vcu.c xvcu->dev = &pdev->dev; xvcu 514 drivers/soc/xilinx/xlnx_vcu.c xvcu->vcu_slcr_ba = devm_ioremap_nocache(&pdev->dev, res->start, xvcu 516 drivers/soc/xilinx/xlnx_vcu.c if (!xvcu->vcu_slcr_ba) { xvcu 527 drivers/soc/xilinx/xlnx_vcu.c xvcu->logicore_reg_ba = devm_ioremap_nocache(&pdev->dev, res->start, xvcu 529 drivers/soc/xilinx/xlnx_vcu.c if (!xvcu->logicore_reg_ba) { xvcu 534 drivers/soc/xilinx/xlnx_vcu.c xvcu->aclk = devm_clk_get(&pdev->dev, "aclk"); xvcu 535 drivers/soc/xilinx/xlnx_vcu.c if (IS_ERR(xvcu->aclk)) { xvcu 537 drivers/soc/xilinx/xlnx_vcu.c return PTR_ERR(xvcu->aclk); xvcu 540 drivers/soc/xilinx/xlnx_vcu.c xvcu->pll_ref = devm_clk_get(&pdev->dev, "pll_ref"); xvcu 541 drivers/soc/xilinx/xlnx_vcu.c if (IS_ERR(xvcu->pll_ref)) { xvcu 543 drivers/soc/xilinx/xlnx_vcu.c return PTR_ERR(xvcu->pll_ref); xvcu 546 drivers/soc/xilinx/xlnx_vcu.c ret = clk_prepare_enable(xvcu->aclk); xvcu 552 drivers/soc/xilinx/xlnx_vcu.c ret = clk_prepare_enable(xvcu->pll_ref); xvcu 563 drivers/soc/xilinx/xlnx_vcu.c xvcu_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, VCU_GASKET_VALUE); xvcu 566 drivers/soc/xilinx/xlnx_vcu.c ret = xvcu_set_pll(xvcu); xvcu 572 drivers/soc/xilinx/xlnx_vcu.c dev_set_drvdata(&pdev->dev, xvcu); xvcu 579 drivers/soc/xilinx/xlnx_vcu.c clk_disable_unprepare(xvcu->pll_ref); xvcu 581 drivers/soc/xilinx/xlnx_vcu.c clk_disable_unprepare(xvcu->aclk); xvcu 595 drivers/soc/xilinx/xlnx_vcu.c struct xvcu_device *xvcu; xvcu 597 drivers/soc/xilinx/xlnx_vcu.c xvcu = platform_get_drvdata(pdev); xvcu 598 drivers/soc/xilinx/xlnx_vcu.c if (!xvcu) xvcu 602 drivers/soc/xilinx/xlnx_vcu.c xvcu_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, 0); xvcu 604 drivers/soc/xilinx/xlnx_vcu.c clk_disable_unprepare(xvcu->pll_ref); xvcu 605 drivers/soc/xilinx/xlnx_vcu.c clk_disable_unprepare(xvcu->aclk);