@@ -27,6 +27,7 @@
#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)
@@ -773,6 +774,36 @@ static inline void omap_hdq_init(void)
static inline void omap_hdq_init(void) {}
#endif
+#ifdef CONFIG_PM
+static void omap_sgx_pm_constraints(struct device *dev, u8 agent_id,
+ unsigned long r)
+{
+ omap_pm_set_min_bus_tput(dev, agent_id, r);
+}
+#else
+static inline void omap_sgx_pm_constraints(struct device *dev, u8 agent_id,
+ unsigned long r)
+{
+}
+#endif
+
+struct sgx_platform_data omap_sgx_data = {
+ .set_min_bus_tput = omap_sgx_pm_constraints,
+};
+
+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)
@@ -787,6 +818,7 @@ static int __init omap2_init_devices(void)
omap_hdq_init();
omap_init_sti();
omap_init_sha1_md5();
+ omap_init_sgx();
return 0;
}
new file mode 100644
@@ -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