linux/drivers/thunderbolt/tb_msgs.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Thunderbolt control channel messages
 *
 * Copyright (C) 2014 Andreas Noever <[email protected]>
 * Copyright (C) 2017, Intel Corporation
 */

#ifndef _TB_MSGS
#define _TB_MSGS

#include <linux/types.h>
#include <linux/uuid.h>

enum tb_cfg_space {};

enum tb_cfg_error {};

/* common header */
struct tb_cfg_header {} __packed;

/* additional header for read/write packets */
struct tb_cfg_address {} __packed;

/* TB_CFG_PKG_READ, response for TB_CFG_PKG_WRITE */
struct cfg_read_pkg {} __packed;

/* TB_CFG_PKG_WRITE, response for TB_CFG_PKG_READ */
struct cfg_write_pkg {} __packed;

/* TB_CFG_PKG_ERROR */
struct cfg_error_pkg {} __packed;

struct cfg_ack_pkg {};

#define TB_CFG_ERROR_PG_HOT_PLUG
#define TB_CFG_ERROR_PG_HOT_UNPLUG

/* TB_CFG_PKG_EVENT */
struct cfg_event_pkg {} __packed;

/* TB_CFG_PKG_RESET */
struct cfg_reset_pkg {} __packed;

/* ICM messages */

enum icm_pkg_code {};

enum icm_event_code {};

struct icm_pkg_header {};

#define ICM_FLAGS_ERROR
#define ICM_FLAGS_NO_KEY
#define ICM_FLAGS_SLEVEL_SHIFT
#define ICM_FLAGS_SLEVEL_MASK
#define ICM_FLAGS_DUAL_LANE
#define ICM_FLAGS_SPEED_GEN3
#define ICM_FLAGS_WRITE

struct icm_pkg_driver_ready {};

/* Falcon Ridge only messages */

struct icm_fr_pkg_driver_ready_response {};

#define ICM_FR_SLEVEL_MASK

/* Falcon Ridge & Alpine Ridge common messages */

struct icm_fr_pkg_get_topology {};

#define ICM_GET_TOPOLOGY_PACKETS

struct icm_fr_pkg_get_topology_response {};

#define ICM_SWITCH_USED
#define ICM_SWITCH_UPSTREAM_PORT_MASK
#define ICM_SWITCH_UPSTREAM_PORT_SHIFT

#define ICM_PORT_TYPE_MASK
#define ICM_PORT_INDEX_SHIFT
#define ICM_PORT_INDEX_MASK

struct icm_fr_event_device_connected {};

#define ICM_LINK_INFO_LINK_MASK
#define ICM_LINK_INFO_DEPTH_SHIFT
#define ICM_LINK_INFO_DEPTH_MASK
#define ICM_LINK_INFO_APPROVED
#define ICM_LINK_INFO_REJECTED
#define ICM_LINK_INFO_BOOT

struct icm_fr_pkg_approve_device {};

struct icm_fr_event_device_disconnected {};

struct icm_fr_event_xdomain_connected {};

struct icm_fr_event_xdomain_disconnected {};

struct icm_fr_pkg_add_device_key {};

struct icm_fr_pkg_add_device_key_response {};

struct icm_fr_pkg_challenge_device {};

struct icm_fr_pkg_challenge_device_response {};

struct icm_fr_pkg_approve_xdomain {};

struct icm_fr_pkg_approve_xdomain_response {};

/* Alpine Ridge only messages */

struct icm_ar_pkg_driver_ready_response {};

#define ICM_AR_FLAGS_RTD3

#define ICM_AR_INFO_SLEVEL_MASK
#define ICM_AR_INFO_BOOT_ACL_SHIFT
#define ICM_AR_INFO_BOOT_ACL_MASK
#define ICM_AR_INFO_BOOT_ACL_SUPPORTED

struct icm_ar_pkg_get_route {};

struct icm_ar_pkg_get_route_response {};

struct icm_ar_boot_acl_entry {};

#define ICM_AR_PREBOOT_ACL_ENTRIES

struct icm_ar_pkg_preboot_acl {};

struct icm_ar_pkg_preboot_acl_response {};

/* Titan Ridge messages */

struct icm_tr_pkg_driver_ready_response {};

#define ICM_TR_FLAGS_RTD3

#define ICM_TR_INFO_SLEVEL_MASK
#define ICM_TR_INFO_PROTO_VERSION_MASK
#define ICM_TR_INFO_PROTO_VERSION_SHIFT
#define ICM_TR_INFO_BOOT_ACL_SHIFT
#define ICM_TR_INFO_BOOT_ACL_MASK

struct icm_tr_event_device_connected {};

struct icm_tr_event_device_disconnected {};

struct icm_tr_event_xdomain_connected {};

struct icm_tr_event_xdomain_disconnected {};

struct icm_tr_pkg_approve_device {};

struct icm_tr_pkg_add_device_key {};

struct icm_tr_pkg_challenge_device {};

struct icm_tr_pkg_approve_xdomain {};

struct icm_tr_pkg_disconnect_xdomain {};

struct icm_tr_pkg_challenge_device_response {};

struct icm_tr_pkg_add_device_key_response {};

struct icm_tr_pkg_approve_xdomain_response {};

struct icm_tr_pkg_disconnect_xdomain_response {};

/* Ice Lake messages */

struct icm_icl_event_rtd3_veto {};

/* USB4 ICM messages */

struct icm_usb4_switch_op {};

#define ICM_USB4_SWITCH_DATA_LEN_MASK
#define ICM_USB4_SWITCH_DATA_VALID

struct icm_usb4_switch_op_response {};

/* XDomain messages */

struct tb_xdomain_header {};

#define TB_XDOMAIN_LENGTH_MASK
#define TB_XDOMAIN_SN_MASK
#define TB_XDOMAIN_SN_SHIFT

enum tb_xdp_type {};

struct tb_xdp_header {};

struct tb_xdp_error_response {};

struct tb_xdp_link_state_status {};

struct tb_xdp_link_state_status_response {};

struct tb_xdp_link_state_change {};

struct tb_xdp_link_state_change_response {};

struct tb_xdp_uuid {};

struct tb_xdp_uuid_response {};

struct tb_xdp_properties {};

struct tb_xdp_properties_response {};

/*
 * Max length of data array single XDomain property response is allowed
 * to carry.
 */
#define TB_XDP_PROPERTIES_MAX_DATA_LENGTH

/* Maximum size of the total property block in dwords we allow */
#define TB_XDP_PROPERTIES_MAX_LENGTH

struct tb_xdp_properties_changed {};

struct tb_xdp_properties_changed_response {};

enum tb_xdp_error {};

#endif