From: Manjunatha GK <manjugk@ti.com>
To: linux-omap@vger.kernel.org
Cc: Preshit Agarwal <preshit.agarwal@ti.com>,
Tony Lindgren <tony@atomide.com>,
Kevin Hilman <khilman@deeprootsystems.com>,
Mike Turquette <mturquette@ti.com>, Hemanth V <hemanthv@ti.com>
Subject: [PATCH v2] OMAP3: Registering sgx device and it's platform data
Date: Tue, 4 May 2010 21:29:46 +0530 [thread overview]
Message-ID: <1272988786-2005-2-git-send-email-manjugk@ti.com> (raw)
In-Reply-To: <1272988786-2005-1-git-send-email-manjugk@ti.com>
The SGX powervr_device is registered with it's platform specific
data to provide information about setting constraint through
omap_pm_set_min_bus_tput.
Signed-off-by: Preshit Agarwal <preshit.agarwal@ti.com>
Signed-off-by: Manjunatha GK <manjugk@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Mike Turquette <mturquette@ti.com>
Cc: Hemanth V <hemanthv@ti.com>
---
arch/arm/mach-omap2/devices.c | 26 ++++++++++++++++++++++-
arch/arm/mach-omap2/include/mach/omap_sgxdef.h | 11 ++++++++++
2 files changed, 35 insertions(+), 2 deletions(-)
create mode 100644 arch/arm/mach-omap2/include/mach/omap_sgxdef.h
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 2271b9b..b624f13 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -26,7 +26,7 @@
#include <plat/mux.h>
#include <mach/gpio.h>
#include <plat/mmc.h>
-
+#include <mach/omap_sgxdef.h>
#include "mux.h"
#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
@@ -786,6 +786,28 @@ static inline void omap_hdq_init(void)
static inline void omap_hdq_init(void) {}
#endif
+struct sgx_platform_data omap_sgx_data = {
+#ifdef CONFIG_PM
+ .set_min_bus_tput = omap_pm_set_min_bus_tput,
+#else
+ .set_min_bus_tput = NULL;
+#endif
+};
+
+static struct platform_device powervr_device = {
+ .name = "pvrsrvkm",
+ .id = -1,
+ .dev = {
+ .platform_data = &omap_sgx_data,
+ }
+};
+
+static void omap_init_sgx(void)
+{
+ (void) platform_device_register(&powervr_device);
+}
+
+
/*-------------------------------------------------------------------------*/
static int __init omap2_init_devices(void)
@@ -800,7 +822,7 @@ static int __init omap2_init_devices(void)
omap_hdq_init();
omap_init_sti();
omap_init_sha1_md5();
-
+ omap_init_sgx();
return 0;
}
arch_initcall(omap2_init_devices);
diff --git a/arch/arm/mach-omap2/include/mach/omap_sgxdef.h b/arch/arm/mach-omap2/include/mach/omap_sgxdef.h
new file mode 100644
index 0000000..5d90a6a
--- /dev/null
+++ b/arch/arm/mach-omap2/include/mach/omap_sgxdef.h
@@ -0,0 +1,11 @@
+#ifndef OMAP_SGXDEF_H
+#define OMAP_SGXDEF_H
+
+#include <plat/omap-pm.h>
+
+struct sgx_platform_data {
+ void(*set_min_bus_tput)(struct device *dev, u8 agent_id,
+ unsigned long r);
+};
+
+#endif
--
1.6.0.4
next prev parent reply other threads:[~2010-05-04 16:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 15:59 [PATCH v7] OMAP2/3: I2C: Errata ID i207: Clear wrong RDR interrupt Manjunatha GK
2010-05-04 15:59 ` Manjunatha GK [this message]
2010-05-05 9:24 ` [PATCH v2] OMAP3: Registering sgx device and it's platform data G, Manjunath Kondaiah
2010-05-10 22:48 ` [APPLIED] [PATCH v7] OMAP2/3: I2C: Errata ID i207: Clear wrong RDR interrupt 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=1272988786-2005-2-git-send-email-manjugk@ti.com \
--to=manjugk@ti.com \
--cc=hemanthv@ti.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=mturquette@ti.com \
--cc=preshit.agarwal@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).