diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 3dd0b12b155e..32c591c0865b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -46,6 +46,46 @@ | |||
46 | 46 | ||
47 | #define IWL5000_UCODE_API "-1" | 47 | #define IWL5000_UCODE_API "-1" |
48 | 48 | ||
49 | static int iwl5000_apm_init(struct iwl_priv *priv) | ||
50 | { | ||
51 | int ret = 0; | ||
52 | |||
53 | iwl_set_bit(priv, CSR_GIO_CHICKEN_BITS, | ||
54 | CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER); | ||
55 | |||
56 | iwl_set_bit(priv, CSR_ANA_PLL_CFG, CSR50_ANA_PLL_CFG_VAL); | ||
57 | |||
58 | /* set "initialization complete" bit to move adapter | ||
59 | * D0U* --> D0A* state */ | ||
60 | iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); | ||
61 | |||
62 | /* wait for clock stabilization */ | ||
63 | ret = iwl_poll_bit(priv, CSR_GP_CNTRL, | ||
64 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, | ||
65 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); | ||
66 | if (ret < 0) { | ||
67 | IWL_DEBUG_INFO("Failed to init the card\n"); | ||
68 | return ret; | ||
69 | } | ||
70 | |||
71 | ret = iwl_grab_nic_access(priv); | ||
72 | if (ret) | ||
73 | return ret; | ||
74 | |||
75 | /* enable DMA */ | ||
76 | iwl_write_prph(priv, APMG_CLK_EN_REG, | ||
77 | APMG_CLK_VAL_DMA_CLK_RQT); | ||
78 | |||
79 | udelay(20); | ||
80 | |||
81 | iwl_set_bits_prph(priv, APMG_PCIDEV_STT_REG, | ||
82 | APMG_PCIDEV_STT_VAL_L1_ACT_DIS); | ||
83 | |||
84 | iwl_release_nic_access(priv); | ||
85 | |||
86 | return ret; | ||
87 | } | ||
88 | |||
49 | static struct iwl_hcmd_ops iwl5000_hcmd = { | 89 | static struct iwl_hcmd_ops iwl5000_hcmd = { |
50 | }; | 90 | }; |
51 | 91 | ||
@@ -53,6 +93,9 @@ static struct iwl_hcmd_utils_ops iwl5000_hcmd_utils = { | |||
53 | }; | 93 | }; |
54 | 94 | ||
55 | static struct iwl_lib_ops iwl5000_lib = { | 95 | static struct iwl_lib_ops iwl5000_lib = { |
96 | .apm_ops = { | ||
97 | .init = iwl5000_apm_init, | ||
98 | }, | ||
56 | .eeprom_ops = { | 99 | .eeprom_ops = { |
57 | .verify_signature = iwlcore_eeprom_verify_signature, | 100 | .verify_signature = iwlcore_eeprom_verify_signature, |
58 | .acquire_semaphore = iwlcore_eeprom_acquire_semaphore, | 101 | .acquire_semaphore = iwlcore_eeprom_acquire_semaphore, |