From patchwork Sat May 1 00:45:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gomez Castellanos, Ivan" X-Patchwork-Id: 96128 X-Patchwork-Delegate: omar.ramirez@ti.com 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 o410rDpb014903 for ; Sat, 1 May 2010 00:53:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758488Ab0EAAxL (ORCPT ); Fri, 30 Apr 2010 20:53:11 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:49441 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757773Ab0EAAwz (ORCPT ); Fri, 30 Apr 2010 20:52:55 -0400 Received: from dlep34.itg.ti.com ([157.170.170.115]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o410qmfV031988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Apr 2010 19:52:48 -0500 Received: from emcc1.sasken-mty.naucm.ext.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id o410qloU006087; Fri, 30 Apr 2010 19:52:48 -0500 (CDT) Received: from localhost.localdomain (x0128362-desktop.sasken-mty.naucm.ext.ti.com [10.87.231.130]) by emcc1.sasken-mty.naucm.ext.ti.com (8.13.8+Sun/8.13.8) with ESMTP id o410qj6J019432; Fri, 30 Apr 2010 19:52:47 -0500 (CDT) From: Ivan Gomez Castellanos To: linux-omap@vger.kernel.org Cc: Hiroshi.DOYU@nokia.com, ameya.palande@nokia.com, felipe.contreras@nokia.com, Ivan Gomez Castellanos Subject: [PATCH 09/11] DSPBRIDGE: Append the content of _dcd.h into dspapi.h Date: Fri, 30 Apr 2010 19:45:49 -0500 Message-Id: <1272674751-21557-10-git-send-email-ivan.gomez@ti.com> X-Mailer: git-send-email 1.7.0.3 In-Reply-To: <1272674751-21557-1-git-send-email-ivan.gomez@ti.com> References: <1272674751-21557-1-git-send-email-ivan.gomez@ti.com> 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]); Sat, 01 May 2010 00:53:13 +0000 (UTC) diff --git a/arch/arm/plat-omap/include/dspbridge/_dcd.h b/arch/arm/plat-omap/include/dspbridge/_dcd.h deleted file mode 100644 index 4c3f701..0000000 --- a/arch/arm/plat-omap/include/dspbridge/_dcd.h +++ /dev/null @@ -1,152 +0,0 @@ -/* - * _dcd.h - * - * DSP-BIOS Bridge driver support functions for TI OMAP processors. - * - * Includes the wrapper functions called directly by the - * DeviceIOControl interface. - * - * Copyright (C) 2005-2006 Texas Instruments, Inc. - * - * This package is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#ifndef _WCD_ -#define _WCD_ - -#include - -/* - * ======== api_call_dev_ioctl ======== - * Purpose: - * Call the (wrapper) function for the corresponding API IOCTL. - * Parameters: - * cmd: IOCTL id, base 0. - * args: Argument structure. - * pResult: - * Returns: - * DSP_SOK if command called; DSP_EINVALIDARG if command not in IOCTL - * table. - * Requires: - * Ensures: - */ -extern dsp_status api_call_dev_ioctl(unsigned int cmd, - union Trapped_Args *args, - u32 *pResult, void *pr_ctxt); - -/* - * ======== api_init ======== - * Purpose: - * Initialize modules used by Bridge API. - * This procedure is called when the driver is loaded. - * Parameters: - * Returns: - * TRUE if success; FALSE otherwise. - * Requires: - * Ensures: - */ -extern bool api_init(void); - -/* - * ======== api_init_complete2 ======== - * Purpose: - * Perform any required bridge initialization which cannot - * be performed in api_init() or dev_start_device() due - * to the fact that some services are not yet - * completely initialized. - * Parameters: - * Returns: - * DSP_SOK: Allow this device to load - * DSP_EFAIL: Failure. - * Requires: - * Bridge API initialized. - * Ensures: - */ -extern dsp_status api_init_complete2(void); - -/* - * ======== api_exit ======== - * Purpose: - * Exit all modules initialized in api_init(void). - * This procedure is called when the driver is unloaded. - * Parameters: - * Returns: - * Requires: - * api_init(void) was previously called. - * Ensures: - * Resources acquired in api_init(void) are freed. - */ -extern void api_exit(void); - -/* MGR wrapper functions */ -extern u32 mgrwrap_enum_node_info(union Trapped_Args *args, void *pr_ctxt); -extern u32 mgrwrap_enum_proc_info(union Trapped_Args *args, void *pr_ctxt); -extern u32 mgrwrap_register_object(union Trapped_Args *args, void *pr_ctxt); -extern u32 mgrwrap_unregister_object(union Trapped_Args *args, void *pr_ctxt); -extern u32 mgrwrap_wait_for_bridge_events(union Trapped_Args *args, - void *pr_ctxt); - -extern u32 mgrwrap_get_process_resources_info(union Trapped_Args *args, - void *pr_ctxt); - -/* CPRC (Processor) wrapper Functions */ -extern u32 procwrap_attach(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_ctrl(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_detach(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_enum_node_info(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_enum_resources(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_get_state(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_get_trace(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_load(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_register_notify(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_start(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_reserve_memory(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_un_reserve_memory(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_map(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_un_map(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_flush_memory(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_stop(union Trapped_Args *args, void *pr_ctxt); -extern u32 procwrap_invalidate_memory(union Trapped_Args *args, void *pr_ctxt); - -/* NODE wrapper functions */ -extern u32 nodewrap_allocate(union Trapped_Args *args, void *pr_ctxt); -extern u32 nodewrap_alloc_msg_buf(union Trapped_Args *args, void *pr_ctxt); -extern u32 nodewrap_change_priority(union Trapped_Args *args, void *pr_ctxt); -extern u32 nodewrap_connect(union Trapped_Args *args, void *pr_ctxt); -extern u32 nodewrap_create(union Trapped_Args *args, void *pr_ctxt); -extern u32 nodewrap_delete(union Trapped_Args *args, void *pr_ctxt); -extern u32 nodewrap_free_msg_buf(union Trapped_Args *args, void *pr_ctxt); -extern u32 nodewrap_get_attr(union Trapped_Args *args, void *pr_ctxt); -extern u32 nodewrap_get_message(union Trapped_Args *args, void *pr_ctxt); -extern u32 nodewrap_pause(union Trapped_Args *args, void *pr_ctxt); -extern u32 nodewrap_put_message(union Trapped_Args *args, void *pr_ctxt); -extern u32 nodewrap_register_notify(union Trapped_Args *args, void *pr_ctxt); -extern u32 nodewrap_run(union Trapped_Args *args, void *pr_ctxt); -extern u32 nodewrap_terminate(union Trapped_Args *args, void *pr_ctxt); -extern u32 nodewrap_get_uuid_props(union Trapped_Args *args, void *pr_ctxt); - -/* STRM wrapper functions */ -extern u32 strmwrap_allocate_buffer(union Trapped_Args *args, void *pr_ctxt); -extern u32 strmwrap_close(union Trapped_Args *args, void *pr_ctxt); -extern u32 strmwrap_free_buffer(union Trapped_Args *args, void *pr_ctxt); -extern u32 strmwrap_get_event_handle(union Trapped_Args *args, void *pr_ctxt); -extern u32 strmwrap_get_info(union Trapped_Args *args, void *pr_ctxt); -extern u32 strmwrap_idle(union Trapped_Args *args, void *pr_ctxt); -extern u32 strmwrap_issue(union Trapped_Args *args, void *pr_ctxt); -extern u32 strmwrap_open(union Trapped_Args *args, void *pr_ctxt); -extern u32 strmwrap_reclaim(union Trapped_Args *args, void *pr_ctxt); -extern u32 strmwrap_register_notify(union Trapped_Args *args, void *pr_ctxt); -extern u32 strmwrap_select(union Trapped_Args *args, void *pr_ctxt); - -extern u32 cmmwrap_calloc_buf(union Trapped_Args *args, void *pr_ctxt); -extern u32 cmmwrap_free_buf(union Trapped_Args *args, void *pr_ctxt); -extern u32 cmmwrap_get_handle(union Trapped_Args *args, void *pr_ctxt); -extern u32 cmmwrap_get_info(union Trapped_Args *args, void *pr_ctxt); - -#endif /* _WCD_ */ diff --git a/arch/arm/plat-omap/include/dspbridge/dspapi.h b/arch/arm/plat-omap/include/dspbridge/dspapi.h index 232aab0..9589574 100644 --- a/arch/arm/plat-omap/include/dspbridge/dspapi.h +++ b/arch/arm/plat-omap/include/dspbridge/dspapi.h @@ -3,17 +3,17 @@ * * DSP-BIOS Bridge driver support functions for TI OMAP processors. * - * Bridge class driver library functions, object definitions, and - * return error/status codes. To be included by Bridge mini drivers. + * Includes the wrapper functions called directly by the + * DeviceIOControl interface. * * Notes: - * Bridge Class Driver services exported to WMD's are initialized by the - * WCD on behalf of the WMD. WMD's must not call module Init/Exit + * Bridge services exported to Bridge driver are initialized by the DSPAPI on + * behalf of the Bridge driver. Bridge driver must not call module Init/Exit * functions. * - * To ensure WMD binary compatibility across different platforms, - * for the same processor, a WMD must restrict its usage of system - * services to those exported by the 'Bridge class library. + * To ensure Bridge driver binary compatibility across different platforms, + * for the same processor, a Bridge driver must restrict its usage of system + * services to those exported by the DSPAPI library. * * Copyright (C) 2005-2006 Texas Instruments, Inc. * @@ -26,11 +26,142 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef WCD_ -#define WCD_ +#ifndef DSPAPI_ +#define DSPAPI_ + +#include /* This BRD API Library Version: */ #define BRD_API_MAJOR_VERSION (u32)8 /* .8x - Alpha, .9x - Beta, 1.x FCS */ #define BRD_API_MINOR_VERSION (u32)0 -#endif /* WCD_ */ + +/* + * ======== api_call_dev_ioctl ======== + * Purpose: + * Call the (wrapper) function for the corresponding API IOCTL. + * Parameters: + * cmd: IOCTL id, base 0. + * args: Argument structure. + * pResult: + * Returns: + * DSP_SOK if command called; DSP_EINVALIDARG if command not in IOCTL + * table. + * Requires: + * Ensures: + */ +extern dsp_status api_call_dev_ioctl(unsigned int cmd, + union Trapped_Args *args, + u32 *pResult, void *pr_ctxt); + +/* + * ======== api_init ======== + * Purpose: + * Initialize modules used by Bridge API. + * This procedure is called when the driver is loaded. + * Parameters: + * Returns: + * TRUE if success; FALSE otherwise. + * Requires: + * Ensures: + */ +extern bool api_init(void); + +/* + * ======== api_init_complete2 ======== + * Purpose: + * Perform any required bridge initialization which cannot + * be performed in api_init() or dev_start_device() due + * to the fact that some services are not yet + * completely initialized. + * Parameters: + * Returns: + * DSP_SOK: Allow this device to load + * DSP_EFAIL: Failure. + * Requires: + * Bridge API initialized. + * Ensures: + */ +extern dsp_status api_init_complete2(void); + +/* + * ======== api_exit ======== + * Purpose: + * Exit all modules initialized in api_init(void). + * This procedure is called when the driver is unloaded. + * Parameters: + * Returns: + * Requires: + * api_init(void) was previously called. + * Ensures: + * Resources acquired in api_init(void) are freed. + */ +extern void api_exit(void); + +/* MGR wrapper functions */ +extern u32 mgrwrap_enum_node_info(union Trapped_Args *args, void *pr_ctxt); +extern u32 mgrwrap_enum_proc_info(union Trapped_Args *args, void *pr_ctxt); +extern u32 mgrwrap_register_object(union Trapped_Args *args, void *pr_ctxt); +extern u32 mgrwrap_unregister_object(union Trapped_Args *args, void *pr_ctxt); +extern u32 mgrwrap_wait_for_bridge_events(union Trapped_Args *args, + void *pr_ctxt); + +extern u32 mgrwrap_get_process_resources_info(union Trapped_Args *args, + void *pr_ctxt); + +/* CPRC (Processor) wrapper Functions */ +extern u32 procwrap_attach(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_ctrl(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_detach(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_enum_node_info(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_enum_resources(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_get_state(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_get_trace(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_load(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_register_notify(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_start(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_reserve_memory(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_un_reserve_memory(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_map(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_un_map(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_flush_memory(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_stop(union Trapped_Args *args, void *pr_ctxt); +extern u32 procwrap_invalidate_memory(union Trapped_Args *args, void *pr_ctxt); + +/* NODE wrapper functions */ +extern u32 nodewrap_allocate(union Trapped_Args *args, void *pr_ctxt); +extern u32 nodewrap_alloc_msg_buf(union Trapped_Args *args, void *pr_ctxt); +extern u32 nodewrap_change_priority(union Trapped_Args *args, void *pr_ctxt); +extern u32 nodewrap_connect(union Trapped_Args *args, void *pr_ctxt); +extern u32 nodewrap_create(union Trapped_Args *args, void *pr_ctxt); +extern u32 nodewrap_delete(union Trapped_Args *args, void *pr_ctxt); +extern u32 nodewrap_free_msg_buf(union Trapped_Args *args, void *pr_ctxt); +extern u32 nodewrap_get_attr(union Trapped_Args *args, void *pr_ctxt); +extern u32 nodewrap_get_message(union Trapped_Args *args, void *pr_ctxt); +extern u32 nodewrap_pause(union Trapped_Args *args, void *pr_ctxt); +extern u32 nodewrap_put_message(union Trapped_Args *args, void *pr_ctxt); +extern u32 nodewrap_register_notify(union Trapped_Args *args, void *pr_ctxt); +extern u32 nodewrap_run(union Trapped_Args *args, void *pr_ctxt); +extern u32 nodewrap_terminate(union Trapped_Args *args, void *pr_ctxt); +extern u32 nodewrap_get_uuid_props(union Trapped_Args *args, void *pr_ctxt); + +/* STRM wrapper functions */ +extern u32 strmwrap_allocate_buffer(union Trapped_Args *args, void *pr_ctxt); +extern u32 strmwrap_close(union Trapped_Args *args, void *pr_ctxt); +extern u32 strmwrap_free_buffer(union Trapped_Args *args, void *pr_ctxt); +extern u32 strmwrap_get_event_handle(union Trapped_Args *args, void *pr_ctxt); +extern u32 strmwrap_get_info(union Trapped_Args *args, void *pr_ctxt); +extern u32 strmwrap_idle(union Trapped_Args *args, void *pr_ctxt); +extern u32 strmwrap_issue(union Trapped_Args *args, void *pr_ctxt); +extern u32 strmwrap_open(union Trapped_Args *args, void *pr_ctxt); +extern u32 strmwrap_reclaim(union Trapped_Args *args, void *pr_ctxt); +extern u32 strmwrap_register_notify(union Trapped_Args *args, void *pr_ctxt); +extern u32 strmwrap_select(union Trapped_Args *args, void *pr_ctxt); + +extern u32 cmmwrap_calloc_buf(union Trapped_Args *args, void *pr_ctxt); +extern u32 cmmwrap_free_buf(union Trapped_Args *args, void *pr_ctxt); +extern u32 cmmwrap_get_handle(union Trapped_Args *args, void *pr_ctxt); +extern u32 cmmwrap_get_info(union Trapped_Args *args, void *pr_ctxt); + + +#endif /* DSPAPI_ */ diff --git a/drivers/dsp/bridge/pmgr/dspapi.c b/drivers/dsp/bridge/pmgr/dspapi.c index 1ac7e78..2274e21 100644 --- a/drivers/dsp/bridge/pmgr/dspapi.c +++ b/drivers/dsp/bridge/pmgr/dspapi.c @@ -53,7 +53,7 @@ #include /* ----------------------------------- This */ -#include +#include #include #include diff --git a/drivers/dsp/bridge/rmgr/drv_interface.c b/drivers/dsp/bridge/rmgr/drv_interface.c index 70e1a3a..bf1e562 100644 --- a/drivers/dsp/bridge/rmgr/drv_interface.c +++ b/drivers/dsp/bridge/rmgr/drv_interface.c @@ -46,7 +46,7 @@ /* ----------------------------------- Platform Manager */ #include -#include +#include #include /* ----------------------------------- Resource Manager */ diff --git a/drivers/dsp/bridge/rmgr/dspdrv.c b/drivers/dsp/bridge/rmgr/dspdrv.c index 175582a..cbdfa73 100644 --- a/drivers/dsp/bridge/rmgr/dspdrv.c +++ b/drivers/dsp/bridge/rmgr/dspdrv.c @@ -34,7 +34,7 @@ /* ----------------------------------- Platform Manager */ #include #include -#include +#include /* ----------------------------------- Resource Manager */ #include