OMAP2PLUS: WDT: Implement WDT in HWMOD way
Subsystems (5)
v3 cover OMAP2PLUS: WDT: Implement WDT in HWMOD way
This patch series makes OMAP2PLUS Watchdog Timer Module implemented in HWMOD FW way. It also implements Watchdog timer driver to use the runtime PM layer.
This patch series is created on "origin/pm-wip/hwmods-omap4".
This patch series is tested on OMAP3430 SDP and OMAP4430 SDP. It would be of great help if someone could test the same on OMAP1 and OMAP2 boards.
Version History:
---------------
Vesrion v3:
Fix Minor comments like renaming omap1 watchdog structures with an omap1_ prefix
Version v2:
Rebase to latest kernel
Some of the v2 links:
http://www.spinics.net/lists/linux-omap/msg34741.html
http://www.spinics.net/lists/linux-omap/msg34673.html
Version v1:
Initial series
Some of the v1 links:
http://www.spinics.net/lists/linux-omap/msg30628.html
http://www.spinics.net/lists/linux-omap/msg30625.html
Benoit Cousson (1):
OMAP4 HWMOD: Add watchdog hwmods.
Charulatha V (4):
OMAP3: WDT: Add watchdog timer HWMOD data for OMAP3
OMAP2420: WDT: Add watchdog timer HWMOD data for OMAP2420
OMAP2430: WDT: Add watchdog timer HWMOD data for OMAP2430
OMAP2PLUS: WDT: Conversion to runtime PM
arch/arm/mach-omap2/omap_hwmod_2420_data.c | 59 ++++++++++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_2430_data.c | 59 ++++++++++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 61 +++++++++++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 68 ++++++++++++++++++++++++++++ arch/arm/mach-omap2/prcm-common.h | 4 ++ arch/arm/plat-omap/devices.c | 64 ++++++++++++++++++-------- drivers/watchdog/omap_wdt.c | 43 +++-------------- 7 files changed, 303 insertions(+), 55 deletions(-)
PATCH v3 1/5 OMAP3: WDT: Add watchdog timer HWMOD data for OMAP3
Add hwmod structures for Watchdog module on OMAP3 HWMOD database
--- arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 61 ++++++++++++++++++++++++++++ arch/arm/mach-omap2/prcm-common.h | 4 ++ 2 files changed, 65 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +61 -0
@@ -36,6 +36,7 @@ static struct omap_hwmod omap3xxx_iva_hwmod;static struct omap_hwmod omap3xxx_l3_main_hwmod;static struct omap_hwmod omap3xxx_l4_core_hwmod;static struct omap_hwmod omap3xxx_l4_per_hwmod; +static struct omap_hwmod omap3xxx_wd_timer2_hwmod;/* L3 -> L4_CORE interface */ static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = {
@@ -197,6 +198,65 @@ static struct omap_hwmod omap3xxx_iva_hwmod = { .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) }; +/* WDTIMER2 <- L4_WKUP interface */ +static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = { + { + .pa_start =0x48314000 , + .pa_end =0x4831407f , + .flags =ADDR_TYPE_RT + }, +}; + +static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = { + .master = &omap3xxx_l4_wkup_hwmod, + .slave = &omap3xxx_wd_timer2_hwmod, + .clk ="wdt2_ick" , + .addr = omap3xxx_wd_timer2_addrs, + .addr_cnt =ARRAY_SIZE (omap3xxx_wd_timer2_addrs), + .user =OCP_USER_MPU |OCP_USER_SDMA , +}; + +/* WDTIMER common */ + +static struct omap_hwmod_class_sysconfig omap3xxx_wd_timer_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SIDLEMODE |SYSC_HAS_EMUFREE | +SYSC_HAS_ENAWAKEUP |SYSC_HAS_SOFTRESET | +SYSC_HAS_AUTOIDLE |SYSC_HAS_CLOCKACTIVITY ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap3xxx_wd_timer_hwmod_class = { + .name ="wd_timer" , + .sysc = &omap3xxx_wd_timer_sysc, +}; + +/* WDTIMER2 */ +static struct omap_hwmod_ocp_if *omap3xxx_wd_timer2_slaves[] = { + &omap3xxx_l4_wkup__wd_timer2, +}; + +static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { + .name ="wd_timer2" , + .class = &omap3xxx_wd_timer_hwmod_class, + .main_clk ="wdt2_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP3430_EN_WDT2_SHIFT , + .module_offs =WKUP_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP3430_EN_WDT2_SHIFT , + }, + }, + .slaves = omap3xxx_wd_timer2_slaves, + .slaves_cnt =ARRAY_SIZE (omap3xxx_wd_timer2_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_IS_OMAP3430 ), +}; +static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { &omap3xxx_l3_main_hwmod, &omap3xxx_l4_core_hwmod,
@@ -204,6 +264,7 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { &omap3xxx_l4_wkup_hwmod, &omap3xxx_mpu_hwmod, &omap3xxx_iva_hwmod, + &omap3xxx_wd_timer2_hwmod, NULL, };
arch/arm/mach-omap2/prcm-common.h +4 -0
@@ -237,6 +237,8 @@#define OMAP24XX_ST_USB_MASK (1 << 0)/* CM_FCLKEN_WKUP, CM_ICLKEN_WKUP, PM_WKEN_WKUP shared bits */ +#define OMAP24XX_EN_WDT2_SHIFT 3 +#define OMAP24XX_EN_WDT2_MASK (1 << 3)#define OMAP24XX_EN_GPIOS_SHIFT 2#define OMAP24XX_EN_GPIOS_MASK (1 << 2)#define OMAP24XX_EN_GPT1_SHIFT 0
@@ -344,6 +346,8 @@#define OMAP3430_ST_D2D_MASK (1 << 3)/* CM_FCLKEN_WKUP, CM_ICLKEN_WKUP, PM_WKEN_WKUP shared bits */ +#define OMAP3430_EN_WDT2_SHIFT 5 +#define OMAP3430_EN_WDT2_MASK (1 << 5)#define OMAP3430_EN_GPIO1_MASK (1 << 3)#define OMAP3430_EN_GPIO1_SHIFT 3#define OMAP3430_EN_GPT12_MASK (1 << 1)
Signature · 1 line
1.6.3.3
PATCH v3 2/5 OMAP2420: WDT: Add watchdog timer HWMOD data for OMAP2420
Add hwmod structures for Watchdog module on OMAP2420 HWMOD database
--- arch/arm/mach-omap2/omap_hwmod_2420_data.c | 59 ++++++++++++++++++++++++++++ 1 files changed, 59 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod_2420_data.c +59 -0
@@ -33,6 +33,7 @@ static struct omap_hwmod omap2420_mpu_hwmod;static struct omap_hwmod omap2420_iva_hwmod;static struct omap_hwmod omap2420_l3_main_hwmod;static struct omap_hwmod omap2420_l4_core_hwmod; +static struct omap_hwmod omap2420_wd_timer2_hwmod;/* L3 -> L4_CORE interface */ static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
@@ -165,12 +166,70 @@ static struct omap_hwmod omap2420_iva_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 =0x4802207f , + .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 =0x0000 , + .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 , + .module_offs =WKUP_MOD , + .idlest_reg_id =1 , + .idlest_idle_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 ), +}; +static __initdata struct omap_hwmod *omap2420_hwmods[] = { &omap2420_l3_main_hwmod, &omap2420_l4_core_hwmod, &omap2420_l4_wkup_hwmod, &omap2420_mpu_hwmod, &omap2420_iva_hwmod, + &omap2420_wd_timer2_hwmod,NULL , };
Signature · 1 line
1.6.3.3
PATCH v3 3/5 OMAP2430: WDT: Add watchdog timer HWMOD data for OMAP2430
Add hwmod structures for Watchdog module on OMAP2430 HWMOD Databse
--- arch/arm/mach-omap2/omap_hwmod_2430_data.c | 59 ++++++++++++++++++++++++++++ 1 files changed, 59 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod_2430_data.c +59 -0
@@ -33,6 +33,7 @@ static struct omap_hwmod omap2430_mpu_hwmod;static struct omap_hwmod omap2430_iva_hwmod;static struct omap_hwmod omap2430_l3_main_hwmod;static struct omap_hwmod omap2430_l4_core_hwmod; +static struct omap_hwmod omap2430_wd_timer2_hwmod;/* L3 -> L4_CORE interface */ static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
@@ -165,12 +166,70 @@ static struct omap_hwmod omap2430_iva_hwmod = { .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) }; +/* WDTIMER2 <- L4_WKUP interface */ +static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = { + { + .pa_start =0x49016000 , + .pa_end =0x4901607f , + .flags =ADDR_TYPE_RT + }, +}; + +static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = { + .master = &omap2430_l4_wkup_hwmod, + .slave = &omap2430_wd_timer2_hwmod, + .clk ="mpu_wdt_ick" , + .addr = omap2430_wd_timer2_addrs, + .addr_cnt =ARRAY_SIZE (omap2430_wd_timer2_addrs), + .user =OCP_USER_MPU |OCP_USER_SDMA , +}; + +/* WDTIMER common */ + +static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = { + .rev_offs =0x0 , + .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 omap2430_wd_timer_hwmod_class = { + .name ="wd_timer" , + .sysc = &omap2430_wd_timer_sysc, +}; + +/* WDTIMER2 */ +static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = { + &omap2430_l4_wkup__wd_timer2, +}; + +static struct omap_hwmod omap2430_wd_timer2_hwmod = { + .name ="wd_timer2" , + .class = &omap2430_wd_timer_hwmod_class, + .main_clk ="mpu_wdt_fck" , + .prcm = { + .omap2 = { + .prcm_reg_id =1 , + .module_bit =OMAP24XX_EN_WDT2_SHIFT , + .module_offs =WKUP_MOD , + .idlest_reg_id =1 , + .idlest_idle_bit =OMAP24XX_EN_WDT2_SHIFT , + }, + }, + .slaves = omap2430_wd_timer2_slaves, + .slaves_cnt =ARRAY_SIZE (omap2430_wd_timer2_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_IS_OMAP2430 ), +}; +static __initdata struct omap_hwmod *omap2430_hwmods[] = { &omap2430_l3_main_hwmod, &omap2430_l4_core_hwmod, &omap2430_l4_wkup_hwmod, &omap2430_mpu_hwmod, &omap2430_iva_hwmod, + &omap2430_wd_timer2_hwmod,NULL , };
Signature · 1 line
1.6.3.3
PATCH v3 4/5 OMAP4 HWMOD: Add watchdog hwmods.
From: Benoit Cousson <[email protected]>
Update omap4 hwmod file with watchdog info.
This patch is extracted from the below patch sent by Benoit
OMAP4: hwmod: Add partial hwmod support for OMAP4430 ES1.0
https://patchwork.kernel.org/patch/99052/
--- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 68 ++++++++++++++++++++++++++++ 1 files changed, 68 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod_44xx_data.c +68 -0
@@ -452,6 +452,72 @@ static struct omap_hwmod omap44xx_mpu_hwmod = { .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), }; +/* +* 'wd_timer' class +* 32-bit watchdog upward counter that generates a pulse on the reset pin on +* overflow condition +*/ + +static struct omap_hwmod_class_sysconfig omap44xx_wd_timer_sysc = { + .rev_offs =0x0000 , + .sysc_offs =0x0010 , + .syss_offs =0x0014 , + .sysc_flags = (SYSC_HAS_SIDLEMODE |SYSC_HAS_EMUFREE | +SYSC_HAS_SOFTRESET ), + .idlemodes = (SIDLE_FORCE |SIDLE_NO |SIDLE_SMART ), + .sysc_fields = &omap_hwmod_sysc_type1, +}; + +static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = { + .name ="wd_timer" , + .sysc = &omap44xx_wd_timer_sysc, +}; + +/* wd_timer2 */ +static struct omap_hwmod omap44xx_wd_timer2_hwmod; +static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = { + { .irq =80 +OMAP44XX_IRQ_GIC_START }, +}; + +static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = { + { + .pa_start =0x4a314000 , + .pa_end =0x4a31407f , + .flags =ADDR_TYPE_RT + }, +}; + +/* l4_wkup -> wd_timer2 */ +static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = { + .master = &omap44xx_l4_wkup_hwmod, + .slave = &omap44xx_wd_timer2_hwmod, + .clk ="l4_wkup_clk_mux_ck" , + .addr = omap44xx_wd_timer2_addrs, + .addr_cnt =ARRAY_SIZE (omap44xx_wd_timer2_addrs), + .user =OCP_USER_MPU |OCP_USER_SDMA , +}; + +/* wd_timer2 slave ports */ +static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = { + &omap44xx_l4_wkup__wd_timer2, +}; + +static struct omap_hwmod omap44xx_wd_timer2_hwmod = { + .name ="wd_timer2" , + .class = &omap44xx_wd_timer_hwmod_class, + .mpu_irqs = omap44xx_wd_timer2_irqs, + .mpu_irqs_cnt =ARRAY_SIZE (omap44xx_wd_timer2_irqs), + .main_clk ="wd_timer2_fck" , + .prcm = { + .omap4 = { + .clkctrl_reg =OMAP4430_CM_WKUP_WDT2_CLKCTRL , + }, + }, + .slaves = omap44xx_wd_timer2_slaves, + .slaves_cnt =ARRAY_SIZE (omap44xx_wd_timer2_slaves), + .omap_chip =OMAP_CHIP_INIT (CHIP_IS_OMAP4430 ), +}; +static __initdata struct omap_hwmod *omap44xx_hwmods[] = {/* dmm class */ &omap44xx_dmm_hwmod,
@@ -472,6 +538,8 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = {/* mpu class */ &omap44xx_mpu_hwmod, +/* wd_timer class */ + &omap44xx_wd_timer2_hwmod, NULL, };
Signature · 1 line
1.6.3.3
PATCH v3 5/5 OMAP2PLUS: WDT: Conversion to runtime PM
This patch converts the OMAP Watchdog timer driver to get adapted to HWMOD FW and to use the runtime PM APIs.
--- arch/arm/plat-omap/devices.c | 64 ++++++++++++++++++++++++++++------------- drivers/watchdog/omap_wdt.c | 43 +++++----------------------- 2 files changed, 52 insertions(+), 55 deletions(-)
arch/arm/plat-omap/devices.c +44 -20
@@ -15,6 +15,7 @@#include <linux/platform_device.h> #include <linux/io.h> #include <linux/slab.h> +#include <linux/err.h> #include <mach/hardware.h> #include <asm/mach-types.h>
@@ -28,6 +29,8 @@#include <plat/menelaus.h> #include <plat/mcbsp.h> #include <plat/omap44xx.h> +#include <plat/omap_hwmod.h> +#include <plat/omap_device.h> /*-------------------------------------------------------------------------*/
@@ -236,37 +239,58 @@ static inline void omap_init_uwire(void) {}#if defined(CONFIG_OMAP_WATCHDOG ) || defined(CONFIG_OMAP_WATCHDOG_MODULE ) -static struct resource wdt_resources[] = { +struct omap_device_pm_latency omap2_wdt_latency[] = { + [0 ] = { + .deactivate_func = omap_device_idle_hwmods, + .activate_func = omap_device_enable_hwmods, + .flags =OMAP_DEVICE_LATENCY_AUTO_ADJUST , + }, +}; + +static void omap2_init_wdt (void ) +{ +int id =-1 ; +struct omap_device *od; +struct omap_hwmod *oh; +char *oh_name ="wd_timer2" ; +char *name ="omap_wdt" ; + + oh =omap_hwmod_lookup (oh_name); +if (!oh) { +pr_err ("Could not look up %s\n" , oh_name); +return ; + } + + od =omap_device_build (name, id, oh,NULL ,0 , + omap2_wdt_latency, +ARRAY_SIZE (omap2_wdt_latency),0 ); +WARN (IS_ERR (od),"Cant build omap_device for %s:%s.\n" , + name, oh->name); +return ; +} + +static struct resource omap1_wdt_resources[] = { { + .start =0xfffeb000 , + .end =0xfffeb07F , .flags =IORESOURCE_MEM , }, }; -static struct platform_device omap_wdt_device = { +static struct platform_device omap1_wdt_device = { .name ="omap_wdt" , .id =-1 , - .num_resources =ARRAY_SIZE (wdt_resources), - .resource = wdt_resources, + .num_resources =ARRAY_SIZE (omap1_wdt_resources), + .resource = omap1_wdt_resources, };static void omap_init_wdt (void ) { -if (cpu_is_omap16xx ()) - wdt_resources[0 ].start =0xfffeb000 ; -else if (cpu_is_omap2420 ()) - wdt_resources[0 ].start =0x48022000 ;/* WDT2 */ -else if (cpu_is_omap2430 ()) - wdt_resources[0 ].start =0x49016000 ;/* WDT2 */ -else if (cpu_is_omap343x ()) - wdt_resources[0 ].start =0x48314000 ;/* WDT2 */ -else if (cpu_is_omap44xx ()) - wdt_resources[0 ].start =0x4a314000 ; -else -return ; - - wdt_resources[0 ].end = wdt_resources[0 ].start +0x4f ; - - (void )platform_device_register (&omap_wdt_device); +if (cpu_class_is_omap2 ()) +omap2_init_wdt (); +else if (cpu_is_omap16xx ()) + (void )platform_device_register (&omap1_wdt_device); +return ; }#else static inline void omap_init_wdt (void ) {}
drivers/watchdog/omap_wdt.c +8 -35
103 lines not on this page · raw message
Signature · 1 line
1.6.3.3
Re: [PATCH 5/5 v3] OMAP2PLUS: WDT: Conversion to runtime PM
Quoted 2 lines · Charulatha V
This patch converts the OMAP Watchdog timer driver to get adapted to HWMOD FW and to use the runtime PM APIs.
Technically, the driver knows nothing about the HWMOD framework, as that's an OMAP core implementation detail.
What's really happening here is two separate things:
1) conversion of driver to runtime PM instead of clock framework
2) convert platform_device/_data over to be omap_device-based
These should be done in two separate patches (and in that order.)
Other than that, the patch contents look good. Some minor comments below...
Quoted 7 lines
Signed-off-by Charulatha V <[email protected]>Signed-off-by Basak, Partha <[email protected]>--- arch/arm/plat-omap/devices.c | 64 ++++++++++++++++++++++++++++------------- drivers/watchdog/omap_wdt.c | 43 +++++----------------------- 2 files changed, 52 insertions(+), 55 deletions(-)
[...]
Quoted 7 lines
drivers/watchdog/omap_wdt.c +0
-0@@ -38,13 +38,14 @@#include <linux/err.h> #include <linux/platform_device.h>
drivers/watchdog/omap_wdt.c line 48
Quoted 10 lines
drivers/watchdog/omap_wdt.c +2
-1#include <linux/moduleparam.h> -#include <linux/clk.h> #include <linux/bitops.h> #include <linux/io.h> #include <linux/uaccess.h> #include <linux/slab.h> +#include <linux/pm_runtime.h> #include <mach/hardware.h> #include <plat/prcm.h> +#include <plat/omap_device.h>
This should not be needed in the driver, as there is no need for driver to call omap_device API.
[...]
Kevin
RE: [PATCH 5/5 v3] OMAP2PLUS: WDT: Conversion to runtime PM
Quoted 18 lines
-----Original Message-----
From: Kevin Hilman [mailto:[email protected]]
Sent: Friday, August 27, 2010 4:34 AM
To: Varadarajan, Charulatha
Cc: [email protected]; [email protected]; [email protected]; Cousson, Benoit; Nayak, Rajendra; Basak, Partha
Subject: Re: [PATCH 5/5 v3] OMAP2PLUS: WDT: Conversion to runtime PMQuoted 2 lines · Charulatha V
This patch converts the OMAP Watchdog timer driver to get adapted to HWMOD FW and to use the runtime PM APIs.
Technically, the driver knows nothing about the HWMOD framework, as that's an OMAP core implementation detail.
Quoted 6 lines
What's really happening here is two separate things:
1) conversion of driver to runtime PM instead of clock framework
2) convert platform_device/_data over to be omap_device-basedThese should be done in two separate patches (and in that order.)
Okay.
Quoted 27 lines
Other than that, the patch contents look good. Some minor comments below...
Quoted 4 lines
Signed-off-by Charulatha V <[email protected]>Signed-off-by Basak, Partha <[email protected]>--- arch/arm/plat-omap/devices.c | 64 ++++++++++++++++++++++++++++-------------
Quoted 3 lines
drivers/watchdog/omap_wdt.c | 43 +++++----------------------- 2 files changed, 52 insertions(+), 55 deletions(-)[...]
Quoted 12 lines
drivers/watchdog/omap_wdt.c +0
-1@@ -38,13 +38,14 @@#include <linux/err.h> #include <linux/platform_device.h> #include <linux/moduleparam.h> -#include <linux/clk.h> #include <linux/bitops.h> #include <linux/io.h> #include <linux/uaccess.h>
Quoted 9 lines
drivers/watchdog/omap_wdt.c line 48
Quoted 5 lines
drivers/watchdog/omap_wdt.c +2
-0#include <linux/slab.h> +#include <linux/pm_runtime.h> #include <mach/hardware.h> #include <plat/prcm.h> +#include <plat/omap_device.h> This should not be needed in the driver, as there is no need for driver to call
omap_deviceAPI.
Yes, I will not include it.
Quoted 3 lines
[...]
Kevin
Quoted 3 lines · Charulatha V
This patch series makes OMAP2PLUS Watchdog Timer Module implemented in HWMOD FW way. It also implements Watchdog timer driver to use the runtime PM layer.
minor nit: hwmod should not be capitalized, as it's not an acronym. This common across the other conversions as well, so it's not unique to you. You just got lucky and got picked on today. :)
Quoted 5 lines
This patch series is created on "origin/pm-wip/hwmods-omap4".
This patch series is tested on OMAP3430 SDP and OMAP4430 SDP. It would be of great help if someone could test the same on OMAP1 and OMAP2 boards.
At a bare minimum, this should be at least compile tested for OMAP1 & OMAP2. Also, your team should have some OMAP2 hardware. Please boot test there.
Kevin
Quoted 35 lines
Version History:
---------------
Vesrion v3:
Fix Minor comments like renaming omap1 watchdog structures with anomap1_prefixVersion v2:
Rebase to latest kernel
Some of the v2 links:
http://www.spinics.net/lists/linux-omap/msg34741.html
http://www.spinics.net/lists/linux-omap/msg34673.htmlVersion v1:
Initial series
Some of the v1 links:
http://www.spinics.net/lists/linux-omap/msg30628.html
http://www.spinics.net/lists/linux-omap/msg30625.htmlBenoit Cousson (1):
OMAP4 HWMOD: Add watchdog hwmods.Charulatha V (4):
OMAP3: WDT: Add watchdog timer HWMOD data for OMAP3
OMAP2420: WDT: Add watchdog timer HWMOD data for OMAP2420
OMAP2430: WDT: Add watchdog timer HWMOD data for OMAP2430
OMAP2PLUS: WDT: Conversion to runtime PMarch/arm/mach-omap2/omap_hwmod_2420_data.c | 59 ++++++++++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_2430_data.c | 59 ++++++++++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 61 +++++++++++++++++++++++++ arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 68 ++++++++++++++++++++++++++++ arch/arm/mach-omap2/prcm-common.h | 4 ++ arch/arm/plat-omap/devices.c | 64 ++++++++++++++++++-------- drivers/watchdog/omap_wdt.c | 43 +++-------------- 7 files changed, 303 insertions(+), 55 deletions(-)
Quoted 12 lines
-----Original Message-----
From: Kevin Hilman [mailto:[email protected]]
Sent: Friday, August 27, 2010 4:25 AM
To: Varadarajan, Charulatha
Cc: [email protected]; [email protected]; [email protected]; Cousson, Benoit; Nayak, Rajendra; Basak, Partha
Subject: Re: [PATCH 0/5 v3] OMAP2PLUS: WDT: Implement WDT in HWMOD wayCharulatha V <[email protected]> writes:
Quoted 7 lines
Quoted 3 lines
This patch series makes OMAP2PLUS Watchdog Timer Module implemented in HWMOD FW way. It also implements Watchdog timer driver to use the runtime PM layer.
minor nit: hwmod should not be capitalized, as it's not an acronym. This common across the other conversions as well, so it's not unique to you. You just got lucky and got picked on today. :)
Sure, will take care.
Quoted 10 lines
Quoted 6 lines
This patch series is created on "origin/pm-wip/hwmods-omap4".
This patch series is tested on OMAP3430 SDP and OMAP4430 SDP. It would be of great help if someone could test the same on OMAP1 and OMAP2 boards.
At a bare minimum, this should be at least compile tested for OMAP1 & OMAP2. Also, your team should have some OMAP2 hardware. Please boot test there.
Okay.
Quoted 43 lines
Kevin
Quoted 21 lines
Version History:
---------------
Vesrion v3:
Fix Minor comments like renaming omap1 watchdog structures with anomap1_prefixVersion v2:
Rebase to latest kernel
Some of the v2 links:
http://www.spinics.net/lists/linux-omap/msg34741.html
http://www.spinics.net/lists/linux-omap/msg34673.htmlVersion v1:
Initial series
Some of the v1 links:
http://www.spinics.net/lists/linux-omap/msg30628.html
http://www.spinics.net/lists/linux-omap/msg30625.htmlBenoit Cousson (1):
OMAP4 HWMOD: Add watchdog hwmods.Quoted 7 lines
Charulatha V (4):
OMAP3: WDT: Add watchdog timer HWMOD data for OMAP3
OMAP2420: WDT: Add watchdog timer HWMOD data for OMAP2420
OMAP2430: WDT: Add watchdog timer HWMOD data for OMAP2430
OMAP2PLUS: WDT: Conversion to runtime PMarch/arm/mach-omap2/omap_hwmod_2420_data.c | 59++++++++++++++++++++++++
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod_2430_data.c | 59++++++++++++++++++++++++
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 61+++++++++++++++++++++++++
Quoted 1 line
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 68++++++++++++++++++++++++++++
Quoted 2 lines
arch/arm/mach-omap2/prcm-common.h | 4 ++ arch/arm/plat-omap/devices.c | 64 ++++++++++++++++++--------
Quoted 2 lines
drivers/watchdog/omap_wdt.c | 43 +++-------------- 7 files changed, 303 insertions(+), 55 deletions(-)