Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
spi-coldfire-qspi.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
#include <linux/platform_device.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/spi/spi.h>
#include <linux/pm_runtime.h>
#include <asm/coldfire.h>
#include <asm/mcfsim.h>
#include <asm/mcfqspi.h>

Go to the source code of this file.

Data Structures

struct  mcfqspi
 

Macros

#define DRIVER_NAME   "mcfqspi"
 
#define MCFQSPI_BUSCLK   (MCF_BUSCLK / 2)
 
#define MCFQSPI_QMR   0x00
 
#define MCFQSPI_QMR_MSTR   0x8000
 
#define MCFQSPI_QMR_CPOL   0x0200
 
#define MCFQSPI_QMR_CPHA   0x0100
 
#define MCFQSPI_QDLYR   0x04
 
#define MCFQSPI_QDLYR_SPE   0x8000
 
#define MCFQSPI_QWR   0x08
 
#define MCFQSPI_QWR_HALT   0x8000
 
#define MCFQSPI_QWR_WREN   0x4000
 
#define MCFQSPI_QWR_CSIV   0x1000
 
#define MCFQSPI_QIR   0x0C
 
#define MCFQSPI_QIR_WCEFB   0x8000
 
#define MCFQSPI_QIR_ABRTB   0x4000
 
#define MCFQSPI_QIR_ABRTL   0x1000
 
#define MCFQSPI_QIR_WCEFE   0x0800
 
#define MCFQSPI_QIR_ABRTE   0x0400
 
#define MCFQSPI_QIR_SPIFE   0x0100
 
#define MCFQSPI_QIR_WCEF   0x0008
 
#define MCFQSPI_QIR_ABRT   0x0004
 
#define MCFQSPI_QIR_SPIF   0x0001
 
#define MCFQSPI_QAR   0x010
 
#define MCFQSPI_QAR_TXBUF   0x00
 
#define MCFQSPI_QAR_RXBUF   0x10
 
#define MCFQSPI_QAR_CMDBUF   0x20
 
#define MCFQSPI_QDR   0x014
 
#define MCFQSPI_QCR   0x014
 
#define MCFQSPI_QCR_CONT   0x8000
 
#define MCFQSPI_QCR_BITSE   0x4000
 
#define MCFQSPI_QCR_DT   0x2000
 

Functions

 module_platform_driver (mcfqspi_driver)
 
 MODULE_AUTHOR ("Steven King <[email protected]>")
 
 MODULE_DESCRIPTION ("Coldfire QSPI Controller Driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:"DRIVER_NAME)
 

Macro Definition Documentation

#define DRIVER_NAME   "mcfqspi"

Definition at line 39 of file spi-coldfire-qspi.c.

#define MCFQSPI_BUSCLK   (MCF_BUSCLK / 2)

Definition at line 41 of file spi-coldfire-qspi.c.

#define MCFQSPI_QAR   0x010

Definition at line 63 of file spi-coldfire-qspi.c.

#define MCFQSPI_QAR_CMDBUF   0x20

Definition at line 66 of file spi-coldfire-qspi.c.

#define MCFQSPI_QAR_RXBUF   0x10

Definition at line 65 of file spi-coldfire-qspi.c.

#define MCFQSPI_QAR_TXBUF   0x00

Definition at line 64 of file spi-coldfire-qspi.c.

#define MCFQSPI_QCR   0x014

Definition at line 68 of file spi-coldfire-qspi.c.

#define MCFQSPI_QCR_BITSE   0x4000

Definition at line 70 of file spi-coldfire-qspi.c.

#define MCFQSPI_QCR_CONT   0x8000

Definition at line 69 of file spi-coldfire-qspi.c.

#define MCFQSPI_QCR_DT   0x2000

Definition at line 71 of file spi-coldfire-qspi.c.

#define MCFQSPI_QDLYR   0x04

Definition at line 47 of file spi-coldfire-qspi.c.

#define MCFQSPI_QDLYR_SPE   0x8000

Definition at line 48 of file spi-coldfire-qspi.c.

#define MCFQSPI_QDR   0x014

Definition at line 67 of file spi-coldfire-qspi.c.

#define MCFQSPI_QIR   0x0C

Definition at line 53 of file spi-coldfire-qspi.c.

#define MCFQSPI_QIR_ABRT   0x0004

Definition at line 61 of file spi-coldfire-qspi.c.

#define MCFQSPI_QIR_ABRTB   0x4000

Definition at line 55 of file spi-coldfire-qspi.c.

#define MCFQSPI_QIR_ABRTE   0x0400

Definition at line 58 of file spi-coldfire-qspi.c.

#define MCFQSPI_QIR_ABRTL   0x1000

Definition at line 56 of file spi-coldfire-qspi.c.

#define MCFQSPI_QIR_SPIF   0x0001

Definition at line 62 of file spi-coldfire-qspi.c.

#define MCFQSPI_QIR_SPIFE   0x0100

Definition at line 59 of file spi-coldfire-qspi.c.

#define MCFQSPI_QIR_WCEF   0x0008

Definition at line 60 of file spi-coldfire-qspi.c.

#define MCFQSPI_QIR_WCEFB   0x8000

Definition at line 54 of file spi-coldfire-qspi.c.

#define MCFQSPI_QIR_WCEFE   0x0800

Definition at line 57 of file spi-coldfire-qspi.c.

#define MCFQSPI_QMR   0x00

Definition at line 43 of file spi-coldfire-qspi.c.

#define MCFQSPI_QMR_CPHA   0x0100

Definition at line 46 of file spi-coldfire-qspi.c.

#define MCFQSPI_QMR_CPOL   0x0200

Definition at line 45 of file spi-coldfire-qspi.c.

#define MCFQSPI_QMR_MSTR   0x8000

Definition at line 44 of file spi-coldfire-qspi.c.

#define MCFQSPI_QWR   0x08

Definition at line 49 of file spi-coldfire-qspi.c.

#define MCFQSPI_QWR_CSIV   0x1000

Definition at line 52 of file spi-coldfire-qspi.c.

#define MCFQSPI_QWR_HALT   0x8000

Definition at line 50 of file spi-coldfire-qspi.c.

#define MCFQSPI_QWR_WREN   0x4000

Definition at line 51 of file spi-coldfire-qspi.c.

Function Documentation

MODULE_ALIAS ( "platform:"  DRIVER_NAME)
MODULE_AUTHOR ( "Steven King <[email protected]>"  )
MODULE_DESCRIPTION ( "Coldfire QSPI Controller Driver"  )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( mcfqspi_driver  )