linux/drivers/mxc/dam/dam_v1.c File Reference

This is the brief documentation for this dam_v1.c file. More...

Defines

#define DAM_VIRT_BASE_ADDR   IO_ADDRESS(AUDMUX_BASE_ADDR)

Functions

 unsigned (DAM_VIRT_BASE_ADDR+0x00))) static struct class *mxc_dam_class
int dam_select_mode (dam_port port, dam_mode the_mode)
void dam_select_RxClk_direction (dam_port port, signal_direction direction)
void dam_select_RxClk_source (dam_port p_config, bool from_RxClk, dam_port p_source)
void dam_select_RxD_source (dam_port p_config, dam_port p_source)
void dam_select_RxFS_direction (dam_port port, signal_direction direction)
void dam_select_RxFS_source (dam_port p_config, bool from_RxFS, dam_port p_source)
void dam_select_TxClk_direction (dam_port port, signal_direction direction)
void dam_select_TxClk_source (dam_port p_config, bool from_RxClk, dam_port p_source)
void dam_select_TxFS_direction (dam_port port, signal_direction direction)
void dam_select_TxFS_source (dam_port p_config, bool from_RxFS, dam_port p_source)
int dam_set_internal_network_mode_mask (dam_port port, unsigned char bit_mask)
void dam_set_synchronous (dam_port port, bool synchronous)
void dam_switch_Tx_Rx (dam_port port, bool value)
void dam_reset_register (dam_port port)
static int __init dam_init (void)
static void __exit dam_exit (void)

Detailed Description

This is the brief documentation for this dam_v1.c file.

This file contains the implementation of the DAM driver main services


Define Documentation

#define DAM_VIRT_BASE_ADDR   IO_ADDRESS(AUDMUX_BASE_ADDR)

This include to define bool type, false and true definitions.


Function Documentation

static void __exit dam_exit ( void   )  [static]

This function implements the exit function of the SPI device. This function is called when the module is unloaded.

static int __init dam_init ( void   )  [static]

This function implements the init function of the DAM device. This function is called when the module is loaded.

Returns:
This function returns 0.
void dam_reset_register ( dam_port  port  ) 

This function resets the two registers of the selected port.

Parameters:
port the DAM port to reset

References ModifyRegister32.

int dam_select_mode ( dam_port  port,
dam_mode  the_mode 
)

DAM major

This function selects the operation mode of the port.

Parameters:
port the DAM port to configure
the_mode the operation mode of the port
Returns:
This function returns the result of the operation (0 if successful, -1 otherwise).

References dam_mode_masq, ModifyRegister32, and normal_mode.

void dam_select_RxClk_direction ( dam_port  port,
signal_direction  direction 
)

This function controls Receive clock signal direction for the port.

Parameters:
port the DAM port to configure
direction the Rx clock signal direction

References ModifyRegister32.

void dam_select_RxClk_source ( dam_port  p_config,
bool  from_RxClk,
dam_port  p_source 
)

This function controls Receive clock signal source for the port.

Parameters:
p_config the DAM port to configure
from_RxClk the signal comes from RxClk or TxClk of the source port
p_source the source port

References ModifyRegister32.

void dam_select_RxD_source ( dam_port  p_config,
dam_port  p_source 
)

This function selects the source port for the RxD data.

Parameters:
p_config the DAM port to configure
p_source the source port

References ModifyRegister32.

void dam_select_RxFS_direction ( dam_port  port,
signal_direction  direction 
)

This function controls Receive Frame Sync signal direction for the port.

Parameters:
port the DAM port to configure
direction the Rx Frame Sync signal direction

References ModifyRegister32.

void dam_select_RxFS_source ( dam_port  p_config,
bool  from_RxFS,
dam_port  p_source 
)

This function controls Receive Frame Sync signal source for the port.

Parameters:
p_config the DAM port to configure
from_RxFS the signal comes from RxFS or TxFS of the source port
p_source the source port

References ModifyRegister32.

void dam_select_TxClk_direction ( dam_port  port,
signal_direction  direction 
)

This function controls Transmit clock signal direction for the port.

Parameters:
port the DAM port to configure
direction the Tx clock signal direction

References ModifyRegister32.

void dam_select_TxClk_source ( dam_port  p_config,
bool  from_RxClk,
dam_port  p_source 
)

This function controls Transmit clock signal source for the port.

Parameters:
p_config the DAM port to configure
from_RxClk the signal comes from RxClk or TxClk of the source port
p_source the source port

References ModifyRegister32.

void dam_select_TxFS_direction ( dam_port  port,
signal_direction  direction 
)

This function controls Transmit Frame Sync signal direction for the port.

Parameters:
port the DAM port to configure
direction the Tx Frame Sync signal direction

References ModifyRegister32.

void dam_select_TxFS_source ( dam_port  p_config,
bool  from_RxFS,
dam_port  p_source 
)

This function controls Transmit Frame Sync signal source for the port.

Parameters:
p_config the DAM port to configure
from_RxFS the signal comes from RxFS or TxFS of the source port
p_source the source port

References ModifyRegister32.

int dam_set_internal_network_mode_mask ( dam_port  port,
unsigned char  bit_mask 
)

This function sets a bit mask that selects the port from which of the RxD signals are to be ANDed together for internal network mode. Bit 6 represents RxD from Port7 and bit0 represents RxD from Port1. 1 excludes RxDn from ANDing. 0 includes RxDn for ANDing.

Parameters:
port the DAM port to configure
bit_mask the bit mask
Returns:
This function returns the result of the operation (0 if successful, -1 otherwise).

References dam_internal_network_mode_shift, and ModifyRegister32.

void dam_set_synchronous ( dam_port  port,
bool  synchronous 
)

This function controls whether or not the port is in synchronous mode. When the synchronous mode is selected, the receive and the transmit sections use common clock and frame sync signals. When the synchronous mode is not selected, separate clock and frame sync signals are used for the transmit and the receive sections. The defaut value is the synchronous mode selected.

Parameters:
port the DAM port to configure
synchronous the state to assign

References dam_synchronous_mode_shift, and ModifyRegister32.

void dam_switch_Tx_Rx ( dam_port  port,
bool  value 
)

This function swaps the transmit and receive signals from (Da-TxD, Db-RxD) to (Da-RxD, Db-TxD). This default signal configuration is Da-TxD, Db-RxD.

Parameters:
port the DAM port to configure
value the switch state

References ModifyRegister32.

unsigned ( DAM_VIRT_BASE_ADDR+  0x00  ) 

HPCR/PPCR Registers bit shift definitions

HPCR/PPCR Register bit masq definitions

HPCR/PPCR Register reset value definitions

footer
©  Freescale Semiconductor, Inc., 2007.  All rights reserved.
Freescale Confidential Proprietary
NDA Required
doxygen