1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /*** ltpc.h 3 * 4 * 5 ***/ 6 7 #define LT_GETRESULT 0x00 8 #define LT_WRITEMEM 0x01 9 #define LT_READMEM 0x02 10 #define LT_GETFLAGS 0x04 11 #define LT_SETFLAGS 0x05 12 #define LT_INIT 0x10 13 #define LT_SENDLAP 0x13 14 #define LT_RCVLAP 0x14 15 16 /* the flag that we care about */ 17 #define LT_FLAG_ALLLAP 0x04 18 19 struct lt_getresult { 20 unsigned char command; 21 unsigned char mailbox; 22 }; 23 24 struct lt_mem { 25 unsigned char command; 26 unsigned char mailbox; 27 unsigned short addr; /* host order */ 28 unsigned short length; /* host order */ 29 }; 30 31 struct lt_setflags { 32 unsigned char command; 33 unsigned char mailbox; 34 unsigned char flags; 35 }; 36 37 struct lt_getflags { 38 unsigned char command; 39 unsigned char mailbox; 40 }; 41 42 struct lt_init { 43 unsigned char command; 44 unsigned char mailbox; 45 unsigned char hint; 46 }; 47 48 struct lt_sendlap { 49 unsigned char command; 50 unsigned char mailbox; 51 unsigned char dnode; 52 unsigned char laptype; 53 unsigned short length; /* host order */ 54 }; 55 56 struct lt_rcvlap { 57 unsigned char command; 58 unsigned char dnode; 59 unsigned char snode; 60 unsigned char laptype; 61 unsigned short length; /* host order */ 62 }; 63 64 union lt_command { 65 struct lt_getresult getresult; 66 struct lt_mem mem; 67 struct lt_setflags setflags; 68 struct lt_getflags getflags; 69 struct lt_init init; 70 struct lt_sendlap sendlap; 71 struct lt_rcvlap rcvlap; 72 }; 73 typedef union lt_command lt_command; 74 75