Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
smd.c File Reference
#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/cdev.h>
#include <linux/device.h>
#include <linux/wait.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <mach/msm_smd.h>
#include "smd_private.h"
#include "proc_comm.h"

Go to the source code of this file.

Data Structures

struct  shared_info
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define MODULE_NAME   "msm_smd"
 

Enumerations

enum  { MSM_SMD_DEBUG = 1U << 0, MSM_SMSM_DEBUG = 1U << 0 }
 

Functions

 module_param_named (debug_mask, msm_smd_debug_mask, int, S_IRUGO|S_IWUSR|S_IWGRP)
 
uint32_t raw_smsm_get_state (enum smsm_state_item item)
 
 DEFINE_SPINLOCK (smd_lock)
 
 DEFINE_SPINLOCK (smem_lock)
 
 LIST_HEAD (smd_ch_closed_list)
 
 LIST_HEAD (smd_ch_list_modem)
 
 LIST_HEAD (smd_ch_list_dsp)
 
void smd_sleep_exit (void)
 
void smd_kick (smd_channel_t *ch)
 
struct smd_channelsmd_get_channel (const char *name)
 
int smd_open (const char *name, smd_channel_t **_ch, void *priv, void(*notify)(void *, unsigned))
 
int smd_close (smd_channel_t *ch)
 
int smd_read (smd_channel_t *ch, void *data, int len)
 
int smd_write (smd_channel_t *ch, const void *data, int len)
 
int smd_write_atomic (smd_channel_t *ch, const void *data, int len)
 
int smd_read_avail (smd_channel_t *ch)
 
int smd_write_avail (smd_channel_t *ch)
 
int smd_wait_until_readable (smd_channel_t *ch, int bytes)
 
int smd_wait_until_writable (smd_channel_t *ch, int bytes)
 
int smd_cur_packet_size (smd_channel_t *ch)
 
voidsmem_alloc (unsigned id, unsigned size)
 
void __iomemsmem_item (unsigned id, unsigned *size)
 
voidsmem_find (unsigned id, unsigned size_in)
 
int smsm_change_state (enum smsm_state_item item, uint32_t clear_mask, uint32_t set_mask)
 
uint32_t smsm_get_state (enum smsm_state_item item)
 
int smsm_set_sleep_duration (uint32_t delay)
 
int smd_core_init (void)
 
 module_init (msm_smd_init)
 
 MODULE_DESCRIPTION ("MSM Shared Memory Core")
 
 MODULE_AUTHOR ("Brian Swetland <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define MODULE_NAME   "msm_smd"

Definition at line 41 of file smd.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 17 of file smd.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
MSM_SMD_DEBUG 
MSM_SMSM_DEBUG 

Definition at line 43 of file smd.c.

Function Documentation

DEFINE_SPINLOCK ( smd_lock  )
DEFINE_SPINLOCK ( smem_lock  )
LIST_HEAD ( smd_ch_closed_list  )
LIST_HEAD ( smd_ch_list_modem  )
LIST_HEAD ( smd_ch_list_dsp  )
MODULE_AUTHOR ( "Brian Swetland <[email protected]>"  )
MODULE_DESCRIPTION ( "MSM Shared Memory Core"  )
module_init ( msm_smd_init  )
MODULE_LICENSE ( "GPL"  )
module_param_named ( debug_mask  ,
msm_smd_debug_mask  ,
int  ,
S_IRUGO|S_IWUSR S_IWGRP 
)
uint32_t raw_smsm_get_state ( enum smsm_state_item  item)

Definition at line 107 of file smd.c.

int smd_close ( smd_channel_t ch)

Definition at line 720 of file smd.c.

int smd_core_init ( void  )

Definition at line 933 of file smd.c.

int smd_cur_packet_size ( smd_channel_t ch)

Definition at line 780 of file smd.c.

struct smd_channel* smd_get_channel ( const char name)
read

Definition at line 651 of file smd.c.

void smd_kick ( smd_channel_t ch)

Definition at line 434 of file smd.c.

int smd_open ( const char name,
smd_channel_t **  _ch,
void priv,
void(*)(void *, unsigned)  notify 
)

Definition at line 668 of file smd.c.

int smd_read ( smd_channel_t ch,
void data,
int  len 
)

Definition at line 740 of file smd.c.

int smd_read_avail ( smd_channel_t ch)

Definition at line 760 of file smd.c.

void smd_sleep_exit ( void  )

Definition at line 404 of file smd.c.

int smd_wait_until_readable ( smd_channel_t ch,
int  bytes 
)

Definition at line 770 of file smd.c.

int smd_wait_until_writable ( smd_channel_t ch,
int  bytes 
)

Definition at line 775 of file smd.c.

int smd_write ( smd_channel_t ch,
const void data,
int  len 
)

Definition at line 745 of file smd.c.

int smd_write_atomic ( smd_channel_t ch,
const void data,
int  len 
)

Definition at line 750 of file smd.c.

int smd_write_avail ( smd_channel_t ch)

Definition at line 765 of file smd.c.

void* smem_alloc ( unsigned  id,
unsigned  size 
)

Definition at line 788 of file smd.c.

void* smem_find ( unsigned  id,
unsigned  size_in 
)

Definition at line 811 of file smd.c.

void __iomem* smem_item ( unsigned  id,
unsigned *  size 
)

Definition at line 793 of file smd.c.

int smsm_change_state ( enum smsm_state_item  item,
uint32_t  clear_mask,
uint32_t  set_mask 
)

Definition at line 851 of file smd.c.

uint32_t smsm_get_state ( enum smsm_state_item  item)

Definition at line 878 of file smd.c.

int smsm_set_sleep_duration ( uint32_t  delay)

Definition at line 915 of file smd.c.