tb.h (23ccd21ccb56fbfd32cb9016dcb1ccb08c662396) tb.h (43f977bc60b1cfd3c1d220a9a0a06493fbf3985d)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Thunderbolt driver - bus logic (NHI independent)
4 *
5 * Copyright (c) 2014 Andreas Noever <andreas.noever@gmail.com>
6 * Copyright (C) 2018, Intel Corporation
7 */
8

--- 126 unchanged lines hidden (view full) ---

135 * @device_name: Name of the device (or %NULL if not known)
136 * @link_speed: Speed of the link in Gb/s
137 * @link_width: Width of the link (1 or 2)
138 * @link_usb4: Upstream link is USB4
139 * @generation: Switch Thunderbolt generation
140 * @cap_plug_events: Offset to the plug events capability (%0 if not found)
141 * @cap_vsec_tmu: Offset to the TMU vendor specific capability (%0 if not found)
142 * @cap_lc: Offset to the link controller capability (%0 if not found)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Thunderbolt driver - bus logic (NHI independent)
4 *
5 * Copyright (c) 2014 Andreas Noever <andreas.noever@gmail.com>
6 * Copyright (C) 2018, Intel Corporation
7 */
8

--- 126 unchanged lines hidden (view full) ---

135 * @device_name: Name of the device (or %NULL if not known)
136 * @link_speed: Speed of the link in Gb/s
137 * @link_width: Width of the link (1 or 2)
138 * @link_usb4: Upstream link is USB4
139 * @generation: Switch Thunderbolt generation
140 * @cap_plug_events: Offset to the plug events capability (%0 if not found)
141 * @cap_vsec_tmu: Offset to the TMU vendor specific capability (%0 if not found)
142 * @cap_lc: Offset to the link controller capability (%0 if not found)
143 * @cap_lp: Offset to the low power (CLx for TBT) capability (%0 if not found)
143 * @is_unplugged: The switch is going away
144 * @drom: DROM of the switch (%NULL if not found)
145 * @nvm: Pointer to the NVM if the switch has one (%NULL otherwise)
146 * @no_nvm_upgrade: Prevent NVM upgrade of this switch
147 * @safe_mode: The switch is in safe-mode
148 * @boot: Whether the switch was already authorized on boot or not
149 * @rpm: The switch supports runtime PM
150 * @authorized: Whether the switch is authorized by user or policy

--- 36 unchanged lines hidden (view full) ---

187 const char *device_name;
188 unsigned int link_speed;
189 unsigned int link_width;
190 bool link_usb4;
191 unsigned int generation;
192 int cap_plug_events;
193 int cap_vsec_tmu;
194 int cap_lc;
144 * @is_unplugged: The switch is going away
145 * @drom: DROM of the switch (%NULL if not found)
146 * @nvm: Pointer to the NVM if the switch has one (%NULL otherwise)
147 * @no_nvm_upgrade: Prevent NVM upgrade of this switch
148 * @safe_mode: The switch is in safe-mode
149 * @boot: Whether the switch was already authorized on boot or not
150 * @rpm: The switch supports runtime PM
151 * @authorized: Whether the switch is authorized by user or policy

--- 36 unchanged lines hidden (view full) ---

188 const char *device_name;
189 unsigned int link_speed;
190 unsigned int link_width;
191 bool link_usb4;
192 unsigned int generation;
193 int cap_plug_events;
194 int cap_vsec_tmu;
195 int cap_lc;
196 int cap_lp;
195 bool is_unplugged;
196 u8 *drom;
197 struct tb_nvm *nvm;
198 bool no_nvm_upgrade;
199 bool safe_mode;
200 bool boot;
201 bool rpm;
202 unsigned int authorized;

--- 764 unchanged lines hidden (view full) ---

967 * Checks if the CL0s is enabled on the router upstream link.
968 * Not applicable for a host router.
969 */
970static inline bool tb_switch_is_cl0s_enabled(const struct tb_switch *sw)
971{
972 return sw->clx == TB_CL0S;
973}
974
197 bool is_unplugged;
198 u8 *drom;
199 struct tb_nvm *nvm;
200 bool no_nvm_upgrade;
201 bool safe_mode;
202 bool boot;
203 bool rpm;
204 unsigned int authorized;

--- 764 unchanged lines hidden (view full) ---

