Linux Kernel
3.7.1
|
#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/platform_device.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
Go to the source code of this file.
Data Structures | |
struct | omap1_spi100k |
struct | omap1_spi100k_cs |
Macros | |
#define | OMAP1_SPI100K_MAX_FREQ 48000000 |
#define | ICR_SPITAS (OMAP7XX_ICR_BASE + 0x12) |
#define | SPI_SETUP1 0x00 |
#define | SPI_SETUP2 0x02 |
#define | SPI_CTRL 0x04 |
#define | SPI_STATUS 0x06 |
#define | SPI_TX_LSB 0x08 |
#define | SPI_TX_MSB 0x0a |
#define | SPI_RX_LSB 0x0c |
#define | SPI_RX_MSB 0x0e |
#define | SPI_SETUP1_INT_READ_ENABLE (1UL << 5) |
#define | SPI_SETUP1_INT_WRITE_ENABLE (1UL << 4) |
#define | SPI_SETUP1_CLOCK_DIVISOR(x) ((x) << 1) |
#define | SPI_SETUP1_CLOCK_ENABLE (1UL << 0) |
#define | SPI_SETUP2_ACTIVE_EDGE_FALLING (0UL << 0) |
#define | SPI_SETUP2_ACTIVE_EDGE_RISING (1UL << 0) |
#define | SPI_SETUP2_NEGATIVE_LEVEL (0UL << 5) |
#define | SPI_SETUP2_POSITIVE_LEVEL (1UL << 5) |
#define | SPI_SETUP2_LEVEL_TRIGGER (0UL << 10) |
#define | SPI_SETUP2_EDGE_TRIGGER (1UL << 10) |
#define | SPI_CTRL_SEN(x) ((x) << 7) |
#define | SPI_CTRL_WORD_SIZE(x) (((x) - 1) << 2) |
#define | SPI_CTRL_WR (1UL << 1) |
#define | SPI_CTRL_RD (1UL << 0) |
#define | SPI_STATUS_WE (1UL << 1) |
#define | SPI_STATUS_RD (1UL << 0) |
#define | WRITE 0 |
#define | READ 1 |
#define | DMA_MIN_BYTES 8 |
#define | SPI_RUNNING 0 |
#define | SPI_SHUTDOWN 1 |
#define | MOD_REG_BIT(val, mask, set) |
#define | MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH) |
Functions | |
module_init (omap1_spi100k_init) | |
module_exit (omap1_spi100k_exit) | |
MODULE_DESCRIPTION ("OMAP7xx SPI 100k controller driver") | |
MODULE_AUTHOR ("Fabrice Crohas <[email protected]>") | |
MODULE_LICENSE ("GPL") | |
#define DMA_MIN_BYTES 8 |
Definition at line 80 of file spi-omap-100k.c.
#define ICR_SPITAS (OMAP7XX_ICR_BASE + 0x12) |
Definition at line 42 of file spi-omap-100k.c.
Definition at line 109 of file spi-omap-100k.c.
#define MODEBITS (SPI_CPOL | SPI_CPHA | SPI_CS_HIGH) |
Definition at line 293 of file spi-omap-100k.c.
#define OMAP1_SPI100K_MAX_FREQ 48000000 |
Definition at line 40 of file spi-omap-100k.c.
#define READ 1 |
Definition at line 74 of file spi-omap-100k.c.
#define SPI_CTRL 0x04 |
Definition at line 46 of file spi-omap-100k.c.
#define SPI_CTRL_RD (1UL << 0) |
Definition at line 68 of file spi-omap-100k.c.
Definition at line 65 of file spi-omap-100k.c.
Definition at line 66 of file spi-omap-100k.c.
#define SPI_CTRL_WR (1UL << 1) |
Definition at line 67 of file spi-omap-100k.c.
#define SPI_RUNNING 0 |
Definition at line 82 of file spi-omap-100k.c.
#define SPI_RX_LSB 0x0c |
Definition at line 50 of file spi-omap-100k.c.
#define SPI_RX_MSB 0x0e |
Definition at line 51 of file spi-omap-100k.c.
#define SPI_SETUP1 0x00 |
Definition at line 44 of file spi-omap-100k.c.
Definition at line 55 of file spi-omap-100k.c.
#define SPI_SETUP1_CLOCK_ENABLE (1UL << 0) |
Definition at line 56 of file spi-omap-100k.c.
#define SPI_SETUP1_INT_READ_ENABLE (1UL << 5) |
Definition at line 53 of file spi-omap-100k.c.
#define SPI_SETUP1_INT_WRITE_ENABLE (1UL << 4) |
Definition at line 54 of file spi-omap-100k.c.
#define SPI_SETUP2 0x02 |
Definition at line 45 of file spi-omap-100k.c.
#define SPI_SETUP2_ACTIVE_EDGE_FALLING (0UL << 0) |
Definition at line 58 of file spi-omap-100k.c.
#define SPI_SETUP2_ACTIVE_EDGE_RISING (1UL << 0) |
Definition at line 59 of file spi-omap-100k.c.
#define SPI_SETUP2_EDGE_TRIGGER (1UL << 10) |
Definition at line 63 of file spi-omap-100k.c.
#define SPI_SETUP2_LEVEL_TRIGGER (0UL << 10) |
Definition at line 62 of file spi-omap-100k.c.
#define SPI_SETUP2_NEGATIVE_LEVEL (0UL << 5) |
Definition at line 60 of file spi-omap-100k.c.
#define SPI_SETUP2_POSITIVE_LEVEL (1UL << 5) |
Definition at line 61 of file spi-omap-100k.c.
#define SPI_SHUTDOWN 1 |
Definition at line 83 of file spi-omap-100k.c.
#define SPI_STATUS 0x06 |
Definition at line 47 of file spi-omap-100k.c.
#define SPI_STATUS_RD (1UL << 0) |
Definition at line 71 of file spi-omap-100k.c.
#define SPI_STATUS_WE (1UL << 1) |
Definition at line 70 of file spi-omap-100k.c.
#define SPI_TX_LSB 0x08 |
Definition at line 48 of file spi-omap-100k.c.
#define SPI_TX_MSB 0x0a |
Definition at line 49 of file spi-omap-100k.c.
#define WRITE 0 |
Definition at line 73 of file spi-omap-100k.c.
MODULE_AUTHOR | ( | "Fabrice Crohas <[email protected]>" | ) |
MODULE_DESCRIPTION | ( | "OMAP7xx SPI 100k controller driver" | ) |
module_exit | ( | omap1_spi100k_exit | ) |
module_init | ( | omap1_spi100k_init | ) |
MODULE_LICENSE | ( | "GPL" | ) |