1
2
3
4
5
6
7
8
9
10#ifndef __ARCH_ASM_MACH_OMAP2_CM_H
11#define __ARCH_ASM_MACH_OMAP2_CM_H
12
13
14
15
16
17
18
19
20#define MAX_MODULE_READY_TIME 2000
21
22# ifndef __ASSEMBLER__
23#include <linux/clk/ti.h>
24
25#include "prcm-common.h"
26
27extern struct omap_domain_base cm_base;
28extern struct omap_domain_base cm2_base;
29# endif
30
31
32
33
34
35
36
37
38
39
40#define MAX_MODULE_DISABLE_TIME 5000
41
42# ifndef __ASSEMBLER__
43
44
45
46
47
48
49
50
51
52
53struct cm_ll_data {
54 int (*split_idlest_reg)(struct clk_omap_reg *idlest_reg, s16 *prcm_inst,
55 u8 *idlest_reg_id);
56 int (*wait_module_ready)(u8 part, s16 prcm_mod, u16 idlest_reg,
57 u8 idlest_shift);
58 int (*wait_module_idle)(u8 part, s16 prcm_mod, u16 idlest_reg,
59 u8 idlest_shift);
60 void (*module_enable)(u8 mode, u8 part, u16 inst, u16 clkctrl_offs);
61 void (*module_disable)(u8 part, u16 inst, u16 clkctrl_offs);
62 u32 (*xlate_clkctrl)(u8 part, u16 inst, u16 clkctrl_offs);
63};
64
65extern int cm_split_idlest_reg(struct clk_omap_reg *idlest_reg, s16 *prcm_inst,
66 u8 *idlest_reg_id);
67int omap_cm_wait_module_ready(u8 part, s16 prcm_mod, u16 idlest_reg,
68 u8 idlest_shift);
69int omap_cm_wait_module_idle(u8 part, s16 prcm_mod, u16 idlest_reg,
70 u8 idlest_shift);
71int omap_cm_module_enable(u8 mode, u8 part, u16 inst, u16 clkctrl_offs);
72int omap_cm_module_disable(u8 part, u16 inst, u16 clkctrl_offs);
73u32 omap_cm_xlate_clkctrl(u8 part, u16 inst, u16 clkctrl_offs);
74extern int cm_register(const struct cm_ll_data *cld);
75extern int cm_unregister(const struct cm_ll_data *cld);
76int omap_cm_init(void);
77int omap2_cm_base_init(void);
78
79# endif
80
81#endif
82