Lines Matching +full:0 +full:- +full:9 +full:a +full:- +full:b
1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * ktti.c is a low-level protocol driver for the KT Technology
7 * portable hard-drives. As far as I can tell, this device
8 * supports 4-bit mode _only_.
20 #define j44(a, b) (((a >> 4) & 0x0f) | (b & 0xf0)) argument
23 * cont = 0 - access the IDE register file
24 * cont = 1 - access the IDE command set
26 static int cont_map[2] = { 0x10, 0x08 };
32 w0(r); w2(0xb); w2(0xa); w2(3); w2(6); in ktti_write_regr()
33 w0(val); w2(3); w0(0); w2(6); w2(0xb); in ktti_write_regr()
38 int a, b, r; in ktti_read_regr() local
42 w0(r); w2(0xb); w2(0xa); w2(9); w2(0xc); w2(9); in ktti_read_regr()
43 a = r1(); w2(0xc); b = r1(); w2(9); w2(0xc); w2(9); in ktti_read_regr()
44 return j44(a, b); in ktti_read_regr()
49 int k, a, b; in ktti_read_block() local
51 for (k = 0; k < count / 2; k++) { in ktti_read_block()
52 w0(0x10); w2(0xb); w2(0xa); w2(9); w2(0xc); w2(9); in ktti_read_block()
53 a = r1(); w2(0xc); b = r1(); w2(9); in ktti_read_block()
54 buf[2*k] = j44(a, b); in ktti_read_block()
55 a = r1(); w2(0xc); b = r1(); w2(9); in ktti_read_block()
56 buf[2*k+1] = j44(a, b); in ktti_read_block()
64 for (k = 0; k < count / 2; k++) { in ktti_write_block()
65 w0(0x10); w2(0xb); w2(0xa); w2(3); w2(6); in ktti_write_block()
68 w2(0xb); in ktti_write_block()
74 pi->saved_r0 = r0(); in ktti_connect()
75 pi->saved_r2 = r2(); in ktti_connect()
76 w2(0xb); w2(0xa); w0(0); w2(3); w2(6); in ktti_connect()
81 w2(0xb); w2(0xa); w0(0xa0); w2(3); w2(4); in ktti_disconnect()
82 w0(pi->saved_r0); in ktti_disconnect()
83 w2(pi->saved_r2); in ktti_disconnect()
88 dev_info(&pi->dev, "KT adapter at 0x%x, delay %d\n", in ktti_log_adapter()
89 pi->port, pi->delay); in ktti_log_adapter()