// SPDX-License-Identifier: GPL-2.0-only1/*2* OMAP2-specific DPLL control functions3*4* Copyright (C) 2011 Nokia Corporation5* Paul Walmsley6*/78#include <linux/kernel.h>9#include <linux/errno.h>10#include <linux/clk.h>11#include <linux/io.h>1213#include "clock.h"14#include "cm2xxx.h"15#include "cm-regbits-24xx.h"1617/* Private functions */1819/**20* _allow_idle - enable DPLL autoidle bits21* @clk: struct clk * of the DPLL to operate on22*23* Enable DPLL automatic idle control. The DPLL will enter low-power24* stop when its downstream clocks are gated. No return value.25* REVISIT: DPLL can optionally enter low-power bypass by writing 0x126* instead. Add some mechanism to optionally enter this mode.27*/28static void _allow_idle(struct clk_hw_omap *clk)29{30if (!clk || !clk->dpll_data)31return;3233omap2xxx_cm_set_dpll_auto_low_power_stop();34}3536/**37* _deny_idle - prevent DPLL from automatically idling38* @clk: struct clk * of the DPLL to operate on39*40* Disable DPLL automatic idle control. No return value.41*/42static void _deny_idle(struct clk_hw_omap *clk)43{44if (!clk || !clk->dpll_data)45return;4647omap2xxx_cm_set_dpll_disable_autoidle();48}495051/* Public data */52const struct clk_hw_omap_ops clkhwops_omap2xxx_dpll = {53.allow_idle = _allow_idle,54.deny_idle = _deny_idle,55};565758