diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
| commit | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch) | |
| tree | a57612d1888735a2ec7972891b68c1ac5ec8faea /drivers/staging/tidspbridge | |
| parent | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff) | |
Diffstat (limited to 'drivers/staging/tidspbridge')
| -rw-r--r-- | drivers/staging/tidspbridge/include/dspbridge/dbc.h | 46 | ||||
| -rw-r--r-- | drivers/staging/tidspbridge/rmgr/drv_interface.h | 28 |
2 files changed, 74 insertions, 0 deletions
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbc.h b/drivers/staging/tidspbridge/include/dspbridge/dbc.h new file mode 100644 index 00000000000..463760f499a --- /dev/null +++ b/drivers/staging/tidspbridge/include/dspbridge/dbc.h | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | /* | ||
| 2 | * dbc.h | ||
| 3 | * | ||
| 4 | * DSP-BIOS Bridge driver support functions for TI OMAP processors. | ||
| 5 | * | ||
| 6 | * "Design by Contract" programming macros. | ||
| 7 | * | ||
| 8 | * Notes: | ||
| 9 | * Requires that the GT->ERROR function has been defaulted to a valid | ||
| 10 | * error handler for the given execution environment. | ||
| 11 | * | ||
| 12 | * Does not require that GT_init() be called. | ||
| 13 | * | ||
| 14 | * Copyright (C) 2008 Texas Instruments, Inc. | ||
| 15 | * | ||
| 16 | * This package is free software; you can redistribute it and/or modify | ||
| 17 | * it under the terms of the GNU General Public License version 2 as | ||
| 18 | * published by the Free Software Foundation. | ||
| 19 | * | ||
| 20 | * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | ||
| 21 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | ||
| 22 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
| 23 | */ | ||
| 24 | |||
| 25 | #ifndef DBC_ | ||
| 26 | #define DBC_ | ||
| 27 | |||
| 28 | /* Assertion Macros: */ | ||
| 29 | #ifdef CONFIG_TIDSPBRIDGE_DEBUG | ||
| 30 | |||
| 31 | #define DBC_ASSERT(exp) \ | ||
| 32 | if (!(exp)) \ | ||
| 33 | pr_err("%s, line %d: Assertion (" #exp ") failed.\n", \ | ||
| 34 | __FILE__, __LINE__) | ||
| 35 | #define DBC_REQUIRE DBC_ASSERT /* Function Precondition. */ | ||
| 36 | #define DBC_ENSURE DBC_ASSERT /* Function Postcondition. */ | ||
| 37 | |||
| 38 | #else | ||
| 39 | |||
| 40 | #define DBC_ASSERT(exp) {} | ||
| 41 | #define DBC_REQUIRE(exp) {} | ||
| 42 | #define DBC_ENSURE(exp) {} | ||
| 43 | |||
| 44 | #endif /* DEBUG */ | ||
| 45 | |||
| 46 | #endif /* DBC_ */ | ||
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.h b/drivers/staging/tidspbridge/rmgr/drv_interface.h new file mode 100644 index 00000000000..ab070602adc --- /dev/null +++ b/drivers/staging/tidspbridge/rmgr/drv_interface.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | /* | ||
| 2 | * drv_interface.h | ||
| 3 | * | ||
| 4 | * DSP-BIOS Bridge driver support functions for TI OMAP processors. | ||
| 5 | * | ||
| 6 | * Copyright (C) 2005-2006 Texas Instruments, Inc. | ||
| 7 | * | ||
| 8 | * This package is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License version 2 as | ||
| 10 | * published by the Free Software Foundation. | ||
| 11 | * | ||
| 12 | * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | ||
| 13 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | ||
| 14 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef _DRV_INTERFACE_H_ | ||
| 18 | #define _DRV_INTERFACE_H_ | ||
| 19 | |||
| 20 | /* Prototypes for all functions in this bridge */ | ||
| 21 | static int __init bridge_init(void); /* Initialize bridge */ | ||
| 22 | static void __exit bridge_exit(void); /* Opposite of initialize */ | ||
| 23 | static int bridge_open(struct inode *ip, struct file *filp); /* Open */ | ||
| 24 | static int bridge_release(struct inode *ip, struct file *filp); /* Release */ | ||
| 25 | static long bridge_ioctl(struct file *filp, unsigned int code, | ||
| 26 | unsigned long args); | ||
| 27 | static int bridge_mmap(struct file *filp, struct vm_area_struct *vma); | ||
| 28 | #endif /* ifndef _DRV_INTERFACE_H_ */ | ||