969 * Checks if the CL0s is enabled on the router upstream link.
970 * Not applicable for a host router.
971 */
972static inline bool tb_switch_is_cl0s_enabled(const struct tb_switch *sw)
973{
974 return sw->clx == TB_CL0S;
975}
976
977/**
978 * tb_switch_is_clx_supported() - Is CLx supported on this type of router
979 * @sw: The router to check CLx support for
980 */
981static inline bool tb_switch_is_clx_supported(const struct tb_switch *sw)
982{
983 return tb_switch_is_usb4(sw) || tb_switch_is_titan_ridge(sw);
984}
985
986int tb_switch_mask_clx_objections(struct tb_switch *sw);
987
988int tb_switch_pcie_l1_enable(struct tb_switch *sw);
989
975int tb_wait_for_port(struct tb_port *port, bool wait_if_unplugged);
976int tb_port_add_nfc_credits(struct tb_port *port, int credits);
977int tb_port_clear_counter(struct tb_port *port, int counter);
978int tb_port_unlock(struct tb_port *port);
979int tb_port_enable(struct tb_port *port);
980int tb_port_disable(struct tb_port *port);
981int tb_port_alloc_in_hopid(struct tb_port *port, int hopid, int max_hopid);
982void tb_port_release_in_hopid(struct tb_port *port, int hopid);

--- 77 unchanged lines hidden (view full) ---

1060int tb_drom_read_uid_only(struct tb_switch *sw, u64 *uid);
1061
1062int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid);
1063int tb_lc_configure_port(struct tb_port *port);
1064void tb_lc_unconfigure_port(struct tb_port *port);
1065int tb_lc_configure_xdomain(struct tb_port *port);
1066void tb_lc_unconfigure_xdomain(struct tb_port *port);
1067int tb_lc_start_lane_initialization(struct tb_port *port);
990int tb_wait_for_port(struct tb_port *port, bool wait_if_unplugged);
991int tb_port_add_nfc_credits(struct tb_port *port, int credits);
992int tb_port_clear_counter(struct tb_port *port, int counter);
993int tb_port_unlock(struct tb_port *port);
994int tb_port_enable(struct tb_port *port);
995int tb_port_disable(struct tb_port *port);
996int tb_port_alloc_in_hopid(struct tb_port *port, int hopid, int max_hopid);
997void tb_port_release_in_hopid(struct tb_port *port, int hopid);

--- 77 unchanged lines hidden (view full) ---

1075int tb_drom_read_uid_only(struct tb_switch *sw, u64 *uid);
1076
1077int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid);
1078int tb_lc_configure_port(struct tb_port *port);
1079void tb_lc_unconfigure_port(struct tb_port *port);
1080int tb_lc_configure_xdomain(struct tb_port *port);
1081void tb_lc_unconfigure_xdomain(struct tb_port *port);
1082int tb_lc_start_lane_initialization(struct tb_port *port);
1083bool tb_lc_is_clx_supported(struct tb_port *port);
1068int tb_lc_set_wake(struct tb_switch *sw, unsigned int flags);
1069int tb_lc_set_sleep(struct tb_switch *sw);
1070bool tb_lc_lane_bonding_possible(struct tb_switch *sw);
1071bool tb_lc_dp_sink_query(struct tb_switch *sw, struct tb_port *in);
1072int tb_lc_dp_sink_alloc(struct tb_switch *sw, struct tb_port *in);
1073int tb_lc_dp_sink_dealloc(struct tb_switch *sw, struct tb_port *in);
1074int tb_lc_force_power(struct tb_switch *sw);
1075

--- 181 unchanged lines hidden ---
1084int tb_lc_set_wake(struct tb_switch *sw, unsigned int flags);
1085int tb_lc_set_sleep(struct tb_switch *sw);
1086bool tb_lc_lane_bonding_possible(struct tb_switch *sw);
1087bool tb_lc_dp_sink_query(struct tb_switch *sw, struct tb_port *in);
1088int tb_lc_dp_sink_alloc(struct tb_switch *sw, struct tb_port *in);
1089int tb_lc_dp_sink_dealloc(struct tb_switch *sw, struct tb_port *in);
1090int tb_lc_force_power(struct tb_switch *sw);
1091

--- 181 unchanged lines hidden ---