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.
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))
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
51 #define ST_PLAYING 0x80
52 #define ST_UNLOCKED 0x40
53 #define ST_NO_DISK 0x20
54 #define ST_DOOR_OPEN 0x10
57 #define ST_INVALID 0x02
63 #define TYPE_INFO 0x01
64 #define TYPE_DATA 0x02
69 #define MOD_POLLED 0x80
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
89 struct gscd_Play_msf
{
94 struct gscd_DiskInfo
{
97 struct msf diskLength
;
98 struct msf firstTrack
;
102 unsigned char ctrl_addr
;
104 unsigned char pointIndex
;
105 struct msf trackTime
;