aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod_2420_data.c
diff options
context:
space:
mode:
authorVaradarajan, Charulatha <charu@ti.com>2010-09-23 10:32:39 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2010-09-29 15:21:57 -0400
commita714b9cfabcc385540a493733bd4958d37e982d3 (patch)
treefd4f486a326ab9aabb2dcacc916f43973c6412bd /arch/arm/mach-omap2/omap_hwmod_2420_data.c
parent6b667f880ff5b273f9c1ec1076ffc2c9baf97a96 (diff)
OMAP2420: hwmod data: Add watchdog timer
Add watchdog timer hwmod data for OMAP2420 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>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod_2420_data.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2420_data.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index 3cc768e8bc04..66678d98ad96 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -19,6 +19,7 @@
19#include "omap_hwmod_common_data.h" 19#include "omap_hwmod_common_data.h"
20 20
21#include "prm-regbits-24xx.h" 21#include "prm-regbits-24xx.h"
22#include "cm-regbits-24xx.h"
22 23
23/* 24/*
24 * OMAP2420 hardware module integration data 25 * OMAP2420 hardware module integration data
@@ -33,6 +34,7 @@ static struct omap_hwmod omap2420_mpu_hwmod;
33static struct omap_hwmod omap2420_iva_hwmod; 34static struct omap_hwmod omap2420_iva_hwmod;
34static struct omap_hwmod omap2420_l3_main_hwmod; 35static struct omap_hwmod omap2420_l3_main_hwmod;
35static struct omap_hwmod omap2420_l4_core_hwmod; 36static struct omap_hwmod omap2420_l4_core_hwmod;
37static struct omap_hwmod omap2420_wd_timer2_hwmod;
36 38
37/* L3 -> L4_CORE interface */ 39/* L3 -> L4_CORE interface */
38static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = { 40static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
@@ -165,12 +167,74 @@ static struct omap_hwmod omap2420_iva_hwmod = {
165 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) 167 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
166}; 168};
167 169
170/* l4_wkup -> wd_timer2 */
171static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
172 {
173 .pa_start = 0x48022000,
174 .pa_end = 0x4802207f,
175 .flags = ADDR_TYPE_RT
176 },
177};
178
179static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
180 .master = &omap2420_l4_wkup_hwmod,
181 .slave = &omap2420_wd_timer2_hwmod,
182 .clk = "mpu_wdt_ick",
183 .addr = omap2420_wd_timer2_addrs,
184 .addr_cnt = ARRAY_SIZE(omap2420_wd_timer2_addrs),
185 .user = OCP_USER_MPU | OCP_USER_SDMA,
186};
187
188/*
189 * 'wd_timer' class
190 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
191 * overflow condition
192 */
193
194static struct omap_hwmod_class_sysconfig omap2420_wd_timer_sysc = {
195 .rev_offs = 0x0000,
196 .sysc_offs = 0x0010,
197 .syss_offs = 0x0014,
198 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
199 SYSC_HAS_AUTOIDLE),
200 .sysc_fields = &omap_hwmod_sysc_type1,
201};
202
203static struct omap_hwmod_class omap2420_wd_timer_hwmod_class = {
204 .name = "wd_timer",
205 .sysc = &omap2420_wd_timer_sysc,
206};
207
208/* wd_timer2 */
209static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
210 &omap2420_l4_wkup__wd_timer2,
211};
212
213static struct omap_hwmod omap2420_wd_timer2_hwmod = {
214 .name = "wd_timer2",
215 .class = &omap2420_wd_timer_hwmod_class,
216 .main_clk = "mpu_wdt_fck",
217 .prcm = {
218 .omap2 = {
219 .prcm_reg_id = 1,
220 .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
221 .module_offs = WKUP_MOD,
222 .idlest_reg_id = 1,
223 .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
224 },
225 },
226 .slaves = omap2420_wd_timer2_slaves,
227 .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves),
228 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
229};
230
168static __initdata struct omap_hwmod *omap2420_hwmods[] = { 231static __initdata struct omap_hwmod *omap2420_hwmods[] = {
169 &omap2420_l3_main_hwmod, 232 &omap2420_l3_main_hwmod,
170 &omap2420_l4_core_hwmod, 233 &omap2420_l4_core_hwmod,
171 &omap2420_l4_wkup_hwmod, 234 &omap2420_l4_wkup_hwmod,
172 &omap2420_mpu_hwmod, 235 &omap2420_mpu_hwmod,
173 &omap2420_iva_hwmod, 236 &omap2420_iva_hwmod,
237 &omap2420_wd_timer2_hwmod,
174 NULL, 238 NULL,
175}; 239};
176 240