diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 56 |
1 files changed, 7 insertions, 49 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 9f18b4cba952..7142aa5dbdb5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -1013,55 +1013,15 @@ static int iwl3945_txq_ctx_reset(struct iwl_priv *priv) | |||
1013 | return rc; | 1013 | return rc; |
1014 | } | 1014 | } |
1015 | 1015 | ||
1016 | |||
1016 | /* | 1017 | /* |
1017 | * Start up NIC's basic functionality after it has been reset | 1018 | * Start up 3945's basic functionality after it has been reset |
1018 | * (e.g. after platform boot, or shutdown via iwl3945_apm_stop()) | 1019 | * (e.g. after platform boot, or shutdown via iwl_apm_stop()) |
1019 | * NOTE: This does not load uCode nor start the embedded processor | 1020 | * NOTE: This does not load uCode nor start the embedded processor |
1020 | */ | 1021 | */ |
1021 | static int iwl3945_apm_init(struct iwl_priv *priv) | 1022 | static int iwl3945_apm_init(struct iwl_priv *priv) |
1022 | { | 1023 | { |
1023 | int ret; | 1024 | int ret = iwl_apm_init(priv); |
1024 | |||
1025 | /* Configure chip clock phase-lock-loop */ | ||
1026 | iwl_set_bit(priv, CSR_ANA_PLL_CFG, CSR39_ANA_PLL_CFG_VAL); | ||
1027 | |||
1028 | /* | ||
1029 | * Disable L0S exit timer (platform NMI Work/Around) | ||
1030 | * (does this do anything on 3945, or just 4965 and beyond?) | ||
1031 | */ | ||
1032 | iwl_set_bit(priv, CSR_GIO_CHICKEN_BITS, | ||
1033 | CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER); | ||
1034 | |||
1035 | /* Disable L0s without affecting L1; don't wait for ICH (L0s bug W/A) */ | ||
1036 | iwl_set_bit(priv, CSR_GIO_CHICKEN_BITS, | ||
1037 | CSR_GIO_CHICKEN_BITS_REG_BIT_L1A_NO_L0S_RX); | ||
1038 | |||
1039 | /* Set FH wait threshold to maximum (HW error during stress W/A) */ | ||
1040 | iwl_set_bit(priv, CSR_DBG_HPET_MEM_REG, CSR_DBG_HPET_MEM_REG_VAL); | ||
1041 | |||
1042 | /* | ||
1043 | * Set "initialization complete" bit to move adapter from | ||
1044 | * D0U* --> D0A* (powered-up active) state. | ||
1045 | */ | ||
1046 | iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); | ||
1047 | |||
1048 | /* | ||
1049 | * Wait for clock stabilization; once stabilized, access to | ||
1050 | * device-internal resources is supported, e.g. iwl_write_prph() | ||
1051 | * and accesses to uCode SRAM. | ||
1052 | */ | ||
1053 | ret = iwl_poll_bit(priv, CSR_GP_CNTRL, | ||
1054 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, | ||
1055 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); | ||
1056 | if (ret < 0) { | ||
1057 | IWL_DEBUG_INFO(priv, "Failed to init the card\n"); | ||
1058 | goto out; | ||
1059 | } | ||
1060 | |||
1061 | /* Enable DMA and BSM clocks, wait for them to stabilize */ | ||
1062 | iwl_write_prph(priv, APMG_CLK_CTRL_REG, APMG_CLK_VAL_DMA_CLK_RQT | | ||
1063 | APMG_CLK_VAL_BSM_CLK_RQT); | ||
1064 | udelay(20); | ||
1065 | 1025 | ||
1066 | /* Clear APMG (NIC's internal power management) interrupts */ | 1026 | /* Clear APMG (NIC's internal power management) interrupts */ |
1067 | iwl_write_prph(priv, APMG_RTC_INT_MSK_REG, 0x0); | 1027 | iwl_write_prph(priv, APMG_RTC_INT_MSK_REG, 0x0); |
@@ -1072,11 +1032,6 @@ static int iwl3945_apm_init(struct iwl_priv *priv) | |||
1072 | udelay(5); | 1032 | udelay(5); |
1073 | iwl_clear_bits_prph(priv, APMG_PS_CTRL_REG, APMG_PS_CTRL_VAL_RESET_REQ); | 1033 | iwl_clear_bits_prph(priv, APMG_PS_CTRL_REG, APMG_PS_CTRL_VAL_RESET_REQ); |
1074 | 1034 | ||
1075 | /* Disable L1-Active */ | ||
1076 | iwl_set_bits_prph(priv, APMG_PCIDEV_STT_REG, | ||
1077 | APMG_PCIDEV_STT_VAL_L1_ACT_DIS); | ||
1078 | |||
1079 | out: | ||
1080 | return ret; | 1035 | return ret; |
1081 | } | 1036 | } |
1082 | 1037 | ||
@@ -2876,6 +2831,9 @@ static struct iwl_cfg iwl3945_bg_cfg = { | |||
2876 | .ops = &iwl3945_ops, | 2831 | .ops = &iwl3945_ops, |
2877 | .num_of_queues = IWL39_NUM_QUEUES, | 2832 | .num_of_queues = IWL39_NUM_QUEUES, |
2878 | .mod_params = &iwl3945_mod_params, | 2833 | .mod_params = &iwl3945_mod_params, |
2834 | .pll_cfg_val = CSR39_ANA_PLL_CFG_VAL, | ||
2835 | .set_l0s = false, | ||
2836 | .use_bsm = true, | ||
2879 | .use_isr_legacy = true, | 2837 | .use_isr_legacy = true, |
2880 | .ht_greenfield_support = false, | 2838 | .ht_greenfield_support = false, |
2881 | .led_compensation = 64, | 2839 | .led_compensation = 64, |