Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
ataflop.c File Reference
#include <linux/module.h>
#include <linux/fd.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/blkdev.h>
#include <linux/mutex.h>
#include <asm/atafd.h>
#include <asm/atafdreg.h>
#include <asm/atariints.h>
#include <asm/atari_stdma.h>
#include <asm/atari_stram.h>

Go to the source code of this file.

Data Structures

struct  atari_disk_type
 
struct  atari_floppy_struct
 

Macros

#define FD_MAX_UNITS   2
 
#define MAX_TYPE_DD   3
 
#define MAX_TYPE_HD   6
 
#define MAX_TYPE_ED   8
 
#define TYPE_DD   0
 
#define TYPE_HD   1
 
#define TYPE_ED   2
 
#define NUM_DISK_MINORS   ARRAY_SIZE(minor2disktype)
 
#define MAX_DISK_SIZE   3280
 
#define UD   unit[drive]
 
#define UDT   unit[drive].disktype
 
#define SUD   unit[SelectedDrive]
 
#define SUDT   unit[SelectedDrive].disktype
 
#define FDC_READ(reg)
 
#define FDC_WRITE(reg, val)
 
#define BUFFER_SIZE   (BufferSize[DriveType])
 
#define SECTOR_BUFFER(sec)   (TrackBuffer + ((sec)-1)*512)
 
#define IS_BUFFERED(drive, side, track)   (BufferDrive == (drive) && BufferSide == (side) && BufferTrack == (track))
 
#define CHECK_CHANGE_DELAY   HZ/2
 
#define FD_MOTOR_OFF_DELAY   (3*HZ)
 
#define FD_MOTOR_OFF_MAXTRY   (10*20)
 
#define FLOPPY_TIMEOUT   (6*HZ)
 
#define RECALIBRATE_ERRORS
 
#define MAX_ERRORS
 
#define DPRINT(a)
 
#define SET_IRQ_HANDLER(proc)   do { FloppyIRQHandler = (proc); } while(0)
 
#define FILL(n, val)
 

Functions

 module_param (UseTrackbuffer, int, 0)
 
 module_param_array (UserSteprate, int, NULL, 0)
 
void do_fd_request (struct request_queue *q)
 
 __setup ("floppy=", atari_floppy_setup)
 

Variables

unsigned charDMABuffer
 
unsigned charTrackBuffer
 

Macro Definition Documentation

#define BUFFER_SIZE   (BufferSize[DriveType])

Definition at line 268 of file ataflop.c.

#define CHECK_CHANGE_DELAY   HZ/2

Definition at line 307 of file ataflop.c.

#define DPRINT (   a)

Definition at line 333 of file ataflop.c.

#define FD_MAX_UNITS   2

Definition at line 78 of file ataflop.c.

#define FD_MOTOR_OFF_DELAY   (3*HZ)

Definition at line 309 of file ataflop.c.

#define FD_MOTOR_OFF_MAXTRY   (10*20)

Definition at line 310 of file ataflop.c.

#define FDC_READ (   reg)
Value:
({ \
/* unsigned long __flags; */ \
unsigned short __val; \
/* local_irq_save(__flags); */ \
dma_wd.dma_mode_status = 0x80 | (reg); \
udelay(25); \
__val = dma_wd.fdc_acces_seccount; \
MFPDELAY(); \
/* local_irq_restore(__flags); */ \
__val & 0xff; \
})

Definition at line 230 of file ataflop.c.

#define FDC_WRITE (   reg,
  val 
)
Value:
do { \
/* unsigned long __flags; */ \
/* local_irq_save(__flags); */ \
dma_wd.dma_mode_status = 0x80 | (reg); \
udelay(25); \
dma_wd.fdc_acces_seccount = (val); \
MFPDELAY(); \
/* local_irq_restore(__flags); */ \
} while(0)

Definition at line 242 of file ataflop.c.

#define FILL (   n,
  val 
)
Value:
do { \
memset( p, val, n ); \
p += n; \
} while(0)

Definition at line 636 of file ataflop.c.

#define FLOPPY_TIMEOUT   (6*HZ)

Definition at line 312 of file ataflop.c.

#define IS_BUFFERED (   drive,
  side,
  track 
)    (BufferDrive == (drive) && BufferSide == (side) && BufferTrack == (track))

Definition at line 282 of file ataflop.c.

#define MAX_DISK_SIZE   3280

Definition at line 190 of file ataflop.c.

#define MAX_ERRORS
Value:
8 /* After this many errors the driver
* will give up. */

Definition at line 314 of file ataflop.c.

#define MAX_TYPE_DD   3
#define MAX_TYPE_ED   8
#define MAX_TYPE_HD   6
#define NUM_DISK_MINORS   ARRAY_SIZE(minor2disktype)

Definition at line 184 of file ataflop.c.

#define RECALIBRATE_ERRORS
Value:
4 /* After this many errors the drive
* will be recalibrated. */

Definition at line 313 of file ataflop.c.

#define SECTOR_BUFFER (   sec)    (TrackBuffer + ((sec)-1)*512)

Definition at line 281 of file ataflop.c.

#define SET_IRQ_HANDLER (   proc)    do { FloppyIRQHandler = (proc); } while(0)

Definition at line 631 of file ataflop.c.

#define SUD   unit[SelectedDrive]

Definition at line 226 of file ataflop.c.

#define SUDT   unit[SelectedDrive].disktype

Definition at line 227 of file ataflop.c.

#define TYPE_DD   0

Definition at line 137 of file ataflop.c.

#define TYPE_ED   2

Definition at line 139 of file ataflop.c.

#define TYPE_HD   1

Definition at line 138 of file ataflop.c.

#define UD   unit[drive]

Definition at line 224 of file ataflop.c.

#define UDT   unit[drive].disktype

Definition at line 225 of file ataflop.c.

Function Documentation

__setup ( )
static void do_fd_request ( struct request_queue q)

Definition at line 1495 of file ataflop.c.

module_param ( UseTrackbuffer  ,
int  ,
 
)
module_param_array ( UserSteprate  ,
int  ,
NULL  ,
 
)

Variable Documentation

unsigned char* DMABuffer

Definition at line 270 of file ataflop.c.

unsigned drive_types

Definition at line 148 of file ataflop.c.

int index

Definition at line 147 of file ataflop.c.

unsigned char* TrackBuffer

Definition at line 276 of file ataflop.c.