Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/of_gpio.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi_bitbang.h>
#include <linux/pinctrl/consumer.h>
Go to the source code of this file.
Data Structures | |
struct | sirfsoc_spi |
Functions | |
MODULE_DEVICE_TABLE (of, sirfsoc_spi_of_match) | |
module_platform_driver (spi_sirfsoc_driver) | |
MODULE_DESCRIPTION ("SiRF SoC SPI master driver") | |
MODULE_AUTHOR ("Zhiwu Song <[email protected]>, ""Barry Song <[email protected]>") | |
MODULE_LICENSE ("GPL v2") | |
#define DRIVER_NAME "sirfsoc_spi" |
Definition at line 24 of file spi-sirf.c.
#define SIRFSOC_SPI_CLK_IDLE_STAT BIT(20) |
Definition at line 52 of file spi-sirf.c.
#define SIRFSOC_SPI_CLK_SAMPLE_MODE BIT(25) |
Definition at line 57 of file spi-sirf.c.
#define SIRFSOC_SPI_CMD 0x0004 |
Definition at line 27 of file spi-sirf.c.
Definition at line 62 of file spi-sirf.c.
#define SIRFSOC_SPI_CMD_MODE BIT(17) |
Definition at line 49 of file spi-sirf.c.
#define SIRFSOC_SPI_CMD_TX_EN BIT(2) |
Definition at line 95 of file spi-sirf.c.
#define SIRFSOC_SPI_CS_HOLD_TIME BIT(24) |
Definition at line 56 of file spi-sirf.c.
#define SIRFSOC_SPI_CS_IDLE_STAT BIT(21) |
Definition at line 53 of file spi-sirf.c.
#define SIRFSOC_SPI_CS_IO_MODE BIT(19) |
Definition at line 51 of file spi-sirf.c.
#define SIRFSOC_SPI_CS_IO_OUT BIT(18) |
Definition at line 50 of file spi-sirf.c.
#define SIRFSOC_SPI_CTRL 0x0000 |
Definition at line 26 of file spi-sirf.c.
#define SIRFSOC_SPI_DAT_FRM_LEN_MAX (64 * 1024) |
Definition at line 116 of file spi-sirf.c.
#define SIRFSOC_SPI_DRV_POS_EDGE BIT(23) |
Definition at line 55 of file spi-sirf.c.
#define SIRFSOC_SPI_DUMMY_DELAY_CTL 0x0144 |
Definition at line 45 of file spi-sirf.c.
#define SIRFSOC_SPI_ENA_AUTO_CLR BIT(30) |
Definition at line 63 of file spi-sirf.c.
#define SIRFSOC_SPI_FIFO_EMPTY BIT(9) |
Definition at line 112 of file spi-sirf.c.
#define SIRFSOC_SPI_FIFO_FULL BIT(8) |
Definition at line 111 of file spi-sirf.c.
Definition at line 120 of file spi-sirf.c.
Definition at line 119 of file spi-sirf.c.
#define SIRFSOC_SPI_FIFO_LEVEL_MASK 0xFF |
Definition at line 110 of file spi-sirf.c.
#define SIRFSOC_SPI_FIFO_RESET BIT(0) |
Definition at line 101 of file spi-sirf.c.
Definition at line 118 of file spi-sirf.c.
#define SIRFSOC_SPI_FIFO_SIZE 256 |
Definition at line 115 of file spi-sirf.c.
#define SIRFSOC_SPI_FIFO_START BIT(1) |
Definition at line 102 of file spi-sirf.c.
Definition at line 121 of file spi-sirf.c.
#define SIRFSOC_SPI_FIFO_WIDTH_BYTE (0 << 0) |
Definition at line 105 of file spi-sirf.c.
#define SIRFSOC_SPI_FIFO_WIDTH_DWORD (2 << 0) |
Definition at line 107 of file spi-sirf.c.
#define SIRFSOC_SPI_FIFO_WIDTH_WORD (1 << 0) |
Definition at line 106 of file spi-sirf.c.
#define SIRFSOC_SPI_FRM_END BIT(10) |
Definition at line 90 of file spi-sirf.c.
#define SIRFSOC_SPI_FRM_END_INT_EN BIT(10) |
Definition at line 77 of file spi-sirf.c.
#define SIRFSOC_SPI_INT_EN 0x000C |
Definition at line 29 of file spi-sirf.c.
#define SIRFSOC_SPI_INT_MASK_ALL 0x1FFF |
Definition at line 79 of file spi-sirf.c.
#define SIRFSOC_SPI_INT_STATUS 0x0010 |
Definition at line 30 of file spi-sirf.c.
#define SIRFSOC_SPI_IO_MODE_SEL BIT(0) |
Definition at line 97 of file spi-sirf.c.
#define SIRFSOC_SPI_MUL_DAT_MODE BIT(31) |
Definition at line 64 of file spi-sirf.c.
#define SIRFSOC_SPI_RX_DMA_FLUSH BIT(2) |
Definition at line 98 of file spi-sirf.c.
#define SIRFSOC_SPI_RX_DMA_IO_CTRL 0x0120 |
Definition at line 38 of file spi-sirf.c.
#define SIRFSOC_SPI_RX_DMA_IO_LEN 0x0124 |
Definition at line 39 of file spi-sirf.c.
#define SIRFSOC_SPI_RX_DONE BIT(0) |
Definition at line 82 of file spi-sirf.c.
#define SIRFSOC_SPI_RX_DONE_INT_EN BIT(0) |
Definition at line 67 of file spi-sirf.c.
#define SIRFSOC_SPI_RX_EN BIT(0) |
Definition at line 93 of file spi-sirf.c.
#define SIRFSOC_SPI_RX_FIFO_FULL BIT(6) |
Definition at line 86 of file spi-sirf.c.
#define SIRFSOC_SPI_RX_IO_DMA_INT_EN BIT(4) |
Definition at line 71 of file spi-sirf.c.
#define SIRFSOC_SPI_RX_OFLOW BIT(2) |
Definition at line 84 of file spi-sirf.c.
#define SIRFSOC_SPI_RX_OFLOW_INT_EN BIT(2) |
Definition at line 69 of file spi-sirf.c.
#define SIRFSOC_SPI_RXFIFO_CTRL 0x0128 |
Definition at line 40 of file spi-sirf.c.
#define SIRFSOC_SPI_RXFIFO_DATA 0x0138 |
Definition at line 44 of file spi-sirf.c.
#define SIRFSOC_SPI_RXFIFO_FULL_INT_EN BIT(6) |
Definition at line 73 of file spi-sirf.c.
#define SIRFSOC_SPI_RXFIFO_LEVEL_CHK 0x012C |
Definition at line 41 of file spi-sirf.c.
#define SIRFSOC_SPI_RXFIFO_OP 0x0130 |
Definition at line 42 of file spi-sirf.c.
#define SIRFSOC_SPI_RXFIFO_STATUS 0x0134 |
Definition at line 43 of file spi-sirf.c.
#define SIRFSOC_SPI_RXFIFO_THD_INT_EN BIT(8) |
Definition at line 75 of file spi-sirf.c.
#define SIRFSOC_SPI_RXFIFO_THD_REACH BIT(8) |
Definition at line 88 of file spi-sirf.c.
#define SIRFSOC_SPI_SLV_MODE BIT(16) |
Definition at line 48 of file spi-sirf.c.
#define SIRFSOC_SPI_TRAN_DAT_FORMAT_12 (1 << 26) |
Definition at line 59 of file spi-sirf.c.
#define SIRFSOC_SPI_TRAN_DAT_FORMAT_16 (2 << 26) |
Definition at line 60 of file spi-sirf.c.
#define SIRFSOC_SPI_TRAN_DAT_FORMAT_32 (3 << 26) |
Definition at line 61 of file spi-sirf.c.
#define SIRFSOC_SPI_TRAN_DAT_FORMAT_8 (0 << 26) |
Definition at line 58 of file spi-sirf.c.
#define SIRFSOC_SPI_TRAN_MSB BIT(22) |
Definition at line 54 of file spi-sirf.c.
#define SIRFSOC_SPI_TX_DMA_IO_CTRL 0x0100 |
Definition at line 31 of file spi-sirf.c.
#define SIRFSOC_SPI_TX_DMA_IO_LEN 0x0104 |
Definition at line 32 of file spi-sirf.c.
#define SIRFSOC_SPI_TX_DONE BIT(1) |
Definition at line 83 of file spi-sirf.c.
#define SIRFSOC_SPI_TX_DONE_INT_EN BIT(1) |
Definition at line 68 of file spi-sirf.c.
#define SIRFSOC_SPI_TX_EN BIT(1) |
Definition at line 94 of file spi-sirf.c.
#define SIRFSOC_SPI_TX_IO_DMA_INT_EN BIT(5) |
Definition at line 72 of file spi-sirf.c.
#define SIRFSOC_SPI_TX_RX_EN 0x0008 |
Definition at line 28 of file spi-sirf.c.
#define SIRFSOC_SPI_TX_UFLOW BIT(3) |
Definition at line 85 of file spi-sirf.c.
#define SIRFSOC_SPI_TX_UFLOW_INT_EN BIT(3) |
Definition at line 70 of file spi-sirf.c.
#define SIRFSOC_SPI_TXFIFO_CTRL 0x0108 |
Definition at line 33 of file spi-sirf.c.
#define SIRFSOC_SPI_TXFIFO_DATA 0x0118 |
Definition at line 37 of file spi-sirf.c.
#define SIRFSOC_SPI_TXFIFO_EMPTY BIT(7) |
Definition at line 87 of file spi-sirf.c.
#define SIRFSOC_SPI_TXFIFO_EMPTY_INT_EN BIT(7) |
Definition at line 74 of file spi-sirf.c.
#define SIRFSOC_SPI_TXFIFO_LEVEL_CHK 0x010C |
Definition at line 34 of file spi-sirf.c.
#define SIRFSOC_SPI_TXFIFO_OP 0x0110 |
Definition at line 35 of file spi-sirf.c.
#define SIRFSOC_SPI_TXFIFO_STATUS 0x0114 |
Definition at line 36 of file spi-sirf.c.
#define SIRFSOC_SPI_TXFIFO_THD_INT_EN BIT(9) |
Definition at line 76 of file spi-sirf.c.
#define SIRFSOC_SPI_TXFIFO_THD_REACH BIT(9) |
Definition at line 89 of file spi-sirf.c.
MODULE_AUTHOR | ( | "Zhiwu Song <[email protected]> | , |
""Barry Song< Baohua.Song @csr.com >" | |||
) |
MODULE_DEVICE_TABLE | ( | of | , |
sirfsoc_spi_of_match | |||
) |
MODULE_LICENSE | ( | "GPL v2" | ) |
module_platform_driver | ( | spi_sirfsoc_driver | ) |