18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/***   ltpc.h
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci ***/
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#define LT_GETRESULT  0x00
88c2ecf20Sopenharmony_ci#define LT_WRITEMEM   0x01
98c2ecf20Sopenharmony_ci#define LT_READMEM    0x02
108c2ecf20Sopenharmony_ci#define LT_GETFLAGS   0x04
118c2ecf20Sopenharmony_ci#define LT_SETFLAGS   0x05
128c2ecf20Sopenharmony_ci#define LT_INIT       0x10
138c2ecf20Sopenharmony_ci#define LT_SENDLAP    0x13
148c2ecf20Sopenharmony_ci#define LT_RCVLAP     0x14
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci/* the flag that we care about */
178c2ecf20Sopenharmony_ci#define LT_FLAG_ALLLAP 0x04
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_cistruct lt_getresult {
208c2ecf20Sopenharmony_ci	unsigned char command;
218c2ecf20Sopenharmony_ci	unsigned char mailbox;
228c2ecf20Sopenharmony_ci};
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_cistruct lt_mem {
258c2ecf20Sopenharmony_ci	unsigned char command;
268c2ecf20Sopenharmony_ci	unsigned char mailbox;
278c2ecf20Sopenharmony_ci	unsigned short addr;	/* host order */
288c2ecf20Sopenharmony_ci	unsigned short length;	/* host order */
298c2ecf20Sopenharmony_ci};
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_cistruct lt_setflags {
328c2ecf20Sopenharmony_ci	unsigned char command;
338c2ecf20Sopenharmony_ci	unsigned char mailbox;
348c2ecf20Sopenharmony_ci	unsigned char flags;
358c2ecf20Sopenharmony_ci};
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_cistruct lt_getflags {
388c2ecf20Sopenharmony_ci	unsigned char command;
398c2ecf20Sopenharmony_ci	unsigned char mailbox;
408c2ecf20Sopenharmony_ci};
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_cistruct lt_init {
438c2ecf20Sopenharmony_ci	unsigned char command;
448c2ecf20Sopenharmony_ci	unsigned char mailbox;
458c2ecf20Sopenharmony_ci	unsigned char hint;
468c2ecf20Sopenharmony_ci};
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_cistruct lt_sendlap {
498c2ecf20Sopenharmony_ci	unsigned char command;
508c2ecf20Sopenharmony_ci	unsigned char mailbox;
518c2ecf20Sopenharmony_ci	unsigned char dnode;
528c2ecf20Sopenharmony_ci	unsigned char laptype;
538c2ecf20Sopenharmony_ci	unsigned short length;	/* host order */
548c2ecf20Sopenharmony_ci};
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_cistruct lt_rcvlap {
578c2ecf20Sopenharmony_ci	unsigned char command;
588c2ecf20Sopenharmony_ci	unsigned char dnode;
598c2ecf20Sopenharmony_ci	unsigned char snode;
608c2ecf20Sopenharmony_ci	unsigned char laptype;
618c2ecf20Sopenharmony_ci	unsigned short length;	/* host order */
628c2ecf20Sopenharmony_ci};
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ciunion lt_command {
658c2ecf20Sopenharmony_ci	struct lt_getresult getresult;
668c2ecf20Sopenharmony_ci	struct lt_mem mem;
678c2ecf20Sopenharmony_ci	struct lt_setflags setflags;
688c2ecf20Sopenharmony_ci	struct lt_getflags getflags;
698c2ecf20Sopenharmony_ci	struct lt_init init;
708c2ecf20Sopenharmony_ci	struct lt_sendlap sendlap;
718c2ecf20Sopenharmony_ci	struct lt_rcvlap rcvlap;
728c2ecf20Sopenharmony_ci};
738c2ecf20Sopenharmony_citypedef union lt_command lt_command;
748c2ecf20Sopenharmony_ci
75