aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/sep/sep_driver_api.h
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2010-12-08 10:57:30 +0000
committerAlan Cox <alan@linux.intel.com>2010-12-08 10:57:30 +0000
commit2b14a66cc1559e49b6f968a19c0ece579a07107a (patch)
treebe3fd1d34f937ef82a7f43db3cc28e635c72fee1 /drivers/staging/sep/sep_driver_api.h
parent554dcfc13529cafedfb1adb1e99892ae2da4c6ce (diff)
downloadmrst-s0i3-test-2b14a66cc1559e49b6f968a19c0ece579a07107a.tar.gz
mrst-s0i3-test-2b14a66cc1559e49b6f968a19c0ece579a07107a.tar.xz
mrst-s0i3-test-2b14a66cc1559e49b6f968a19c0ece579a07107a.zip
sep: second ioctl pass
We can now kill off the various unused ioctls and make the ones we have left 32/64bit size safe. Most of this is just some types and then doing re-ordering of fields to pack better. For the init message I've moved the 14 words of message into the struct which makes the code far simpler. The big chunks of code changes are from removing is_kva, this is now always true which in turn means lots of code becomes unreachable and shakes out. Signed-off-by: Alan Cox <alan@linux.intel.com>
Diffstat (limited to 'drivers/staging/sep/sep_driver_api.h')
-rw-r--r--drivers/staging/sep/sep_driver_api.h93
1 files changed, 14 insertions, 79 deletions
diff --git a/drivers/staging/sep/sep_driver_api.h b/drivers/staging/sep/sep_driver_api.h
index f518b15935d..aa0f19a9c98 100644
--- a/drivers/staging/sep/sep_driver_api.h
+++ b/drivers/staging/sep/sep_driver_api.h
@@ -51,40 +51,17 @@
init command struct
*/
struct init_struct {
- /* address that SEP can access */
- u32 *message_addr;
-
/* start address of resident */
u32 message_size_in_words;
-
/* offset of the init message in the sep sram */
u32 sep_sram_addr;
-
- /* -not used- resident size in bytes*/
- u32 unused_resident_size_in_bytes;
-
- /* -not used- cache size in bytes*/
- u32 unused_cache_size_in_bytes;
-
- /* -not used- ext cache current address */
- void *unused_extcache_addr;
-
- /* -not used- ext cache size in bytes*/
- u32 unused_extcache_size_in_bytes;
-};
-
-struct realloc_ext_struct {
- /* -not used- current external cache address */
- void *unused_ext_cache_addr;
-
- /* -not used- external cache size in bytes*/
- u32 unused_ext_cache_size_in_bytes;
+ /* message buffer to pass - up to 14 dwords */
+ u32 message_buf[14];
};
struct alloc_struct {
/* offset from start of shared pool area */
u32 offset;
-
/* number of bytes to allocate */
u32 num_bytes;
};
@@ -93,41 +70,31 @@ struct alloc_struct {
*/
struct bld_syn_tab_struct {
/* address value of the data in (user space addr) */
- unsigned long app_in_address;
-
+ u64 app_in_address;
+ /* address of the data out (user space addr) */
+ u64 app_out_address;
/* size of data in */
u32 data_in_size;
-
- /* address of the data out (user space addr) */
- unsigned long app_out_address;
-
/* the size of the block of the operation - if needed,
every table will be modulo this parameter */
u32 block_size;
-
- /* -not used- distinct user/kernel layout */
- bool unused_isKernelVirtualAddress;
-
};
/* command struct for static pool addresses */
struct stat_pool_addr_struct {
-
/* virtual address of the static pool */
- void *static_virt_address;
+ u64 static_virt_address;
};
/* command struct for getting time value and address */
struct caller_id_struct {
/* pid of the process */
- u32 pid;
-
+ u32 pid;
/* virtual address of the caller id hash */
- void *callerIdAddress;
-
+ u64 callerIdAddress;
/* caller id hash size in bytes */
- u32 callerIdSizeInBytes;
+ u32 callerIdSizeInBytes;
};
/*
@@ -136,28 +103,20 @@ struct caller_id_struct {
struct sep_dcblock {
/* physical address of the first input mlli */
u32 input_mlli_address;
-
/* num of entries in the first input mlli */
u32 input_mlli_num_entries;
-
/* size of data in the first input mlli */
u32 input_mlli_data_size;
-
/* physical address of the first output mlli */
u32 output_mlli_address;
-
/* num of entries in the first output mlli */
u32 output_mlli_num_entries;
-
/* size of data in the first output mlli */
u32 output_mlli_data_size;
-
/* pointer to the output virtual tail */
- void *out_vr_tail_pt;
-
+ u64 out_vr_tail_pt;
/* size of tail data */
u32 tail_data_size;
-
/* input tail data array */
u8 tail_data[64];
};
@@ -172,18 +131,14 @@ struct sep_caller_id_entry {
*/
struct build_dcb_struct {
/* address value of the data in */
- unsigned long app_in_address;
-
+ u64 app_in_address;
+ /* address of the data out */
+ u64 app_out_address;
/* size of data in */
u32 data_in_size;
-
- /* address of the data out */
- unsigned long app_out_address;
-
/* the size of the block of the operation - if needed,
every table will be modulo this parameter */
u32 block_size;
-
/* the size of the block of the operation - if needed,
every table will be modulo this parameter */
u32 tail_block_size;
@@ -198,10 +153,8 @@ struct build_dcb_struct {
*
*/
struct sep_dma_map {
-
/* mapped dma address */
dma_addr_t dma_addr;
-
/* size of the mapped data */
size_t size;
};
@@ -285,18 +238,6 @@ struct sep_lli_entry {
#define SEP_IOCGETSTATICPOOLADDR \
_IOR(SEP_IOC_MAGIC_NUMBER, 8, struct stat_pool_addr_struct)
-/* set flow id command */
-#define SEP_IOCSETFLOWID \
- _IO(SEP_IOC_MAGIC_NUMBER, 9)
-
-/* add tables to the dynamic flow */
-#define SEP_IOCADDFLOWTABLE \
- _IO(SEP_IOC_MAGIC_NUMBER, 10)
-
-/* add flow add tables message */
-#define SEP_IOCADDFLOWMESSAGE \
- _IO(SEP_IOC_MAGIC_NUMBER, 11)
-
/* start sep command */
#define SEP_IOCSEPSTART \
_IO(SEP_IOC_MAGIC_NUMBER, 12)
@@ -311,17 +252,11 @@ struct sep_lli_entry {
/* reallocate external app */
#define SEP_IOCREALLOCEXTCACHE \
- _IOW(SEP_IOC_MAGIC_NUMBER, 18, struct realloc_ext_struct)
+ _IO(SEP_IOC_MAGIC_NUMBER, 18)
#define SEP_IOCRARPREPAREMESSAGE \
_IOW(SEP_IOC_MAGIC_NUMBER, 20, struct rar_hndl_to_bus_struct)
-#define SEP_IOCTLSINGLETONLOCK \
- _IO(SEP_IOC_MAGIC_NUMBER, 32)
-
-#define SEP_IOCTLSINGLETONUNLOCK \
- _IO(SEP_IOC_MAGIC_NUMBER, 33)
-
#define SEP_IOCTLSETCALLERID \
_IOW(SEP_IOC_MAGIC_NUMBER, 34, struct caller_id_struct)