1 |
1275 |
phoenix |
#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: /home/marcus/revision_ctrl_test/oc_cvs/cvs/or1k/linux/linux-2.4/drivers/char/ftape/lowlevel/ftape-io.h,v $
|
24 |
|
|
* $Revision: 1.1.1.1 $
|
25 |
|
|
* $Date: 2004-04-15 02:02:40 $
|
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_parameter_wait(unsigned int parameter,
|
69 |
|
|
unsigned int timeout,
|
70 |
|
|
int *status);
|
71 |
|
|
extern int ftape_report_operation(int *status,
|
72 |
|
|
qic117_cmd_t command,
|
73 |
|
|
int result_length);
|
74 |
|
|
extern int ftape_report_configuration(qic_model *model,
|
75 |
|
|
unsigned int *rate,
|
76 |
|
|
int *qic_std,
|
77 |
|
|
int *tape_len);
|
78 |
|
|
extern int ftape_report_drive_status(int *status);
|
79 |
|
|
extern int ftape_report_raw_drive_status(int *status);
|
80 |
|
|
extern int ftape_report_status(int *status);
|
81 |
|
|
extern int ftape_ready_wait(unsigned int timeout, int *status);
|
82 |
|
|
extern int ftape_seek_head_to_track(unsigned int track);
|
83 |
|
|
extern int ftape_in_error_state(int status);
|
84 |
|
|
extern int ftape_set_data_rate(unsigned int new_rate, unsigned int qic_std);
|
85 |
|
|
extern int ftape_report_error(unsigned int *error,
|
86 |
|
|
qic117_cmd_t *command,
|
87 |
|
|
int report);
|
88 |
|
|
extern int ftape_reset_drive(void);
|
89 |
|
|
extern int ftape_put_drive_to_sleep(wake_up_types method);
|
90 |
|
|
extern int ftape_wakeup_drive(wake_up_types method);
|
91 |
|
|
extern int ftape_increase_threshold(void);
|
92 |
|
|
extern int ftape_half_data_rate(void);
|
93 |
|
|
|
94 |
|
|
#endif
|