|
Linux Kernel
3.7.1
|
#include <linux/module.h>#include <linux/fd.h>#include <linux/slab.h>#include <linux/blkdev.h>#include <linux/mutex.h>#include <linux/hdreg.h>#include <linux/kernel.h>#include <linux/delay.h>#include <linux/platform_device.h>#include <asm/mac_via.h>Go to the source code of this file.
Data Structures | |
| struct | sector_header |
| struct | swim |
| struct | iwm |
| struct | floppy_state |
| struct | swim_priv |
Macros | |
| #define | CARDNAME "swim" |
| #define | DRIVER_VERSION "Version 0.2 (2008-10-30)" |
| #define | REG(x) unsigned char x, x ## _pad[0x200 - 1]; |
| #define | swim_write(base, reg, v) out_8(&(base)->write_##reg, (v)) |
| #define | swim_read(base, reg) in_8(&(base)->read_##reg) |
| #define | iwm_write(base, reg, v) out_8(&(base)->reg, (v)) |
| #define | iwm_read(base, reg) in_8(&(base)->reg) |
| #define | SEEK_POSITIVE 0x070 |
| #define | SEEK_NEGATIVE 0x074 |
| #define | STEP 0x071 |
| #define | MOTOR_ON 0x072 |
| #define | MOTOR_OFF 0x076 |
| #define | INDEX 0x073 |
| #define | EJECT 0x077 |
| #define | SETMFM 0x171 |
| #define | SETGCR 0x175 |
| #define | RELAX 0x033 |
| #define | LSTRB 0x008 |
| #define | CA_MASK 0x077 |
| #define | READ_DATA_0 0x074 |
| #define | TWOMEG_DRIVE 0x075 |
| #define | SINGLE_SIDED 0x076 |
| #define | DRIVE_PRESENT 0x077 |
| #define | DISK_IN 0x170 |
| #define | WRITE_PROT 0x171 |
| #define | TRACK_ZERO 0x172 |
| #define | TACHO 0x173 |
| #define | READ_DATA_1 0x174 |
| #define | MFM_MODE 0x175 |
| #define | SEEK_COMPLETE 0x176 |
| #define | ONEMEG_MEDIA 0x177 |
| #define | MARK_BYTE 0x01 |
| #define | CRC_ZERO 0x02 |
| #define | RDDATA 0x04 |
| #define | SENSE 0x08 |
| #define | MOTEN 0x10 |
| #define | ERROR 0x20 |
| #define | DAT2BYTE 0x40 |
| #define | DAT1BYTE 0x80 |
| #define | S_INV_WDATA 0x01 |
| #define | S_3_5_SELECT 0x02 |
| #define | S_GCR 0x04 |
| #define | S_FCLK_DIV2 0x08 |
| #define | S_ERROR_CORR 0x10 |
| #define | S_IBM_DRIVE 0x20 |
| #define | S_GCR_WRITE 0x40 |
| #define | S_TIMEOUT 0x80 |
| #define | CLFIFO 0x01 |
| #define | ENBL1 0x02 |
| #define | ENBL2 0x04 |
| #define | ACTION 0x08 |
| #define | WRITE_MODE 0x10 |
| #define | HEDSEL 0x20 |
| #define | MOTON 0x80 |
| #define | FD_MAX_UNIT 2 |
Enumerations | |
| enum | drive_location { INTERNAL_DRIVE = 0x02, EXTERNAL_DRIVE = 0x04 } |
| enum | media_type { DD_MEDIA, HD_MEDIA } |
| enum | motor_action { OFF, ON } |
| enum | head { LOWER_HEAD = 0, UPPER_HEAD = 1 } |
Functions | |
| struct sector_header | __attribute__ ((packed)) |
| int | swim_read_sector_header (struct swim __iomem *base, struct sector_header *header) |
| int | swim_read_sector_data (struct swim __iomem *base, unsigned char *data) |
| module_init (swim_init) | |
| module_exit (swim_exit) | |
| MODULE_DESCRIPTION ("Driver for SWIM floppy controller") | |
| MODULE_LICENSE ("GPL") | |
| MODULE_AUTHOR ("Laurent Vivier <laurent@lvivier.info>") | |
| MODULE_ALIAS_BLOCKDEV_MAJOR (FLOPPY_MAJOR) | |
Variables | |
| unsigned char | side |
| unsigned char | track |
| unsigned char | sector |
| unsigned char | size |
| unsigned char | crc0 |
| unsigned char | crc1 |
| enum drive_location | __attribute__ |
| enum drive_location |
| enum media_type |
| enum motor_action |
|
read |
Definition at line 171 of file esd_usb2.c.
| MODULE_ALIAS_BLOCKDEV_MAJOR | ( | FLOPPY_MAJOR | ) |
| MODULE_AUTHOR | ( | "Laurent Vivier <laurent@lvivier.info>" | ) |
| MODULE_DESCRIPTION | ( | "Driver for SWIM floppy controller" | ) |
| module_exit | ( | swim_exit | ) |
| module_init | ( | swim_init | ) |
| MODULE_LICENSE | ( | "GPL" | ) |
1.8.2