Path: blob/master/arch/arm/mach-omap2/clkt2xxx_dpll.c
10817 views
/*1* OMAP2-specific DPLL control functions2*3* Copyright (C) 2011 Nokia Corporation4* Paul Walmsley5*6* This program is free software; you can redistribute it and/or modify7* it under the terms of the GNU General Public License version 2 as8* published by the Free Software Foundation.9*/1011#include <linux/kernel.h>12#include <linux/errno.h>13#include <linux/clk.h>14#include <linux/io.h>1516#include <plat/clock.h>1718#include "clock.h"19#include "cm2xxx_3xxx.h"20#include "cm-regbits-24xx.h"2122/* Private functions */2324/**25* _allow_idle - enable DPLL autoidle bits26* @clk: struct clk * of the DPLL to operate on27*28* Enable DPLL automatic idle control. The DPLL will enter low-power29* stop when its downstream clocks are gated. No return value.30* REVISIT: DPLL can optionally enter low-power bypass by writing 0x131* instead. Add some mechanism to optionally enter this mode.32*/33static void _allow_idle(struct clk *clk)34{35if (!clk || !clk->dpll_data)36return;3738omap2xxx_cm_set_dpll_auto_low_power_stop();39}4041/**42* _deny_idle - prevent DPLL from automatically idling43* @clk: struct clk * of the DPLL to operate on44*45* Disable DPLL automatic idle control. No return value.46*/47static void _deny_idle(struct clk *clk)48{49if (!clk || !clk->dpll_data)50return;5152omap2xxx_cm_set_dpll_disable_autoidle();53}545556/* Public data */5758const struct clkops clkops_omap2xxx_dpll_ops = {59.allow_idle = _allow_idle,60.deny_idle = _deny_idle,61};62636465