SHW Compile Flags

Defines

#define SHW_DRIVER_NAME   "fsl_shw"

Functions

static void SHW_ADD_USER (fsl_shw_uco_t *ctx)
static void SHW_REMOVE_USER (fsl_shw_uco_t *ctx)
void * wire_user_memory (void *address, uint32_t length, void **page_ctx)
void unwire_user_memory (void **page_ctx)
os_error_code map_user_memory (struct vm_area_struct *vma, uint32_t physical_addr, uint32_t size)
os_error_code unmap_user_memory (uint32_t user_addr, uint32_t size)

Detailed Description

These are flags which are used to configure the SHW driver at compilation time.

The terms 'defined' and 'undefined' refer to whether a #define (or -D on a compile command) has defined a given preprocessor symbol. If a given symbol is defined, then #ifdef <symbol> will succeed. Some symbols described below default to not having a definition, i.e. they are undefined.

This should be configured in a Makefile/compile command line. It is the value the driver will use to register itself as a device driver for a /dev/node file. Zero means allow (Linux) to assign a value. Any positive number will be attempted as the registration value, to allow for coordination with the creation/existence of a /dev/fsl_shw (for instance) file in the filesystem.


Define Documentation

#define SHW_DRIVER_NAME   "fsl_shw"

Name the driver will use to register itself to the kernel as the driver for the shw_major_node and interrupt handling.

Referenced by shw_setup_user_driver_interaction().


Function Documentation

os_error_code map_user_memory ( struct vm_area_struct *  vma,
uint32_t  physical_addr,
uint32_t  size 
)

Map some physical memory into a users memory space

Parameters:
vma Memory structure to map to
physical_addr Physical address of the memory to be mapped in
size Size of the memory to map (bytes)
Returns:

Referenced by OS_DEV_MMAP().

static void SHW_ADD_USER ( fsl_shw_uco_t ctx  )  [inline, static]

Add a user context onto the list of registered users.

Place it at the head of the user_list queue.

Parameters:
ctx A pointer to a user context
Returns:
void

References fsl_shw_uco_t::next, os_lock_save_context, os_unlock_restore_context, shw_queue_lock, and user_list.

Referenced by fsl_shw_register_user(), and init_uco().

static void SHW_REMOVE_USER ( fsl_shw_uco_t ctx  )  [inline, static]

Remove a user context from the list of registered users.

Parameters:
ctx A pointer to a user context
Returns:
void

References fsl_shw_uco_t::next, os_lock_save_context, os_unlock_restore_context, shw_queue_lock, and user_list.

Referenced by fsl_shw_deregister_user(), and OS_DEV_IOCTL().

os_error_code unmap_user_memory ( uint32_t  user_addr,
uint32_t  size 
)

Remove some memory from a user's memory space

Parameters:
user_addr Userspace address of the memory to be unmapped
size Size of the memory to map (bytes)
Returns:

Referenced by fsl_shw_deregister_user(), and sah_handle_deregistration().

void unwire_user_memory ( void **  page_ctx  ) 

Release and unmap a region of user memory.

Parameters:
page_ctx Page context from wire_user_memory
void* wire_user_memory ( void *  address,
uint32_t  length,
void **  page_ctx 
)

Map and wire down a region of user memory.

Parameters:
address Userspace address of the memory to wire
length Length of the memory region to wire
page_ctx Page context, to be passed to unwire_user_memory
Returns:
(if successful) Kernel virtual address of the wired pages
footer
©  Freescale Semiconductor, Inc., 2007.  All rights reserved.
Freescale Confidential Proprietary
NDA Required
doxygen