GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / arm / mach-omap2 / clock2xxx.c
blob84d60452d7f1ddcd5817bc2fc72d963a3b93a0b4
1 /*
2 * clock2xxx.c - OMAP2xxx-specific clock integration code
4 * Copyright (C) 2005-2008 Texas Instruments, Inc.
5 * Copyright (C) 2004-2010 Nokia Corporation
7 * Contacts:
8 * Richard Woodruff <r-woodruff2@ti.com>
9 * Paul Walmsley
11 * Based on earlier work by Tuukka Tikkanen, Tony Lindgren,
12 * Gordon McNutt and RidgeRun, Inc.
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation.
18 #undef DEBUG
20 #include <linux/kernel.h>
21 #include <linux/errno.h>
22 #include <linux/clk.h>
23 #include <linux/io.h>
25 #include <plat/clock.h>
27 #include "clock.h"
28 #include "clock2xxx.h"
29 #include "cm.h"
30 #include "cm-regbits-24xx.h"
32 struct clk *vclk, *sclk, *dclk;
35 * Omap24xx specific clock functions
39 * Set clocks for bypass mode for reboot to work.
41 void omap2xxx_clk_prepare_for_reboot(void)
43 u32 rate;
45 if (vclk == NULL || sclk == NULL)
46 return;
48 rate = clk_get_rate(sclk);
49 clk_set_rate(vclk, rate);
52 static int __init omap2xxx_clk_arch_init(void)
54 int ret;
56 if (!cpu_is_omap24xx())
57 return 0;
59 ret = omap2_clk_switch_mpurate_at_boot("virt_prcm_set");
60 if (!ret)
61 omap2_clk_print_new_rates("sys_ck", "dpll_ck", "mpu_ck");
63 return ret;
66 arch_initcall(omap2xxx_clk_arch_init);