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

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