Commit 6280238c authored by Omar Ramirez Luna's avatar Omar Ramirez Luna Committed by Greg Kroah-Hartman

staging: ti dspbridge: add header files

Add TI's DSP Bridge driver header files
Signed-off-by: default avatarOmar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: default avatarKanigeri, Hari <h-kanigeri2@ti.com>
Signed-off-by: default avatarAmeya Palande <ameya.palande@nokia.com>
Signed-off-by: default avatarGuzman Lugo, Fernando <fernando.lugo@ti.com>
Signed-off-by: default avatarHebbar, Shivananda <x0hebbar@ti.com>
Signed-off-by: default avatarRamos Falcon, Ernesto <ernesto@ti.com>
Signed-off-by: default avatarFelipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: default avatarAnna, Suman <s-anna@ti.com>
Signed-off-by: default avatarGupta, Ramesh <grgupta@ti.com>
Signed-off-by: default avatarGomez Castellanos, Ivan <ivan.gomez@ti.com>
Signed-off-by: default avatarAndy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: default avatarArmando Uribe De Leon <x0095078@ti.com>
Signed-off-by: default avatarDeepak Chitriki <deepak.chitriki@ti.com>
Signed-off-by: default avatarMenon, Nishanth <nm@ti.com>
Signed-off-by: default avatarPhil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 26f8db7d
/*
* _chnl_sm.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Private header file defining channel manager and channel objects for
* a shared memory channel driver.
*
* Shared between the modules implementing the shared memory channel class
* library.
*
* 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 _CHNL_SM_
#define _CHNL_SM_
#include <dspbridge/dspapi.h>
#include <dspbridge/dspdefs.h>
#include <dspbridge/list.h>
#include <dspbridge/ntfy.h>
/*
* These target side symbols define the beginning and ending addresses
* of shared memory buffer. They are defined in the *cfg.cmd file by
* cdb code.
*/
#define CHNL_SHARED_BUFFER_BASE_SYM "_SHM_BEG"
#define CHNL_SHARED_BUFFER_LIMIT_SYM "_SHM_END"
#define BRIDGEINIT_BIOSGPTIMER "_BRIDGEINIT_BIOSGPTIMER"
#define BRIDGEINIT_LOADMON_GPTIMER "_BRIDGEINIT_LOADMON_GPTIMER"
#ifndef _CHNL_WORDSIZE
#define _CHNL_WORDSIZE 4 /* default _CHNL_WORDSIZE is 2 bytes/word */
#endif
#define MAXOPPS 16
/* Shared memory config options */
#define SHM_CURROPP 0 /* Set current OPP in shm */
#define SHM_OPPINFO 1 /* Set dsp voltage and freq table values */
#define SHM_GETOPP 2 /* Get opp requested by DSP */
struct opp_table_entry {
u32 voltage;
u32 frequency;
u32 min_freq;
u32 max_freq;
};
struct opp_struct {
u32 curr_opp_pt;
u32 num_opp_pts;
struct opp_table_entry opp_point[MAXOPPS];
};
/* Request to MPU */
struct opp_rqst_struct {
u32 rqst_dsp_freq;
u32 rqst_opp_pt;
};
/* Info to MPU */
struct load_mon_struct {
u32 curr_dsp_load;
u32 curr_dsp_freq;
u32 pred_dsp_load;
u32 pred_dsp_freq;
};
/* Structure in shared between DSP and PC for communication. */
struct shm {
u32 dsp_free_mask; /* Written by DSP, read by PC. */
u32 host_free_mask; /* Written by PC, read by DSP */
u32 input_full; /* Input channel has unread data. */
u32 input_id; /* Channel for which input is available. */
u32 input_size; /* Size of data block (in DSP words). */
u32 output_full; /* Output channel has unread data. */
u32 output_id; /* Channel for which output is available. */
u32 output_size; /* Size of data block (in DSP words). */
u32 arg; /* Arg for Issue/Reclaim (23 bits for 55x). */
u32 resvd; /* Keep structure size even for 32-bit DSPs */
/* Operating Point structure */
struct opp_struct opp_table_struct;
/* Operating Point Request structure */
struct opp_rqst_struct opp_request;
/* load monitor information structure */
struct load_mon_struct load_mon_info;
#ifdef CONFIG_BRIDGE_WDT3
/* Flag for WDT enable/disable F/I clocks */
u32 wdt_setclocks;
u32 wdt_overflow; /* WDT overflow time */
char dummy[176]; /* padding to 256 byte boundary */
#else
char dummy[184]; /* padding to 256 byte boundary */
#endif
u32 shm_dbg_var[64]; /* shared memory debug variables */
};
/* Channel Manager: only one created per board: */
struct chnl_mgr {
/* Function interface to Bridge driver */
struct bridge_drv_interface *intf_fxns;
struct io_mgr *hio_mgr; /* IO manager */
/* Device this board represents */
struct dev_object *hdev_obj;
/* These fields initialized in bridge_chnl_create(): */
u32 dw_output_mask; /* Host output channels w/ full buffers */
u32 dw_last_output; /* Last output channel fired from DPC */
/* Critical section object handle */
spinlock_t chnl_mgr_lock;
u32 word_size; /* Size in bytes of DSP word */
u8 max_channels; /* Total number of channels */
u8 open_channels; /* Total number of open channels */
struct chnl_object **ap_channel; /* Array of channels */
u8 dw_type; /* Type of channel class library */
/* If no shm syms, return for CHNL_Open */
int chnl_open_status;
};
/*
* Channel: up to CHNL_MAXCHANNELS per board or if DSP-DMA supported then
* up to CHNL_MAXCHANNELS + CHNL_MAXDDMACHNLS per board.
*/
struct chnl_object {
/* Pointer back to channel manager */
struct chnl_mgr *chnl_mgr_obj;
u32 chnl_id; /* Channel id */
u8 dw_state; /* Current channel state */
s8 chnl_mode; /* Chnl mode and attributes */
/* Chnl I/O completion event (user mode) */
void *user_event;
/* Abstract syncronization object */
struct sync_object *sync_event;
u32 process; /* Process which created this channel */
u32 pcb_arg; /* Argument to use with callback */
struct lst_list *pio_requests; /* List of IOR's to driver */
s32 cio_cs; /* Number of IOC's in queue */
s32 cio_reqs; /* Number of IORequests in queue */
s32 chnl_packets; /* Initial number of free Irps */
/* List of IOC's from driver */
struct lst_list *pio_completions;
struct lst_list *free_packets_list; /* List of free Irps */
struct ntfy_object *ntfy_obj;
u32 bytes_moved; /* Total number of bytes transfered */
/* For DSP-DMA */
/* Type of chnl transport:CHNL_[PCPY][DDMA] */
u32 chnl_type;
};
/* I/O Request/completion packet: */
struct chnl_irp {
struct list_head link; /* Link to next CHIRP in queue. */
/* Buffer to be filled/emptied. (User) */
u8 *host_user_buf;
/* Buffer to be filled/emptied. (System) */
u8 *host_sys_buf;
u32 dw_arg; /* Issue/Reclaim argument. */
u32 dsp_tx_addr; /* Transfer address on DSP side. */
u32 byte_size; /* Bytes transferred. */
u32 buf_size; /* Actual buffer size when allocated. */
u32 status; /* Status of IO completion. */
};
#endif /* _CHNL_SM_ */
/*
* brddefs.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Global BRD constants and types, shared between DSP API and Bridge driver.
*
* 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 BRDDEFS_
#define BRDDEFS_
/* platform status values */
#define BRD_STOPPED 0x0 /* No Monitor Loaded, Not running. */
#define BRD_IDLE 0x1 /* Monitor Loaded, but suspended. */
#define BRD_RUNNING 0x2 /* Monitor loaded, and executing. */
#define BRD_UNKNOWN 0x3 /* Board state is indeterminate. */
#define BRD_SYNCINIT 0x4
#define BRD_LOADED 0x5
#define BRD_LASTSTATE BRD_LOADED /* Set to highest legal board state. */
#define BRD_SLEEP_TRANSITION 0x6 /* Sleep transition in progress */
#define BRD_HIBERNATION 0x7 /* MPU initiated hibernation */
#define BRD_RETENTION 0x8 /* Retention mode */
#define BRD_DSP_HIBERNATION 0x9 /* DSP initiated hibernation */
#define BRD_ERROR 0xA /* Board state is Error */
/* BRD Object */
struct brd_object;
#endif /* BRDDEFS_ */
/*
* cfg.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* PM Configuration module.
*
* 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 CFG_
#define CFG_
#include <dspbridge/host_os.h>
#include <dspbridge/cfgdefs.h>
/*
* ======== cfg_exit ========
* Purpose:
* Discontinue usage of the CFG module.
* Parameters:
* Returns:
* Requires:
* cfg_init(void) was previously called.
* Ensures:
* Resources acquired in cfg_init(void) are freed.
*/
extern void cfg_exit(void);
/*
* ======== cfg_get_auto_start ========
* Purpose:
* Retreive the autostart mask, if any, for this board.
* Parameters:
* dev_node_obj: Handle to the dev_node who's driver we are querying.
* pdwAutoStart: Ptr to location for 32 bit autostart mask.
* Returns:
* 0: Success.
* -EFAULT: dev_node_obj is invalid.
* -ENODATA: Unable to retreive resource.
* Requires:
* CFG initialized.
* Ensures:
* 0: *pdwAutoStart contains autostart mask for this devnode.
*/
extern int cfg_get_auto_start(IN struct cfg_devnode *dev_node_obj,
OUT u32 *pdwAutoStart);
/*
* ======== cfg_get_cd_version ========
* Purpose:
* Retrieves the version of the PM Class Driver.
* Parameters:
* pdwVersion: Ptr to u32 to contain version number upon return.
* Returns:
* 0: Success. pdwVersion contains Class Driver version in
* the form: 0xAABBCCDD where AABB is Major version and
* CCDD is Minor.
* -EPERM: Failure.
* Requires:
* CFG initialized.
* Ensures:
* 0: Success.
* else: *pdwVersion is NULL.
*/
extern int cfg_get_cd_version(OUT u32 *pdwVersion);
/*
* ======== cfg_get_dev_object ========
* Purpose:
* Retrieve the Device Object handle for a given devnode.
* Parameters:
* dev_node_obj: Platform's dev_node handle from which to retrieve
* value.
* pdwValue: Ptr to location to store the value.
* Returns:
* 0: Success.
* -EFAULT: dev_node_obj is invalid or phDevObject is invalid.
* -ENODATA: The resource is not available.
* Requires:
* CFG initialized.
* Ensures:
* 0: *pdwValue is set to the retrieved u32.
* else: *pdwValue is set to 0L.
*/
extern int cfg_get_dev_object(IN struct cfg_devnode *dev_node_obj,
OUT u32 *pdwValue);
/*
* ======== cfg_get_exec_file ========
* Purpose:
* Retreive the default executable, if any, for this board.
* Parameters:
* dev_node_obj: Handle to the dev_node who's driver we are querying.
* buf_size: Size of buffer.
* pstrExecFile: Ptr to character buf to hold ExecFile.
* Returns:
* 0: Success.
* -EFAULT: dev_node_obj is invalid or pstrExecFile is invalid.
* -ENODATA: The resource is not available.
* Requires:
* CFG initialized.
* Ensures:
* 0: Not more than buf_size bytes were copied into pstrExecFile,
* and *pstrExecFile contains default executable for this
* devnode.
*/
extern int cfg_get_exec_file(IN struct cfg_devnode *dev_node_obj,
IN u32 buf_size, OUT char *pstrExecFile);
/*
* ======== cfg_get_object ========
* Purpose:
* Retrieve the Driver Object handle From the Registry
* Parameters:
* pdwValue: Ptr to location to store the value.
* dw_type Type of Object to Get
* Returns:
* 0: Success.
* Requires:
* CFG initialized.
* Ensures:
* 0: *pdwValue is set to the retrieved u32(non-Zero).
* else: *pdwValue is set to 0L.
*/
extern int cfg_get_object(OUT u32 *pdwValue, u8 dw_type);
/*
* ======== cfg_get_perf_value ========
* Purpose:
* Retrieve a flag indicating whether PERF should log statistics for the
* PM class driver.
* Parameters:
* pfEnablePerf: Location to store flag. 0 indicates the key was
* not found, or had a zero value. A nonzero value
* means the key was found and had a nonzero value.
* Returns:
* Requires:
* pfEnablePerf != NULL;
* Ensures:
*/
extern void cfg_get_perf_value(OUT bool *pfEnablePerf);
/*
* ======== cfg_get_zl_file ========
* Purpose:
* Retreive the ZLFile, if any, for this board.
* Parameters:
* dev_node_obj: Handle to the dev_node who's driver we are querying.
* buf_size: Size of buffer.
* pstrZLFileName: Ptr to character buf to hold ZLFileName.
* Returns:
* 0: Success.
* -EFAULT: pstrZLFileName is invalid or dev_node_obj is invalid.
* -ENODATA: couldn't find the ZLFileName.
* Requires:
* CFG initialized.
* Ensures:
* 0: Not more than buf_size bytes were copied into
* pstrZLFileName, and *pstrZLFileName contains ZLFileName
* for this devnode.
*/
extern int cfg_get_zl_file(IN struct cfg_devnode *dev_node_obj,
IN u32 buf_size, OUT char *pstrZLFileName);
/*
* ======== cfg_init ========
* Purpose:
* Initialize the CFG module's private state.
* Parameters:
* Returns:
* TRUE if initialized; FALSE if error occured.
* Requires:
* Ensures:
* A requirement for each of the other public CFG functions.
*/
extern bool cfg_init(void);
/*
* ======== cfg_set_dev_object ========
* Purpose:
* Store the Device Object handle for a given devnode.
* Parameters:
* dev_node_obj: Platform's dev_node handle we are storing value with.
* dwValue: Arbitrary value to store.
* Returns:
* 0: Success.
* -EFAULT: dev_node_obj is invalid.
* -EPERM: Internal Error.
* Requires:
* CFG initialized.
* Ensures:
* 0: The Private u32 was successfully set.
*/
extern int cfg_set_dev_object(IN struct cfg_devnode *dev_node_obj,
IN u32 dwValue);
/*
* ======== CFG_SetDrvObject ========
* Purpose:
* Store the Driver Object handle.
* Parameters:
* dwValue: Arbitrary value to store.
* dw_type Type of Object to Store
* Returns:
* 0: Success.
* -EPERM: Internal Error.
* Requires:
* CFG initialized.
* Ensures:
* 0: The Private u32 was successfully set.
*/
extern int cfg_set_object(IN u32 dwValue, u8 dw_type);
#endif /* CFG_ */
/*
* cfgdefs.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Global CFG constants and types, shared between DSP API and Bridge driver.
*
* 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 CFGDEFS_
#define CFGDEFS_
/* Maximum length of module search path. */
#define CFG_MAXSEARCHPATHLEN 255
/* Maximum length of general paths. */
#define CFG_MAXPATH 255
/* Host Resources: */
#define CFG_MAXMEMREGISTERS 9
#define CFG_MAXIOPORTS 20
#define CFG_MAXIRQS 7
#define CFG_MAXDMACHANNELS 7
/* IRQ flag */
#define CFG_IRQSHARED 0x01 /* IRQ can be shared */
/* DSP Resources: */
#define CFG_DSPMAXMEMTYPES 10
#define CFG_DEFAULT_NUM_WINDOWS 1 /* We support only one window. */
/* A platform-related device handle: */
struct cfg_devnode;
/*
* Host resource structure.
*/
struct cfg_hostres {
u32 num_mem_windows; /* Set to default */
/* This is the base.memory */
u32 dw_mem_base[CFG_MAXMEMREGISTERS]; /* shm virtual address */
u32 dw_mem_length[CFG_MAXMEMREGISTERS]; /* Length of the Base */
u32 dw_mem_phys[CFG_MAXMEMREGISTERS]; /* shm Physical address */
u8 birq_registers; /* IRQ Number */
u8 birq_attrib; /* IRQ Attribute */
u32 dw_offset_for_monitor; /* The Shared memory starts from
* dw_mem_base + this offset */
/*
* Info needed by NODE for allocating channels to communicate with RMS:
* dw_chnl_offset: Offset of RMS channels. Lower channels are
* reserved.
* dw_chnl_buf_size: Size of channel buffer to send to RMS
* dw_num_chnls: Total number of channels
* (including reserved).
*/
u32 dw_chnl_offset;
u32 dw_chnl_buf_size;
u32 dw_num_chnls;
void __iomem *dw_per_base;
u32 dw_per_pm_base;
u32 dw_core_pm_base;
void __iomem *dw_dmmu_base;
void __iomem *dw_sys_ctrl_base;
};
struct cfg_dspmemdesc {
u32 mem_type; /* Type of memory. */
u32 ul_min; /* Minimum amount of memory of this type. */
u32 ul_max; /* Maximum amount of memory of this type. */
};
#endif /* CFGDEFS_ */
/*
* chnl.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* DSP API channel interface: multiplexes data streams through the single
* physical link managed by a Bridge driver.
*
* See DSP API chnl.h for more details.
*
* 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 CHNL_
#define CHNL_
#include <dspbridge/chnlpriv.h>
/*
* ======== chnl_close ========
* Purpose:
* Ensures all pending I/O on this channel is cancelled, discards all
* queued I/O completion notifications, then frees the resources allocated
* for this channel, and makes the corresponding logical channel id
* available for subsequent use.
* Parameters:
* chnl_obj: Channel object handle.
* Returns:
* 0: Success;
* -EFAULT: Invalid chnl_obj.
* Requires:
* chnl_init(void) called.
* No thread must be blocked on this channel's I/O completion event.
* Ensures:
* 0: The I/O completion event for this channel is freed.
* chnl_obj is no longer valid.
*/
extern int chnl_close(struct chnl_object *chnl_obj);
/*
* ======== chnl_create ========
* Purpose:
* Create a channel manager object, responsible for opening new channels
* and closing old ones for a given board.
* Parameters:
* phChnlMgr: Location to store a channel manager object on output.
* hdev_obj: Handle to a device object.
* pMgrAttrs: Channel manager attributes.
* pMgrAttrs->max_channels: Max channels
* pMgrAttrs->birq: Channel's I/O IRQ number.
* pMgrAttrs->irq_shared: TRUE if the IRQ is shareable.
* pMgrAttrs->word_size: DSP Word size in equivalent PC bytes..
* Returns:
* 0: Success;
* -EFAULT: hdev_obj is invalid.
* -EINVAL: max_channels is 0.
* Invalid DSP word size (must be > 0).
* Invalid base address for DSP communications.
* -ENOMEM: Insufficient memory for requested resources.
* -EIO: Unable to plug channel ISR for configured IRQ.
* -ECHRNG: This manager cannot handle this many channels.
* -EEXIST: Channel manager already exists for this device.
* Requires:
* chnl_init(void) called.
* phChnlMgr != NULL.
* pMgrAttrs != NULL.
* Ensures:
* 0: Subsequent calls to chnl_create() for the same
* board without an intervening call to
* chnl_destroy() will fail.
*/
extern int chnl_create(OUT struct chnl_mgr **phChnlMgr,
struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs *pMgrAttrs);
/*
* ======== chnl_destroy ========
* Purpose:
* Close all open channels, and destroy the channel manager.
* Parameters:
* hchnl_mgr: Channel manager object.
* Returns:
* 0: Success.
* -EFAULT: hchnl_mgr was invalid.
* Requires:
* chnl_init(void) called.
* Ensures:
* 0: Cancels I/O on each open channel.
* Closes each open channel.
* chnl_create may subsequently be called for the
* same board.
*/
extern int chnl_destroy(struct chnl_mgr *hchnl_mgr);
/*
* ======== chnl_exit ========
* Purpose:
* Discontinue usage of the CHNL module.
* Parameters:
* Returns:
* Requires:
* chnl_init(void) previously called.
* Ensures:
* Resources, if any acquired in chnl_init(void), are freed when the last
* client of CHNL calls chnl_exit(void).
*/
extern void chnl_exit(void);
/*
* ======== chnl_init ========
* Purpose:
* Initialize the CHNL module's private state.
* Parameters:
* Returns:
* TRUE if initialized; FALSE if error occurred.
* Requires:
* Ensures:
* A requirement for each of the other public CHNL functions.
*/
extern bool chnl_init(void);
#endif /* CHNL_ */
/*
* chnldefs.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* System-wide channel objects and constants.
*
* 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 CHNLDEFS_
#define CHNLDEFS_
/* Channel id option. */
#define CHNL_PICKFREE (~0UL) /* Let manager pick a free channel. */
/* Channel manager limits: */
#define CHNL_INITIOREQS 4 /* Default # of I/O requests. */
/* Channel modes */
#define CHNL_MODETODSP 0 /* Data streaming to the DSP. */
#define CHNL_MODEFROMDSP 1 /* Data streaming from the DSP. */
/* GetIOCompletion flags */
#define CHNL_IOCINFINITE 0xffffffff /* Wait forever for IO completion. */
#define CHNL_IOCNOWAIT 0x0 /* Dequeue an IOC, if available. */
/* IO Completion Record status: */
#define CHNL_IOCSTATCOMPLETE 0x0000 /* IO Completed. */
#define CHNL_IOCSTATCANCEL 0x0002 /* IO was cancelled */
#define CHNL_IOCSTATTIMEOUT 0x0008 /* Wait for IOC timed out. */
#define CHNL_IOCSTATEOS 0x8000 /* End Of Stream reached. */
/* Macros for checking I/O Completion status: */
#define CHNL_IS_EOS(ioc) (ioc.status & CHNL_IOCSTATEOS)
#define CHNL_IS_IO_COMPLETE(ioc) (!(ioc.status & ~CHNL_IOCSTATEOS))
#define CHNL_IS_IO_CANCELLED(ioc) (ioc.status & CHNL_IOCSTATCANCEL)
#define CHNL_IS_TIMED_OUT(ioc) (ioc.status & CHNL_IOCSTATTIMEOUT)
/* Channel attributes: */
struct chnl_attr {
u32 uio_reqs; /* Max # of preallocated I/O requests. */
void *event_obj; /* User supplied auto-reset event object. */
char *pstr_event_name; /* Ptr to name of user event object. */
void *reserved1; /* Reserved for future use. */
u32 reserved2; /* Reserved for future use. */
};
/* I/O completion record: */
struct chnl_ioc {
void *pbuf; /* Buffer to be filled/emptied. */
u32 byte_size; /* Bytes transferred. */
u32 buf_size; /* Actual buffer size in bytes */
u32 status; /* Status of IO completion. */
u32 dw_arg; /* User argument associated with pbuf. */
};
#endif /* CHNLDEFS_ */
/*
* chnlpriv.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Private channel header shared between DSPSYS, DSPAPI and
* Bridge driver modules.
*
* 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 CHNLPRIV_
#define CHNLPRIV_
#include <dspbridge/chnldefs.h>
#include <dspbridge/devdefs.h>
#include <dspbridge/sync.h>
/* Channel manager limits: */
#define CHNL_MAXCHANNELS 32 /* Max channels available per transport */
/*
* Trans port channel Id definitions:(must match dsp-side).
*
* For CHNL_MAXCHANNELS = 16:
*
* ChnlIds:
* 0-15 (PCPY) - transport 0)
* 16-31 (DDMA) - transport 1)
* 32-47 (ZCPY) - transport 2)
*/
#define CHNL_PCPY 0 /* Proc-copy transport 0 */
#define CHNL_MAXIRQ 0xff /* Arbitrarily large number. */
/* The following modes are private: */
#define CHNL_MODEUSEREVENT 0x1000 /* User provided the channel event. */
#define CHNL_MODEMASK 0x1001
/* Higher level channel states: */
#define CHNL_STATEREADY 0 /* Channel ready for I/O. */
#define CHNL_STATECANCEL 1 /* I/O was cancelled. */
#define CHNL_STATEEOS 2 /* End Of Stream reached. */
/* Determine if user supplied an event for this channel: */
#define CHNL_IS_USER_EVENT(mode) (mode & CHNL_MODEUSEREVENT)
/* Macros for checking mode: */
#define CHNL_IS_INPUT(mode) (mode & CHNL_MODEFROMDSP)
#define CHNL_IS_OUTPUT(mode) (!CHNL_IS_INPUT(mode))
/* Types of channel class libraries: */
#define CHNL_TYPESM 1 /* Shared memory driver. */
#define CHNL_TYPEBM 2 /* Bus Mastering driver. */
/* Max string length of channel I/O completion event name - change if needed */
#define CHNL_MAXEVTNAMELEN 32
/* Max memory pages lockable in CHNL_PrepareBuffer() - change if needed */
#define CHNL_MAXLOCKPAGES 64
/* Channel info. */
struct chnl_info {
struct chnl_mgr *hchnl_mgr; /* Owning channel manager. */
u32 cnhl_id; /* Channel ID. */
void *event_obj; /* Channel I/O completion event. */
/*Abstraction of I/O completion event. */
struct sync_object *sync_event;
s8 dw_mode; /* Channel mode. */
u8 dw_state; /* Current channel state. */
u32 bytes_tx; /* Total bytes transferred. */
u32 cio_cs; /* Number of IOCs in queue. */
u32 cio_reqs; /* Number of IO Requests in queue. */
u32 process; /* Process owning this channel. */
};
/* Channel manager info: */
struct chnl_mgrinfo {
u8 dw_type; /* Type of channel class library. */
/* Channel handle, given the channel id. */
struct chnl_object *chnl_obj;
u8 open_channels; /* Number of open channels. */
u8 max_channels; /* total # of chnls supported */
};
/* Channel Manager Attrs: */
struct chnl_mgrattrs {
/* Max number of channels this manager can use. */
u8 max_channels;
u32 word_size; /* DSP Word size. */
};
#endif /* CHNLPRIV_ */
/*
* clk.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Provides Clock functions.
*
* 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 _CLK_H
#define _CLK_H
enum dsp_clk_id {
DSP_CLK_IVA2 = 0,
DSP_CLK_GPT5,
DSP_CLK_GPT6,
DSP_CLK_GPT7,
DSP_CLK_GPT8,
DSP_CLK_WDT3,
DSP_CLK_MCBSP1,
DSP_CLK_MCBSP2,
DSP_CLK_MCBSP3,
DSP_CLK_MCBSP4,
DSP_CLK_MCBSP5,
DSP_CLK_SSI,
DSP_CLK_NOT_DEFINED
};
/*
* ======== dsp_clk_exit ========
* Purpose:
* Discontinue usage of module; free resources when reference count
* reaches 0.
* Parameters:
* Returns:
* Requires:
* CLK initialized.
* Ensures:
* Resources used by module are freed when cRef reaches zero.
*/
extern void dsp_clk_exit(void);
/*
* ======== dsp_clk_init ========
* Purpose:
* Initializes private state of CLK module.
* Parameters:
* Returns:
* TRUE if initialized; FALSE if error occured.
* Requires:
* Ensures:
* CLK initialized.
*/
extern void dsp_clk_init(void);
void dsp_gpt_wait_overflow(short int clk_id, unsigned int load);
/*
* ======== dsp_clk_enable ========
* Purpose:
* Enables the clock requested.
* Parameters:
* Returns:
* 0: Success.
* -EPERM: Error occured while enabling the clock.
* Requires:
* Ensures:
*/
extern int dsp_clk_enable(IN enum dsp_clk_id clk_id);
u32 dsp_clock_enable_all(u32 dsp_per_clocks);
/*
* ======== dsp_clk_disable ========
* Purpose:
* Disables the clock requested.
* Parameters:
* Returns:
* 0: Success.
* -EPERM: Error occured while disabling the clock.
* Requires:
* Ensures:
*/
extern int dsp_clk_disable(IN enum dsp_clk_id clk_id);
extern u32 dsp_clk_get_iva2_rate(void);
u32 dsp_clock_disable_all(u32 dsp_per_clocks);
extern void ssi_clk_prepare(bool FLAG);
#endif /* _SYNC_H */
This diff is collapsed.
/*
* cmmdefs.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Global MEM constants and types.
*
* Copyright (C) 2008 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 CMMDEFS_
#define CMMDEFS_
#include <dspbridge/list.h>
/* Cmm attributes used in cmm_create() */
struct cmm_mgrattrs {
/* Minimum SM allocation; default 32 bytes. */
u32 ul_min_block_size;
};
/* Attributes for CMM_AllocBuf() & CMM_AllocDesc() */
struct cmm_attrs {
u32 ul_seg_id; /* 1,2... are SM segments. 0 is not. */
u32 ul_alignment; /* 0,1,2,4....ul_min_block_size */
};
/*
* DSPPa to GPPPa Conversion Factor.
*
* For typical platforms:
* converted Address = PaDSP + ( c_factor * addressToConvert).
*/
#define CMM_SUBFROMDSPPA -1
#define CMM_ADDTODSPPA 1
#define CMM_ALLSEGMENTS 0xFFFFFF /* All SegIds */
#define CMM_MAXGPPSEGS 1 /* Maximum # of SM segs */
/*
* SMSEGs are SM segments the DSP allocates from.
*
* This info is used by the GPP to xlate DSP allocated PAs.
*/
struct cmm_seginfo {
u32 dw_seg_base_pa; /* Start Phys address of SM segment */
/* Total size in bytes of segment: DSP+GPP */
u32 ul_total_seg_size;
u32 dw_gpp_base_pa; /* Start Phys addr of Gpp SM seg */
u32 ul_gpp_size; /* Size of Gpp SM seg in bytes */
u32 dw_dsp_base_va; /* DSP virt base byte address */
u32 ul_dsp_size; /* DSP seg size in bytes */
/* # of current GPP allocations from this segment */
u32 ul_in_use_cnt;
u32 dw_seg_base_va; /* Start Virt address of SM seg */
};
/* CMM useful information */
struct cmm_info {
/* # of SM segments registered with this Cmm. */
u32 ul_num_gppsm_segs;
/* Total # of allocations outstanding for CMM */
u32 ul_total_in_use_cnt;
/* Min SM block size allocation from cmm_create() */
u32 ul_min_block_size;
/* Info per registered SM segment. */
struct cmm_seginfo seg_info[CMM_MAXGPPSEGS];
};
/* XlatorCreate attributes */
struct cmm_xlatorattrs {
u32 ul_seg_id; /* segment Id used for SM allocations */
u32 dw_dsp_bufs; /* # of DSP-side bufs */
u32 dw_dsp_buf_size; /* size of DSP-side bufs in GPP bytes */
/* Vm base address alloc'd in client process context */
void *vm_base;
/* dw_vm_size must be >= (dwMaxNumBufs * dwMaxSize) */
u32 dw_vm_size;
};
/*
* Cmm translation types. Use to map SM addresses to process context.
*/
enum cmm_xlatetype {
CMM_VA2PA = 0, /* Virtual to GPP physical address xlation */
CMM_PA2VA = 1, /* GPP Physical to virtual */
CMM_VA2DSPPA = 2, /* Va to DSP Pa */
CMM_PA2DSPPA = 3, /* GPP Pa to DSP Pa */
CMM_DSPPA2PA = 4, /* DSP Pa to GPP Pa */
};
struct cmm_object;
struct cmm_xlatorobject;
#endif /* CMMDEFS_ */
This diff is collapsed.
/*
* dbc.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* "Design by Contract" programming macros.
*
* Notes:
* Requires that the GT->ERROR function has been defaulted to a valid
* error handler for the given execution environment.
*
* Does not require that GT_init() be called.
*
* Copyright (C) 2008 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 DBC_
#define DBC_
/* Assertion Macros: */
#ifdef CONFIG_BRIDGE_DEBUG
#define DBC_ASSERT(exp) \
if (!(exp)) \
pr_err("%s, line %d: Assertion (" #exp ") failed.\n", \
__FILE__, __LINE__)
#define DBC_REQUIRE DBC_ASSERT /* Function Precondition. */
#define DBC_ENSURE DBC_ASSERT /* Function Postcondition. */
#else
#define DBC_ASSERT(exp) {}
#define DBC_REQUIRE(exp) {}
#define DBC_ENSURE(exp) {}
#endif /* DEBUG */
#endif /* DBC_ */
This diff is collapsed.
/*
* dbdcddef.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* DCD (DSP/BIOS Bridge Configuration Database) constants and types.
*
* Copyright (C) 2008 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 DBDCDDEF_
#define DBDCDDEF_
#include <dspbridge/dbdefs.h>
#include <dspbridge/mgrpriv.h> /* for mgr_processorextinfo */
/*
* The following defines are critical elements for the DCD module:
*
* - DCD_REGKEY enables DCD functions to locate registered DCD objects.
* - DCD_REGISTER_SECTION identifies the COFF section where the UUID of
* registered DCD objects are stored.
*/
#define DCD_REGKEY "Software\\TexasInstruments\\DspBridge\\DCD"
#define DCD_REGISTER_SECTION ".dcd_register"
#define DCD_MAXPATHLENGTH 255
/* DCD Manager Object */
struct dcd_manager;
struct dcd_key_elem {
struct list_head link; /* Make it linked to a list */
char name[DCD_MAXPATHLENGTH]; /* Name of a given value entry */
char *path; /* Pointer to the actual data */
};
/* DCD Node Properties */
struct dcd_nodeprops {
struct dsp_ndbprops ndb_props;
u32 msg_segid;
u32 msg_notify_type;
char *pstr_create_phase_fxn;
char *pstr_delete_phase_fxn;
char *pstr_execute_phase_fxn;
char *pstr_i_alg_name;
/* Dynamic load properties */
u16 us_load_type; /* Static, dynamic, overlay */
u32 ul_data_mem_seg_mask; /* Data memory requirements */
u32 ul_code_mem_seg_mask; /* Code memory requirements */
};
/* DCD Generic Object Type */
struct dcd_genericobj {
union dcdObjUnion {
struct dcd_nodeprops node_obj; /* node object. */
/* processor object. */
struct dsp_processorinfo proc_info;
/* extended proc object (private) */
struct mgr_processorextinfo ext_proc_obj;
} obj_data;
};
/* DCD Internal Callback Type */
typedef int(*dcd_registerfxn) (IN struct dsp_uuid *uuid_obj,
IN enum dsp_dcdobjtype obj_type,
IN void *handle);
#endif /* DBDCDDEF_ */
This diff is collapsed.
/*
* dbldefs.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* 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 DBLDEFS_
#define DBLDEFS_
/*
* Bit masks for dbl_flags.
*/
#define DBL_NOLOAD 0x0 /* Don't load symbols, code, or data */
#define DBL_SYMB 0x1 /* load symbols */
#define DBL_CODE 0x2 /* load code */
#define DBL_DATA 0x4 /* load data */
#define DBL_DYNAMIC 0x8 /* dynamic load */
#define DBL_BSS 0x20 /* Unitialized section */
#define DBL_MAXPATHLENGTH 255
/*
* ======== dbl_flags ========
* Specifies whether to load code, data, or symbols
*/
typedef s32 dbl_flags;
/*
* ======== dbl_sect_info ========
* For collecting info on overlay sections
*/
struct dbl_sect_info {
const char *name; /* name of section */
u32 sect_run_addr; /* run address of section */
u32 sect_load_addr; /* load address of section */
u32 size; /* size of section (target MAUs) */
dbl_flags type; /* Code, data, or BSS */
};
/*
* ======== dbl_symbol ========
* (Needed for dynamic load library)
*/
struct dbl_symbol {
u32 value;
};
/*
* ======== dbl_alloc_fxn ========
* Allocate memory function. Allocate or reserve (if reserved == TRUE)
* "size" bytes of memory from segment "space" and return the address in
* *dspAddr (or starting at *dspAddr if reserve == TRUE). Returns 0 on
* success, or an error code on failure.
*/
typedef s32(*dbl_alloc_fxn) (void *hdl, s32 space, u32 size, u32 align,
u32 *dspAddr, s32 seg_id, s32 req, bool reserved);
/*
* ======== dbl_free_fxn ========
* Free memory function. Free, or unreserve (if reserved == TRUE) "size"
* bytes of memory from segment "space"
*/
typedef bool(*dbl_free_fxn) (void *hdl, u32 addr, s32 space, u32 size,
bool reserved);
/*
* ======== dbl_log_write_fxn ========
* Function to call when writing data from a section, to log the info.
* Can be NULL if no logging is required.
*/
typedef int(*dbl_log_write_fxn) (void *handle,
struct dbl_sect_info *sect, u32 addr,
u32 bytes);
/*
* ======== dbl_sym_lookup ========
* Symbol lookup function - Find the symbol name and return its value.
*
* Parameters:
* handle - Opaque handle
* parg - Opaque argument.
* name - Name of symbol to lookup.
* sym - Location to store address of symbol structure.
*
* Returns:
* TRUE: Success (symbol was found).
* FALSE: Failed to find symbol.
*/
typedef bool(*dbl_sym_lookup) (void *handle, void *parg, void *rmm_handle,
const char *name, struct dbl_symbol ** sym);
/*
* ======== dbl_write_fxn ========
* Write memory function. Write "n" HOST bytes of memory to segment "mtype"
* starting at address "dspAddr" from the buffer "buf". The buffer is
* formatted as an array of words appropriate for the DSP.
*/
typedef s32(*dbl_write_fxn) (void *hdl, u32 dspAddr, void *buf,
u32 n, s32 mtype);
/*
* ======== dbl_attrs ========
*/
struct dbl_attrs {
dbl_alloc_fxn alloc;
dbl_free_fxn free;
void *rmm_handle; /* Handle to pass to alloc, free functions */
dbl_write_fxn write;
void *input_params; /* Handle to pass to write, cinit function */
dbl_log_write_fxn log_write;
void *log_write_handle;
/* Symbol matching function and handle to pass to it */
dbl_sym_lookup sym_lookup;
void *sym_handle;
void *sym_arg;
/*
* These file manipulation functions should be compatible with the
* "C" run time library functions of the same name.
*/
s32(*fread) (void *, size_t, size_t, void *);
s32(*fseek) (void *, long, int);
s32(*ftell) (void *);
s32(*fclose) (void *);
void *(*fopen) (const char *, const char *);
};
#endif /* DBLDEFS_ */
/*
* dbll.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* DSP/BIOS Bridge Dynamic load library module interface. Function header
* comments are in the file dblldefs.h.
*
* 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 DBLL_
#define DBLL_
#include <dspbridge/dbdefs.h>
#include <dspbridge/dblldefs.h>
extern bool symbols_reloaded;
extern void dbll_close(struct dbll_library_obj *lib);
extern int dbll_create(struct dbll_tar_obj **target_obj,
struct dbll_attrs *pattrs);
extern void dbll_delete(struct dbll_tar_obj *target);
extern void dbll_exit(void);
extern bool dbll_get_addr(struct dbll_library_obj *lib, char *name,
struct dbll_sym_val **ppSym);
extern void dbll_get_attrs(struct dbll_tar_obj *target,
struct dbll_attrs *pattrs);
extern bool dbll_get_c_addr(struct dbll_library_obj *lib, char *name,
struct dbll_sym_val **ppSym);
extern int dbll_get_sect(struct dbll_library_obj *lib, char *name,
u32 *paddr, u32 *psize);
extern bool dbll_init(void);
extern int dbll_load(struct dbll_library_obj *lib,
dbll_flags flags,
struct dbll_attrs *attrs, u32 * pEntry);
extern int dbll_load_sect(struct dbll_library_obj *lib,
char *sectName, struct dbll_attrs *attrs);
extern int dbll_open(struct dbll_tar_obj *target, char *file,
dbll_flags flags, struct dbll_library_obj **pLib);
extern int dbll_read_sect(struct dbll_library_obj *lib,
char *name, char *pbuf, u32 size);
extern void dbll_set_attrs(struct dbll_tar_obj *target,
struct dbll_attrs *pattrs);
extern void dbll_unload(struct dbll_library_obj *lib, struct dbll_attrs *attrs);
extern int dbll_unload_sect(struct dbll_library_obj *lib,
char *sectName, struct dbll_attrs *attrs);
bool dbll_find_dsp_symbol(struct dbll_library_obj *zl_lib, u32 address,
u32 offset_range, u32 *sym_addr_output, char *name_output);
#endif /* DBLL_ */
This diff is collapsed.
/*
* dbtype.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* This header defines data types for DSP/BIOS Bridge APIs and device
* driver modules. It also defines the Hungarian prefix to use for each
* base type.
*
* Copyright (C) 2008 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 DBTYPE_
#define DBTYPE_
/*===========================================================================*/
/* Argument specification syntax */
/*===========================================================================*/
#ifndef IN
#define IN /* Following parameter is for input. */
#endif
#ifndef OUT
#define OUT /* Following parameter is for output. */
#endif
#ifndef OPTIONAL
#define OPTIONAL /* Function may optionally use previous parameter. */
#endif
#ifndef CONST
#define CONST const
#endif
/*===========================================================================*/
/* Boolean constants */
/*===========================================================================*/
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
/*===========================================================================*/
/* NULL (Definition is language specific) */
/*===========================================================================*/
#ifndef NULL
#define NULL ((void *)0) /* Null pointer. */
#endif
/*===========================================================================*/
/* NULL character (normally used for string termination) */
/*===========================================================================*/
#ifndef NULL_CHAR
#define NULL_CHAR '\0' /* Null character. */
#endif
/*===========================================================================*/
/* Basic Type definitions (with Prefixes for Hungarian notation) */
/*===========================================================================*/
#ifndef OMAPBRIDGE_TYPES
#define OMAPBRIDGE_TYPES
typedef volatile unsigned short reg_uword16;
#endif
#define TEXT(x) x
#define DLLIMPORT
#define DLLEXPORT
/* Define DSPAPIDLL correctly in dspapi.h */
#define _DSPSYSDLL32_
#endif /* DBTYPE_ */
/*
* dehdefs.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Definition for Bridge driver module DEH.
*
* 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 DEHDEFS_
#define DEHDEFS_
#include <dspbridge/mbx_sh.h> /* shared mailbox codes */
/* DEH object manager */
struct deh_mgr;
/* Magic code used to determine if DSP signaled exception. */
#define DEH_BASE MBX_DEH_BASE
#define DEH_USERS_BASE MBX_DEH_USERS_BASE
#define DEH_LIMIT MBX_DEH_LIMIT
#endif /* _DEHDEFS_H */
This diff is collapsed.
/*
* devdefs.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Definition of common include typedef between dspdefs.h and dev.h. Required
* to break circular dependency between Bridge driver and DEV include files.
*
* Copyright (C) 2008 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 DEVDEFS_
#define DEVDEFS_
/* Bridge Device Object */
struct dev_object;
#endif /* DEVDEFS_ */
/*
* disp.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* DSP/BIOS Bridge Node Dispatcher.
*
* 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 DISP_
#define DISP_
#include <dspbridge/dbdefs.h>
#include <dspbridge/nodedefs.h>
#include <dspbridge/nodepriv.h>
#include <dspbridge/dispdefs.h>
/*
* ======== disp_create ========
* Create a NODE Dispatcher object. This object handles the creation,
* deletion, and execution of nodes on the DSP target, through communication
* with the Resource Manager Server running on the target. Each NODE
* Manager object should have exactly one NODE Dispatcher.
*
* Parameters:
* phDispObject: Location to store node dispatcher object on output.
* hdev_obj: Device for this processor.
* pDispAttrs: Node dispatcher attributes.
* Returns:
* 0: Success;
* -ENOMEM: Insufficient memory for requested resources.
* -EPERM: Unable to create dispatcher.
* Requires:
* disp_init(void) called.
* pDispAttrs != NULL.
* hdev_obj != NULL.
* phDispObject != NULL.
* Ensures:
* 0: IS_VALID(*phDispObject).
* error: *phDispObject == NULL.
*/
extern int disp_create(OUT struct disp_object **phDispObject,
struct dev_object *hdev_obj,
IN CONST struct disp_attr *pDispAttrs);
/*
* ======== disp_delete ========
* Delete the NODE Dispatcher.
*
* Parameters:
* hDispObject: Node Dispatcher object.
* Returns:
* Requires:
* disp_init(void) called.
* Valid hDispObject.
* Ensures:
* hDispObject is invalid.
*/
extern void disp_delete(struct disp_object *hDispObject);
/*
* ======== disp_exit ========
* Discontinue usage of DISP module.
*
* Parameters:
* Returns:
* Requires:
* disp_init(void) previously called.
* Ensures:
* Any resources acquired in disp_init(void) will be freed when last DISP
* client calls disp_exit(void).
*/
extern void disp_exit(void);
/*
* ======== disp_init ========
* Initialize the DISP module.
*
* Parameters:
* Returns:
* TRUE if initialization succeeded, FALSE otherwise.
* Ensures:
*/
extern bool disp_init(void);
/*
* ======== disp_node_change_priority ========
* Change the priority of a node currently running on the target.
*
* Parameters:
* hDispObject: Node Dispatcher object.
* hnode: Node object representing a node currently
* allocated or running on the DSP.
* ulFxnAddress: Address of RMS function for changing priority.
* node_env: Address of node's environment structure.
* prio: New priority level to set node's priority to.
* Returns:
* 0: Success.
* -ETIME: A timeout occurred before the DSP responded.
* Requires:
* disp_init(void) called.
* Valid hDispObject.
* hnode != NULL.
* Ensures:
*/
extern int disp_node_change_priority(struct disp_object
*hDispObject,
struct node_object *hnode,
u32 ul_fxn_addr,
nodeenv node_env, s32 prio);
/*
* ======== disp_node_create ========
* Create a node on the DSP by remotely calling the node's create function.
*
* Parameters:
* hDispObject: Node Dispatcher object.
* hnode: Node handle obtained from node_allocate().
* ul_fxn_addr: Address or RMS create node function.
* ul_create_fxn: Address of node's create function.
* pargs: Arguments to pass to RMS node create function.
* pNodeEnv: Location to store node environment pointer on
* output.
* Returns:
* 0: Success.
* -ETIME: A timeout occurred before the DSP responded.
* -EPERM: A failure occurred, unable to create node.
* Requires:
* disp_init(void) called.
* Valid hDispObject.
* pargs != NULL.
* hnode != NULL.
* pNodeEnv != NULL.
* node_get_type(hnode) != NODE_DEVICE.
* Ensures:
*/
extern int disp_node_create(struct disp_object *hDispObject,
struct node_object *hnode,
u32 ul_fxn_addr,
u32 ul_create_fxn,
IN CONST struct node_createargs
*pargs, OUT nodeenv *pNodeEnv);
/*
* ======== disp_node_delete ========
* Delete a node on the DSP by remotely calling the node's delete function.
*
* Parameters:
* hDispObject: Node Dispatcher object.
* hnode: Node object representing a node currently
* loaded on the DSP.
* ul_fxn_addr: Address or RMS delete node function.
* ul_delete_fxn: Address of node's delete function.
* node_env: Address of node's environment structure.
* Returns:
* 0: Success.
* -ETIME: A timeout occurred before the DSP responded.
* Requires:
* disp_init(void) called.
* Valid hDispObject.
* hnode != NULL.
* Ensures:
*/
extern int disp_node_delete(struct disp_object *hDispObject,
struct node_object *hnode,
u32 ul_fxn_addr,
u32 ul_delete_fxn, nodeenv node_env);
/*
* ======== disp_node_run ========
* Start execution of a node's execute phase, or resume execution of a node
* that has been suspended (via DISP_NodePause()) on the DSP.
*
* Parameters:
* hDispObject: Node Dispatcher object.
* hnode: Node object representing a node to be executed
* on the DSP.
* ul_fxn_addr: Address or RMS node execute function.
* ul_execute_fxn: Address of node's execute function.
* node_env: Address of node's environment structure.
* Returns:
* 0: Success.
* -ETIME: A timeout occurred before the DSP responded.
* Requires:
* disp_init(void) called.
* Valid hDispObject.
* hnode != NULL.
* Ensures:
*/
extern int disp_node_run(struct disp_object *hDispObject,
struct node_object *hnode,
u32 ul_fxn_addr,
u32 ul_execute_fxn, nodeenv node_env);
#endif /* DISP_ */
/*
* dispdefs.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Global DISP constants and types, shared by PROCESSOR, NODE, and DISP.
*
* 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 DISPDEFS_
#define DISPDEFS_
struct disp_object;
/* Node Dispatcher attributes */
struct disp_attr {
u32 ul_chnl_offset; /* Offset of channel ids reserved for RMS */
/* Size of buffer for sending data to RMS */
u32 ul_chnl_buf_size;
int proc_family; /* eg, 5000 */
int proc_type; /* eg, 5510 */
void *reserved1; /* Reserved for future use. */
u32 reserved2; /* Reserved for future use. */
};
#endif /* DISPDEFS_ */
/*
* dmm.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* The Dynamic Memory Mapping(DMM) module manages the DSP Virtual address
* space that can be directly mapped to any MPU buffer or memory region.
*
* 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 DMM_
#define DMM_
#include <dspbridge/dbdefs.h>
struct dmm_object;
/* DMM attributes used in dmm_create() */
struct dmm_mgrattrs {
u32 reserved;
};
#define DMMPOOLSIZE 0x4000000
/*
* ======== dmm_get_handle ========
* Purpose:
* Return the dynamic memory manager object for this device.
* This is typically called from the client process.
*/
extern int dmm_get_handle(void *hprocessor,
OUT struct dmm_object **phDmmMgr);
extern int dmm_reserve_memory(struct dmm_object *dmm_mgr,
u32 size, u32 *prsv_addr);
extern int dmm_un_reserve_memory(struct dmm_object *dmm_mgr,
u32 rsv_addr);
extern int dmm_map_memory(struct dmm_object *dmm_mgr, u32 addr,
u32 size);
extern int dmm_un_map_memory(struct dmm_object *dmm_mgr,
u32 addr, u32 *psize);
extern int dmm_destroy(struct dmm_object *dmm_mgr);
extern int dmm_delete_tables(struct dmm_object *dmm_mgr);
extern int dmm_create(OUT struct dmm_object **phDmmMgr,
struct dev_object *hdev_obj,
IN CONST struct dmm_mgrattrs *pMgrAttrs);
extern bool dmm_init(void);
extern void dmm_exit(void);
extern int dmm_create_tables(struct dmm_object *dmm_mgr,
u32 addr, u32 size);
#ifdef DSP_DMM_DEBUG
u32 dmm_mem_map_dump(struct dmm_object *dmm_mgr);
#endif
#endif /* DMM_ */
This diff is collapsed.
/*
* drvdefs.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Definition of common struct between dspdefs.h and drv.h.
*
* 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 DRVDEFS_
#define DRVDEFS_
/* Bridge Driver Object */
struct drv_object;
#endif /* DRVDEFS_ */
This diff is collapsed.
/*
* dspapi.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Includes the wrapper functions called directly by the
* DeviceIOControl interface.
*
* Notes:
* 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 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.
*
* 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 DSPAPI_
#define DSPAPI_
#include <dspbridge/dspapi-ioctl.h>
/* 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
/*
* ======== 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:
* 0 if command called; -EINVAL if command not in IOCTL
* table.
* Requires:
* Ensures:
*/
extern int 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:
* 0: Allow this device to load
* -EPERM: Failure.
* Requires:
* Bridge API initialized.
* Ensures:
*/
extern int 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);
extern u32 procwrap_begin_dma(union Trapped_Args *args, void *pr_ctxt);
extern u32 procwrap_end_dma(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_ */
/*
* dspchnl.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Declares the upper edge channel class library functions required by
* all Bridge driver / DSP API driver interface tables. These functions are
* implemented by every class of Bridge channel library.
*
* Notes:
* The function comment headers reside in dspdefs.h.
*
* 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 DSPCHNL_
#define DSPCHNL_
extern int bridge_chnl_create(OUT struct chnl_mgr **phChnlMgr,
struct dev_object *hdev_obj,
IN CONST struct chnl_mgrattrs
*pMgrAttrs);
extern int bridge_chnl_destroy(struct chnl_mgr *hchnl_mgr);
extern int bridge_chnl_open(OUT struct chnl_object **phChnl,
struct chnl_mgr *hchnl_mgr,
s8 chnl_mode,
u32 uChnlId,
CONST IN OPTIONAL struct chnl_attr
*pattrs);
extern int bridge_chnl_close(struct chnl_object *chnl_obj);
extern int bridge_chnl_add_io_req(struct chnl_object *chnl_obj,
void *pHostBuf,
u32 byte_size, u32 buf_size,
OPTIONAL u32 dw_dsp_addr, u32 dw_arg);
extern int bridge_chnl_get_ioc(struct chnl_object *chnl_obj,
u32 dwTimeOut, OUT struct chnl_ioc *pIOC);
extern int bridge_chnl_cancel_io(struct chnl_object *chnl_obj);
extern int bridge_chnl_flush_io(struct chnl_object *chnl_obj,
u32 dwTimeOut);
extern int bridge_chnl_get_info(struct chnl_object *chnl_obj,
OUT struct chnl_info *pInfo);
extern int bridge_chnl_get_mgr_info(struct chnl_mgr *hchnl_mgr,
u32 uChnlID, OUT struct chnl_mgrinfo
*pMgrInfo);
extern int bridge_chnl_idle(struct chnl_object *chnl_obj,
u32 dwTimeOut, bool fFlush);
extern int bridge_chnl_register_notify(struct chnl_object *chnl_obj,
u32 event_mask,
u32 notify_type,
struct dsp_notification
*hnotification);
#endif /* DSPCHNL_ */
This diff is collapsed.
/*
* dspdeh.h
*
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
*
* Defines upper edge DEH functions required by all Bridge driver/DSP API
* interface tables.
*
* Notes:
* Function comment headers reside with the function typedefs in dspdefs.h.
*
* 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 DSPDEH_
#define DSPDEH_
#include <dspbridge/devdefs.h>
#include <dspbridge/dehdefs.h>
extern int bridge_deh_create(struct deh_mgr **ret_deh_mgr,
struct dev_object *hdev_obj);
extern int bridge_deh_destroy(struct deh_mgr *deh_mgr);
extern int bridge_deh_get_info(struct deh_mgr *deh_mgr,
struct dsp_errorinfo *pErrInfo);
extern int bridge_deh_register_notify(struct deh_mgr *deh_mgr,
u32 event_mask,
u32 notify_type,
struct dsp_notification *hnotification);
extern void bridge_deh_notify(struct deh_mgr *deh_mgr,
u32 ulEventMask, u32 dwErrInfo);
extern void bridge_deh_release_dummy_mem(void);
#endif /* DSPDEH_ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment