linux/arch/arm/mach-mx25/iomux.h File Reference

I/O Muxing control definitions and functions. More...


Typedefs

typedef enum iomux_pin_config iomux_pin_cfg_t
typedef enum iomux_pad_config iomux_pad_config_t
typedef enum iomux_gp_func iomux_gp_func_t
typedef enum iomux_input_select iomux_input_select_t
typedef enum iomux_input_config iomux_input_cfg_t

Enumerations

enum  iomux_pin_config {
  MUX_CONFIG_FUNC = 0,
  MUX_CONFIG_ALT1,
  MUX_CONFIG_ALT2,
  MUX_CONFIG_ALT3,
  MUX_CONFIG_ALT4,
  MUX_CONFIG_ALT5,
  MUX_CONFIG_ALT6,
  MUX_CONFIG_ALT7,
  MUX_CONFIG_SION = 0x1 << 4,
  MUX_CONFIG_GPIO = MUX_CONFIG_ALT5
}
enum  iomux_pad_config
enum  iomux_gp_func
enum  iomux_input_select
enum  iomux_input_config { ,
  INPUTCONFIG_NONE = 0,
  INPUTCONFIG_GPIO = 1 << 0,
  INPUTCONFIG_FUNC = 1 << 1,
  INPUTCONFIG_ALT1 = 1 << 2,
  INPUTCONFIG_ALT2 = 1 << 3
}

Functions

int mxc_request_iomux (iomux_pin_name_t pin, iomux_pin_cfg_t cfg)
void mxc_free_iomux (iomux_pin_name_t pin, iomux_pin_cfg_t cfg)
void mxc_iomux_set_gpr (iomux_gp_func_t gp, bool en)
void mxc_iomux_set_pad (iomux_pin_name_t pin, u32 config)
void mxc_iomux_set_input (iomux_input_select_t input, u32 config)


Detailed Description

I/O Muxing control definitions and functions.


Typedef Documentation

IOMUX general purpose functions IOMUXC_GPR1

IOMUX input functions SW_SELECT_INPUT bits 2-0

IOMUX SELECT_INPUT register index Base register is IOMUXSW_INPUT_CTL in iomux.c

IOMUX pad functions SW_PAD_CTL

IOMUX functions SW_MUX_CTL


Enumeration Type Documentation

IOMUX general purpose functions IOMUXC_GPR1

IOMUX input functions SW_SELECT_INPUT bits 2-0

Enumerator:
INPUTCONFIG_NONE  not configured for input
INPUTCONFIG_GPIO  used as GPIO
INPUTCONFIG_FUNC  used as function
INPUTCONFIG_ALT1  used as alternate function 1
INPUTCONFIG_ALT2  used as alternate function 2

IOMUX SELECT_INPUT register index Base register is IOMUXSW_INPUT_CTL in iomux.c

IOMUX pad functions SW_PAD_CTL

IOMUX functions SW_MUX_CTL

Enumerator:
MUX_CONFIG_FUNC  used as function
MUX_CONFIG_ALT1  used as alternate function 1
MUX_CONFIG_ALT2  used as alternate function 2
MUX_CONFIG_ALT3  used as alternate function 3
MUX_CONFIG_ALT4  used as alternate function 4
MUX_CONFIG_ALT5  used as alternate function 5
MUX_CONFIG_ALT6  used as alternate function 6
MUX_CONFIG_ALT7  used as alternate function 7
MUX_CONFIG_SION  used as LOOPBACK:MUX SION bit
MUX_CONFIG_GPIO  used as GPIO


Function Documentation

void mxc_free_iomux ( iomux_pin_name_t  pin,
iomux_pin_cfg_t  cfg 
)

Release ownership for an IO pin

Parameters:
pin a name defined by iomux_pin_name_t
cfg an input function as defined in iomux_pin_cfg_t

void mxc_iomux_set_gpr ( iomux_gp_func_t  gp,
bool  en 
)

This function enables/disables the general purpose function for a particular signal.

Parameters:
gp one signal as defined in iomux_gp_func_t
en true to enable; false to disable

void mxc_iomux_set_input ( iomux_input_select_t  input,
u32  config 
)

This function configures input path.

Parameters:
input index of input select register as defined in iomux_input_select_t
config the binary value of elements defined in iomux_input_cfg_t

void mxc_iomux_set_pad ( iomux_pin_name_t  pin,
u32  config 
)

This function configures the pad value for a IOMUX pin.

Parameters:
pin a pin number as defined in iomux_pin_name_t
config the ORed value of elements defined in iomux_pad_config_t

int mxc_request_iomux ( iomux_pin_name_t  pin,
iomux_pin_cfg_t  cfg 
)

Request ownership for an IO pin. This function has to be the first one being called before that pin is used. The caller has to check the return value to make sure it returns 0.

Parameters:
pin a name defined by iomux_pin_name_t
cfg an input function as defined in iomux_pin_cfg_t
Returns:
0 if successful; Non-zero otherwise

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