Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
spi-falcon.c File Reference
#include <linux/module.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/delay.h>
#include <linux/workqueue.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <lantiq_soc.h>

Go to the source code of this file.

Data Structures

struct  falcon_sflash
 

Macros

#define DRV_NAME   "sflash-falcon"
 
#define FALCON_SPI_XFER_BEGIN   (1 << 0)
 
#define FALCON_SPI_XFER_END   (1 << 1)
 
#define BUSRCON0   0x00000010
 
#define BUSWCON0   0x00000018
 
#define SFCON   0x00000080
 
#define SFTIME   0x00000084
 
#define SFSTAT   0x00000088
 
#define SFCMD   0x0000008C
 
#define SFADDR   0x00000090
 
#define SFDATA   0x00000094
 
#define SFIO   0x00000098
 
#define EBUCC   0x000000C4
 
#define SFCMD_DUMLEN_OFFSET   16
 
#define SFCMD_DUMLEN_MASK   0x000F0000
 
#define SFCMD_CS_OFFSET   24
 
#define SFCMD_CS_MASK   0x07000000
 
#define SFCMD_ALEN_OFFSET   20
 
#define SFCMD_ALEN_MASK   0x00700000
 
#define SFTIME_SCKR_POS_OFFSET   8
 
#define SFTIME_SCKR_POS_MASK   0x00000F00
 
#define SFTIME_SCK_PER_OFFSET   0
 
#define SFTIME_SCK_PER_MASK   0x0000000F
 
#define SFTIME_SCKF_POS_OFFSET   12
 
#define SFTIME_SCKF_POS_MASK   0x0000F000
 
#define SFCON_DEV_SIZE_A23_0   0x03000000
 
#define SFCON_DEV_SIZE_MASK   0x0F000000
 
#define SFTIME_RD_POS_MASK   0x000F0000
 
#define SFIO_UNUSED_WD_MASK   0x0000000F
 
#define SFCMD_OPC_MASK   0x000000FF
 
#define SFCMD_DIR_WRITE   0x00000100
 
#define SFCMD_DLEN_OFFSET   9
 
#define SFSTAT_CMD_ERR   0x20000000
 
#define SFSTAT_CMD_PEND   0x00400000
 
#define EBUCC_EBUDIV_SELF100   0x00000001
 
#define BUSRCON0_AGEN_SERIAL_FLASH   0xF0000000
 
#define BUSRCON0_PORTW_8_BIT_MUX   0x00000000
 
#define BUSWCON0_AGEN_SERIAL_FLASH   0xF0000000
 
#define SFCMD_KEEP_CS_KEEP_SELECTED   0x00008000
 
#define CLOCK_100M   100000000
 
#define CLOCK_50M   50000000
 

Functions

int falcon_sflash_xfer (struct spi_device *spi, struct spi_transfer *t, unsigned long flags)
 
 MODULE_DEVICE_TABLE (of, falcon_sflash_match)
 
 module_platform_driver (falcon_sflash_driver)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("Lantiq Falcon SPI/SFLASH controller driver")
 

Macro Definition Documentation

#define BUSRCON0   0x00000010

Definition at line 26 of file spi-falcon.c.

#define BUSRCON0_AGEN_SERIAL_FLASH   0xF0000000

Definition at line 84 of file spi-falcon.c.

#define BUSRCON0_PORTW_8_BIT_MUX   0x00000000

Definition at line 86 of file spi-falcon.c.

#define BUSWCON0   0x00000018

Definition at line 28 of file spi-falcon.c.

#define BUSWCON0_AGEN_SERIAL_FLASH   0xF0000000

Definition at line 88 of file spi-falcon.c.

#define CLOCK_100M   100000000

Definition at line 92 of file spi-falcon.c.

#define CLOCK_50M   50000000

Definition at line 93 of file spi-falcon.c.

#define DRV_NAME   "sflash-falcon"

Definition at line 20 of file spi-falcon.c.

#define EBUCC   0x000000C4

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

#define EBUCC_EBUDIV_SELF100   0x00000001

Definition at line 82 of file spi-falcon.c.

#define FALCON_SPI_XFER_BEGIN   (1 << 0)

Definition at line 22 of file spi-falcon.c.

#define FALCON_SPI_XFER_END   (1 << 1)

Definition at line 23 of file spi-falcon.c.

#define SFADDR   0x00000090

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

#define SFCMD   0x0000008C

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

#define SFCMD_ALEN_MASK   0x00700000

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

#define SFCMD_ALEN_OFFSET   20

Definition at line 53 of file spi-falcon.c.

#define SFCMD_CS_MASK   0x07000000

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

#define SFCMD_CS_OFFSET   24

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

#define SFCMD_DIR_WRITE   0x00000100

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

#define SFCMD_DLEN_OFFSET   9

Definition at line 76 of file spi-falcon.c.

#define SFCMD_DUMLEN_MASK   0x000F0000

Definition at line 48 of file spi-falcon.c.

#define SFCMD_DUMLEN_OFFSET   16

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

#define SFCMD_KEEP_CS_KEEP_SELECTED   0x00008000

Definition at line 90 of file spi-falcon.c.

#define SFCMD_OPC_MASK   0x000000FF

Definition at line 72 of file spi-falcon.c.

#define SFCON   0x00000080

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

#define SFCON_DEV_SIZE_A23_0   0x03000000

Definition at line 65 of file spi-falcon.c.

#define SFCON_DEV_SIZE_MASK   0x0F000000

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

#define SFDATA   0x00000094

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

#define SFIO   0x00000098

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

#define SFIO_UNUSED_WD_MASK   0x0000000F

Definition at line 70 of file spi-falcon.c.

#define SFSTAT   0x00000088

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

#define SFSTAT_CMD_ERR   0x20000000

Definition at line 78 of file spi-falcon.c.

#define SFSTAT_CMD_PEND   0x00400000

Definition at line 80 of file spi-falcon.c.

#define SFTIME   0x00000084

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

#define SFTIME_RD_POS_MASK   0x000F0000

Definition at line 68 of file spi-falcon.c.

#define SFTIME_SCK_PER_MASK   0x0000000F

Definition at line 60 of file spi-falcon.c.

#define SFTIME_SCK_PER_OFFSET   0

Definition at line 59 of file spi-falcon.c.

#define SFTIME_SCKF_POS_MASK   0x0000F000

Definition at line 63 of file spi-falcon.c.

#define SFTIME_SCKF_POS_OFFSET   12

Definition at line 62 of file spi-falcon.c.

#define SFTIME_SCKR_POS_MASK   0x00000F00

Definition at line 57 of file spi-falcon.c.

#define SFTIME_SCKR_POS_OFFSET   8

Definition at line 56 of file spi-falcon.c.

Function Documentation

int falcon_sflash_xfer ( struct spi_device spi,
struct spi_transfer t,
unsigned long  flags 
)

Definition at line 100 of file spi-falcon.c.

MODULE_DESCRIPTION ( "Lantiq Falcon SPI/SFLASH controller driver )
MODULE_DEVICE_TABLE ( of  ,
falcon_sflash_match   
)
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( falcon_sflash_driver  )