linux/drivers/firewire/phy-packet-definitions.h

// SPDX-License-Identifier: GPL-2.0-or-later
//
// phy-packet-definitions.h - The definitions of phy packet for IEEE 1394.
//
// Copyright (c) 2024 Takashi Sakamoto

#ifndef _FIREWIRE_PHY_PACKET_DEFINITIONS_H
#define _FIREWIRE_PHY_PACKET_DEFINITIONS_H

#define PACKET_IDENTIFIER_MASK
#define PACKET_IDENTIFIER_SHIFT

static inline unsigned int phy_packet_get_packet_identifier(u32 quadlet)
{}

static inline void phy_packet_set_packet_identifier(u32 *quadlet, unsigned int packet_identifier)
{}

#define PHY_PACKET_PACKET_IDENTIFIER_PHY_CONFIG

#define PHY_CONFIG_ROOT_ID_MASK
#define PHY_CONFIG_ROOT_ID_SHIFT
#define PHY_CONFIG_FORCE_ROOT_NODE_MASK
#define PHY_CONFIG_FORCE_ROOT_NODE_SHIFT
#define PHY_CONFIG_GAP_COUNT_OPTIMIZATION_MASK
#define PHY_CONFIG_GAP_COUNT_OPTIMIZATION_SHIFT
#define PHY_CONFIG_GAP_COUNT_MASK
#define PHY_CONFIG_GAP_COUNT_SHIFT

static inline unsigned int phy_packet_phy_config_get_root_id(u32 quadlet)
{}

static inline void phy_packet_phy_config_set_root_id(u32 *quadlet, unsigned int root_id)
{}

static inline bool phy_packet_phy_config_get_force_root_node(u32 quadlet)
{}

static inline void phy_packet_phy_config_set_force_root_node(u32 *quadlet, bool has_force_root_node)
{}

static inline bool phy_packet_phy_config_get_gap_count_optimization(u32 quadlet)
{}

static inline void phy_packet_phy_config_set_gap_count_optimization(u32 *quadlet, bool has_gap_count_optimization)
{}

static inline unsigned int phy_packet_phy_config_get_gap_count(u32 quadlet)
{}

static inline void phy_packet_phy_config_set_gap_count(u32 *quadlet, unsigned int gap_count)
{}

#define PHY_PACKET_PACKET_IDENTIFIER_SELF_ID

#define SELF_ID_PHY_ID_MASK
#define SELF_ID_PHY_ID_SHIFT
#define SELF_ID_EXTENDED_MASK
#define SELF_ID_EXTENDED_SHIFT
#define SELF_ID_MORE_PACKETS_MASK
#define SELF_ID_MORE_PACKETS_SHIFT

#define SELF_ID_ZERO_LINK_ACTIVE_MASK
#define SELF_ID_ZERO_LINK_ACTIVE_SHIFT
#define SELF_ID_ZERO_GAP_COUNT_MASK
#define SELF_ID_ZERO_GAP_COUNT_SHIFT
#define SELF_ID_ZERO_SCODE_MASK
#define SELF_ID_ZERO_SCODE_SHIFT
#define SELF_ID_ZERO_CONTENDER_MASK
#define SELF_ID_ZERO_CONTENDER_SHIFT
#define SELF_ID_ZERO_POWER_CLASS_MASK
#define SELF_ID_ZERO_POWER_CLASS_SHIFT
#define SELF_ID_ZERO_INITIATED_RESET_MASK
#define SELF_ID_ZERO_INITIATED_RESET_SHIFT

#define SELF_ID_EXTENDED_SEQUENCE_MASK
#define SELF_ID_EXTENDED_SEQUENCE_SHIFT

#define SELF_ID_PORT_STATUS_MASK

#define SELF_ID_SEQUENCE_MAXIMUM_QUADLET_COUNT

static inline unsigned int phy_packet_self_id_get_phy_id(u32 quadlet)
{}

static inline void phy_packet_self_id_set_phy_id(u32 *quadlet, unsigned int phy_id)
{}

static inline bool phy_packet_self_id_get_extended(u32 quadlet)
{}

static inline void phy_packet_self_id_set_extended(u32 *quadlet, bool extended)
{}

static inline bool phy_packet_self_id_zero_get_link_active(u32 quadlet)
{}

static inline void phy_packet_self_id_zero_set_link_active(u32 *quadlet, bool is_active)
{}

static inline unsigned int phy_packet_self_id_zero_get_gap_count(u32 quadlet)
{}

static inline void phy_packet_self_id_zero_set_gap_count(u32 *quadlet, unsigned int gap_count)
{}

static inline unsigned int phy_packet_self_id_zero_get_scode(u32 quadlet)
{}

static inline void phy_packet_self_id_zero_set_scode(u32 *quadlet, unsigned int speed)
{}

static inline bool phy_packet_self_id_zero_get_contender(u32 quadlet)
{}

static inline void phy_packet_self_id_zero_set_contender(u32 *quadlet, bool is_contender)
{}

static inline unsigned int phy_packet_self_id_zero_get_power_class(u32 quadlet)
{}

static inline void phy_packet_self_id_zero_set_power_class(u32 *quadlet, unsigned int power_class)
{}

static inline bool phy_packet_self_id_zero_get_initiated_reset(u32 quadlet)
{}

static inline void phy_packet_self_id_zero_set_initiated_reset(u32 *quadlet, bool is_initiated_reset)
{}

static inline bool phy_packet_self_id_get_more_packets(u32 quadlet)
{}

static inline void phy_packet_self_id_set_more_packets(u32 *quadlet, bool is_more_packets)
{}

static inline unsigned int phy_packet_self_id_extended_get_sequence(u32 quadlet)
{}

static inline void phy_packet_self_id_extended_set_sequence(u32 *quadlet, unsigned int sequence)
{}

struct self_id_sequence_enumerator {};

static inline const u32 *self_id_sequence_enumerator_next(
		struct self_id_sequence_enumerator *enumerator, unsigned int *quadlet_count)
{}

enum phy_packet_self_id_port_status {};

static inline unsigned int self_id_sequence_get_port_capacity(unsigned int quadlet_count)
{}

static inline enum phy_packet_self_id_port_status self_id_sequence_get_port_status(
		const u32 *self_id_sequence, unsigned int quadlet_count, unsigned int port_index)
{}

static inline void self_id_sequence_set_port_status(u32 *self_id_sequence, unsigned int quadlet_count,
						    unsigned int port_index,
						    enum phy_packet_self_id_port_status status)
{}

#endif // _FIREWIRE_PHY_PACKET_DEFINITIONS_H