Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions | Variables
pinctrl-falcon.c File Reference
#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/of_address.h>
#include <linux/of_gpio.h>
#include <linux/platform_device.h>
#include "pinctrl-lantiq.h"
#include <lantiq_soc.h>

Go to the source code of this file.

Macros

#define LTQ_PADC_MUX(x)   (x * 0x4)
 
#define LTQ_PADC_PUEN   0x80
 
#define LTQ_PADC_PDEN   0x84
 
#define LTQ_PADC_SRC   0x88
 
#define LTQ_PADC_DCC   0x8C
 
#define LTQ_PADC_AVAIL   0xF0
 
#define pad_r32(p, reg)   ltq_r32(p + reg)
 
#define pad_w32(p, val, reg)   ltq_w32(val, p + reg)
 
#define pad_w32_mask(c, clear, set, reg)   pad_w32(c, (pad_r32(c, reg) & ~(clear)) | (set), reg)
 
#define pad_getbit(m, r, p)   (!!(ltq_r32(m + r) & (1 << p)))
 
#define PORTS   5
 
#define PINS   32
 
#define PORT(x)   (x / PINS)
 
#define PORT_PIN(x)   (x % PINS)
 
#define MFP_FALCON(a, f0, f1, f2, f3)
 
#define GRP_MUX(a, m, p)
 

Enumerations

enum  falcon_mux {
  FALCON_MUX_GPIO = 0, FALCON_MUX_RST, FALCON_MUX_NTR, FALCON_MUX_MDIO,
  FALCON_MUX_LED, FALCON_MUX_SPI, FALCON_MUX_ASC, FALCON_MUX_I2C,
  FALCON_MUX_HOSTIF, FALCON_MUX_SLIC, FALCON_MUX_JTAG, FALCON_MUX_PCM,
  FALCON_MUX_MII, FALCON_MUX_PHY, FALCON_MUX_NONE = 0xffff
}
 

Functions

int pinctrl_falcon_get_range_size (int id)
 
void pinctrl_falcon_add_gpio_range (struct pinctrl_gpio_range *range)
 
 MODULE_DEVICE_TABLE (of, falcon_match)
 
int __init pinctrl_falcon_init (void)
 
 core_initcall_sync (pinctrl_falcon_init)
 

Variables

struct pinconf_ops falcon_pinconf_ops
 

Macro Definition Documentation

#define GRP_MUX (   a,
  m,
  p 
)
Value:
{ \
.name = a, \
.mux = FALCON_MUX_##m, \
.pins = p, \
.npins = ARRAY_SIZE(p), \
}

Definition at line 66 of file pinctrl-falcon.c.

#define LTQ_PADC_AVAIL   0xF0

Definition at line 40 of file pinctrl-falcon.c.

#define LTQ_PADC_DCC   0x8C

Definition at line 38 of file pinctrl-falcon.c.

#define LTQ_PADC_MUX (   x)    (x * 0x4)

Definition at line 30 of file pinctrl-falcon.c.

#define LTQ_PADC_PDEN   0x84

Definition at line 34 of file pinctrl-falcon.c.

#define LTQ_PADC_PUEN   0x80

Definition at line 32 of file pinctrl-falcon.c.

#define LTQ_PADC_SRC   0x88

Definition at line 36 of file pinctrl-falcon.c.

#define MFP_FALCON (   a,
  f0,
  f1,
  f2,
  f3 
)
Value:
{ \
.name = #a, \
.pin = a, \
.func = { \
FALCON_MUX_##f0, \
FALCON_MUX_##f1, \
FALCON_MUX_##f2, \
FALCON_MUX_##f3, \
}, \
}

Definition at line 54 of file pinctrl-falcon.c.

#define pad_getbit (   m,
  r,
  p 
)    (!!(ltq_r32(m + r) & (1 << p)))

Definition at line 47 of file pinctrl-falcon.c.

#define pad_r32 (   p,
  reg 
)    ltq_r32(p + reg)

Definition at line 42 of file pinctrl-falcon.c.

#define pad_w32 (   p,
  val,
  reg 
)    ltq_w32(val, p + reg)

Definition at line 43 of file pinctrl-falcon.c.

#define pad_w32_mask (   c,
  clear,
  set,
  reg 
)    pad_w32(c, (pad_r32(c, reg) & ~(clear)) | (set), reg)

Definition at line 44 of file pinctrl-falcon.c.

#define PINS   32

Definition at line 50 of file pinctrl-falcon.c.

#define PORT (   x)    (x / PINS)

Definition at line 51 of file pinctrl-falcon.c.

#define PORT_PIN (   x)    (x % PINS)

Definition at line 52 of file pinctrl-falcon.c.

#define PORTS   5

Definition at line 49 of file pinctrl-falcon.c.

Enumeration Type Documentation

enum falcon_mux
Enumerator:
FALCON_MUX_GPIO 
FALCON_MUX_RST 
FALCON_MUX_NTR 
FALCON_MUX_MDIO 
FALCON_MUX_LED 
FALCON_MUX_SPI 
FALCON_MUX_ASC 
FALCON_MUX_I2C 
FALCON_MUX_HOSTIF 
FALCON_MUX_SLIC 
FALCON_MUX_JTAG 
FALCON_MUX_PCM 
FALCON_MUX_MII 
FALCON_MUX_PHY 
FALCON_MUX_NONE 

Definition at line 74 of file pinctrl-falcon.c.

Function Documentation

core_initcall_sync ( pinctrl_falcon_init  )
MODULE_DEVICE_TABLE ( of  ,
falcon_match   
)
void pinctrl_falcon_add_gpio_range ( struct pinctrl_gpio_range *  range)

Definition at line 382 of file pinctrl-falcon.c.

int pinctrl_falcon_get_range_size ( int  id)

Definition at line 370 of file pinctrl-falcon.c.

int __init pinctrl_falcon_init ( void  )

Definition at line 463 of file pinctrl-falcon.c.

Variable Documentation

struct pinconf_ops falcon_pinconf_ops
Initial value:
= {
.pin_config_get = falcon_pinconf_get,
.pin_config_set = falcon_pinconf_set,
.pin_config_group_get = falcon_pinconf_group_get,
.pin_config_group_set = falcon_pinconf_group_set,
.pin_config_dbg_show = falcon_pinconf_dbg_show,
.pin_config_group_dbg_show = falcon_pinconf_group_dbg_show,
}

Definition at line 325 of file pinctrl-falcon.c.