root/include/linux/gscd.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Definitions for a GoldStar R420 CD-ROM interface
   3  *
   4  *   Copyright (C) 1995  Oliver Raupach <raupach@nwfs1.rz.fh-hannover.de>
   5  *                       Eberhard Moenkeberg <emoenke@gwdg.de>
   6  *
   7  *  Published under the GPL.
   8  *
   9  */
  10 
  11 
  12 /* The Interface Card default address is 0x340. This will work fo 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             */
  17 
  18 /* insert here the I/O port address */
  19 #define GSCD_BASE_ADDR          0x340
  20 
  21 /* change this to set the dma-channel */
  22 #define GSCD_DMA_CHANNEL        3                  /* not used */ 
  23 
  24 /************** nothing to set up below here *********************/
  25 
  26 /* port access macro */
  27 #define GSCDPORT(x)             (gscd_port + (x))
  28 
  29 /*
  30  * commands
  31  * the lower nibble holds the command length
  32  */
  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
  48 
  49 /*
  50  * disk_state:
  51  */
  52 #define ST_PLAYING      0x80
  53 #define ST_UNLOCKED     0x40
  54 #define ST_NO_DISK      0x20
  55 #define ST_DOOR_OPEN    0x10
  56 #define ST_x08  0x08
  57 #define ST_x04  0x04
  58 #define ST_INVALID      0x02
  59 #define ST_x01  0x01
  60 
  61 /*
  62  * cmd_type:
  63  */
  64 #define TYPE_INFO       0x01
  65 #define TYPE_DATA       0x02
  66 
  67 /*
  68  * read_mode:
  69  */
  70 #define MOD_POLLED      0x80
  71 #define MOD_x08 0x08
  72 #define MOD_RAW 0x04
  73 
  74 #define READ_DATA(port, buf, nr) insb(port, buf, nr)
  75 
  76 #define SET_TIMER(func, jifs) \
  77         ((timer_table[GSCD_TIMER].expires = jiffies + jifs), \
  78         (timer_table[GSCD_TIMER].fn = func), \
  79         (timer_active |= 1<<GSCD_TIMER))
  80 
  81 #define CLEAR_TIMER             timer_active &= ~(1<<GSCD_TIMER)
  82 
  83 #define MAX_TRACKS              104
  84 
  85 struct msf {
  86         unsigned char   min;
  87         unsigned char   sec;
  88         unsigned char   frame;
  89 };
  90 
  91 struct gscd_Play_msf {
  92         struct msf      start;
  93         struct msf      end;
  94 };
  95 
  96 struct gscd_DiskInfo {
  97         unsigned char   first;
  98         unsigned char   last;
  99         struct msf      diskLength;
 100         struct msf      firstTrack;
 101 };
 102 
 103 struct gscd_Toc {
 104         unsigned char   ctrl_addr;
 105         unsigned char   track;
 106         unsigned char   pointIndex;
 107         struct msf      trackTime;
 108         struct msf      diskTime;
 109 };
 110 

/* [previous][next][first][last][top][bottom][index][help] */