Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
amiflop.c File Reference
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/fd.h>
#include <linux/hdreg.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/mutex.h>
#include <linux/amifdreg.h>
#include <linux/amifd.h>
#include <linux/fs.h>
#include <linux/blkdev.h>
#include <linux/elevator.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <asm/setup.h>
#include <asm/uaccess.h>
#include <asm/amigahw.h>
#include <asm/amigaints.h>
#include <asm/irq.h>

Go to the source code of this file.

Data Structures

struct  header
 
struct  dos_header
 

Macros

#define RAW_IOCTL
 
#define IOCTL_RAW_TRACK   0x5254524B /* 'RTRK' */
 
#define FD_OK   0 /* operation succeeded */
 
#define FD_ERROR   -1 /* general error (seek, read, write, etc) */
 
#define FD_NOUNIT   1 /* unit does not exist */
 
#define FD_UNITBUSY   2 /* unit already active */
 
#define FD_NOTACTIVE   3 /* unit is not active */
 
#define FD_NOTREADY   4 /* unit is not ready (motor not on/no disk) */
 
#define MFM_NOSYNC   1
 
#define MFM_HEADER   2
 
#define MFM_DATA   3
 
#define MFM_TRACK   4
 
#define FD_NODRIVE   0x00000000 /* response when no unit is present */
 
#define FD_DD_3   0xffffffff /* double-density 3.5" (880K) drive */
 
#define FD_HD_3   0x55555555 /* high-density 3.5" (1760K) drive */
 
#define FD_DD_5   0xaaaaaaaa /* double-density 5.25" (440K) drive */
 
#define MOTOR_ON   (ciab.prb &= ~DSKMOTOR)
 
#define MOTOR_OFF   (ciab.prb |= DSKMOTOR)
 
#define SELECT(mask)   (ciab.prb &= ~mask)
 
#define DESELECT(mask)   (ciab.prb |= mask)
 
#define SELMASK(drive)   (1 << (3 + (drive & 3)))
 
#define RAW_BUF_SIZE   30000 /* size of raw disk data */
 
#define MS_TICKS   ((amiga_eclock+50)/1000)
 
#define MAX_ERRORS   12
 
#define custom   amiga_custom
 

Functions

 module_param (fd_def_df0, ulong, 0)
 
 MODULE_LICENSE ("GPL")
 
static int dos_read (int)
 
static void dos_write (int)
 
 module_init (amiga_floppy_init)
 
 __setup ("floppy=", amiga_floppy_setup)
 
 MODULE_ALIAS ("platform:amiga-floppy")
 

Macro Definition Documentation

#define custom   amiga_custom

Definition at line 198 of file amiflop.c.

#define DESELECT (   mask)    (ciab.prb |= mask)

Definition at line 124 of file amiflop.c.

#define FD_DD_3   0xffffffff /* double-density 3.5" (880K) drive */

Definition at line 108 of file amiflop.c.

#define FD_DD_5   0xaaaaaaaa /* double-density 5.25" (440K) drive */

Definition at line 110 of file amiflop.c.

#define FD_ERROR   -1 /* general error (seek, read, write, etc) */

Definition at line 93 of file amiflop.c.

#define FD_HD_3   0x55555555 /* high-density 3.5" (1760K) drive */

Definition at line 109 of file amiflop.c.

#define FD_NODRIVE   0x00000000 /* response when no unit is present */

Definition at line 107 of file amiflop.c.

#define FD_NOTACTIVE   3 /* unit is not active */

Definition at line 96 of file amiflop.c.

#define FD_NOTREADY   4 /* unit is not ready (motor not on/no disk) */

Definition at line 97 of file amiflop.c.

#define FD_NOUNIT   1 /* unit does not exist */

Definition at line 94 of file amiflop.c.

#define FD_OK   0 /* operation succeeded */

Definition at line 92 of file amiflop.c.

#define FD_UNITBUSY   2 /* unit already active */

Definition at line 95 of file amiflop.c.

#define IOCTL_RAW_TRACK   0x5254524B /* 'RTRK' */

Definition at line 82 of file amiflop.c.

#define MAX_ERRORS   12

Definition at line 196 of file amiflop.c.

#define MFM_DATA   3

Definition at line 101 of file amiflop.c.

#define MFM_HEADER   2

Definition at line 100 of file amiflop.c.

#define MFM_NOSYNC   1

Definition at line 99 of file amiflop.c.

#define MFM_TRACK   4

Definition at line 102 of file amiflop.c.

#define MOTOR_OFF   (ciab.prb |= DSKMOTOR)

Definition at line 122 of file amiflop.c.

#define MOTOR_ON   (ciab.prb &= ~DSKMOTOR)

Definition at line 121 of file amiflop.c.

#define MS_TICKS   ((amiga_eclock+50)/1000)

Definition at line 189 of file amiflop.c.

#define RAW_BUF_SIZE   30000 /* size of raw disk data */

Definition at line 170 of file amiflop.c.

#define RAW_IOCTL

Definition at line 80 of file amiflop.c.

#define SELECT (   mask)    (ciab.prb &= ~mask)

Definition at line 123 of file amiflop.c.

#define SELMASK (   drive)    (1 << (3 + (drive & 3)))

Definition at line 125 of file amiflop.c.

Function Documentation

__setup ( )
static int dos_read ( int  drive)

Definition at line 1033 of file amiflop.c.

static void dos_write ( int  disk)

Definition at line 1205 of file amiflop.c.

MODULE_ALIAS ( "platform:amiga-floppy"  )
module_init ( amiga_floppy_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( fd_def_df0  ,
ulong  ,
 
)