Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
spi-au1550.c File Reference
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/resource.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi_bitbang.h>
#include <linux/dma-mapping.h>
#include <linux/completion.h>
#include <asm/mach-au1x00/au1000.h>
#include <asm/mach-au1x00/au1xxx_psc.h>
#include <asm/mach-au1x00/au1xxx_dbdma.h>
#include <asm/mach-au1x00/au1550_spi.h>

Go to the source code of this file.

Data Structures

struct  au1550_spi
 

Macros

#define AU1550_SPI_DBDMA_DESCRIPTORS   1
 
#define AU1550_SPI_DMA_RXTMP_MINSIZE   2048U
 
#define AU1550_SPI_RX_WORD(size, mask)
 
#define AU1550_SPI_TX_WORD(size, mask)
 

Functions

 module_param (usedma, uint, 0644)
 
 MODULE_ALIAS ("platform:au1550-spi")
 
 module_init (au1550_spi_init)
 
 module_exit (au1550_spi_exit)
 
 MODULE_DESCRIPTION ("Au1550 PSC SPI Driver")
 
 MODULE_AUTHOR ("Jan Nikitenko <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define AU1550_SPI_DBDMA_DESCRIPTORS   1

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

#define AU1550_SPI_DMA_RXTMP_MINSIZE   2048U

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

#define AU1550_SPI_RX_WORD (   size,
  mask 
)
Value:
static void au1550_spi_rx_word_##size(struct au1550_spi *hw) \
{ \
u32 fifoword = hw->regs->psc_spitxrx & (u32)(mask); \
au_sync(); \
if (hw->rx) { \
*(u##size *)hw->rx = (u##size)fifoword; \
hw->rx += (size) / 8; \
} \
hw->rx_count += (size) / 8; \
}

Definition at line 516 of file spi-au1550.c.

#define AU1550_SPI_TX_WORD (   size,
  mask 
)
Value:
static void au1550_spi_tx_word_##size(struct au1550_spi *hw) \
{ \
u32 fifoword = 0; \
if (hw->tx) { \
fifoword = *(u##size *)hw->tx & (u32)(mask); \
hw->tx += (size) / 8; \
} \
hw->tx_count += (size) / 8; \
if (hw->tx_count >= hw->len) \
fifoword |= PSC_SPITXRX_LC; \
hw->regs->psc_spitxrx = fifoword; \
au_sync(); \
}

Definition at line 528 of file spi-au1550.c.

Function Documentation

MODULE_ALIAS ( "platform:au1550-spi )
MODULE_AUTHOR ( "Jan Nikitenko <[email protected]>"  )
MODULE_DESCRIPTION ( "Au1550 PSC SPI Driver"  )
module_exit ( au1550_spi_exit  )
module_init ( au1550_spi_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( usedma  ,
uint  ,
0644   
)