Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

iomux.c File Reference


Detailed Description

I/O Muxing control functions.

Definition in file iomux.c.

#include <linux/io.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/gpio.h>
#include <mach/hardware.h>
#include <mach/irqs.h>
#include "iomux.h"

Go to the source code of this file.

Defines

#define IOMUXGPR   (IO_ADDRESS(IOMUXC_BASE_ADDR))
#define IOMUXSW_INPUT_CTL   (IO_ADDRESS(IOMUXC_BASE_ADDR) + 0x460)
#define IOMUXSW_INPUT_END   (IO_ADDRESS(IOMUXC_BASE_ADDR) + 0x580)
#define IOMUXSW_MUX_CTL   (IO_ADDRESS(IOMUXC_BASE_ADDR) + 0x008)
#define IOMUXSW_MUX_END   (IO_ADDRESS(IOMUXC_BASE_ADDR) + 0x228)
#define IOMUXSW_PAD_CTL   (IO_ADDRESS(IOMUXC_BASE_ADDR) + 0x22C)
#define IOMUXSW_PAD_END   (IO_ADDRESS(IOMUXC_BASE_ADDR) + 0x414)
#define MUX_INPUT_NUM_MUX   (((IOMUXSW_INPUT_END - IOMUXSW_INPUT_CTL) >> 2) + 1)
#define MUX_PIN_NUM_MAX   (((IOMUXSW_MUX_END - IOMUXSW_MUX_CTL) >> 2) + 1)
#define MUX_USED   0x80
#define PIN_TO_IOMUX_INDEX(pin)   (PIN_TO_IOMUX_MUX(pin) >> 2)

Functions

static DEFINE_SPINLOCK (gpio_mux_lock)
 EXPORT_SYMBOL (mxc_iomux_set_input)
 EXPORT_SYMBOL (mxc_iomux_set_gpr)
 EXPORT_SYMBOL (mxc_iomux_set_pad)
 EXPORT_SYMBOL (mxc_free_iomux)
 EXPORT_SYMBOL (mxc_request_iomux)
static int iomux_config_mux (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_input (iomux_input_select_t input, u32 config)
void mxc_iomux_set_pad (iomux_pin_name_t pin, u32 config)
int mxc_request_iomux (iomux_pin_name_t pin, iomux_pin_cfg_t cfg)

Variables

static u8 iomux_pin_res_table [MUX_PIN_NUM_MAX]


Generated by  Doxygen 1.6.0   Back to index