Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
spi-omap2-mcspi.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/dmaengine.h>
#include <linux/omap-dma.h>
#include <linux/platform_device.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/pinctrl/consumer.h>
#include <linux/spi/spi.h>
#include <linux/platform_data/spi-omap2-mcspi.h>

Go to the source code of this file.

Data Structures

struct  omap2_mcspi_dma
 
struct  omap2_mcspi_regs
 
struct  omap2_mcspi
 
struct  omap2_mcspi_cs
 

Macros

#define OMAP2_MCSPI_MAX_FREQ   48000000
 
#define SPI_AUTOSUSPEND_TIMEOUT   2000
 
#define OMAP2_MCSPI_REVISION   0x00
 
#define OMAP2_MCSPI_SYSSTATUS   0x14
 
#define OMAP2_MCSPI_IRQSTATUS   0x18
 
#define OMAP2_MCSPI_IRQENABLE   0x1c
 
#define OMAP2_MCSPI_WAKEUPENABLE   0x20
 
#define OMAP2_MCSPI_SYST   0x24
 
#define OMAP2_MCSPI_MODULCTRL   0x28
 
#define OMAP2_MCSPI_CHCONF0   0x2c
 
#define OMAP2_MCSPI_CHSTAT0   0x30
 
#define OMAP2_MCSPI_CHCTRL0   0x34
 
#define OMAP2_MCSPI_TX0   0x38
 
#define OMAP2_MCSPI_RX0   0x3c
 
#define OMAP2_MCSPI_MODULCTRL_SINGLE   BIT(0)
 
#define OMAP2_MCSPI_MODULCTRL_MS   BIT(2)
 
#define OMAP2_MCSPI_MODULCTRL_STEST   BIT(3)
 
#define OMAP2_MCSPI_CHCONF_PHA   BIT(0)
 
#define OMAP2_MCSPI_CHCONF_POL   BIT(1)
 
#define OMAP2_MCSPI_CHCONF_CLKD_MASK   (0x0f << 2)
 
#define OMAP2_MCSPI_CHCONF_EPOL   BIT(6)
 
#define OMAP2_MCSPI_CHCONF_WL_MASK   (0x1f << 7)
 
#define OMAP2_MCSPI_CHCONF_TRM_RX_ONLY   BIT(12)
 
#define OMAP2_MCSPI_CHCONF_TRM_TX_ONLY   BIT(13)
 
#define OMAP2_MCSPI_CHCONF_TRM_MASK   (0x03 << 12)
 
#define OMAP2_MCSPI_CHCONF_DMAW   BIT(14)
 
#define OMAP2_MCSPI_CHCONF_DMAR   BIT(15)
 
#define OMAP2_MCSPI_CHCONF_DPE0   BIT(16)
 
#define OMAP2_MCSPI_CHCONF_DPE1   BIT(17)
 
#define OMAP2_MCSPI_CHCONF_IS   BIT(18)
 
#define OMAP2_MCSPI_CHCONF_TURBO   BIT(19)
 
#define OMAP2_MCSPI_CHCONF_FORCE   BIT(20)
 
#define OMAP2_MCSPI_CHSTAT_RXS   BIT(0)
 
#define OMAP2_MCSPI_CHSTAT_TXS   BIT(1)
 
#define OMAP2_MCSPI_CHSTAT_EOT   BIT(2)
 
#define OMAP2_MCSPI_CHCTRL_EN   BIT(0)
 
#define OMAP2_MCSPI_WAKEUPENABLE_WKEN   BIT(0)
 
#define DMA_MIN_BYTES   160
 
#define omap2_mcspi_resume   NULL
 

Functions

 MODULE_DEVICE_TABLE (of, omap_mcspi_of_match)
 
 MODULE_ALIAS ("platform:omap2_mcspi")
 
 module_platform_driver (omap2_mcspi_driver)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DMA_MIN_BYTES   160

Definition at line 111 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF0   0x2c

Definition at line 60 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF_CLKD_MASK   (0x0f << 2)

Definition at line 74 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF_DMAR   BIT(15)

Definition at line 81 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF_DMAW   BIT(14)

Definition at line 80 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF_DPE0   BIT(16)

Definition at line 82 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF_DPE1   BIT(17)

Definition at line 83 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF_EPOL   BIT(6)

Definition at line 75 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF_FORCE   BIT(20)

Definition at line 86 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF_IS   BIT(18)

Definition at line 84 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF_PHA   BIT(0)

Definition at line 72 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF_POL   BIT(1)

Definition at line 73 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF_TRM_MASK   (0x03 << 12)

Definition at line 79 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF_TRM_RX_ONLY   BIT(12)

Definition at line 77 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF_TRM_TX_ONLY   BIT(13)

Definition at line 78 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF_TURBO   BIT(19)

Definition at line 85 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCONF_WL_MASK   (0x1f << 7)

Definition at line 76 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCTRL0   0x34

Definition at line 62 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHCTRL_EN   BIT(0)

Definition at line 92 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHSTAT0   0x30

Definition at line 61 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHSTAT_EOT   BIT(2)

Definition at line 90 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHSTAT_RXS   BIT(0)

Definition at line 88 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_CHSTAT_TXS   BIT(1)

Definition at line 89 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_IRQENABLE   0x1c

Definition at line 54 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_IRQSTATUS   0x18

Definition at line 53 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_MAX_FREQ   48000000

Definition at line 48 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_MODULCTRL   0x28

Definition at line 57 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_MODULCTRL_MS   BIT(2)

Definition at line 69 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_MODULCTRL_SINGLE   BIT(0)

Definition at line 68 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_MODULCTRL_STEST   BIT(3)

Definition at line 70 of file spi-omap2-mcspi.c.

#define omap2_mcspi_resume   NULL

Definition at line 1328 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_REVISION   0x00

Definition at line 51 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_RX0   0x3c

Definition at line 64 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_SYSSTATUS   0x14

Definition at line 52 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_SYST   0x24

Definition at line 56 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_TX0   0x38

Definition at line 63 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_WAKEUPENABLE   0x20

Definition at line 55 of file spi-omap2-mcspi.c.

#define OMAP2_MCSPI_WAKEUPENABLE_WKEN   BIT(0)

Definition at line 94 of file spi-omap2-mcspi.c.

#define SPI_AUTOSUSPEND_TIMEOUT   2000

Definition at line 49 of file spi-omap2-mcspi.c.

Function Documentation

MODULE_ALIAS ( "platform:omap2_mcspi"  )
MODULE_DEVICE_TABLE ( of  ,
omap_mcspi_of_match   
)
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( omap2_mcspi_driver  )