diff options
Diffstat (limited to 'sys/contrib/dev/iwlwifi/fw/acpi.h')
| -rw-r--r-- | sys/contrib/dev/iwlwifi/fw/acpi.h | 60 | 
1 files changed, 53 insertions, 7 deletions
| diff --git a/sys/contrib/dev/iwlwifi/fw/acpi.h b/sys/contrib/dev/iwlwifi/fw/acpi.h index bb88398a6987..68d8fb5f6357 100644 --- a/sys/contrib/dev/iwlwifi/fw/acpi.h +++ b/sys/contrib/dev/iwlwifi/fw/acpi.h @@ -1,7 +1,7 @@  /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */  /*   * Copyright (C) 2017 Intel Deutschland GmbH - * Copyright (C) 2018-2023 Intel Corporation + * Copyright (C) 2018-2023, 2025 Intel Corporation   */  #ifndef __iwl_fw_acpi__  #define __iwl_fw_acpi__ @@ -28,6 +28,7 @@  #define ACPI_WPFC_METHOD	"WPFC"  #define ACPI_GLAI_METHOD	"GLAI"  #define ACPI_WBEM_METHOD	"WBEM" +#define ACPI_DSBR_METHOD	"DSBR"  #define ACPI_WIFI_DOMAIN	(0x07) @@ -76,6 +77,13 @@  #define ACPI_WBEM_WIFI_DATA_SIZE	2  /*   * One element for domain type, + * and one for DSBR response data + */ +#define ACPI_DSBR_WIFI_DATA_SIZE	2 +#define ACPI_DSBR_WIFI_DATA_REV		1 + +/* + * One element for domain type,   * and one for the status   */  #define ACPI_GLAI_WIFI_DATA_SIZE	2 @@ -101,6 +109,30 @@  #define ACPI_DSM_REV 0 +#define DSM_INTERNAL_FUNC_GET_PLAT_INFO	1 +/* TBD: VPRO is BIT(0) in the result, but what's the result? */ + +#define DSM_INTERNAL_FUNC_PRODUCT_RESET	2 + +/* DSM_INTERNAL_FUNC_PRODUCT_RESET - product reset (aka "PLDR") */ +enum iwl_dsm_internal_product_reset_cmds { +	DSM_INTERNAL_PLDR_CMD_GET_MODE = 1, +	DSM_INTERNAL_PLDR_CMD_SET_MODE = 2, +	DSM_INTERNAL_PLDR_CMD_GET_STATUS = 3, +}; + +enum iwl_dsm_internal_product_reset_mode { +	DSM_INTERNAL_PLDR_MODE_EN_PROD_RESET	= BIT(0), +	DSM_INTERNAL_PLDR_MODE_EN_WIFI_FLR	= BIT(1), +	DSM_INTERNAL_PLDR_MODE_EN_BT_OFF_ON	= BIT(2), +}; + +struct iwl_dsm_internal_product_reset_cmd { +	/* cmd is from enum iwl_dsm_internal_product_reset_cmds */ +	u16 cmd; +	u16 value; +} __packed; +  #define IWL_ACPI_WBEM_REV0_MASK (BIT(0) | BIT(1))  #define IWL_ACPI_WBEM_REVISION 0 @@ -110,6 +142,10 @@ struct iwl_fw_runtime;  extern const guid_t iwl_guid; +union acpi_object *iwl_acpi_get_dsm_object(struct device *dev, int rev, +					   int func, union acpi_object *args, +					   const guid_t *guid); +  /**   * iwl_acpi_get_mcc - read MCC from ACPI, if available   * @@ -144,8 +180,7 @@ int iwl_acpi_get_tas_table(struct iwl_fw_runtime *fwrt,  int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt); -void iwl_acpi_get_phy_filters(struct iwl_fw_runtime *fwrt, -			      struct iwl_phy_specific_cfg *filters); +int iwl_acpi_get_phy_filters(struct iwl_fw_runtime *fwrt);  void iwl_acpi_get_guid_lock_status(struct iwl_fw_runtime *fwrt); @@ -153,10 +188,14 @@ int iwl_acpi_get_dsm(struct iwl_fw_runtime *fwrt,  		     enum iwl_dsm_funcs func, u32 *value);  int iwl_acpi_get_wbem(struct iwl_fw_runtime *fwrt, u32 *value); + +int iwl_acpi_get_dsbr(struct iwl_fw_runtime *fwrt, u32 *value); +  #else /* CONFIG_ACPI */ -static inline void *iwl_acpi_get_dsm_object(struct device *dev, int rev, -					    int func, union acpi_object *args) +static inline union acpi_object * +iwl_acpi_get_dsm_object(struct device *dev, int rev, int func, +			union acpi_object *args, const guid_t *guid)  {  	return ERR_PTR(-ENOENT);  } @@ -204,8 +243,10 @@ static inline int iwl_acpi_get_ppag_table(struct iwl_fw_runtime *fwrt)  	return -ENOENT;  } -/* macro since the second argument doesn't always exist */ -#define iwl_acpi_get_phy_filters(fwrt, filters) do { } while (0) +static inline int iwl_acpi_get_phy_filters(struct iwl_fw_runtime *fwrt) +{ +	return -ENOENT; +}  static inline void iwl_acpi_get_guid_lock_status(struct iwl_fw_runtime *fwrt)  { @@ -221,6 +262,11 @@ static inline int iwl_acpi_get_wbem(struct iwl_fw_runtime *fwrt, u32 *value)  {  	return -ENOENT;  } + +static inline int iwl_acpi_get_dsbr(struct iwl_fw_runtime *fwrt, u32 *value) +{ +	return -ENOENT; +}  #endif /* CONFIG_ACPI */  #endif /* __iwl_fw_acpi__ */ | 
