linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thara Gopinath <thara@ti.com>
To: linux-omap@vger.kernel.org
Cc: khilman@deeprootsystems.com, tony@atomide.com, sawant@ti.com,
	Thara Gopinath <thara@ti.com>
Subject: [PATCH 4/9] OMAP2: Support for early device registration
Date: Sat, 29 May 2010 20:07:06 +0530	[thread overview]
Message-ID: <1275143831-7629-5-git-send-email-thara@ti.com> (raw)
In-Reply-To: <1275143831-7629-4-git-send-email-thara@ti.com>

This patch adds a new API in the common boot up sequence to register
early drivers and probe for early devices. This API can be used by any
early device to register itself.
This patch also adds support to register "earlytimer" drivers and
probe for any associated devices that are registered as early devices.

Signed-off-by: Thara Gopinath <thara@ti.com>
---
 arch/arm/mach-omap2/io.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 3bf1cb4..edf1146 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -23,6 +23,7 @@
 #include <linux/io.h>
 #include <linux/clk.h>
 #include <linux/omapfb.h>
+#include <linux/platform_device.h>
 
 #include <asm/tlb.h>
 
@@ -47,6 +48,8 @@
 #include "clockdomains.h"
 #include <plat/omap_hwmod.h>
 
+#include "dmtimers.h"
+
 /*
  * The machine specific code may provide the extra mapping besides the
  * default mapping provided here.
@@ -304,6 +307,16 @@ static int __init _omap2_init_reprogram_sdrc(void)
 	return v;
 }
 
+static void __init omap_init_early_devices(void)
+{
+	int timer_count;
+
+	early_platform_driver_register_all("earlytimer");
+	timer_count = omap2_get_early_timer_count();
+	early_platform_driver_probe("earlytimer", timer_count, 0);
+	/* Add any other early devices needed here */
+}
+
 void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
 				 struct omap_sdrc_params *sdrc_cs1)
 {
@@ -341,4 +354,7 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
 		_omap2_init_reprogram_sdrc();
 	}
 	gpmc_init();
+	omap2_dm_timer_early_init();
+	/* Call the probe for all early devices */
+	omap_init_early_devices();
 }
-- 
1.7.0.rc1.33.g07cf0f


  reply	other threads:[~2010-05-29 14:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-29 14:37 [PATCH 0/9] OMAP: DMTIMER: Convert platform driver so as to make use of hwmod + omap device framework for OMAP2 PLUS Thara Gopinath
2010-05-29 14:37 ` [PATCH 1/9] OMAP: Convert dual mode timer into a platform driver Thara Gopinath
2010-05-29 14:37   ` [PATCH 2/9] OMAP1: Dual mode timer device registration Thara Gopinath
2010-05-29 14:37     ` [PATCH 3/9] OMAP2/3/4 : " Thara Gopinath
2010-05-29 14:37       ` Thara Gopinath [this message]
2010-05-29 14:37         ` [PATCH 5/9] OMAP2/3/4: Adding device names to dmtimer fclk nodes Thara Gopinath
2010-05-29 14:37           ` [PATCH 6/9] OMAP3: Add hwmod data for OMAP3 dual mode timers Thara Gopinath
2010-05-29 14:37             ` [PATCH 7/9] OMAP2: Add hwmod data for OMAP2420 " Thara Gopinath
2010-05-29 14:37               ` [PATCH 8/9] OMAP2: Add hwmod data for OMAP2430 " Thara Gopinath
2010-05-29 14:37                 ` [PATCH 9/9] OMAP4: Changing dmtimer1 fclk name Thara Gopinath
2010-06-03 23:19         ` [PATCH 4/9] OMAP2: Support for early device registration Kevin Hilman
2010-05-30 23:02       ` [PATCH 3/9] OMAP2/3/4 : Dual mode timer " Benoit Cousson
2010-06-01  9:20         ` Tony Lindgren
2010-06-03  9:30           ` Gopinath, Thara
2010-06-03 23:18       ` Kevin Hilman
2010-06-03 23:24       ` Kevin Hilman
2010-06-03 19:47   ` [PATCH 1/9] OMAP: Convert dual mode timer into a platform driver Kevin Hilman
2010-05-30 22:11 ` [PATCH 0/9] OMAP: DMTIMER: Convert platform driver so as to make use of hwmod + omap device framework for OMAP2 PLUS Benoit Cousson
2010-06-03 22:20   ` Kevin Hilman
2010-06-03 22:29     ` Benoit
2010-06-03 23:46       ` Kevin Hilman
2010-06-01  9:37 ` Tony Lindgren

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=1275143831-7629-5-git-send-email-thara@ti.com \
    --to=thara@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=sawant@ti.com \
    --cc=tony@atomide.com \
    /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).