1 /* $NetBSD: hpreg.h,v 1.6 2017/05/22 17:13:09 ragge Exp $ */ 2 /* 3 * Copyright (c) 1994 Ludd, University of Lule}, Sweden. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27 #ifdef notdef 28 struct hp_regs { 29 int hp_cs1; 30 int hp_ds; 31 int hp_er1; 32 int hp_mr1; 33 int hp_as; 34 int hp_da; 35 int hp_dt; 36 int hp_la; 37 int hp_sn; 38 int hp_of; 39 int hp_dc; 40 int hp_hr; 41 int hp_mr2; 42 int hp_er2; 43 int hp_ec1; 44 int hp_ec2; 45 int utrymme[16]; 46 }; 47 #endif 48 49 #define HP_CS1 0 50 #define HP_DS 4 51 #define HP_ER1 8 52 #define HP_MR1 12 53 #define HP_AS 16 54 #define HP_DA 20 55 #define HP_DT 24 56 #define HP_LA 28 57 #define HP_SN 32 58 #define HP_OF 36 59 #define HP_DC 40 60 #define HP_HR 44 61 #define HP_MR2 48 62 #define HP_ER2 52 63 #define HP_EC1 56 64 #define HP_EC2 60 65 66 #define HPCS_DVA 4000 /* Drive avail, in dual-port config */ 67 #define HPCS_WRITE 061 /* Write data */ 68 #define HPCS_WCHECK 051 /* Write check data */ 69 #define HPCS_WHEAD 063 /* Write header and data */ 70 #define HPCS_WCHEAD 053 /* Write check header and data */ 71 #define HPCS_READ 071 /* Read data */ 72 #define HPCS_RHEAD 073 /* Read header and data */ 73 #define HPCS_SEEK 005 /* Just seek */ 74 #define HPCS_RECAL 007 /* Recalibrate */ 75 #define HPCS_RTC 017 /* Return to centerline */ 76 #define HPCS_OFFSET 015 /* Offset */ 77 #define HPCS_SEARCH 031 /* Search */ 78 #define HPCS_UNLOAD 003 /* Unload pack (removable) */ 79 #define HPCS_RELEASE 013 /* Release massbuss port */ 80 #define HPCS_RPS 021 /* Read-in preset */ 81 #define HPCS_PA 023 /* Pack acknowledge */ 82 #define HPCS_DC 011 /* Drive clear */ 83 84 85 #define HPDS_VV 0x40 /* Volume valid, not changed */ 86 #define HPDS_DRY 0x80 /* Drive ready to accept commands */ 87 #define HPDS_DPR 0x100 /* Drive present */ 88 #define HPDS_PGM 0x200 /* Programmable in dual-port config */ 89 #define HPDS_LBT 0x400 /* Last block transferred */ 90 #define HPDS_WRL 0x800 /* Write locked media */ 91 #define HPDS_MOL 0x1000 /* Medium on-line */ 92 #define HPDS_PIP 0x2000 /* Positioning in progress */ 93 #define HPDS_ERR 0x4000 /* ORed error bit, something wrong */ 94 #define HPDS_ATA 0x8000 /* Attention drive */ 95 96 #define HPDT_DRQ 0x800 /* Dual-port disk */ 97 98 #define HPOF_FMT 0x1000 /* 16/18 bit data */ 99 100 /* 101 * Error registers. The defines are the corresponding bit number 102 * in the error register, instead of a bit mask. 103 * Use (1<<HPER1_FOO) when touching registers. 104 */ 105 #define HPER1_ILF 0 /* Illegal function */ 106 #define HPER1_ILR 1 /* Illegal register */ 107 #define HPER1_RMR 2 /* Register modification refused */ 108 #define HPER1_PAR 3 /* Parity error */ 109 #define HPER1_FER 4 /* Format error */ 110 #define HPER1_WCF 5 /* Write clock failed */ 111 #define HPER1_ECH 6 /* ECC hard error */ 112 #define HPER1_HCE 7 /* Header compare error */ 113 #define HPER1_HCRC 8 /* Header CRC error */ 114 #define HPER1_AOE 9 /* Address overflow error */ 115 #define HPER1_IAE 10 /* Invalid address error */ 116 #define HPER1_WLE 11 /* Write lock error */ 117 #define HPER1_DTE 12 /* Drive timing error */ 118 #define HPER1_OPI 13 /* Operation incomplete */ 119 #define HPER1_UNS 14 /* Unsafe drive */ 120 #define HPER1_DCK 15 /* Data check error */ 121