tb.h (341d45188a7800ae3bc18558d62020787b78397e) tb.h (b2911a593a705e54adde6d06d4657c1ff2f16583)
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

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

328/* HopIDs 0-7 are reserved by the Thunderbolt protocol */
329#define TB_PATH_MIN_HOPID 8
330/*
331 * Support paths from the farthest (depth 6) router to the host and back
332 * to the same level (not necessarily to the same router).
333 */
334#define TB_PATH_MAX_HOPS (7 * 2)
335
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

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

328/* HopIDs 0-7 are reserved by the Thunderbolt protocol */
329#define TB_PATH_MIN_HOPID 8
330/*
331 * Support paths from the farthest (depth 6) router to the host and back
332 * to the same level (not necessarily to the same router).
333 */
334#define TB_PATH_MAX_HOPS (7 * 2)
335
336/* Possible wake types */
337#define TB_WAKE_ON_CONNECT BIT(0)
338#define TB_WAKE_ON_DISCONNECT BIT(1)
339#define TB_WAKE_ON_USB4 BIT(2)
340#define TB_WAKE_ON_USB3 BIT(3)
341#define TB_WAKE_ON_PCIE BIT(4)
342
336/**
337 * struct tb_cm_ops - Connection manager specific operations vector
338 * @driver_ready: Called right after control channel is started. Used by
339 * ICM to send driver ready message to the firmware.
340 * @start: Starts the domain
341 * @stop: Stops the domain
342 * @suspend_noirq: Connection manager specific suspend_noirq
343 * @resume_noirq: Connection manager specific resume_noirq

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

847int tb_drom_read(struct tb_switch *sw);
848int tb_drom_read_uid_only(struct tb_switch *sw, u64 *uid);
849
850int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid);
851int tb_lc_configure_port(struct tb_port *port);
852void tb_lc_unconfigure_port(struct tb_port *port);
853int tb_lc_configure_xdomain(struct tb_port *port);
854void tb_lc_unconfigure_xdomain(struct tb_port *port);
343/**
344 * struct tb_cm_ops - Connection manager specific operations vector
345 * @driver_ready: Called right after control channel is started. Used by
346 * ICM to send driver ready message to the firmware.
347 * @start: Starts the domain
348 * @stop: Stops the domain
349 * @suspend_noirq: Connection manager specific suspend_noirq
350 * @resume_noirq: Connection manager specific resume_noirq

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

854int tb_drom_read(struct tb_switch *sw);
855int tb_drom_read_uid_only(struct tb_switch *sw, u64 *uid);
856
857int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid);
858int tb_lc_configure_port(struct tb_port *port);
859void tb_lc_unconfigure_port(struct tb_port *port);
860int tb_lc_configure_xdomain(struct tb_port *port);
861void tb_lc_unconfigure_xdomain(struct tb_port *port);
862int tb_lc_set_wake(struct tb_switch *sw, unsigned int flags);
855int tb_lc_set_sleep(struct tb_switch *sw);
856bool tb_lc_lane_bonding_possible(struct tb_switch *sw);
857bool tb_lc_dp_sink_query(struct tb_switch *sw, struct tb_port *in);
858int tb_lc_dp_sink_alloc(struct tb_switch *sw, struct tb_port *in);
859int tb_lc_dp_sink_dealloc(struct tb_switch *sw, struct tb_port *in);
860int tb_lc_force_power(struct tb_switch *sw);
861
862static inline int tb_route_length(u64 route)

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

902 return NULL;
903}
904
905int usb4_switch_setup(struct tb_switch *sw);
906int usb4_switch_read_uid(struct tb_switch *sw, u64 *uid);
907int usb4_switch_drom_read(struct tb_switch *sw, unsigned int address, void *buf,
908 size_t size);
909bool usb4_switch_lane_bonding_possible(struct tb_switch *sw);
863int tb_lc_set_sleep(struct tb_switch *sw);
864bool tb_lc_lane_bonding_possible(struct tb_switch *sw);
865bool tb_lc_dp_sink_query(struct tb_switch *sw, struct tb_port *in);
866int tb_lc_dp_sink_alloc(struct tb_switch *sw, struct tb_port *in);
867int tb_lc_dp_sink_dealloc(struct tb_switch *sw, struct tb_port *in);
868int tb_lc_force_power(struct tb_switch *sw);
869
870static inline int tb_route_length(u64 route)

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

910 return NULL;
911}
912
913int usb4_switch_setup(struct tb_switch *sw);
914int usb4_switch_read_uid(struct tb_switch *sw, u64 *uid);
915int usb4_switch_drom_read(struct tb_switch *sw, unsigned int address, void *buf,
916 size_t size);
917bool usb4_switch_lane_bonding_possible(struct tb_switch *sw);
918int usb4_switch_set_wake(struct tb_switch *sw, unsigned int flags);
910int usb4_switch_set_sleep(struct tb_switch *sw);
911int usb4_switch_nvm_sector_size(struct tb_switch *sw);
912int usb4_switch_nvm_read(struct tb_switch *sw, unsigned int address, void *buf,
913 size_t size);
914int usb4_switch_nvm_write(struct tb_switch *sw, unsigned int address,
915 const void *buf, size_t size);
916int usb4_switch_nvm_authenticate(struct tb_switch *sw);
917bool usb4_switch_query_dp_resource(struct tb_switch *sw, struct tb_port *in);

--- 44 unchanged lines hidden ---
919int usb4_switch_set_sleep(struct tb_switch *sw);
920int usb4_switch_nvm_sector_size(struct tb_switch *sw);
921int usb4_switch_nvm_read(struct tb_switch *sw, unsigned int address, void *buf,
922 size_t size);
923int usb4_switch_nvm_write(struct tb_switch *sw, unsigned int address,
924 const void *buf, size_t size);
925int usb4_switch_nvm_authenticate(struct tb_switch *sw);
926bool usb4_switch_query_dp_resource(struct tb_switch *sw, struct tb_port *in);

--- 44 unchanged lines hidden ---