forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/net/wireless/intel/iwlwifi/iwl-context-info.h
....@@ -6,7 +6,7 @@
66 * GPL LICENSE SUMMARY
77 *
88 * Copyright(c) 2017 Intel Deutschland GmbH
9
- * Copyright(c) 2018 Intel Corporation
9
+ * Copyright(c) 2018 - 2020 Intel Corporation
1010 *
1111 * This program is free software; you can redistribute it and/or modify
1212 * it under the terms of version 2 of the GNU General Public License as
....@@ -20,7 +20,7 @@
2020 * BSD LICENSE
2121 *
2222 * Copyright(c) 2017 Intel Deutschland GmbH
23
- * Copyright(c) 2018 Intel Corporation
23
+ * Copyright(c) 2018 - 2020 Intel Corporation
2424 * All rights reserved.
2525 *
2626 * Redistribution and use in source and binary forms, with or without
....@@ -64,20 +64,41 @@
6464 * the init done for driver command that configures several system modes
6565 * @IWL_CTXT_INFO_EARLY_DEBUG: enable early debug
6666 * @IWL_CTXT_INFO_ENABLE_CDMP: enable core dump
67
- * @IWL_CTXT_INFO_RB_SIZE_4K: Use 4K RB size (the default is 2K)
68
- * @IWL_CTXT_INFO_RB_CB_SIZE_POS: position of the RBD Cyclic Buffer Size
67
+ * @IWL_CTXT_INFO_RB_CB_SIZE: mask of the RBD Cyclic Buffer Size
6968 * exponent, the actual size is 2**value, valid sizes are 8-2048.
7069 * The value is four bits long. Maximum valid exponent is 12
7170 * @IWL_CTXT_INFO_TFD_FORMAT_LONG: use long TFD Format (the
7271 * default is short format - not supported by the driver)
72
+ * @IWL_CTXT_INFO_RB_SIZE: RB size mask
73
+ * (values are IWL_CTXT_INFO_RB_SIZE_*K)
74
+ * @IWL_CTXT_INFO_RB_SIZE_1K: Value for 1K RB size
75
+ * @IWL_CTXT_INFO_RB_SIZE_2K: Value for 2K RB size
76
+ * @IWL_CTXT_INFO_RB_SIZE_4K: Value for 4K RB size
77
+ * @IWL_CTXT_INFO_RB_SIZE_8K: Value for 8K RB size
78
+ * @IWL_CTXT_INFO_RB_SIZE_12K: Value for 12K RB size
79
+ * @IWL_CTXT_INFO_RB_SIZE_16K: Value for 16K RB size
80
+ * @IWL_CTXT_INFO_RB_SIZE_20K: Value for 20K RB size
81
+ * @IWL_CTXT_INFO_RB_SIZE_24K: Value for 24K RB size
82
+ * @IWL_CTXT_INFO_RB_SIZE_28K: Value for 28K RB size
83
+ * @IWL_CTXT_INFO_RB_SIZE_32K: Value for 32K RB size
7384 */
7485 enum iwl_context_info_flags {
75
- IWL_CTXT_INFO_AUTO_FUNC_INIT = BIT(0),
76
- IWL_CTXT_INFO_EARLY_DEBUG = BIT(1),
77
- IWL_CTXT_INFO_ENABLE_CDMP = BIT(2),
78
- IWL_CTXT_INFO_RB_SIZE_4K = BIT(3),
79
- IWL_CTXT_INFO_RB_CB_SIZE_POS = 4,
80
- IWL_CTXT_INFO_TFD_FORMAT_LONG = BIT(8),
86
+ IWL_CTXT_INFO_AUTO_FUNC_INIT = 0x0001,
87
+ IWL_CTXT_INFO_EARLY_DEBUG = 0x0002,
88
+ IWL_CTXT_INFO_ENABLE_CDMP = 0x0004,
89
+ IWL_CTXT_INFO_RB_CB_SIZE = 0x00f0,
90
+ IWL_CTXT_INFO_TFD_FORMAT_LONG = 0x0100,
91
+ IWL_CTXT_INFO_RB_SIZE = 0x1e00,
92
+ IWL_CTXT_INFO_RB_SIZE_1K = 0x1,
93
+ IWL_CTXT_INFO_RB_SIZE_2K = 0x2,
94
+ IWL_CTXT_INFO_RB_SIZE_4K = 0x4,
95
+ IWL_CTXT_INFO_RB_SIZE_8K = 0x8,
96
+ IWL_CTXT_INFO_RB_SIZE_12K = 0x9,
97
+ IWL_CTXT_INFO_RB_SIZE_16K = 0xa,
98
+ IWL_CTXT_INFO_RB_SIZE_20K = 0xb,
99
+ IWL_CTXT_INFO_RB_SIZE_24K = 0xc,
100
+ IWL_CTXT_INFO_RB_SIZE_28K = 0xd,
101
+ IWL_CTXT_INFO_RB_SIZE_32K = 0xe,
81102 };
82103
83104 /*
....@@ -204,5 +225,8 @@
204225 int iwl_pcie_init_fw_sec(struct iwl_trans *trans,
205226 const struct fw_img *fw,
206227 struct iwl_context_info_dram *ctxt_dram);
228
+int iwl_pcie_ctxt_info_alloc_dma(struct iwl_trans *trans,
229
+ const void *data, u32 len,
230
+ struct iwl_dram_data *dram);
207231
208232 #endif /* __iwl_context_info_file_h__ */