From patchwork Tue May 11 06:54:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: manjugk manjugk X-Patchwork-Id: 98610 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4B6smgt019639 for ; Tue, 11 May 2010 06:54:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933102Ab0EKGys (ORCPT ); Tue, 11 May 2010 02:54:48 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:59822 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933045Ab0EKGyr (ORCPT ); Tue, 11 May 2010 02:54:47 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o4B6sg7m030064 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 May 2010 01:54:45 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id o4B6saAu003455; Tue, 11 May 2010 12:24:37 +0530 (IST) From: Manjunatha GK To: linux-omap@vger.kernel.org Cc: Preshit Agarwal , Tony Lindgren , Kevin Hilman , Mike Turquette , Hemanth V Subject: [PATCH v3] OMAP3: Registering sgx device and it's platform data Date: Tue, 11 May 2010 12:24:59 +0530 Message-Id: <1273560899-4449-1-git-send-email-manjugk@ti.com> X-Mailer: git-send-email 1.6.3.3 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 11 May 2010 06:54:49 +0000 (UTC) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 20fa76e..aabbf7b 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -26,7 +26,7 @@ #include #include #include - +#include #include "mux.h" #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) @@ -791,6 +791,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) @@ -805,7 +827,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 + +struct sgx_platform_data { + void(*set_min_bus_tput)(struct device *dev, u8 agent_id, + unsigned long r); +}; + +#endif