root/include/linux/cm206.h

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

INCLUDED FROM


   1 /* cm206.h Header file for cm206.c.
   2    Copyright (c) 1995 David van Leeuwen 
   3 */
   4 
   5 /* First, the cm260 stuff */
   6 /* The ports and irq used. If it is not defined, make it variable, 
   7    and initialize them at some reasonable value */
   8 
   9 #define CM206_BASE 0x340
  10 #define CM206_IRQ 11
  11 
  12 #define r_data_status (CM206_BASE)
  13 #define r_uart_receive (CM206_BASE+0x2)
  14 #define r_fifo_output_buffer (CM206_BASE+0x4)
  15 #define r_line_status (CM206_BASE+0x6)
  16 #define r_data_control (CM206_BASE+0x8)
  17 #define r_uart_transmit (CM206_BASE+0xa)
  18 #define r_test_clock (CM206_BASE+0xc)
  19 #define r_test_control (CM206_BASE+0xe)
  20 
  21 /* the data_status flags */
  22 #define ds_ram_size 0x4000
  23 #define ds_toc_ready 0x2000
  24 #define ds_fifo_empty 0x1000
  25 #define ds_sync_error 0x800
  26 #define ds_crc_error 0x400
  27 #define ds_data_error 0x200
  28 #define ds_fifo_overflow 0x100
  29 #define ds_data_ready 0x80
  30 
  31 /* the line_status flags */
  32 #define ls_attention 0x10
  33 #define ls_parity_error 0x8
  34 #define ls_overrun 0x4
  35 #define ls_receive_buffer_full 0x2
  36 #define ls_transmitter_buffer_empty 0x1
  37 
  38 /* the data control register flags */
  39 #define dc_read_q_channel 0x4000
  40 #define dc_mask_sync_error 0x2000
  41 #define dc_toc_enable 0x1000
  42 #define dc_no_stop_on_error 0x800
  43 #define dc_break 0x400
  44 #define dc_initialize 0x200
  45 #define dc_mask_transmit_ready 0x100
  46 #define dc_flag_enable 0x80
  47 
  48 #define dc_normal (dc_mask_sync_error | dc_no_stop_on_error | \
  49                    dc_mask_transmit_ready)
  50 
  51 /* now some constants related to the cm206 */
  52 /* another drive status byte, echoed by the cm206 on most commmands */
  53 
  54 #define dsb_error_condition 0x1
  55 #define dsb_play_in_progress 0x4
  56 #define dsb_possible_media_change 0x8
  57 #define dsb_disc_present 0x10
  58 #define dsb_drive_not_ready 0x20
  59 #define dsb_tray_locked 0x40
  60 #define dsb_tray_not_closed 0x80
  61 
  62 #define dsb_not_useful (dsb_drive_not_ready | dsb_tray_not_closed)
  63 
  64 /* the cm206 command set */
  65 
  66 #define c_close_tray 0
  67 #define c_lock_tray 0x01
  68 #define c_unlock_tray 0x04
  69 #define c_open_tray 0x05
  70 #define c_seek 0x10
  71 #define c_read_data 0x20
  72 #define c_force_1x 0x21
  73 #define c_force_2x 0x22
  74 #define c_auto_mode 0x23
  75 #define c_play 0x30
  76 #define c_set_audio_mode 0x31
  77 #define c_read_current_q 0x41
  78 #define c_stream_q 0x42
  79 #define c_drive_status 0x50
  80 #define c_disc_status 0x51
  81 #define c_audio_status 0x52
  82 #define c_drive_configuration 0x53
  83 #define c_read_upc 0x60
  84 #define c_stop 0x70
  85 #define c_calc_checksum 0xe5
  86 
  87 #define c_gimme 0xf8
  88 
  89 /* finally, the (error) condition that the drive can be in      *
  90  * OK, this is not always an error, but let's prefix it with e_ */
  91 
  92 #define e_none 0
  93 #define e_illegal_command 0x01
  94 #define e_sync 0x02
  95 #define e_seek 0x03
  96 #define e_parity 0x04
  97 #define e_focus 0x05
  98 #define e_header_sync 0x06
  99 #define e_code_incompatibility 0x07
 100 #define e_reset_done 0x08
 101 #define e_bad_parameter 0x09
 102 #define e_radial 0x0a
 103 #define e_sub_code 0x0b
 104 #define e_no_data_track 0x0c
 105 #define e_scan 0x0d
 106 #define e_tray_open 0x0f
 107 #define e_no_disc 0x10
 108 #define e_tray stalled 0x11
 109 
 110 /* drive configuration masks */
 111 
 112 #define dcf_revision_code 0x7
 113 #define dcf_transfer_rate 0x60
 114 #define dcf_motorized_tray 0x80
 115 
 116 /* disc status byte */
 117 
 118 #define cds_multi_session 0x2
 119 #define cds_all_audio 0x8
 120 #define cds_xa_mode 0xf0
 121 
 122 /* finally some ioctls for the driver */
 123 
 124 #define CM206CTL_GET_STAT 0x2000
 125 #define CM206CTL_GET_LAST_STAT 0x2001
 126 #define CM206_RESET_DRIVE 0x2002 /* use with care */

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