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 */
19 #define GSCD_BASE_ADDR 0x340
21 /* change this to set the dma-channel */
22 #define GSCD_DMA_CHANNEL 3 /* not used */
24 /************** nothing to set up below here *********************/
26 /* port access macro */
27 #define GSCDPORT(x) (gscd_port + (x))
31 * the lower nibble holds the command length
33 #define CMD_STATUS 0x01
34 #define CMD_READSUBQ 0x02 /* 1: ?, 2: UPC, 5: ? */
35 #define CMD_SEEK 0x05 /* read_mode M-S-F */
36 #define CMD_READ 0x07 /* read_mode M-S-F nsec_h nsec_l */
37 #define CMD_RESET 0x11
38 #define CMD_SETMODE 0x15
39 #define CMD_PLAY 0x17 /* M-S-F M-S-F */
40 #define CMD_LOCK_CTL 0x22 /* 0: unlock, 1: lock */
41 #define CMD_IDENT 0x31
42 #define CMD_SETSPEED 0x32 /* 0: auto */ /* ??? */
43 #define CMD_GETMODE 0x41
44 #define CMD_PAUSE 0x51
45 #define CMD_READTOC 0x61
46 #define CMD_DISKINFO 0x71
47 #define CMD_TRAY_CTL 0x81
52 #define ST_PLAYING 0x80
53 #define ST_UNLOCKED 0x40
54 #define ST_NO_DISK 0x20
55 #define ST_DOOR_OPEN 0x10
58 #define ST_INVALID 0x02
64 #define TYPE_INFO 0x01
65 #define TYPE_DATA 0x02
70 #define MOD_POLLED 0x80
74 #define READ_DATA(port, buf, nr) insb(port, buf, nr)
76 #define SET_TIMER(func, jifs) \
77 ((mod_timer(&gscd_timer, jiffies + jifs)), \
78 (gscd_timer.function = func))
80 #define CLEAR_TIMER del_timer_sync(&gscd_timer)
82 #define MAX_TRACKS 104
90 struct gscd_Play_msf
{
95 struct gscd_DiskInfo
{
98 struct msf diskLength
;
99 struct msf firstTrack
;
103 unsigned char ctrl_addr
;
105 unsigned char pointIndex
;
106 struct msf trackTime
;