aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-core.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-08-26 02:11:14 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-29 15:30:29 -0400
commit83ed90155f98bd949735c2cc22d832b557a6d7d1 (patch)
tree795ecd1ebd93357a80895825310c19315a633e49 /drivers/net/wireless/iwlwifi/iwl-core.c
parenta72b8b088c3465b28192c1a14ba97be8223a8cec (diff)
iwlagn: all function iwl-io.c receive iwl_bus
Which means that iwl-io.c doesn't need to include iwl-dev.h any more. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 048c8e2578f5..411edc8f3f9d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -907,9 +907,10 @@ static int iwl_apm_stop_master(struct iwl_priv *priv)
907 int ret = 0; 907 int ret = 0;
908 908
909 /* stop device's busmaster DMA activity */ 909 /* stop device's busmaster DMA activity */
910 iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER); 910 iwl_set_bit(bus(priv), CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER);
911 911
912 ret = iwl_poll_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_MASTER_DISABLED, 912 ret = iwl_poll_bit(bus(priv), CSR_RESET,
913 CSR_RESET_REG_FLAG_MASTER_DISABLED,
913 CSR_RESET_REG_FLAG_MASTER_DISABLED, 100); 914 CSR_RESET_REG_FLAG_MASTER_DISABLED, 100);
914 if (ret) 915 if (ret)
915 IWL_WARN(priv, "Master Disable Timed Out, 100 usec\n"); 916 IWL_WARN(priv, "Master Disable Timed Out, 100 usec\n");
@@ -929,7 +930,7 @@ void iwl_apm_stop(struct iwl_priv *priv)
929 iwl_apm_stop_master(priv); 930 iwl_apm_stop_master(priv);
930 931
931 /* Reset the entire device */ 932 /* Reset the entire device */
932 iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET); 933 iwl_set_bit(bus(priv), CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET);
933 934
934 udelay(10); 935 udelay(10);
935 936
@@ -937,7 +938,7 @@ void iwl_apm_stop(struct iwl_priv *priv)
937 * Clear "initialization complete" bit to move adapter from 938 * Clear "initialization complete" bit to move adapter from
938 * D0A* (powered-up Active) --> D0U* (Uninitialized) state. 939 * D0A* (powered-up Active) --> D0U* (Uninitialized) state.
939 */ 940 */
940 iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); 941 iwl_clear_bit(bus(priv), CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
941} 942}
942 943
943 944
@@ -957,45 +958,45 @@ int iwl_apm_init(struct iwl_priv *priv)
957 */ 958 */
958 959
959 /* Disable L0S exit timer (platform NMI Work/Around) */ 960 /* Disable L0S exit timer (platform NMI Work/Around) */
960 iwl_set_bit(priv, CSR_GIO_CHICKEN_BITS, 961 iwl_set_bit(bus(priv), CSR_GIO_CHICKEN_BITS,
961 CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER); 962 CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER);
962 963
963 /* 964 /*
964 * Disable L0s without affecting L1; 965 * Disable L0s without affecting L1;
965 * don't wait for ICH L0s (ICH bug W/A) 966 * don't wait for ICH L0s (ICH bug W/A)
966 */ 967 */
967 iwl_set_bit(priv, CSR_GIO_CHICKEN_BITS, 968 iwl_set_bit(bus(priv), CSR_GIO_CHICKEN_BITS,
968 CSR_GIO_CHICKEN_BITS_REG_BIT_L1A_NO_L0S_RX); 969 CSR_GIO_CHICKEN_BITS_REG_BIT_L1A_NO_L0S_RX);
969 970
970 /* Set FH wait threshold to maximum (HW error during stress W/A) */ 971 /* Set FH wait threshold to maximum (HW error during stress W/A) */
971 iwl_set_bit(priv, CSR_DBG_HPET_MEM_REG, CSR_DBG_HPET_MEM_REG_VAL); 972 iwl_set_bit(bus(priv), CSR_DBG_HPET_MEM_REG, CSR_DBG_HPET_MEM_REG_VAL);
972 973
973 /* 974 /*
974 * Enable HAP INTA (interrupt from management bus) to 975 * Enable HAP INTA (interrupt from management bus) to
975 * wake device's PCI Express link L1a -> L0s 976 * wake device's PCI Express link L1a -> L0s
976 */ 977 */
977 iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, 978 iwl_set_bit(bus(priv), CSR_HW_IF_CONFIG_REG,
978 CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A); 979 CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A);
979 980
980 bus_apm_config(priv->bus); 981 bus_apm_config(priv->bus);
981 982
982 /* Configure analog phase-lock-loop before activating to D0A */ 983 /* Configure analog phase-lock-loop before activating to D0A */
983 if (priv->cfg->base_params->pll_cfg_val) 984 if (priv->cfg->base_params->pll_cfg_val)
984 iwl_set_bit(priv, CSR_ANA_PLL_CFG, 985 iwl_set_bit(bus(priv), CSR_ANA_PLL_CFG,
985 priv->cfg->base_params->pll_cfg_val); 986 priv->cfg->base_params->pll_cfg_val);
986 987
987 /* 988 /*
988 * Set "initialization complete" bit to move adapter from 989 * Set "initialization complete" bit to move adapter from
989 * D0U* --> D0A* (powered-up active) state. 990 * D0U* --> D0A* (powered-up active) state.
990 */ 991 */
991 iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); 992 iwl_set_bit(bus(priv), CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
992 993
993 /* 994 /*
994 * Wait for clock stabilization; once stabilized, access to 995 * Wait for clock stabilization; once stabilized, access to
995 * device-internal resources is supported, e.g. iwl_write_prph() 996 * device-internal resources is supported, e.g. iwl_write_prph()
996 * and accesses to uCode SRAM. 997 * and accesses to uCode SRAM.
997 */ 998 */
998 ret = iwl_poll_bit(priv, CSR_GP_CNTRL, 999 ret = iwl_poll_bit(bus(priv), CSR_GP_CNTRL,
999 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 1000 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY,
1000 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); 1001 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
1001 if (ret < 0) { 1002 if (ret < 0) {
@@ -1010,11 +1011,11 @@ int iwl_apm_init(struct iwl_priv *priv)
1010 * do not disable clocks. This preserves any hardware bits already 1011 * do not disable clocks. This preserves any hardware bits already
1011 * set by default in "CLK_CTRL_REG" after reset. 1012 * set by default in "CLK_CTRL_REG" after reset.
1012 */ 1013 */
1013 iwl_write_prph(priv, APMG_CLK_EN_REG, APMG_CLK_VAL_DMA_CLK_RQT); 1014 iwl_write_prph(bus(priv), APMG_CLK_EN_REG, APMG_CLK_VAL_DMA_CLK_RQT);
1014 udelay(20); 1015 udelay(20);
1015 1016
1016 /* Disable L1-Active */ 1017 /* Disable L1-Active */
1017 iwl_set_bits_prph(priv, APMG_PCIDEV_STT_REG, 1018 iwl_set_bits_prph(bus(priv), APMG_PCIDEV_STT_REG,
1018 APMG_PCIDEV_STT_VAL_L1_ACT_DIS); 1019 APMG_PCIDEV_STT_VAL_L1_ACT_DIS);
1019 1020
1020 set_bit(STATUS_DEVICE_ENABLED, &priv->shrd->status); 1021 set_bit(STATUS_DEVICE_ENABLED, &priv->shrd->status);