From patchwork Tue Mar 30 07:06:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Agarwal, Preshit" X-Patchwork-Id: 89209 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 o2U75XqT016923 for ; Tue, 30 Mar 2010 07:05:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754846Ab0C3HFa (ORCPT ); Tue, 30 Mar 2010 03:05:30 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:45016 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752312Ab0C3HF2 convert rfc822-to-8bit (ORCPT ); Tue, 30 Mar 2010 03:05:28 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o2U75NTt004532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 30 Mar 2010 02:05:25 -0500 Received: from dbde70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id o2U75MgQ028920; Tue, 30 Mar 2010 12:35:22 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde70.ent.ti.com ([172.24.170.148]) with mapi; Tue, 30 Mar 2010 12:35:22 +0530 From: "Agarwal, Preshit" To: "linux-omap@vger.kernel.org" CC: "Pais, Allen" , "felipe.balbi@nokia.com" Date: Tue, 30 Mar 2010 12:36:33 +0530 Subject: [PATCH v3 1/1] Registering sgx device and it's platform data Thread-Topic: [PATCH v3 1/1] Registering sgx device and it's platform data Thread-Index: AcrP14e+lF+7keWTRkqyNgpgqM/HIQ== Message-ID: <19F8576C6E063C45BE387C64729E7394044DEBF372@dbde02.ent.ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 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, 30 Mar 2010 07:05:33 +0000 (UTC) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 7131d8d..fe76248 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -27,6 +27,7 @@ #include #include +#include #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; } 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..195df97 --- /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