Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions | Variables
via-maciisi.c File Reference
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/adb.h>
#include <linux/cuda.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <asm/macintosh.h>
#include <asm/macints.h>
#include <asm/mac_via.h>

Go to the source code of this file.

Macros

#define RS   0x200 /* skip between registers */
 
#define B   0 /* B-side data */
 
#define A   RS /* A-side data */
 
#define DIRB   (2*RS) /* B-side direction (1=output) */
 
#define DIRA   (3*RS) /* A-side direction (1=output) */
 
#define SR   (10*RS) /* Shift register */
 
#define ACR   (11*RS) /* Auxiliary control register */
 
#define IFR   (13*RS) /* Interrupt flag register */
 
#define IER   (14*RS) /* Interrupt enable register */
 
#define TREQ   0x08 /* Transfer request (input) */
 
#define TACK   0x10 /* Transfer acknowledge (output) */
 
#define TIP   0x20 /* Transfer in progress (output) */
 
#define ST_MASK   0x30 /* mask for selecting ADB state bits */
 
#define SR_CTRL   0x1c /* Shift register control bits */
 
#define SR_EXT   0x0c /* Shift on external clock */
 
#define SR_OUT   0x10 /* Shift out if 1 */
 
#define IER_SET   0x80 /* set bits in IER */
 
#define IER_CLR   0 /* clear bits in IER */
 
#define SR_INT   0x04 /* Shift register full/empty */
 
#define SR_DATA   0x08 /* Shift register data */
 
#define SR_CLOCK   0x10 /* Shift register clock */
 
#define ADB_DELAY   150
 

Enumerations

enum  maciisi_state { idle, sending, reading }
 

Functions

int maciisi_request (struct adb_request *req, void(*done)(struct adb_request *), int nbytes,...)
 

Variables

struct adb_driver via_maciisi_driver
 

Macro Definition Documentation

#define A   RS /* A-side data */

Definition at line 34 of file via-maciisi.c.

#define ACR   (11*RS) /* Auxiliary control register */

Definition at line 38 of file via-maciisi.c.

#define ADB_DELAY   150

Definition at line 60 of file via-maciisi.c.

#define B   0 /* B-side data */

Definition at line 33 of file via-maciisi.c.

#define DIRA   (3*RS) /* A-side direction (1=output) */

Definition at line 36 of file via-maciisi.c.

#define DIRB   (2*RS) /* B-side direction (1=output) */

Definition at line 35 of file via-maciisi.c.

#define IER   (14*RS) /* Interrupt enable register */

Definition at line 40 of file via-maciisi.c.

#define IER_CLR   0 /* clear bits in IER */

Definition at line 55 of file via-maciisi.c.

#define IER_SET   0x80 /* set bits in IER */

Definition at line 54 of file via-maciisi.c.

#define IFR   (13*RS) /* Interrupt flag register */

Definition at line 39 of file via-maciisi.c.

#define RS   0x200 /* skip between registers */

Definition at line 32 of file via-maciisi.c.

#define SR   (10*RS) /* Shift register */

Definition at line 37 of file via-maciisi.c.

#define SR_CLOCK   0x10 /* Shift register clock */

Definition at line 58 of file via-maciisi.c.

#define SR_CTRL   0x1c /* Shift register control bits */

Definition at line 49 of file via-maciisi.c.

#define SR_DATA   0x08 /* Shift register data */

Definition at line 57 of file via-maciisi.c.

#define SR_EXT   0x0c /* Shift on external clock */

Definition at line 50 of file via-maciisi.c.

#define SR_INT   0x04 /* Shift register full/empty */

Definition at line 56 of file via-maciisi.c.

#define SR_OUT   0x10 /* Shift out if 1 */

Definition at line 51 of file via-maciisi.c.

#define ST_MASK   0x30 /* mask for selecting ADB state bits */

Definition at line 46 of file via-maciisi.c.

#define TACK   0x10 /* Transfer acknowledge (output) */

Definition at line 44 of file via-maciisi.c.

#define TIP   0x20 /* Transfer in progress (output) */

Definition at line 45 of file via-maciisi.c.

#define TREQ   0x08 /* Transfer request (input) */

Definition at line 43 of file via-maciisi.c.

Enumeration Type Documentation

Enumerator:
idle 
sending 
reading 

Definition at line 74 of file via-maciisi.c.

Function Documentation

int maciisi_request ( struct adb_request req,
void(*)(struct adb_request *)  done,
int  nbytes,
  ... 
)

Definition at line 296 of file via-maciisi.c.

Variable Documentation

struct adb_driver via_maciisi_driver
Initial value:
= {
"Mac IIsi",
maciisi_probe,
maciisi_init,
maciisi_send_request,
NULL,
maciisi_poll,
NULL
}

Definition at line 91 of file via-maciisi.c.