* Varadarajan, Charulatha <ch...@ti.com> [100914 22:18]:
> Use omap_device_build API instead of platform_device_register for
> watchdog timer device registration.
> 
> For OMAP2PLUS chips, the device specific data defined in centralized
> hwmod database will be used.

<snip>

>  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) {}

Please just split this into separate omap_init_wdt functions
under mach-omap1 and mach-omap2. Then set them up with
subsys_initcall and make sure you return early from the
subsys_initcall if the platform is not the right one.

Tony
--
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

Reply via email to