From: Tony Lindgren <tony@atomide.com>
To: "Varadarajan, Charulatha" <charu@ti.com>
Cc: wim@iguana.be, linux-watchdog@vger.kernel.org,
khilman@deeprootsystems.com, paul@pwsan.com, b-cousson@ti.com,
rnayak@ti.com, p-basak2@ti.com, linux-omap@vger.kernel.org
Subject: Re: [PATCH v5 5/6] OMAP2PLUS: WDT: use omap_device_build for device registration
Date: Wed, 15 Sep 2010 10:52:49 -0700 [thread overview]
Message-ID: <20100915175248.GC4174@atomide.com> (raw)
In-Reply-To: <1284528403-6494-6-git-send-email-charu@ti.com>
* Varadarajan, Charulatha <charu@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
next prev parent reply other threads:[~2010-09-15 17:52 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-15 5:26 [PATCH v5 0/6] OMAP: WDT: Implement WDT in hwmod way Varadarajan, Charulatha
2010-09-15 5:26 ` [PATCH v5 1/6] OMAP3: hwmod data: Add watchdog timer Varadarajan, Charulatha
2010-09-15 21:26 ` Cousson, Benoit
2010-09-16 13:00 ` Varadarajan, Charulatha
2010-09-15 5:26 ` [PATCH v5 2/6] OMAP2420: " Varadarajan, Charulatha
2010-09-15 5:26 ` [PATCH v5 3/6] OMAP2430: " Varadarajan, Charulatha
2010-09-15 5:26 ` [PATCH v5 4/6] OMAP4: " Varadarajan, Charulatha
2010-09-15 21:18 ` Cousson, Benoit
2010-09-17 9:23 ` Varadarajan, Charulatha
2010-09-17 9:55 ` Cousson, Benoit
2010-09-17 9:56 ` Varadarajan, Charulatha
2010-09-17 14:27 ` Kevin Hilman
2010-09-17 14:33 ` Cousson, Benoit
2010-09-17 15:18 ` Kevin Hilman
2010-09-15 21:35 ` Cousson, Benoit
2010-09-16 13:02 ` Varadarajan, Charulatha
2010-09-15 5:26 ` [PATCH v5 5/6] OMAP2PLUS: WDT: use omap_device_build for device registration Varadarajan, Charulatha
2010-09-15 17:52 ` Tony Lindgren [this message]
2010-09-16 13:05 ` Varadarajan, Charulatha
2010-09-15 5:26 ` [PATCH v5 6/6] OMAP: WDT: Use PM runtime APIs instead of clk FW APIs Varadarajan, Charulatha
2010-09-15 14:45 ` Kevin Hilman
2010-09-15 17:55 ` Tony Lindgren
2010-09-15 19:31 ` Kevin Hilman
2010-09-15 18:40 ` Wim Van Sebroeck
2010-09-15 21:41 ` Cousson, Benoit
2010-09-16 13:37 ` Varadarajan, Charulatha
2010-09-16 13:57 ` Cousson, Benoit
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=20100915175248.GC4174@atomide.com \
--to=tony@atomide.com \
--cc=b-cousson@ti.com \
--cc=charu@ti.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=linux-watchdog@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).