RE: [PATCH v5 5/6] OMAP2PLUS: WDT: use omap_device_build for device registration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Tony Lindgren [mailto:tony@xxxxxxxxxxx]
> Sent: Wednesday, September 15, 2010 11:23 PM
> To: Varadarajan, Charulatha
> Cc: wim@xxxxxxxxx; linux-watchdog@xxxxxxxxxxxxxxx;
> khilman@xxxxxxxxxxxxxxxxxxx; paul@xxxxxxxxx; Cousson, Benoit; Nayak,
> Rajendra; Basak, Partha; linux-omap@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v5 5/6] OMAP2PLUS: WDT: use omap_device_build for
> device registration
> 
> * Varadarajan, Charulatha <charu@xxxxxx> [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.
> 

Okay.

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


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux