| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _FTAPE_IO_H | 
|  | 2 | #define _FTAPE_IO_H | 
|  | 3 |  | 
|  | 4 | /* | 
|  | 5 | * Copyright (C) 1993-1996 Bas Laarhoven, | 
|  | 6 | *           (C) 1997      Claus-Justus Heine. | 
|  | 7 |  | 
|  | 8 | This program is free software; you can redistribute it and/or modify | 
|  | 9 | it under the terms of the GNU General Public License as published by | 
|  | 10 | the Free Software Foundation; either version 2, or (at your option) | 
|  | 11 | any later version. | 
|  | 12 |  | 
|  | 13 | This program is distributed in the hope that it will be useful, | 
|  | 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|  | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|  | 16 | GNU General Public License for more details. | 
|  | 17 |  | 
|  | 18 | You should have received a copy of the GNU General Public License | 
|  | 19 | along with this program; see the file COPYING.  If not, write to | 
|  | 20 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 
|  | 21 |  | 
|  | 22 | * | 
|  | 23 | * $Source: /homes/cvs/ftape-stacked/ftape/lowlevel/ftape-io.h,v $ | 
|  | 24 | * $Revision: 1.2 $ | 
|  | 25 | * $Date: 1997/10/05 19:18:18 $ | 
|  | 26 | * | 
|  | 27 | *      This file contains definitions for the glue part of the | 
|  | 28 | *      QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux. | 
|  | 29 | */ | 
|  | 30 |  | 
|  | 31 | #include <linux/qic117.h> | 
|  | 32 | #include <linux/ftape-vendors.h> | 
|  | 33 |  | 
|  | 34 | typedef struct { | 
|  | 35 | unsigned int seek; | 
|  | 36 | unsigned int reset; | 
|  | 37 | unsigned int rewind; | 
|  | 38 | unsigned int head_seek; | 
|  | 39 | unsigned int stop; | 
|  | 40 | unsigned int pause; | 
|  | 41 | } ft_timeout_table; | 
|  | 42 |  | 
|  | 43 | typedef enum { | 
|  | 44 | prehistoric, pre_qic117c, post_qic117b, post_qic117d | 
|  | 45 | } qic_model; | 
|  | 46 |  | 
|  | 47 | /* | 
|  | 48 | *      ftape-io.c defined global vars. | 
|  | 49 | */ | 
|  | 50 | extern ft_timeout_table ftape_timeout; | 
|  | 51 | extern unsigned int ftape_tape_len; | 
|  | 52 | extern volatile qic117_cmd_t ftape_current_command; | 
|  | 53 | extern const struct qic117_command_table qic117_cmds[]; | 
|  | 54 | extern int ftape_might_be_off_track; | 
|  | 55 |  | 
|  | 56 | /* | 
|  | 57 | *      ftape-io.c defined global functions. | 
|  | 58 | */ | 
|  | 59 | extern void ftape_udelay(unsigned int usecs); | 
|  | 60 | extern void  ftape_udelay_calibrate(void); | 
|  | 61 | extern void ftape_sleep(unsigned int time); | 
|  | 62 | extern void ftape_report_vendor_id(unsigned int *id); | 
|  | 63 | extern int  ftape_command(qic117_cmd_t command); | 
|  | 64 | extern int  ftape_command_wait(qic117_cmd_t command, | 
|  | 65 | unsigned int timeout, | 
|  | 66 | int *status); | 
|  | 67 | extern int  ftape_parameter(unsigned int parameter); | 
|  | 68 | extern int ftape_report_operation(int *status, | 
|  | 69 | qic117_cmd_t  command, | 
|  | 70 | int result_length); | 
|  | 71 | extern int ftape_report_configuration(qic_model *model, | 
|  | 72 | unsigned int *rate, | 
|  | 73 | int *qic_std, | 
|  | 74 | int *tape_len); | 
|  | 75 | extern int ftape_report_drive_status(int *status); | 
|  | 76 | extern int ftape_report_raw_drive_status(int *status); | 
|  | 77 | extern int ftape_report_status(int *status); | 
|  | 78 | extern int ftape_ready_wait(unsigned int timeout, int *status); | 
|  | 79 | extern int ftape_seek_head_to_track(unsigned int track); | 
|  | 80 | extern int ftape_set_data_rate(unsigned int new_rate, unsigned int qic_std); | 
|  | 81 | extern int ftape_report_error(unsigned int *error, | 
|  | 82 | qic117_cmd_t *command, | 
|  | 83 | int report); | 
|  | 84 | extern int ftape_reset_drive(void); | 
|  | 85 | extern int ftape_put_drive_to_sleep(wake_up_types method); | 
|  | 86 | extern int ftape_wakeup_drive(wake_up_types method); | 
|  | 87 | extern int ftape_increase_threshold(void); | 
|  | 88 | extern int ftape_half_data_rate(void); | 
|  | 89 |  | 
|  | 90 | #endif |