Re: [PATCH 3/6] OMAP2420: WDT: Add watchdog timer HWMOD data for OMAP2420

2010-06-03 Thread Kevin Hilman
Charulatha V ch...@ti.com writes:

 Add hwmod structures for Watchdog module on OMAP2420

 Signed-off-by: Charulatha V ch...@ti.com
 ---
  arch/arm/mach-omap2/omap_hwmod_2420_data.c |   56 
 
  1 files changed, 56 insertions(+), 0 deletions(-)


[...]

 +/* WDTIMER2 */
 +static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
 + omap2420_l4_wkup__wd_timer2,
 +};
 +
 +static struct omap_hwmod omap2420_wd_timer2_hwmod = {
 + .name   = wd_timer2,
 + .class  = omap2420_wd_timer_hwmod_class,
 + .main_clk   = mpu_wdt_fck,
 + .prcm   = {
 + .omap2 = {

missing .module_offs

 + .prcm_reg_id = 1,
 + .module_bit = OMAP24XX_EN_WDT2_SHIFT,
 + },
 + },
 + .slaves = omap2420_wd_timer2_slaves,
 + .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves),
 + .omap_chip  = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
 +};
 +
  /* Master interfaces on the MPU device */

Kevin
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/6] OMAP2420: WDT: Add watchdog timer HWMOD data for OMAP2420

2010-05-22 Thread Charulatha V
Add hwmod structures for Watchdog module on OMAP2420

Signed-off-by: Charulatha V ch...@ti.com
---
 arch/arm/mach-omap2/omap_hwmod_2420_data.c |   56 
 1 files changed, 56 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 e5530c5..ceed66e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -69,6 +69,7 @@ static struct omap_hwmod omap2420_l3_hwmod = {
 };
 
 static struct omap_hwmod omap2420_l4_wkup_hwmod;
+static struct omap_hwmod omap2420_wd_timer2_hwmod;
 
 /* L4_CORE - L4_WKUP interface */
 static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
@@ -118,6 +119,60 @@ static struct omap_hwmod omap2420_l4_wkup_hwmod = {
.omap_chip  = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
 };
 
+/* WDTIMER2 - L4_WKUP interface */
+static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
+   {
+   .pa_start   = 0x48022000,
+   .pa_end = 0x48022000 + SZ_4K - 1,
+   .flags  = ADDR_TYPE_RT
+   },
+};
+
+static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
+   .master = omap2420_l4_wkup_hwmod,
+   .slave  = omap2420_wd_timer2_hwmod,
+   .clk= mpu_wdt_ick,
+   .addr   = omap2420_wd_timer2_addrs,
+   .addr_cnt   = ARRAY_SIZE(omap2420_wd_timer2_addrs),
+   .user   = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* WDTIMER common */
+
+static struct omap_hwmod_class_sysconfig omap2420_wd_timer_sysc = {
+   .rev_offs   = 0x,
+   .sysc_offs  = 0x0010,
+   .syss_offs  = 0x0014,
+   .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
+  SYSC_HAS_AUTOIDLE),
+   .sysc_fields= omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class omap2420_wd_timer_hwmod_class = {
+   .name = wd_timer,
+   .sysc = omap2420_wd_timer_sysc,
+};
+
+/* WDTIMER2 */
+static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
+   omap2420_l4_wkup__wd_timer2,
+};
+
+static struct omap_hwmod omap2420_wd_timer2_hwmod = {
+   .name   = wd_timer2,
+   .class  = omap2420_wd_timer_hwmod_class,
+   .main_clk   = mpu_wdt_fck,
+   .prcm   = {
+   .omap2 = {
+   .prcm_reg_id = 1,
+   .module_bit = OMAP24XX_EN_WDT2_SHIFT,
+   },
+   },
+   .slaves = omap2420_wd_timer2_slaves,
+   .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves),
+   .omap_chip  = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
+};
+
 /* Master interfaces on the MPU device */
 static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
omap2420_mpu__l3,
@@ -138,6 +193,7 @@ static __initdata struct omap_hwmod *omap2420_hwmods[] = {
omap2420_l4_core_hwmod,
omap2420_l4_wkup_hwmod,
omap2420_mpu_hwmod,
+   omap2420_wd_timer2_hwmod,
NULL,
 };
 
-- 
1.6.3.3

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html