All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Charulatha V <charu@ti.com>
Cc: linux-omap@vger.kernel.org, wim@iguana.be, paul@pwsan.com,
	b-cousson@ti.com, rnayak@ti.com, p-basak2@ti.com
Subject: Re: [PATCH 6/6 v2] OMAP2PLUS: WDT: Conversion to runtime PM
Date: Wed, 11 Aug 2010 11:45:21 -0700	[thread overview]
Message-ID: <87lj8d0z0e.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1281521471-15802-7-git-send-email-charu@ti.com> (Charulatha V.'s message of "Wed, 11 Aug 2010 15:41:11 +0530")

Charulatha V <charu@ti.com> writes:

> This patch converts the OMAP Watchdog timer driver to
> get adapted to HWMOD FW and to use the runtime PM APIs.
>
> Signed-off-by: Charulatha V <charu@ti.com>
> Signed-off-by: Basak, Partha <p-basak2@ti.com>

This series looks good.  One minor comment below...

> ---
>  arch/arm/plat-omap/devices.c |   52 ++++++++++++++++++++++++++++++-----------
>  drivers/watchdog/omap_wdt.c  |   43 ++++++----------------------------
>  2 files changed, 46 insertions(+), 49 deletions(-)
>
> diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
> index d1920be..efe2aff 100644
> --- a/arch/arm/plat-omap/devices.c
> +++ b/arch/arm/plat-omap/devices.c
> @@ -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>
>  
>  /*-------------------------------------------------------------------------*/
>  
> @@ -238,6 +241,8 @@ static inline void omap_init_uwire(void) {}
>  
>  static struct resource wdt_resources[] = {
>  	{
> +		.start		= 0xfffeb000,
> +		.end		= 0xfffeb07F,
>  		.flags		= IORESOURCE_MEM,
>  	},
>  };

This struct should probably be renamed with an omap1_ prefix.

> @@ -249,24 +254,43 @@ static struct platform_device omap_wdt_device = {
>  	.resource	= wdt_resources,
>  };

ditto

and they should be moved down just above omap_init_wdt()

> -static void omap_init_wdt(void)
> +struct omap_device_pm_latency omap_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()
>  {
> -	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
> +	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;
> +	}

Kevin

  reply	other threads:[~2010-08-11 18:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11 10:11 [PATCH 0/6 v2] OMAP2PLUS: WDT: Implement WDT in HWMOD way Charulatha V
2010-08-11 10:11 ` [PATCH 1/6 v2] OMAP2PLUS: WDT: Add ICLKEN, FCLKEN, WKEN shared bits for WDT Charulatha V
2010-08-11 10:11   ` [PATCH 2/6 v2] OMAP3: WDT: Add watchdog timer HWMOD data for OMAP3 Charulatha V
2010-08-11 10:11     ` [PATCH 3/6 v2] OMAP2420: WDT: Add watchdog timer HWMOD data for OMAP2420 Charulatha V
2010-08-11 10:11       ` [PATCH 4/6 v2] OMAP2430: WDT: Add watchdog timer HWMOD data for OMAP2430 Charulatha V
2010-08-11 10:11         ` [PATCH 5/6 v2] OMAP4: WDT: Enable watchdog timer2 hwmod structure Charulatha V
2010-08-11 10:11           ` [PATCH 6/6 v2] OMAP2PLUS: WDT: Conversion to runtime PM Charulatha V
2010-08-11 18:45             ` Kevin Hilman [this message]
2010-08-12  4:40               ` Varadarajan, Charulatha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lj8d0z0e.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=b-cousson@ti.com \
    --cc=charu@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=p-basak2@ti.com \
    --cc=paul@pwsan.com \
    --cc=rnayak@ti.com \
    --cc=wim@iguana.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.