public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Jarkko Nikula <jarkko.nikula@nokia.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] ARM: OMAP: Fix omap_wdt driver failure on 2420 when running multi-omap config
Date: Sat, 23 Aug 2008 16:18:52 -0700	[thread overview]
Message-ID: <20080823231852.GK4713@atomide.com> (raw)
In-Reply-To: <20080821123238.0d205e16.jarkko.nikula@nokia.com>

* Jarkko Nikula <jarkko.nikula@nokia.com> [080821 02:34]:
> Signed-off line was missing...
> 
> ----------------------------->
> 
> omap_wdt driver will do unhandled fault on 2420 if support for 2430 is
> compiled in since wrong base address is defined in that case. Assign
> omap_wdt base address runtime depending on cpu type.

Pushing today.

Tony


> Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
> ---
>  arch/arm/plat-omap/devices.c |   30 +++++++++++++-----------------
>  1 files changed, 13 insertions(+), 17 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
> index f22ccbb..3bd1da2 100644
> --- a/arch/arm/plat-omap/devices.c
> +++ b/arch/arm/plat-omap/devices.c
> @@ -454,25 +454,8 @@ static inline void omap_init_uwire(void) {}
>  
>  #if	defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)
>  
> -#if defined(CONFIG_ARCH_OMAP34XX)
> -#define	OMAP_WDT_BASE		0x48314000
> -#elif defined(CONFIG_ARCH_OMAP24XX)
> -
> -#ifdef CONFIG_ARCH_OMAP2430
> -/* WDT2 */
> -#define	OMAP_WDT_BASE		0x49016000
> -#else
> -#define	OMAP_WDT_BASE		0x48022000
> -#endif
> -
> -#else
> -#define	OMAP_WDT_BASE		0xfffeb000
> -#endif
> -
>  static struct resource wdt_resources[] = {
>  	{
> -		.start		= OMAP_WDT_BASE,
> -		.end		= OMAP_WDT_BASE + 0x4f,
>  		.flags		= IORESOURCE_MEM,
>  	},
>  };
> @@ -486,6 +469,19 @@ static struct platform_device omap_wdt_device = {
>  
>  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
> +		return;
> +
> +	wdt_resources[0].end = wdt_resources[0].start + 0x4f;
> +
>  	(void) platform_device_register(&omap_wdt_device);
>  }
>  #else
> -- 
> 1.5.6.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2008-08-23 23:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-21  8:20 Fixes for multi-omap configurion Jarkko Nikula
2008-08-21  8:20 ` [PATCH] ARM: OMAP2: Fix SPI driver failure on 2420 when running multi-omap config Jarkko Nikula
2008-08-23 23:17   ` Tony Lindgren
2008-08-21  8:20 ` [PATCH] ARM: OMAP: Fix omap_wdt " Jarkko Nikula
2008-08-21  9:32   ` Jarkko Nikula
2008-08-23 23:18     ` Tony Lindgren [this message]

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=20080823231852.GK4713@atomide.com \
    --to=tony@atomide.com \
    --cc=jarkko.nikula@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox