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