Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
dsp56k.c File Reference
#include <linux/module.h>
#include <linux/major.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/mutex.h>
#include <linux/firmware.h>
#include <linux/platform_device.h>
#include <linux/uaccess.h>
#include <asm/atarihw.h>
#include <asm/traps.h>
#include <asm/dsp56k.h>

Go to the source code of this file.

Data Structures

struct  dsp56k_device
 

Macros

#define DSP56K_DEV_56001   0 /* The only device so far */
 
#define TIMEOUT   10 /* Host port timeout in number of tries */
 
#define MAXIO   2048 /* Maximum number of words before sleep */
 
#define DSP56K_MAX_BINARY_LENGTH   (3*64*1024)
 
#define DSP56K_TX_INT_ON   dsp56k_host_interface.icr |= DSP56K_ICR_TREQ
 
#define DSP56K_RX_INT_ON   dsp56k_host_interface.icr |= DSP56K_ICR_RREQ
 
#define DSP56K_TX_INT_OFF   dsp56k_host_interface.icr &= ~DSP56K_ICR_TREQ
 
#define DSP56K_RX_INT_OFF   dsp56k_host_interface.icr &= ~DSP56K_ICR_RREQ
 
#define DSP56K_TRANSMIT   (dsp56k_host_interface.isr & DSP56K_ISR_TXDE)
 
#define DSP56K_RECEIVE   (dsp56k_host_interface.isr & DSP56K_ISR_RXDF)
 
#define handshake(count, maxio, timeout, ENABLE, f)
 
#define tx_wait(n)
 
#define rx_wait(n)
 

Functions

 module_init (dsp56k_init_driver)
 
 module_exit (dsp56k_cleanup_driver)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_FIRMWARE ("dsp56k/bootstrap.bin")
 

Macro Definition Documentation

#define DSP56K_DEV_56001   0 /* The only device so far */

Definition at line 46 of file dsp56k.c.

#define DSP56K_MAX_BINARY_LENGTH   (3*64*1024)

Definition at line 50 of file dsp56k.c.

#define DSP56K_RECEIVE   (dsp56k_host_interface.isr & DSP56K_ISR_RXDF)

Definition at line 58 of file dsp56k.c.

#define DSP56K_RX_INT_OFF   dsp56k_host_interface.icr &= ~DSP56K_ICR_RREQ

Definition at line 55 of file dsp56k.c.

#define DSP56K_RX_INT_ON   dsp56k_host_interface.icr |= DSP56K_ICR_RREQ

Definition at line 53 of file dsp56k.c.

#define DSP56K_TRANSMIT   (dsp56k_host_interface.isr & DSP56K_ISR_TXDE)

Definition at line 57 of file dsp56k.c.

#define DSP56K_TX_INT_OFF   dsp56k_host_interface.icr &= ~DSP56K_ICR_TREQ

Definition at line 54 of file dsp56k.c.

#define DSP56K_TX_INT_ON   dsp56k_host_interface.icr |= DSP56K_ICR_TREQ

Definition at line 52 of file dsp56k.c.

#define handshake (   count,
  maxio,
  timeout,
  ENABLE,
  f 
)
Value:
{ \
long i, t, m; \
while (count > 0) { \
m = min_t(unsigned long, count, maxio); \
for (i = 0; i < m; i++) { \
for (t = 0; t < timeout && !ENABLE; t++) \
msleep(20); \
if(!ENABLE) \
return -EIO; \
f; \
} \
count -= m; \
if (m == maxio) msleep(20); \
} \
}

Definition at line 60 of file dsp56k.c.

#define MAXIO   2048 /* Maximum number of words before sleep */

Definition at line 49 of file dsp56k.c.

#define rx_wait (   n)
Value:
{ \
int t; \
for(t = 0; t < n && !DSP56K_RECEIVE; t++) \
msleep(10); \
if(!DSP56K_RECEIVE) { \
return -EIO; \
} \
}

Definition at line 87 of file dsp56k.c.

#define TIMEOUT   10 /* Host port timeout in number of tries */

Definition at line 48 of file dsp56k.c.

#define tx_wait (   n)
Value:
{ \
int t; \
for(t = 0; t < n && !DSP56K_TRANSMIT; t++) \
msleep(10); \
if(!DSP56K_TRANSMIT) { \
return -EIO; \
} \
}

Definition at line 77 of file dsp56k.c.

Function Documentation

module_exit ( dsp56k_cleanup_driver  )
MODULE_FIRMWARE ( "dsp56k/bootstrap.bin"  )
module_init ( dsp56k_init_driver  )
MODULE_LICENSE ( "GPL"  )