Path: blob/master/arch/arm/mach-pxa/clock-pxa2xx.c
10817 views
/*1* linux/arch/arm/mach-pxa/clock-pxa2xx.c2*3* This program is free software; you can redistribute it and/or modify4* it under the terms of the GNU General Public License version 2 as5* published by the Free Software Foundation.6*/78#include <linux/module.h>9#include <linux/kernel.h>10#include <linux/init.h>11#include <linux/syscore_ops.h>1213#include <mach/pxa2xx-regs.h>1415#include "clock.h"1617void clk_pxa2xx_cken_enable(struct clk *clk)18{19CKEN |= 1 << clk->cken;20}2122void clk_pxa2xx_cken_disable(struct clk *clk)23{24CKEN &= ~(1 << clk->cken);25}2627const struct clkops clk_pxa2xx_cken_ops = {28.enable = clk_pxa2xx_cken_enable,29.disable = clk_pxa2xx_cken_disable,30};3132#ifdef CONFIG_PM33static uint32_t saved_cken;3435static int pxa2xx_clock_suspend(void)36{37saved_cken = CKEN;38return 0;39}4041static void pxa2xx_clock_resume(void)42{43CKEN = saved_cken;44}45#else46#define pxa2xx_clock_suspend NULL47#define pxa2xx_clock_resume NULL48#endif4950struct syscore_ops pxa2xx_clock_syscore_ops = {51.suspend = pxa2xx_clock_suspend,52.resume = pxa2xx_clock_resume,53};545556