Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
spi.c File Reference
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/module.h>
#include <linux/crc7.h>
#include <linux/spi/spi.h>
#include <linux/wl12xx.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include "wlcore.h"
#include "wl12xx_80211.h"
#include "io.h"

Go to the source code of this file.

Data Structures

struct  wl12xx_spi_glue
 

Macros

#define WSPI_CMD_READ   0x40000000
 
#define WSPI_CMD_WRITE   0x00000000
 
#define WSPI_CMD_FIXED   0x20000000
 
#define WSPI_CMD_BYTE_LENGTH   0x1FFE0000
 
#define WSPI_CMD_BYTE_LENGTH_OFFSET   17
 
#define WSPI_CMD_BYTE_ADDR   0x0001FFFF
 
#define WSPI_INIT_CMD_CRC_LEN   5
 
#define WSPI_INIT_CMD_START   0x00
 
#define WSPI_INIT_CMD_TX   0x40
 
#define WSPI_INIT_CMD_BYPASS_BIT   0x80
 
#define WSPI_INIT_CMD_FIXEDBUSY_LEN   0x07
 
#define WSPI_INIT_CMD_EN_FIXEDBUSY   0x80
 
#define WSPI_INIT_CMD_DIS_FIXEDBUSY   0x00
 
#define WSPI_INIT_CMD_IOD   0x40
 
#define WSPI_INIT_CMD_IP   0x20
 
#define WSPI_INIT_CMD_CS   0x10
 
#define WSPI_INIT_CMD_WS   0x08
 
#define WSPI_INIT_CMD_WSPI   0x01
 
#define WSPI_INIT_CMD_END   0x01
 
#define WSPI_INIT_CMD_LEN   8
 
#define HW_ACCESS_WSPI_FIXED_BUSY_LEN   ((WL1271_BUSY_WORD_LEN - 4) / sizeof(u32))
 
#define HW_ACCESS_WSPI_INIT_CMD_MASK   0
 
#define WSPI_MAX_CHUNK_SIZE   4092
 
#define SPI_AGGR_BUFFER_SIZE   (4 * PAGE_SIZE)
 
#define WSPI_MAX_NUM_OF_CHUNKS   (SPI_AGGR_BUFFER_SIZE / WSPI_MAX_CHUNK_SIZE)
 
#define WL1271_BUSY_WORD_TIMEOUT   1000
 

Functions

 module_init (wl1271_init)
 
 module_exit (wl1271_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Luciano Coelho <[email protected]>")
 
 MODULE_AUTHOR ("Juuso Oikarinen <[email protected]>")
 
 MODULE_ALIAS ("spi:wl1271")
 

Macro Definition Documentation

#define HW_ACCESS_WSPI_FIXED_BUSY_LEN   ((WL1271_BUSY_WORD_LEN - 4) / sizeof(u32))

Definition at line 62 of file spi.c.

#define HW_ACCESS_WSPI_INIT_CMD_MASK   0

Definition at line 64 of file spi.c.

#define SPI_AGGR_BUFFER_SIZE   (4 * PAGE_SIZE)

Definition at line 73 of file spi.c.

#define WL1271_BUSY_WORD_TIMEOUT   1000

Definition at line 165 of file spi.c.

#define WSPI_CMD_BYTE_ADDR   0x0001FFFF

Definition at line 42 of file spi.c.

#define WSPI_CMD_BYTE_LENGTH   0x1FFE0000

Definition at line 40 of file spi.c.

#define WSPI_CMD_BYTE_LENGTH_OFFSET   17

Definition at line 41 of file spi.c.

#define WSPI_CMD_FIXED   0x20000000

Definition at line 39 of file spi.c.

#define WSPI_CMD_READ   0x40000000

Definition at line 37 of file spi.c.

#define WSPI_CMD_WRITE   0x00000000

Definition at line 38 of file spi.c.

#define WSPI_INIT_CMD_BYPASS_BIT   0x80

Definition at line 49 of file spi.c.

#define WSPI_INIT_CMD_CRC_LEN   5

Definition at line 44 of file spi.c.

#define WSPI_INIT_CMD_CS   0x10

Definition at line 55 of file spi.c.

#define WSPI_INIT_CMD_DIS_FIXEDBUSY   0x00

Definition at line 52 of file spi.c.

#define WSPI_INIT_CMD_EN_FIXEDBUSY   0x80

Definition at line 51 of file spi.c.

#define WSPI_INIT_CMD_END   0x01

Definition at line 58 of file spi.c.

#define WSPI_INIT_CMD_FIXEDBUSY_LEN   0x07

Definition at line 50 of file spi.c.

#define WSPI_INIT_CMD_IOD   0x40

Definition at line 53 of file spi.c.

#define WSPI_INIT_CMD_IP   0x20

Definition at line 54 of file spi.c.

#define WSPI_INIT_CMD_LEN   8

Definition at line 60 of file spi.c.

#define WSPI_INIT_CMD_START   0x00

Definition at line 46 of file spi.c.

#define WSPI_INIT_CMD_TX   0x40

Definition at line 47 of file spi.c.

#define WSPI_INIT_CMD_WS   0x08

Definition at line 56 of file spi.c.

#define WSPI_INIT_CMD_WSPI   0x01

Definition at line 57 of file spi.c.

#define WSPI_MAX_CHUNK_SIZE   4092

Definition at line 67 of file spi.c.

#define WSPI_MAX_NUM_OF_CHUNKS   (SPI_AGGR_BUFFER_SIZE / WSPI_MAX_CHUNK_SIZE)

Definition at line 75 of file spi.c.

Function Documentation

MODULE_ALIAS ( "spi:wl1271"  )
MODULE_AUTHOR ( "Luciano Coelho <[email protected]>"  )
MODULE_AUTHOR ( "Juuso Oikarinen <[email protected]>"  )
module_exit ( wl1271_exit  )
module_init ( wl1271_init  )
MODULE_LICENSE ( "GPL"  )