/* SPDX-License-Identifier: GPL-2.0 *//* * Thunderbolt driver - bus logic (NHI independent) * * Copyright (c) 2014 Andreas Noever <andreas.noever@gmail.com> * Copyright (C) 2018, Intel Corporation */#ifndef TB_H_#define TB_H_#include<linux/nvmem-provider.h>#include<linux/pci.h>#include<linux/thunderbolt.h>#include<linux/uuid.h>#include<linux/bitfield.h>#include"tb_regs.h"#include"ctl.h"#include"dma_port.h"/* Keep link controller awake during update */#define QUIRK_FORCE_POWER_LINK_CONTROLLER BIT(0)/* Disable CLx if not supported */#define QUIRK_NO_CLX BIT(1)/* Need to keep power on while USB4 port is in redrive mode */#define QUIRK_KEEP_POWER_IN_DP_REDRIVE BIT(2)/** * struct tb_nvm - Structure holding NVM information * @dev: Owner of the NVM * @major: Major version number of the active NVM portion * @minor: Minor version number of the active NVM portion * @id: Identifier used with both NVM portions * @active: Active portion NVMem device * @active_size: Size in bytes of the active NVM * @non_active: Non-active portion NVMem device * @buf: Buffer where the NVM image is stored before it is written to * the actual NVM flash device * @buf_data_start: Where the actual image starts after skipping * possible headers * @buf_data_size: Number of bytes actually consumed by the new NVM * image * @authenticating: The device is authenticating the new NVM * @flushed: The image has been flushed to the storage area * @vops: Router vendor specific NVM operations (optional) * * The user of this structure needs to handle serialization of possible * concurrent access. */structtb_nvm{structdevice*dev;u32major;u32minor;intid;structnvmem_device*active;size_tactive_size;structnvmem_device*non_active