Commit 3e2b49d6 authored by Luca Coelho's avatar Luca Coelho

iwlwifi: don't define OTP_LOW_IMAGE_SIZE per family, but per size

Using OTP_LOW_IMAGE_SIZE_FAMILY_8000/9000/22000 only obfuscates the
actual values, since these 3 are the same.  Redefine the values per
size so it's easier to understand and compare the different
configurations.
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent da2eb669
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
static const struct iwl_base_params iwl1000_base_params = { static const struct iwl_base_params iwl1000_base_params = {
.num_of_queues = IWLAGN_NUM_QUEUES, .num_of_queues = IWLAGN_NUM_QUEUES,
.max_tfd_queue_size = 256, .max_tfd_queue_size = 256,
.eeprom_size = OTP_LOW_IMAGE_SIZE, .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
.pll_cfg = true, .pll_cfg = true,
.max_ll_items = OTP_MAX_LL_ITEMS_1000, .max_ll_items = OTP_MAX_LL_ITEMS_1000,
.shadow_ram_support = false, .shadow_ram_support = false,
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
#define IWL135_MODULE_FIRMWARE(api) IWL135_FW_PRE __stringify(api) ".ucode" #define IWL135_MODULE_FIRMWARE(api) IWL135_FW_PRE __stringify(api) ".ucode"
static const struct iwl_base_params iwl2000_base_params = { static const struct iwl_base_params iwl2000_base_params = {
.eeprom_size = OTP_LOW_IMAGE_SIZE, .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
.num_of_queues = IWLAGN_NUM_QUEUES, .num_of_queues = IWLAGN_NUM_QUEUES,
.max_tfd_queue_size = 256, .max_tfd_queue_size = 256,
.max_ll_items = OTP_MAX_LL_ITEMS_2x00, .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
...@@ -71,7 +71,7 @@ static const struct iwl_base_params iwl2000_base_params = { ...@@ -71,7 +71,7 @@ static const struct iwl_base_params iwl2000_base_params = {
static const struct iwl_base_params iwl2030_base_params = { static const struct iwl_base_params iwl2030_base_params = {
.eeprom_size = OTP_LOW_IMAGE_SIZE, .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
.num_of_queues = IWLAGN_NUM_QUEUES, .num_of_queues = IWLAGN_NUM_QUEUES,
.max_tfd_queue_size = 256, .max_tfd_queue_size = 256,
.max_ll_items = OTP_MAX_LL_ITEMS_2x00, .max_ll_items = OTP_MAX_LL_ITEMS_2x00,
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
#define NVM_HW_SECTION_NUM_FAMILY_22000 10 #define NVM_HW_SECTION_NUM_FAMILY_22000 10
static const struct iwl_base_params iwl_22000_base_params = { static const struct iwl_base_params iwl_22000_base_params = {
.eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_22000, .eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
.num_of_queues = 512, .num_of_queues = 512,
.max_tfd_queue_size = 256, .max_tfd_queue_size = 256,
.shadow_ram_support = true, .shadow_ram_support = true,
...@@ -121,7 +121,7 @@ static const struct iwl_base_params iwl_22000_base_params = { ...@@ -121,7 +121,7 @@ static const struct iwl_base_params iwl_22000_base_params = {
}; };
static const struct iwl_base_params iwl_22560_base_params = { static const struct iwl_base_params iwl_22560_base_params = {
.eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_22000, .eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
.num_of_queues = 512, .num_of_queues = 512,
.max_tfd_queue_size = 65536, .max_tfd_queue_size = 65536,
.shadow_ram_support = true, .shadow_ram_support = true,
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
#define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE __stringify(api) ".ucode" #define IWL6030_MODULE_FIRMWARE(api) IWL6030_FW_PRE __stringify(api) ".ucode"
static const struct iwl_base_params iwl6000_base_params = { static const struct iwl_base_params iwl6000_base_params = {
.eeprom_size = OTP_LOW_IMAGE_SIZE, .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
.num_of_queues = IWLAGN_NUM_QUEUES, .num_of_queues = IWLAGN_NUM_QUEUES,
.max_tfd_queue_size = 256, .max_tfd_queue_size = 256,
.max_ll_items = OTP_MAX_LL_ITEMS_6x00, .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
...@@ -79,7 +79,7 @@ static const struct iwl_base_params iwl6000_base_params = { ...@@ -79,7 +79,7 @@ static const struct iwl_base_params iwl6000_base_params = {
}; };
static const struct iwl_base_params iwl6050_base_params = { static const struct iwl_base_params iwl6050_base_params = {
.eeprom_size = OTP_LOW_IMAGE_SIZE, .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
.num_of_queues = IWLAGN_NUM_QUEUES, .num_of_queues = IWLAGN_NUM_QUEUES,
.max_tfd_queue_size = 256, .max_tfd_queue_size = 256,
.max_ll_items = OTP_MAX_LL_ITEMS_6x50, .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
...@@ -92,7 +92,7 @@ static const struct iwl_base_params iwl6050_base_params = { ...@@ -92,7 +92,7 @@ static const struct iwl_base_params iwl6050_base_params = {
}; };
static const struct iwl_base_params iwl6000_g2_base_params = { static const struct iwl_base_params iwl6000_g2_base_params = {
.eeprom_size = OTP_LOW_IMAGE_SIZE, .eeprom_size = OTP_LOW_IMAGE_SIZE_2K,
.num_of_queues = IWLAGN_NUM_QUEUES, .num_of_queues = IWLAGN_NUM_QUEUES,
.max_tfd_queue_size = 256, .max_tfd_queue_size = 256,
.max_ll_items = OTP_MAX_LL_ITEMS_6x00, .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
......
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
#define NVM_HW_SECTION_NUM_FAMILY_7000 0 #define NVM_HW_SECTION_NUM_FAMILY_7000 0
static const struct iwl_base_params iwl7000_base_params = { static const struct iwl_base_params iwl7000_base_params = {
.eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_7000, .eeprom_size = OTP_LOW_IMAGE_SIZE_16K,
.num_of_queues = 31, .num_of_queues = 31,
.max_tfd_queue_size = 256, .max_tfd_queue_size = 256,
.shadow_ram_support = true, .shadow_ram_support = true,
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
#define DEFAULT_NVM_FILE_FAMILY_8000C "nvmData-8000C" #define DEFAULT_NVM_FILE_FAMILY_8000C "nvmData-8000C"
static const struct iwl_base_params iwl8000_base_params = { static const struct iwl_base_params iwl8000_base_params = {
.eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_8000, .eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
.num_of_queues = 31, .num_of_queues = 31,
.max_tfd_queue_size = 256, .max_tfd_queue_size = 256,
.shadow_ram_support = true, .shadow_ram_support = true,
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
#define NVM_HW_SECTION_NUM_FAMILY_9000 10 #define NVM_HW_SECTION_NUM_FAMILY_9000 10
static const struct iwl_base_params iwl9000_base_params = { static const struct iwl_base_params iwl9000_base_params = {
.eeprom_size = OTP_LOW_IMAGE_SIZE_FAMILY_9000, .eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
.num_of_queues = 31, .num_of_queues = 31,
.max_tfd_queue_size = 256, .max_tfd_queue_size = 256,
.shadow_ram_support = true, .shadow_ram_support = true,
......
...@@ -265,11 +265,9 @@ struct iwl_tt_params { ...@@ -265,11 +265,9 @@ struct iwl_tt_params {
#define EEPROM_REGULATORY_BAND_NO_HT40 0 #define EEPROM_REGULATORY_BAND_NO_HT40 0
/* lower blocks contain EEPROM image and calibration data */ /* lower blocks contain EEPROM image and calibration data */
#define OTP_LOW_IMAGE_SIZE (2 * 512 * sizeof(u16)) /* 2 KB */ #define OTP_LOW_IMAGE_SIZE_2K (2 * 512 * sizeof(u16)) /* 2 KB */
#define OTP_LOW_IMAGE_SIZE_FAMILY_7000 (16 * 512 * sizeof(u16)) /* 16 KB */ #define OTP_LOW_IMAGE_SIZE_16K (16 * 512 * sizeof(u16)) /* 16 KB */
#define OTP_LOW_IMAGE_SIZE_FAMILY_8000 (32 * 512 * sizeof(u16)) /* 32 KB */ #define OTP_LOW_IMAGE_SIZE_32K (32 * 512 * sizeof(u16)) /* 32 KB */
#define OTP_LOW_IMAGE_SIZE_FAMILY_9000 OTP_LOW_IMAGE_SIZE_FAMILY_8000
#define OTP_LOW_IMAGE_SIZE_FAMILY_22000 OTP_LOW_IMAGE_SIZE_FAMILY_9000
struct iwl_eeprom_params { struct iwl_eeprom_params {
const u8 regulatory_bands[7]; const u8 regulatory_bands[7];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment