blob: 22dee215d4dd23f1be27bb021980ff3ba988f504 [file] [log] [blame]
Tony Lindgrenb824efa2006-04-02 17:46:20 +01001/*
2 * linux/arch/arm/mach-omap2/prcm.c
3 *
4 * OMAP 24xx Power Reset and Clock Management (PRCM) functions
5 *
6 * Copyright (C) 2005 Nokia Corporation
7 *
8 * Written by Tony Lindgren <tony.lindgren@nokia.com>
9 *
Rajendra Nayakc171a252008-09-26 17:48:31 +053010 * Copyright (C) 2007 Texas Instruments, Inc.
11 * Rajendra Nayak <rnayak@ti.com>
12 *
Tony Lindgrenb824efa2006-04-02 17:46:20 +010013 * Some pieces of code Copyright (C) 2005 Texas Instruments, Inc.
Abhijit Pagare37903002010-01-26 20:12:51 -070014 * Upgraded with OMAP4 support by Abhijit Pagare <abhijitpagare@ti.com>
Tony Lindgrenb824efa2006-04-02 17:46:20 +010015 *
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License version 2 as
18 * published by the Free Software Foundation.
19 */
Paul Walmsleyc4d7e582010-12-21 21:05:14 -070020
21#include <linux/kernel.h>
Tony Lindgrenb824efa2006-04-02 17:46:20 +010022#include <linux/init.h>
23#include <linux/clk.h>
Tony Lindgrena58caad2008-07-03 12:24:44 +030024#include <linux/io.h>
Paul Walmsley72350b22009-07-24 19:44:03 -060025#include <linux/delay.h>
Paul Gortmakerdc280942011-07-31 16:17:29 -040026#include <linux/export.h>
Tony Lindgrenb824efa2006-04-02 17:46:20 +010027
Tony Lindgren4e653312011-11-10 22:45:17 +010028#include "common.h"
Tony Lindgrence491cf2009-10-20 09:40:47 -070029#include <plat/prcm.h>
Paul Walmsley44595982008-03-18 10:04:51 +020030
Tony Lindgrene4c060d2012-10-05 13:25:59 -070031#include "soc.h"
Tony Lindgrena58caad2008-07-03 12:24:44 +030032#include "clock.h"
Paul Walmsleyfeec1272010-01-26 20:13:11 -070033#include "clock2xxx.h"
Paul Walmsley59fb6592010-12-21 15:30:55 -070034#include "cm2xxx_3xxx.h"
Paul Walmsley59fb6592010-12-21 15:30:55 -070035#include "prm2xxx_3xxx.h"
Paul Walmsleyd198b512010-12-21 15:30:54 -070036#include "prm44xx.h"
Paul Walmsleyc4d7e582010-12-21 21:05:14 -070037#include "prminst44xx.h"
R Sricharan3f4990f2012-07-04 05:04:00 -060038#include "cminst44xx.h"
Paul Walmsley44595982008-03-18 10:04:51 +020039#include "prm-regbits-24xx.h"
Rajeev Kulkarniff4d3e12010-09-21 10:34:09 -060040#include "prm-regbits-44xx.h"
Paul Walmsley4814ced2010-10-08 11:40:20 -060041#include "control.h"
Tony Lindgrenb824efa2006-04-02 17:46:20 +010042
R Sricharan3f4990f2012-07-04 05:04:00 -060043
44/*
45 * Stubbed functions so that common files continue to build when
46 * custom builds are used
47 * XXX These are temporary and should be removed at the earliest possible
48 * opportunity
49 */
50int __weak omap4_cminst_wait_module_idle(u8 part, u16 inst, s16 cdoffs,
51 u16 clkctrl_offs)
52{
53 return 0;
54}
55
56void __weak omap4_cminst_module_enable(u8 mode, u8 part, u16 inst,
57 s16 cdoffs, u16 clkctrl_offs)
58{
59}
60
61void __weak omap4_cminst_module_disable(u8 part, u16 inst, s16 cdoffs,
62 u16 clkctrl_offs)
63{
64}