2 * thor_mode.h - USB TIZEN THOR - internal gadget definitions
4 * Copyright (C) 2015 Samsung Electronics
5 * Inha Song <ideal.song@samsung.com>
7 * SPDX-License-Identifier: GPL-2.0+
13 #include <asm/sizes.h>
15 #define ENOTSUPP 524 /* Operation is not supported */
17 #define F_NAME_BUF_SIZE 32
18 #define THOR_PACKET_SIZE SZ_1M /* 1 MiB */
19 #define THOR_STORE_UNIT_SIZE SZ_16M /* 16 MiB */
21 /* same with fastboot buffer address */
22 #define CONFIG_THOR_TRANSFER_BUFFER 0x80100000
24 #define VER_PROTOCOL_MAJOR 4
25 #define VER_PROTOCOL_MINOR 0
36 RQT_INFO_VER_PROTOCOL = 1,
40 RQT_INIT_VER_PLATFORM,
62 struct rqt_box { /* total: 256B */
63 signed int rqt; /* request id */
64 signed int rqt_data; /* request data id */
65 signed int int_data[14]; /* int data */
66 char str_data[5][32]; /* string data */
67 char md5[32]; /* md5 checksum */
68 } __attribute__ ((__packed__));
70 struct rsp_box { /* total: 128B */
71 signed int rsp; /* response id (= request id) */
72 signed int rsp_data; /* response data id */
73 signed int ack; /* ack */
74 signed int int_data[5]; /* int data */
75 char str_data[3][32]; /* string data */
76 } __attribute__ ((__packed__));
78 struct data_rsp_box { /* total: 8B */
79 signed int ack; /* response id (= request id) */
80 signed int count; /* response data id */
81 } __attribute__ ((__packed__));
88 #endif /* _THOR_MODE_H_ */