1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18#undef DEBUG
19
20#include <linux/kernel.h>
21#include <linux/clk.h>
22#include <linux/io.h>
23
24#include "clock.h"
25#include "clock34xx.h"
26#include "cm3xxx.h"
27#include "cm-regbits-34xx.h"
28
29
30
31
32
33
34
35
36
37
38
39
40static void omap3430es2_clk_ssi_find_idlest(struct clk_hw_omap *clk,
41 void __iomem **idlest_reg,
42 u8 *idlest_bit,
43 u8 *idlest_val)
44{
45 u32 r;
46
47 r = (((__force u32)clk->enable_reg & ~0xf0) | 0x20);
48 *idlest_reg = (__force void __iomem *)r;
49 *idlest_bit = OMAP3430ES2_ST_SSI_IDLE_SHIFT;
50 *idlest_val = OMAP34XX_CM_IDLEST_VAL;
51}
52const struct clk_hw_omap_ops clkhwops_omap3430es2_ssi_wait = {
53 .find_idlest = omap3430es2_clk_ssi_find_idlest,
54 .find_companion = omap2_clk_dflt_find_companion,
55};
56
57const struct clk_hw_omap_ops clkhwops_omap3430es2_iclk_ssi_wait = {
58 .allow_idle = omap2_clkt_iclk_allow_idle,
59 .deny_idle = omap2_clkt_iclk_deny_idle,
60 .find_idlest = omap3430es2_clk_ssi_find_idlest,
61 .find_companion = omap2_clk_dflt_find_companion,
62};
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78static void omap3430es2_clk_dss_usbhost_find_idlest(struct clk_hw_omap *clk,
79 void __iomem **idlest_reg,
80 u8 *idlest_bit,
81 u8 *idlest_val)
82{
83 u32 r;
84
85 r = (((__force u32)clk->enable_reg & ~0xf0) | 0x20);
86 *idlest_reg = (__force void __iomem *)r;
87
88 *idlest_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT;
89 *idlest_val = OMAP34XX_CM_IDLEST_VAL;
90}
91
92const struct clk_hw_omap_ops clkhwops_omap3430es2_dss_usbhost_wait = {
93 .find_idlest = omap3430es2_clk_dss_usbhost_find_idlest,
94 .find_companion = omap2_clk_dflt_find_companion,
95};
96
97const struct clk_hw_omap_ops clkhwops_omap3430es2_iclk_dss_usbhost_wait = {
98 .allow_idle = omap2_clkt_iclk_allow_idle,
99 .deny_idle = omap2_clkt_iclk_deny_idle,
100 .find_idlest = omap3430es2_clk_dss_usbhost_find_idlest,
101 .find_companion = omap2_clk_dflt_find_companion,
102};
103
104
105
106
107
108
109
110
111
112
113
114
115static void omap3430es2_clk_hsotgusb_find_idlest(struct clk_hw_omap *clk,
116 void __iomem **idlest_reg,
117 u8 *idlest_bit,
118 u8 *idlest_val)
119{
120 u32 r;
121
122 r = (((__force u32)clk->enable_reg & ~0xf0) | 0x20);
123 *idlest_reg = (__force void __iomem *)r;
124 *idlest_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT;
125 *idlest_val = OMAP34XX_CM_IDLEST_VAL;
126}
127
128const struct clk_hw_omap_ops clkhwops_omap3430es2_iclk_hsotgusb_wait = {
129 .allow_idle = omap2_clkt_iclk_allow_idle,
130 .deny_idle = omap2_clkt_iclk_deny_idle,
131 .find_idlest = omap3430es2_clk_hsotgusb_find_idlest,
132 .find_companion = omap2_clk_dflt_find_companion,
133};
134
135const struct clk_hw_omap_ops clkhwops_omap3430es2_hsotgusb_wait = {
136 .find_idlest = omap3430es2_clk_hsotgusb_find_idlest,
137 .find_companion = omap2_clk_dflt_find_companion,
138};
139