diff options
author | Varadarajan, Charulatha <charu@ti.com> | 2010-09-23 10:32:38 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2010-09-29 15:21:57 -0400 |
commit | 6b667f880ff5b273f9c1ec1076ffc2c9baf97a96 (patch) | |
tree | 5417338eef15ea20deff1528143be16c0bf899d1 | |
parent | 26428b5c4f675434d52c8dc09c4c8d5e6198a6ac (diff) |
OMAP3: hwmod data: Add watchdog timer
Add watchdog timer hwmod data for OMAP3 chip
Signed-off-by: Charulatha V <charu@ti.com>
Acked-by: Cousson, Benoit <b-cousson@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 5d8eb58ba5e3..5bfe9c933144 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include "omap_hwmod_common_data.h" | 21 | #include "omap_hwmod_common_data.h" |
22 | 22 | ||
23 | #include "prm-regbits-34xx.h" | 23 | #include "prm-regbits-34xx.h" |
24 | #include "cm-regbits-34xx.h" | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * OMAP3xxx hardware module integration data | 27 | * OMAP3xxx hardware module integration data |
@@ -36,6 +37,7 @@ static struct omap_hwmod omap3xxx_iva_hwmod; | |||
36 | static struct omap_hwmod omap3xxx_l3_main_hwmod; | 37 | static struct omap_hwmod omap3xxx_l3_main_hwmod; |
37 | static struct omap_hwmod omap3xxx_l4_core_hwmod; | 38 | static struct omap_hwmod omap3xxx_l4_core_hwmod; |
38 | static struct omap_hwmod omap3xxx_l4_per_hwmod; | 39 | static struct omap_hwmod omap3xxx_l4_per_hwmod; |
40 | static struct omap_hwmod omap3xxx_wd_timer2_hwmod; | ||
39 | 41 | ||
40 | /* L3 -> L4_CORE interface */ | 42 | /* L3 -> L4_CORE interface */ |
41 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = { | 43 | static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = { |
@@ -197,6 +199,69 @@ static struct omap_hwmod omap3xxx_iva_hwmod = { | |||
197 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | 199 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) |
198 | }; | 200 | }; |
199 | 201 | ||
202 | /* l4_wkup -> wd_timer2 */ | ||
203 | static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = { | ||
204 | { | ||
205 | .pa_start = 0x48314000, | ||
206 | .pa_end = 0x4831407f, | ||
207 | .flags = ADDR_TYPE_RT | ||
208 | }, | ||
209 | }; | ||
210 | |||
211 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = { | ||
212 | .master = &omap3xxx_l4_wkup_hwmod, | ||
213 | .slave = &omap3xxx_wd_timer2_hwmod, | ||
214 | .clk = "wdt2_ick", | ||
215 | .addr = omap3xxx_wd_timer2_addrs, | ||
216 | .addr_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_addrs), | ||
217 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
218 | }; | ||
219 | |||
220 | /* | ||
221 | * 'wd_timer' class | ||
222 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on | ||
223 | * overflow condition | ||
224 | */ | ||
225 | |||
226 | static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = { | ||
227 | .rev_offs = 0x0000, | ||
228 | .sysc_offs = 0x0010, | ||
229 | .syss_offs = 0x0014, | ||
230 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_EMUFREE | | ||
231 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
232 | SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY), | ||
233 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
234 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
235 | }; | ||
236 | |||
237 | static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = { | ||
238 | .name = "wd_timer", | ||
239 | .sysc = &omap3xxx_wd_timer_sysc, | ||
240 | }; | ||
241 | |||
242 | /* wd_timer2 */ | ||
243 | static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = { | ||
244 | &omap3xxx_l4_wkup__wd_timer2, | ||
245 | }; | ||
246 | |||
247 | static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { | ||
248 | .name = "wd_timer2", | ||
249 | .class = &omap3xxx_wd_timer_hwmod_class, | ||
250 | .main_clk = "wdt2_fck", | ||
251 | .prcm = { | ||
252 | .omap2 = { | ||
253 | .prcm_reg_id = 1, | ||
254 | .module_bit = OMAP3430_EN_WDT2_SHIFT, | ||
255 | .module_offs = WKUP_MOD, | ||
256 | .idlest_reg_id = 1, | ||
257 | .idlest_idle_bit = OMAP3430_ST_WDT2_SHIFT, | ||
258 | }, | ||
259 | }, | ||
260 | .slaves = omap3xxx_wd_timer2_slaves, | ||
261 | .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves), | ||
262 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
263 | }; | ||
264 | |||
200 | static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { | 265 | static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { |
201 | &omap3xxx_l3_main_hwmod, | 266 | &omap3xxx_l3_main_hwmod, |
202 | &omap3xxx_l4_core_hwmod, | 267 | &omap3xxx_l4_core_hwmod, |
@@ -204,6 +269,7 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { | |||
204 | &omap3xxx_l4_wkup_hwmod, | 269 | &omap3xxx_l4_wkup_hwmod, |
205 | &omap3xxx_mpu_hwmod, | 270 | &omap3xxx_mpu_hwmod, |
206 | &omap3xxx_iva_hwmod, | 271 | &omap3xxx_iva_hwmod, |
272 | &omap3xxx_wd_timer2_hwmod, | ||
207 | NULL, | 273 | NULL, |
208 | }; | 274 | }; |
209 | 275 | ||