xref: /openbmc/linux/arch/m68k/include/asm/adb_iop.h (revision 404e077a)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * ADB through the IOP
4  * Written by Joshua M. Thompson
5  */
6 
7 /* IOP number and channel number for ADB */
8 
9 #define ADB_IOP		IOP_NUM_ISM
10 #define ADB_CHAN	2
11 
12 /* From the A/UX headers...maybe important, maybe not */
13 
14 #define ADB_IOP_LISTEN	0x01
15 #define ADB_IOP_TALK	0x02
16 #define ADB_IOP_EXISTS	0x04
17 #define ADB_IOP_FLUSH	0x08
18 #define ADB_IOP_RESET	0x10
19 #define ADB_IOP_INT	0x20
20 #define ADB_IOP_POLL	0x40
21 #define ADB_IOP_UNINT	0x80
22 
23 #define AIF_RESET	0x00
24 #define AIF_FLUSH	0x01
25 #define AIF_LISTEN	0x08
26 #define AIF_TALK	0x0C
27 
28 /* Flag bits in struct adb_iopmsg */
29 
30 #define ADB_IOP_EXPLICIT	0x80	/* nonzero if explicit command */
31 #define ADB_IOP_AUTOPOLL	0x40	/* auto/SRQ polling enabled    */
32 #define ADB_IOP_SET_AUTOPOLL	0x20	/* set autopoll device list    */
33 #define ADB_IOP_SRQ		0x04	/* SRQ detected                */
34 #define ADB_IOP_TIMEOUT		0x02	/* nonzero if timeout          */
35 
36 #ifndef __ASSEMBLY__
37 
38 struct adb_iopmsg {
39 	__u8 flags;		/* ADB flags         */
40 	__u8 count;		/* no. of data bytes */
41 	__u8 cmd;		/* ADB command       */
42 	__u8 data[8];		/* ADB data          */
43 	__u8 spare[21];		/* spare             */
44 };
45 
46 #endif /* __ASSEMBLY__ */
47