[PATCH] x86_64: CPU hotplug sibling map cleanup
[linux/fpc-iii.git] / drivers / cdrom / gscd.h
bloba41e64bfc0610b83fbcf5522e4586216349673fd
1 /*
2 * Definitions for a GoldStar R420 CD-ROM interface
4 * Copyright (C) 1995 Oliver Raupach <raupach@nwfs1.rz.fh-hannover.de>
5 * Eberhard Moenkeberg <emoenke@gwdg.de>
7 * Published under the GPL.
9 */
12 /* The Interface Card default address is 0x340. This will work for most
13 applications. Address selection is accomplished by jumpers PN801-1 to
14 PN801-4 on the GoldStar Interface Card.
15 Appropriate settings are: 0x300, 0x310, 0x320, 0x330, 0x340, 0x350, 0x360
16 0x370, 0x380, 0x390, 0x3A0, 0x3B0, 0x3C0, 0x3D0, 0x3E0, 0x3F0 */
18 /* insert here the I/O port address and extent */
19 #define GSCD_BASE_ADDR 0x340
20 #define GSCD_IO_EXTENT 4
23 /************** nothing to set up below here *********************/
25 /* port access macro */
26 #define GSCDPORT(x) (gscd_port + (x))
29 * commands
30 * the lower nibble holds the command length
32 #define CMD_STATUS 0x01
33 #define CMD_READSUBQ 0x02 /* 1: ?, 2: UPC, 5: ? */
34 #define CMD_SEEK 0x05 /* read_mode M-S-F */
35 #define CMD_READ 0x07 /* read_mode M-S-F nsec_h nsec_l */
36 #define CMD_RESET 0x11
37 #define CMD_SETMODE 0x15
38 #define CMD_PLAY 0x17 /* M-S-F M-S-F */
39 #define CMD_LOCK_CTL 0x22 /* 0: unlock, 1: lock */
40 #define CMD_IDENT 0x31
41 #define CMD_SETSPEED 0x32 /* 0: auto */ /* ??? */
42 #define CMD_GETMODE 0x41
43 #define CMD_PAUSE 0x51
44 #define CMD_READTOC 0x61
45 #define CMD_DISKINFO 0x71
46 #define CMD_TRAY_CTL 0x81
49 * disk_state:
51 #define ST_PLAYING 0x80
52 #define ST_UNLOCKED 0x40
53 #define ST_NO_DISK 0x20
54 #define ST_DOOR_OPEN 0x10
55 #define ST_x08 0x08
56 #define ST_x04 0x04
57 #define ST_INVALID 0x02
58 #define ST_x01 0x01
61 * cmd_type:
63 #define TYPE_INFO 0x01
64 #define TYPE_DATA 0x02
67 * read_mode:
69 #define MOD_POLLED 0x80
70 #define MOD_x08 0x08
71 #define MOD_RAW 0x04
73 #define READ_DATA(port, buf, nr) insb(port, buf, nr)
75 #define SET_TIMER(func, jifs) \
76 ((mod_timer(&gscd_timer, jiffies + jifs)), \
77 (gscd_timer.function = func))
79 #define CLEAR_TIMER del_timer_sync(&gscd_timer)
81 #define MAX_TRACKS 104
83 struct msf {
84 unsigned char min;
85 unsigned char sec;
86 unsigned char frame;
89 struct gscd_Play_msf {
90 struct msf start;
91 struct msf end;
94 struct gscd_DiskInfo {
95 unsigned char first;
96 unsigned char last;
97 struct msf diskLength;
98 struct msf firstTrack;
101 struct gscd_Toc {
102 unsigned char ctrl_addr;
103 unsigned char track;
104 unsigned char pointIndex;
105 struct msf trackTime;
106 struct msf diskTime;