diff options
author | Abhijeet Kolekar <abhijeet.kolekar@intel.com> | 2008-12-18 21:37:29 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:59:14 -0500 |
commit | 5d49f498a29360592dea4693724fef242278e0d3 (patch) | |
tree | 0bc4b1c3623944a925e414c4858f2279c27d5a92 /drivers/net/wireless/iwlwifi/iwl3945-base.c | |
parent | 4a8a43222db6f04c88def2160a95f978f704b515 (diff) |
iwl3945: use iwl-io.h and delete iwl-3945-io.h
The patch deletes iwl-3945-io.h and uses iwl-io.h functions.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 230 |
1 files changed, 115 insertions, 115 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index f80294e6bd9b..6bbc887449ca 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -1411,7 +1411,7 @@ static void get_eeprom_mac(struct iwl_priv *priv, u8 *mac) | |||
1411 | */ | 1411 | */ |
1412 | static inline int iwl3945_eeprom_acquire_semaphore(struct iwl_priv *priv) | 1412 | static inline int iwl3945_eeprom_acquire_semaphore(struct iwl_priv *priv) |
1413 | { | 1413 | { |
1414 | _iwl3945_clear_bit(priv, CSR_EEPROM_GP, CSR_EEPROM_GP_IF_OWNER_MSK); | 1414 | _iwl_clear_bit(priv, CSR_EEPROM_GP, CSR_EEPROM_GP_IF_OWNER_MSK); |
1415 | return 0; | 1415 | return 0; |
1416 | } | 1416 | } |
1417 | 1417 | ||
@@ -1425,7 +1425,7 @@ static inline int iwl3945_eeprom_acquire_semaphore(struct iwl_priv *priv) | |||
1425 | int iwl3945_eeprom_init(struct iwl_priv *priv) | 1425 | int iwl3945_eeprom_init(struct iwl_priv *priv) |
1426 | { | 1426 | { |
1427 | u16 *e = (u16 *)&priv->eeprom39; | 1427 | u16 *e = (u16 *)&priv->eeprom39; |
1428 | u32 gp = iwl3945_read32(priv, CSR_EEPROM_GP); | 1428 | u32 gp = iwl_read32(priv, CSR_EEPROM_GP); |
1429 | int sz = sizeof(priv->eeprom39); | 1429 | int sz = sizeof(priv->eeprom39); |
1430 | int ret; | 1430 | int ret; |
1431 | u16 addr; | 1431 | u16 addr; |
@@ -1452,10 +1452,10 @@ int iwl3945_eeprom_init(struct iwl_priv *priv) | |||
1452 | for (addr = 0; addr < sz; addr += sizeof(u16)) { | 1452 | for (addr = 0; addr < sz; addr += sizeof(u16)) { |
1453 | u32 r; | 1453 | u32 r; |
1454 | 1454 | ||
1455 | _iwl3945_write32(priv, CSR_EEPROM_REG, | 1455 | _iwl_write32(priv, CSR_EEPROM_REG, |
1456 | CSR_EEPROM_REG_MSK_ADDR & (addr << 1)); | 1456 | CSR_EEPROM_REG_MSK_ADDR & (addr << 1)); |
1457 | _iwl3945_clear_bit(priv, CSR_EEPROM_REG, CSR_EEPROM_REG_BIT_CMD); | 1457 | _iwl_clear_bit(priv, CSR_EEPROM_REG, CSR_EEPROM_REG_BIT_CMD); |
1458 | ret = iwl3945_poll_direct_bit(priv, CSR_EEPROM_REG, | 1458 | ret = iwl_poll_direct_bit(priv, CSR_EEPROM_REG, |
1459 | CSR_EEPROM_REG_READ_VALID_MSK, | 1459 | CSR_EEPROM_REG_READ_VALID_MSK, |
1460 | IWL_EEPROM_ACCESS_TIMEOUT); | 1460 | IWL_EEPROM_ACCESS_TIMEOUT); |
1461 | if (ret < 0) { | 1461 | if (ret < 0) { |
@@ -1463,7 +1463,7 @@ int iwl3945_eeprom_init(struct iwl_priv *priv) | |||
1463 | return ret; | 1463 | return ret; |
1464 | } | 1464 | } |
1465 | 1465 | ||
1466 | r = _iwl3945_read_direct32(priv, CSR_EEPROM_REG); | 1466 | r = _iwl_read_direct32(priv, CSR_EEPROM_REG); |
1467 | e[addr / 2] = le16_to_cpu((__force __le16)(r >> 16)); | 1467 | e[addr / 2] = le16_to_cpu((__force __le16)(r >> 16)); |
1468 | } | 1468 | } |
1469 | 1469 | ||
@@ -2663,7 +2663,7 @@ static void iwl3945_radio_kill_sw(struct iwl_priv *priv, int disable_radio) | |||
2663 | /* FIXME: This is a workaround for AP */ | 2663 | /* FIXME: This is a workaround for AP */ |
2664 | if (priv->iw_mode != NL80211_IFTYPE_AP) { | 2664 | if (priv->iw_mode != NL80211_IFTYPE_AP) { |
2665 | spin_lock_irqsave(&priv->lock, flags); | 2665 | spin_lock_irqsave(&priv->lock, flags); |
2666 | iwl3945_write32(priv, CSR_UCODE_DRV_GP1_SET, | 2666 | iwl_write32(priv, CSR_UCODE_DRV_GP1_SET, |
2667 | CSR_UCODE_SW_BIT_RFKILL); | 2667 | CSR_UCODE_SW_BIT_RFKILL); |
2668 | spin_unlock_irqrestore(&priv->lock, flags); | 2668 | spin_unlock_irqrestore(&priv->lock, flags); |
2669 | iwl3945_send_card_state(priv, CARD_STATE_CMD_DISABLE, 0); | 2669 | iwl3945_send_card_state(priv, CARD_STATE_CMD_DISABLE, 0); |
@@ -2673,7 +2673,7 @@ static void iwl3945_radio_kill_sw(struct iwl_priv *priv, int disable_radio) | |||
2673 | } | 2673 | } |
2674 | 2674 | ||
2675 | spin_lock_irqsave(&priv->lock, flags); | 2675 | spin_lock_irqsave(&priv->lock, flags); |
2676 | iwl3945_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); | 2676 | iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); |
2677 | 2677 | ||
2678 | clear_bit(STATUS_RF_KILL_SW, &priv->status); | 2678 | clear_bit(STATUS_RF_KILL_SW, &priv->status); |
2679 | spin_unlock_irqrestore(&priv->lock, flags); | 2679 | spin_unlock_irqrestore(&priv->lock, flags); |
@@ -2682,9 +2682,9 @@ static void iwl3945_radio_kill_sw(struct iwl_priv *priv, int disable_radio) | |||
2682 | msleep(10); | 2682 | msleep(10); |
2683 | 2683 | ||
2684 | spin_lock_irqsave(&priv->lock, flags); | 2684 | spin_lock_irqsave(&priv->lock, flags); |
2685 | iwl3945_read32(priv, CSR_UCODE_DRV_GP1); | 2685 | iwl_read32(priv, CSR_UCODE_DRV_GP1); |
2686 | if (!iwl3945_grab_nic_access(priv)) | 2686 | if (!iwl_grab_nic_access(priv)) |
2687 | iwl3945_release_nic_access(priv); | 2687 | iwl_release_nic_access(priv); |
2688 | spin_unlock_irqrestore(&priv->lock, flags); | 2688 | spin_unlock_irqrestore(&priv->lock, flags); |
2689 | 2689 | ||
2690 | if (test_bit(STATUS_RF_KILL_HW, &priv->status)) { | 2690 | if (test_bit(STATUS_RF_KILL_HW, &priv->status)) { |
@@ -3151,7 +3151,7 @@ static void iwl3945_rx_card_state_notif(struct iwl_priv *priv, | |||
3151 | (flags & HW_CARD_DISABLED) ? "Kill" : "On", | 3151 | (flags & HW_CARD_DISABLED) ? "Kill" : "On", |
3152 | (flags & SW_CARD_DISABLED) ? "Kill" : "On"); | 3152 | (flags & SW_CARD_DISABLED) ? "Kill" : "On"); |
3153 | 3153 | ||
3154 | iwl3945_write32(priv, CSR_UCODE_DRV_GP1_SET, | 3154 | iwl_write32(priv, CSR_UCODE_DRV_GP1_SET, |
3155 | CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); | 3155 | CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); |
3156 | 3156 | ||
3157 | if (flags & HW_CARD_DISABLED) | 3157 | if (flags & HW_CARD_DISABLED) |
@@ -3386,27 +3386,27 @@ int iwl3945_rx_queue_update_write_ptr(struct iwl_priv *priv, struct iwl_rx_queue | |||
3386 | 3386 | ||
3387 | /* If power-saving is in use, make sure device is awake */ | 3387 | /* If power-saving is in use, make sure device is awake */ |
3388 | if (test_bit(STATUS_POWER_PMI, &priv->status)) { | 3388 | if (test_bit(STATUS_POWER_PMI, &priv->status)) { |
3389 | reg = iwl3945_read32(priv, CSR_UCODE_DRV_GP1); | 3389 | reg = iwl_read32(priv, CSR_UCODE_DRV_GP1); |
3390 | 3390 | ||
3391 | if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { | 3391 | if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { |
3392 | iwl3945_set_bit(priv, CSR_GP_CNTRL, | 3392 | iwl_set_bit(priv, CSR_GP_CNTRL, |
3393 | CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); | 3393 | CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); |
3394 | goto exit_unlock; | 3394 | goto exit_unlock; |
3395 | } | 3395 | } |
3396 | 3396 | ||
3397 | rc = iwl3945_grab_nic_access(priv); | 3397 | rc = iwl_grab_nic_access(priv); |
3398 | if (rc) | 3398 | if (rc) |
3399 | goto exit_unlock; | 3399 | goto exit_unlock; |
3400 | 3400 | ||
3401 | /* Device expects a multiple of 8 */ | 3401 | /* Device expects a multiple of 8 */ |
3402 | iwl3945_write_direct32(priv, FH39_RSCSR_CHNL0_WPTR, | 3402 | iwl_write_direct32(priv, FH39_RSCSR_CHNL0_WPTR, |
3403 | q->write & ~0x7); | 3403 | q->write & ~0x7); |
3404 | iwl3945_release_nic_access(priv); | 3404 | iwl_release_nic_access(priv); |
3405 | 3405 | ||
3406 | /* Else device is assumed to be awake */ | 3406 | /* Else device is assumed to be awake */ |
3407 | } else | 3407 | } else |
3408 | /* Device expects a multiple of 8 */ | 3408 | /* Device expects a multiple of 8 */ |
3409 | iwl3945_write32(priv, FH39_RSCSR_CHNL0_WPTR, q->write & ~0x7); | 3409 | iwl_write32(priv, FH39_RSCSR_CHNL0_WPTR, q->write & ~0x7); |
3410 | 3410 | ||
3411 | 3411 | ||
3412 | q->need_update = 0; | 3412 | q->need_update = 0; |
@@ -3843,27 +3843,27 @@ static int iwl3945_tx_queue_update_write_ptr(struct iwl_priv *priv, | |||
3843 | /* wake up nic if it's powered down ... | 3843 | /* wake up nic if it's powered down ... |
3844 | * uCode will wake up, and interrupt us again, so next | 3844 | * uCode will wake up, and interrupt us again, so next |
3845 | * time we'll skip this part. */ | 3845 | * time we'll skip this part. */ |
3846 | reg = iwl3945_read32(priv, CSR_UCODE_DRV_GP1); | 3846 | reg = iwl_read32(priv, CSR_UCODE_DRV_GP1); |
3847 | 3847 | ||
3848 | if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { | 3848 | if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { |
3849 | IWL_DEBUG_INFO("Requesting wakeup, GP1 = 0x%x\n", reg); | 3849 | IWL_DEBUG_INFO("Requesting wakeup, GP1 = 0x%x\n", reg); |
3850 | iwl3945_set_bit(priv, CSR_GP_CNTRL, | 3850 | iwl_set_bit(priv, CSR_GP_CNTRL, |
3851 | CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); | 3851 | CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); |
3852 | return rc; | 3852 | return rc; |
3853 | } | 3853 | } |
3854 | 3854 | ||
3855 | /* restore this queue's parameters in nic hardware. */ | 3855 | /* restore this queue's parameters in nic hardware. */ |
3856 | rc = iwl3945_grab_nic_access(priv); | 3856 | rc = iwl_grab_nic_access(priv); |
3857 | if (rc) | 3857 | if (rc) |
3858 | return rc; | 3858 | return rc; |
3859 | iwl3945_write_direct32(priv, HBUS_TARG_WRPTR, | 3859 | iwl_write_direct32(priv, HBUS_TARG_WRPTR, |
3860 | txq->q.write_ptr | (txq_id << 8)); | 3860 | txq->q.write_ptr | (txq_id << 8)); |
3861 | iwl3945_release_nic_access(priv); | 3861 | iwl_release_nic_access(priv); |
3862 | 3862 | ||
3863 | /* else not in power-save mode, uCode will never sleep when we're | 3863 | /* else not in power-save mode, uCode will never sleep when we're |
3864 | * trying to tx (during RFKILL, we're not trying to tx). */ | 3864 | * trying to tx (during RFKILL, we're not trying to tx). */ |
3865 | } else | 3865 | } else |
3866 | iwl3945_write32(priv, HBUS_TARG_WRPTR, | 3866 | iwl_write32(priv, HBUS_TARG_WRPTR, |
3867 | txq->q.write_ptr | (txq_id << 8)); | 3867 | txq->q.write_ptr | (txq_id << 8)); |
3868 | 3868 | ||
3869 | txq->need_update = 0; | 3869 | txq->need_update = 0; |
@@ -3895,7 +3895,7 @@ static void iwl3945_enable_interrupts(struct iwl_priv *priv) | |||
3895 | { | 3895 | { |
3896 | IWL_DEBUG_ISR("Enabling interrupts\n"); | 3896 | IWL_DEBUG_ISR("Enabling interrupts\n"); |
3897 | set_bit(STATUS_INT_ENABLED, &priv->status); | 3897 | set_bit(STATUS_INT_ENABLED, &priv->status); |
3898 | iwl3945_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK); | 3898 | iwl_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK); |
3899 | } | 3899 | } |
3900 | 3900 | ||
3901 | 3901 | ||
@@ -3913,12 +3913,12 @@ static inline void iwl3945_disable_interrupts(struct iwl_priv *priv) | |||
3913 | clear_bit(STATUS_INT_ENABLED, &priv->status); | 3913 | clear_bit(STATUS_INT_ENABLED, &priv->status); |
3914 | 3914 | ||
3915 | /* disable interrupts from uCode/NIC to host */ | 3915 | /* disable interrupts from uCode/NIC to host */ |
3916 | iwl3945_write32(priv, CSR_INT_MASK, 0x00000000); | 3916 | iwl_write32(priv, CSR_INT_MASK, 0x00000000); |
3917 | 3917 | ||
3918 | /* acknowledge/clear/reset any interrupts still pending | 3918 | /* acknowledge/clear/reset any interrupts still pending |
3919 | * from uCode or flow handler (Rx/Tx DMA) */ | 3919 | * from uCode or flow handler (Rx/Tx DMA) */ |
3920 | iwl3945_write32(priv, CSR_INT, 0xffffffff); | 3920 | iwl_write32(priv, CSR_INT, 0xffffffff); |
3921 | iwl3945_write32(priv, CSR_FH_INT_STATUS, 0xffffffff); | 3921 | iwl_write32(priv, CSR_FH_INT_STATUS, 0xffffffff); |
3922 | IWL_DEBUG_ISR("Disabled interrupts\n"); | 3922 | IWL_DEBUG_ISR("Disabled interrupts\n"); |
3923 | } | 3923 | } |
3924 | 3924 | ||
@@ -3959,13 +3959,13 @@ static void iwl3945_dump_nic_error_log(struct iwl_priv *priv) | |||
3959 | return; | 3959 | return; |
3960 | } | 3960 | } |
3961 | 3961 | ||
3962 | rc = iwl3945_grab_nic_access(priv); | 3962 | rc = iwl_grab_nic_access(priv); |
3963 | if (rc) { | 3963 | if (rc) { |
3964 | IWL_WARNING("Can not read from adapter at this time.\n"); | 3964 | IWL_WARNING("Can not read from adapter at this time.\n"); |
3965 | return; | 3965 | return; |
3966 | } | 3966 | } |
3967 | 3967 | ||
3968 | count = iwl3945_read_targ_mem(priv, base); | 3968 | count = iwl_read_targ_mem(priv, base); |
3969 | 3969 | ||
3970 | if (ERROR_START_OFFSET <= count * ERROR_ELEM_SIZE) { | 3970 | if (ERROR_START_OFFSET <= count * ERROR_ELEM_SIZE) { |
3971 | IWL_ERROR("Start IWL Error Log Dump:\n"); | 3971 | IWL_ERROR("Start IWL Error Log Dump:\n"); |
@@ -3977,19 +3977,19 @@ static void iwl3945_dump_nic_error_log(struct iwl_priv *priv) | |||
3977 | for (i = ERROR_START_OFFSET; | 3977 | for (i = ERROR_START_OFFSET; |
3978 | i < (count * ERROR_ELEM_SIZE) + ERROR_START_OFFSET; | 3978 | i < (count * ERROR_ELEM_SIZE) + ERROR_START_OFFSET; |
3979 | i += ERROR_ELEM_SIZE) { | 3979 | i += ERROR_ELEM_SIZE) { |
3980 | desc = iwl3945_read_targ_mem(priv, base + i); | 3980 | desc = iwl_read_targ_mem(priv, base + i); |
3981 | time = | 3981 | time = |
3982 | iwl3945_read_targ_mem(priv, base + i + 1 * sizeof(u32)); | 3982 | iwl_read_targ_mem(priv, base + i + 1 * sizeof(u32)); |
3983 | blink1 = | 3983 | blink1 = |
3984 | iwl3945_read_targ_mem(priv, base + i + 2 * sizeof(u32)); | 3984 | iwl_read_targ_mem(priv, base + i + 2 * sizeof(u32)); |
3985 | blink2 = | 3985 | blink2 = |
3986 | iwl3945_read_targ_mem(priv, base + i + 3 * sizeof(u32)); | 3986 | iwl_read_targ_mem(priv, base + i + 3 * sizeof(u32)); |
3987 | ilink1 = | 3987 | ilink1 = |
3988 | iwl3945_read_targ_mem(priv, base + i + 4 * sizeof(u32)); | 3988 | iwl_read_targ_mem(priv, base + i + 4 * sizeof(u32)); |
3989 | ilink2 = | 3989 | ilink2 = |
3990 | iwl3945_read_targ_mem(priv, base + i + 5 * sizeof(u32)); | 3990 | iwl_read_targ_mem(priv, base + i + 5 * sizeof(u32)); |
3991 | data1 = | 3991 | data1 = |
3992 | iwl3945_read_targ_mem(priv, base + i + 6 * sizeof(u32)); | 3992 | iwl_read_targ_mem(priv, base + i + 6 * sizeof(u32)); |
3993 | 3993 | ||
3994 | IWL_ERROR | 3994 | IWL_ERROR |
3995 | ("%-13s (#%d) %010u 0x%05X 0x%05X 0x%05X 0x%05X %u\n\n", | 3995 | ("%-13s (#%d) %010u 0x%05X 0x%05X 0x%05X 0x%05X %u\n\n", |
@@ -3997,7 +3997,7 @@ static void iwl3945_dump_nic_error_log(struct iwl_priv *priv) | |||
3997 | ilink1, ilink2, data1); | 3997 | ilink1, ilink2, data1); |
3998 | } | 3998 | } |
3999 | 3999 | ||
4000 | iwl3945_release_nic_access(priv); | 4000 | iwl_release_nic_access(priv); |
4001 | 4001 | ||
4002 | } | 4002 | } |
4003 | 4003 | ||
@@ -4006,7 +4006,7 @@ static void iwl3945_dump_nic_error_log(struct iwl_priv *priv) | |||
4006 | /** | 4006 | /** |
4007 | * iwl3945_print_event_log - Dump error event log to syslog | 4007 | * iwl3945_print_event_log - Dump error event log to syslog |
4008 | * | 4008 | * |
4009 | * NOTE: Must be called with iwl3945_grab_nic_access() already obtained! | 4009 | * NOTE: Must be called with iwl_grab_nic_access() already obtained! |
4010 | */ | 4010 | */ |
4011 | static void iwl3945_print_event_log(struct iwl_priv *priv, u32 start_idx, | 4011 | static void iwl3945_print_event_log(struct iwl_priv *priv, u32 start_idx, |
4012 | u32 num_events, u32 mode) | 4012 | u32 num_events, u32 mode) |
@@ -4032,14 +4032,14 @@ static void iwl3945_print_event_log(struct iwl_priv *priv, u32 start_idx, | |||
4032 | /* "time" is actually "data" for mode 0 (no timestamp). | 4032 | /* "time" is actually "data" for mode 0 (no timestamp). |
4033 | * place event id # at far right for easier visual parsing. */ | 4033 | * place event id # at far right for easier visual parsing. */ |
4034 | for (i = 0; i < num_events; i++) { | 4034 | for (i = 0; i < num_events; i++) { |
4035 | ev = iwl3945_read_targ_mem(priv, ptr); | 4035 | ev = iwl_read_targ_mem(priv, ptr); |
4036 | ptr += sizeof(u32); | 4036 | ptr += sizeof(u32); |
4037 | time = iwl3945_read_targ_mem(priv, ptr); | 4037 | time = iwl_read_targ_mem(priv, ptr); |
4038 | ptr += sizeof(u32); | 4038 | ptr += sizeof(u32); |
4039 | if (mode == 0) | 4039 | if (mode == 0) |
4040 | IWL_ERROR("0x%08x\t%04u\n", time, ev); /* data, ev */ | 4040 | IWL_ERROR("0x%08x\t%04u\n", time, ev); /* data, ev */ |
4041 | else { | 4041 | else { |
4042 | data = iwl3945_read_targ_mem(priv, ptr); | 4042 | data = iwl_read_targ_mem(priv, ptr); |
4043 | ptr += sizeof(u32); | 4043 | ptr += sizeof(u32); |
4044 | IWL_ERROR("%010u\t0x%08x\t%04u\n", time, data, ev); | 4044 | IWL_ERROR("%010u\t0x%08x\t%04u\n", time, data, ev); |
4045 | } | 4045 | } |
@@ -4062,24 +4062,24 @@ static void iwl3945_dump_nic_event_log(struct iwl_priv *priv) | |||
4062 | return; | 4062 | return; |
4063 | } | 4063 | } |
4064 | 4064 | ||
4065 | rc = iwl3945_grab_nic_access(priv); | 4065 | rc = iwl_grab_nic_access(priv); |
4066 | if (rc) { | 4066 | if (rc) { |
4067 | IWL_WARNING("Can not read from adapter at this time.\n"); | 4067 | IWL_WARNING("Can not read from adapter at this time.\n"); |
4068 | return; | 4068 | return; |
4069 | } | 4069 | } |
4070 | 4070 | ||
4071 | /* event log header */ | 4071 | /* event log header */ |
4072 | capacity = iwl3945_read_targ_mem(priv, base); | 4072 | capacity = iwl_read_targ_mem(priv, base); |
4073 | mode = iwl3945_read_targ_mem(priv, base + (1 * sizeof(u32))); | 4073 | mode = iwl_read_targ_mem(priv, base + (1 * sizeof(u32))); |
4074 | num_wraps = iwl3945_read_targ_mem(priv, base + (2 * sizeof(u32))); | 4074 | num_wraps = iwl_read_targ_mem(priv, base + (2 * sizeof(u32))); |
4075 | next_entry = iwl3945_read_targ_mem(priv, base + (3 * sizeof(u32))); | 4075 | next_entry = iwl_read_targ_mem(priv, base + (3 * sizeof(u32))); |
4076 | 4076 | ||
4077 | size = num_wraps ? capacity : next_entry; | 4077 | size = num_wraps ? capacity : next_entry; |
4078 | 4078 | ||
4079 | /* bail out if nothing in log */ | 4079 | /* bail out if nothing in log */ |
4080 | if (size == 0) { | 4080 | if (size == 0) { |
4081 | IWL_ERROR("Start IWL Event Log Dump: nothing in log\n"); | 4081 | IWL_ERROR("Start IWL Event Log Dump: nothing in log\n"); |
4082 | iwl3945_release_nic_access(priv); | 4082 | iwl_release_nic_access(priv); |
4083 | return; | 4083 | return; |
4084 | } | 4084 | } |
4085 | 4085 | ||
@@ -4095,7 +4095,7 @@ static void iwl3945_dump_nic_event_log(struct iwl_priv *priv) | |||
4095 | /* (then/else) start at top of log */ | 4095 | /* (then/else) start at top of log */ |
4096 | iwl3945_print_event_log(priv, 0, next_entry, mode); | 4096 | iwl3945_print_event_log(priv, 0, next_entry, mode); |
4097 | 4097 | ||
4098 | iwl3945_release_nic_access(priv); | 4098 | iwl_release_nic_access(priv); |
4099 | } | 4099 | } |
4100 | 4100 | ||
4101 | /** | 4101 | /** |
@@ -4167,19 +4167,19 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
4167 | /* Ack/clear/reset pending uCode interrupts. | 4167 | /* Ack/clear/reset pending uCode interrupts. |
4168 | * Note: Some bits in CSR_INT are "OR" of bits in CSR_FH_INT_STATUS, | 4168 | * Note: Some bits in CSR_INT are "OR" of bits in CSR_FH_INT_STATUS, |
4169 | * and will clear only when CSR_FH_INT_STATUS gets cleared. */ | 4169 | * and will clear only when CSR_FH_INT_STATUS gets cleared. */ |
4170 | inta = iwl3945_read32(priv, CSR_INT); | 4170 | inta = iwl_read32(priv, CSR_INT); |
4171 | iwl3945_write32(priv, CSR_INT, inta); | 4171 | iwl_write32(priv, CSR_INT, inta); |
4172 | 4172 | ||
4173 | /* Ack/clear/reset pending flow-handler (DMA) interrupts. | 4173 | /* Ack/clear/reset pending flow-handler (DMA) interrupts. |
4174 | * Any new interrupts that happen after this, either while we're | 4174 | * Any new interrupts that happen after this, either while we're |
4175 | * in this tasklet, or later, will show up in next ISR/tasklet. */ | 4175 | * in this tasklet, or later, will show up in next ISR/tasklet. */ |
4176 | inta_fh = iwl3945_read32(priv, CSR_FH_INT_STATUS); | 4176 | inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); |
4177 | iwl3945_write32(priv, CSR_FH_INT_STATUS, inta_fh); | 4177 | iwl_write32(priv, CSR_FH_INT_STATUS, inta_fh); |
4178 | 4178 | ||
4179 | #ifdef CONFIG_IWL3945_DEBUG | 4179 | #ifdef CONFIG_IWL3945_DEBUG |
4180 | if (priv->debug_level & IWL_DL_ISR) { | 4180 | if (priv->debug_level & IWL_DL_ISR) { |
4181 | /* just for debug */ | 4181 | /* just for debug */ |
4182 | inta_mask = iwl3945_read32(priv, CSR_INT_MASK); | 4182 | inta_mask = iwl_read32(priv, CSR_INT_MASK); |
4183 | IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", | 4183 | IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", |
4184 | inta, inta_mask, inta_fh); | 4184 | inta, inta_mask, inta_fh); |
4185 | } | 4185 | } |
@@ -4258,11 +4258,11 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
4258 | if (inta & CSR_INT_BIT_FH_TX) { | 4258 | if (inta & CSR_INT_BIT_FH_TX) { |
4259 | IWL_DEBUG_ISR("Tx interrupt\n"); | 4259 | IWL_DEBUG_ISR("Tx interrupt\n"); |
4260 | 4260 | ||
4261 | iwl3945_write32(priv, CSR_FH_INT_STATUS, (1 << 6)); | 4261 | iwl_write32(priv, CSR_FH_INT_STATUS, (1 << 6)); |
4262 | if (!iwl3945_grab_nic_access(priv)) { | 4262 | if (!iwl_grab_nic_access(priv)) { |
4263 | iwl3945_write_direct32(priv, FH39_TCSR_CREDIT | 4263 | iwl_write_direct32(priv, FH39_TCSR_CREDIT |
4264 | (FH39_SRVC_CHNL), 0x0); | 4264 | (FH39_SRVC_CHNL), 0x0); |
4265 | iwl3945_release_nic_access(priv); | 4265 | iwl_release_nic_access(priv); |
4266 | } | 4266 | } |
4267 | handled |= CSR_INT_BIT_FH_TX; | 4267 | handled |= CSR_INT_BIT_FH_TX; |
4268 | } | 4268 | } |
@@ -4283,9 +4283,9 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
4283 | 4283 | ||
4284 | #ifdef CONFIG_IWL3945_DEBUG | 4284 | #ifdef CONFIG_IWL3945_DEBUG |
4285 | if (priv->debug_level & (IWL_DL_ISR)) { | 4285 | if (priv->debug_level & (IWL_DL_ISR)) { |
4286 | inta = iwl3945_read32(priv, CSR_INT); | 4286 | inta = iwl_read32(priv, CSR_INT); |
4287 | inta_mask = iwl3945_read32(priv, CSR_INT_MASK); | 4287 | inta_mask = iwl_read32(priv, CSR_INT_MASK); |
4288 | inta_fh = iwl3945_read32(priv, CSR_FH_INT_STATUS); | 4288 | inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); |
4289 | IWL_DEBUG_ISR("End inta 0x%08x, enabled 0x%08x, fh 0x%08x, " | 4289 | IWL_DEBUG_ISR("End inta 0x%08x, enabled 0x%08x, fh 0x%08x, " |
4290 | "flags 0x%08lx\n", inta, inta_mask, inta_fh, flags); | 4290 | "flags 0x%08lx\n", inta, inta_mask, inta_fh, flags); |
4291 | } | 4291 | } |
@@ -4307,12 +4307,12 @@ static irqreturn_t iwl3945_isr(int irq, void *data) | |||
4307 | * back-to-back ISRs and sporadic interrupts from our NIC. | 4307 | * back-to-back ISRs and sporadic interrupts from our NIC. |
4308 | * If we have something to service, the tasklet will re-enable ints. | 4308 | * If we have something to service, the tasklet will re-enable ints. |
4309 | * If we *don't* have something, we'll re-enable before leaving here. */ | 4309 | * If we *don't* have something, we'll re-enable before leaving here. */ |
4310 | inta_mask = iwl3945_read32(priv, CSR_INT_MASK); /* just for debug */ | 4310 | inta_mask = iwl_read32(priv, CSR_INT_MASK); /* just for debug */ |
4311 | iwl3945_write32(priv, CSR_INT_MASK, 0x00000000); | 4311 | iwl_write32(priv, CSR_INT_MASK, 0x00000000); |
4312 | 4312 | ||
4313 | /* Discover which interrupts are active/pending */ | 4313 | /* Discover which interrupts are active/pending */ |
4314 | inta = iwl3945_read32(priv, CSR_INT); | 4314 | inta = iwl_read32(priv, CSR_INT); |
4315 | inta_fh = iwl3945_read32(priv, CSR_FH_INT_STATUS); | 4315 | inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); |
4316 | 4316 | ||
4317 | /* Ignore interrupt if there's nothing in NIC to service. | 4317 | /* Ignore interrupt if there's nothing in NIC to service. |
4318 | * This may be due to IRQ shared with another device, | 4318 | * This may be due to IRQ shared with another device, |
@@ -4937,11 +4937,11 @@ static int iwl3945_verify_inst_full(struct iwl_priv *priv, __le32 *image, u32 le | |||
4937 | 4937 | ||
4938 | IWL_DEBUG_INFO("ucode inst image size is %u\n", len); | 4938 | IWL_DEBUG_INFO("ucode inst image size is %u\n", len); |
4939 | 4939 | ||
4940 | rc = iwl3945_grab_nic_access(priv); | 4940 | rc = iwl_grab_nic_access(priv); |
4941 | if (rc) | 4941 | if (rc) |
4942 | return rc; | 4942 | return rc; |
4943 | 4943 | ||
4944 | iwl3945_write_direct32(priv, HBUS_TARG_MEM_RADDR, | 4944 | iwl_write_direct32(priv, HBUS_TARG_MEM_RADDR, |
4945 | IWL39_RTC_INST_LOWER_BOUND); | 4945 | IWL39_RTC_INST_LOWER_BOUND); |
4946 | 4946 | ||
4947 | errcnt = 0; | 4947 | errcnt = 0; |
@@ -4949,7 +4949,7 @@ static int iwl3945_verify_inst_full(struct iwl_priv *priv, __le32 *image, u32 le | |||
4949 | /* read data comes through single port, auto-incr addr */ | 4949 | /* read data comes through single port, auto-incr addr */ |
4950 | /* NOTE: Use the debugless read so we don't flood kernel log | 4950 | /* NOTE: Use the debugless read so we don't flood kernel log |
4951 | * if IWL_DL_IO is set */ | 4951 | * if IWL_DL_IO is set */ |
4952 | val = _iwl3945_read_direct32(priv, HBUS_TARG_MEM_RDAT); | 4952 | val = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT); |
4953 | if (val != le32_to_cpu(*image)) { | 4953 | if (val != le32_to_cpu(*image)) { |
4954 | IWL_ERROR("uCode INST section is invalid at " | 4954 | IWL_ERROR("uCode INST section is invalid at " |
4955 | "offset 0x%x, is 0x%x, s/b 0x%x\n", | 4955 | "offset 0x%x, is 0x%x, s/b 0x%x\n", |
@@ -4961,7 +4961,7 @@ static int iwl3945_verify_inst_full(struct iwl_priv *priv, __le32 *image, u32 le | |||
4961 | } | 4961 | } |
4962 | } | 4962 | } |
4963 | 4963 | ||
4964 | iwl3945_release_nic_access(priv); | 4964 | iwl_release_nic_access(priv); |
4965 | 4965 | ||
4966 | if (!errcnt) | 4966 | if (!errcnt) |
4967 | IWL_DEBUG_INFO("ucode image in INSTRUCTION memory is good\n"); | 4967 | IWL_DEBUG_INFO("ucode image in INSTRUCTION memory is good\n"); |
@@ -4984,7 +4984,7 @@ static int iwl3945_verify_inst_sparse(struct iwl_priv *priv, __le32 *image, u32 | |||
4984 | 4984 | ||
4985 | IWL_DEBUG_INFO("ucode inst image size is %u\n", len); | 4985 | IWL_DEBUG_INFO("ucode inst image size is %u\n", len); |
4986 | 4986 | ||
4987 | rc = iwl3945_grab_nic_access(priv); | 4987 | rc = iwl_grab_nic_access(priv); |
4988 | if (rc) | 4988 | if (rc) |
4989 | return rc; | 4989 | return rc; |
4990 | 4990 | ||
@@ -4992,9 +4992,9 @@ static int iwl3945_verify_inst_sparse(struct iwl_priv *priv, __le32 *image, u32 | |||
4992 | /* read data comes through single port, auto-incr addr */ | 4992 | /* read data comes through single port, auto-incr addr */ |
4993 | /* NOTE: Use the debugless read so we don't flood kernel log | 4993 | /* NOTE: Use the debugless read so we don't flood kernel log |
4994 | * if IWL_DL_IO is set */ | 4994 | * if IWL_DL_IO is set */ |
4995 | iwl3945_write_direct32(priv, HBUS_TARG_MEM_RADDR, | 4995 | iwl_write_direct32(priv, HBUS_TARG_MEM_RADDR, |
4996 | i + IWL39_RTC_INST_LOWER_BOUND); | 4996 | i + IWL39_RTC_INST_LOWER_BOUND); |
4997 | val = _iwl3945_read_direct32(priv, HBUS_TARG_MEM_RDAT); | 4997 | val = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT); |
4998 | if (val != le32_to_cpu(*image)) { | 4998 | if (val != le32_to_cpu(*image)) { |
4999 | #if 0 /* Enable this if you want to see details */ | 4999 | #if 0 /* Enable this if you want to see details */ |
5000 | IWL_ERROR("uCode INST section is invalid at " | 5000 | IWL_ERROR("uCode INST section is invalid at " |
@@ -5008,7 +5008,7 @@ static int iwl3945_verify_inst_sparse(struct iwl_priv *priv, __le32 *image, u32 | |||
5008 | } | 5008 | } |
5009 | } | 5009 | } |
5010 | 5010 | ||
5011 | iwl3945_release_nic_access(priv); | 5011 | iwl_release_nic_access(priv); |
5012 | 5012 | ||
5013 | return rc; | 5013 | return rc; |
5014 | } | 5014 | } |
@@ -5075,11 +5075,11 @@ static int iwl3945_verify_bsm(struct iwl_priv *priv) | |||
5075 | IWL_DEBUG_INFO("Begin verify bsm\n"); | 5075 | IWL_DEBUG_INFO("Begin verify bsm\n"); |
5076 | 5076 | ||
5077 | /* verify BSM SRAM contents */ | 5077 | /* verify BSM SRAM contents */ |
5078 | val = iwl3945_read_prph(priv, BSM_WR_DWCOUNT_REG); | 5078 | val = iwl_read_prph(priv, BSM_WR_DWCOUNT_REG); |
5079 | for (reg = BSM_SRAM_LOWER_BOUND; | 5079 | for (reg = BSM_SRAM_LOWER_BOUND; |
5080 | reg < BSM_SRAM_LOWER_BOUND + len; | 5080 | reg < BSM_SRAM_LOWER_BOUND + len; |
5081 | reg += sizeof(u32), image++) { | 5081 | reg += sizeof(u32), image++) { |
5082 | val = iwl3945_read_prph(priv, reg); | 5082 | val = iwl_read_prph(priv, reg); |
5083 | if (val != le32_to_cpu(*image)) { | 5083 | if (val != le32_to_cpu(*image)) { |
5084 | IWL_ERROR("BSM uCode verification failed at " | 5084 | IWL_ERROR("BSM uCode verification failed at " |
5085 | "addr 0x%08X+%u (of %u), is 0x%x, s/b 0x%x\n", | 5085 | "addr 0x%08X+%u (of %u), is 0x%x, s/b 0x%x\n", |
@@ -5156,42 +5156,42 @@ static int iwl3945_load_bsm(struct iwl_priv *priv) | |||
5156 | inst_len = priv->ucode_init.len; | 5156 | inst_len = priv->ucode_init.len; |
5157 | data_len = priv->ucode_init_data.len; | 5157 | data_len = priv->ucode_init_data.len; |
5158 | 5158 | ||
5159 | rc = iwl3945_grab_nic_access(priv); | 5159 | rc = iwl_grab_nic_access(priv); |
5160 | if (rc) | 5160 | if (rc) |
5161 | return rc; | 5161 | return rc; |
5162 | 5162 | ||
5163 | iwl3945_write_prph(priv, BSM_DRAM_INST_PTR_REG, pinst); | 5163 | iwl_write_prph(priv, BSM_DRAM_INST_PTR_REG, pinst); |
5164 | iwl3945_write_prph(priv, BSM_DRAM_DATA_PTR_REG, pdata); | 5164 | iwl_write_prph(priv, BSM_DRAM_DATA_PTR_REG, pdata); |
5165 | iwl3945_write_prph(priv, BSM_DRAM_INST_BYTECOUNT_REG, inst_len); | 5165 | iwl_write_prph(priv, BSM_DRAM_INST_BYTECOUNT_REG, inst_len); |
5166 | iwl3945_write_prph(priv, BSM_DRAM_DATA_BYTECOUNT_REG, data_len); | 5166 | iwl_write_prph(priv, BSM_DRAM_DATA_BYTECOUNT_REG, data_len); |
5167 | 5167 | ||
5168 | /* Fill BSM memory with bootstrap instructions */ | 5168 | /* Fill BSM memory with bootstrap instructions */ |
5169 | for (reg_offset = BSM_SRAM_LOWER_BOUND; | 5169 | for (reg_offset = BSM_SRAM_LOWER_BOUND; |
5170 | reg_offset < BSM_SRAM_LOWER_BOUND + len; | 5170 | reg_offset < BSM_SRAM_LOWER_BOUND + len; |
5171 | reg_offset += sizeof(u32), image++) | 5171 | reg_offset += sizeof(u32), image++) |
5172 | _iwl3945_write_prph(priv, reg_offset, | 5172 | _iwl_write_prph(priv, reg_offset, |
5173 | le32_to_cpu(*image)); | 5173 | le32_to_cpu(*image)); |
5174 | 5174 | ||
5175 | rc = iwl3945_verify_bsm(priv); | 5175 | rc = iwl3945_verify_bsm(priv); |
5176 | if (rc) { | 5176 | if (rc) { |
5177 | iwl3945_release_nic_access(priv); | 5177 | iwl_release_nic_access(priv); |
5178 | return rc; | 5178 | return rc; |
5179 | } | 5179 | } |
5180 | 5180 | ||
5181 | /* Tell BSM to copy from BSM SRAM into instruction SRAM, when asked */ | 5181 | /* Tell BSM to copy from BSM SRAM into instruction SRAM, when asked */ |
5182 | iwl3945_write_prph(priv, BSM_WR_MEM_SRC_REG, 0x0); | 5182 | iwl_write_prph(priv, BSM_WR_MEM_SRC_REG, 0x0); |
5183 | iwl3945_write_prph(priv, BSM_WR_MEM_DST_REG, | 5183 | iwl_write_prph(priv, BSM_WR_MEM_DST_REG, |
5184 | IWL39_RTC_INST_LOWER_BOUND); | 5184 | IWL39_RTC_INST_LOWER_BOUND); |
5185 | iwl3945_write_prph(priv, BSM_WR_DWCOUNT_REG, len / sizeof(u32)); | 5185 | iwl_write_prph(priv, BSM_WR_DWCOUNT_REG, len / sizeof(u32)); |
5186 | 5186 | ||
5187 | /* Load bootstrap code into instruction SRAM now, | 5187 | /* Load bootstrap code into instruction SRAM now, |
5188 | * to prepare to load "initialize" uCode */ | 5188 | * to prepare to load "initialize" uCode */ |
5189 | iwl3945_write_prph(priv, BSM_WR_CTRL_REG, | 5189 | iwl_write_prph(priv, BSM_WR_CTRL_REG, |
5190 | BSM_WR_CTRL_REG_BIT_START); | 5190 | BSM_WR_CTRL_REG_BIT_START); |
5191 | 5191 | ||
5192 | /* Wait for load of bootstrap uCode to finish */ | 5192 | /* Wait for load of bootstrap uCode to finish */ |
5193 | for (i = 0; i < 100; i++) { | 5193 | for (i = 0; i < 100; i++) { |
5194 | done = iwl3945_read_prph(priv, BSM_WR_CTRL_REG); | 5194 | done = iwl_read_prph(priv, BSM_WR_CTRL_REG); |
5195 | if (!(done & BSM_WR_CTRL_REG_BIT_START)) | 5195 | if (!(done & BSM_WR_CTRL_REG_BIT_START)) |
5196 | break; | 5196 | break; |
5197 | udelay(10); | 5197 | udelay(10); |
@@ -5205,10 +5205,10 @@ static int iwl3945_load_bsm(struct iwl_priv *priv) | |||
5205 | 5205 | ||
5206 | /* Enable future boot loads whenever power management unit triggers it | 5206 | /* Enable future boot loads whenever power management unit triggers it |
5207 | * (e.g. when powering back up after power-save shutdown) */ | 5207 | * (e.g. when powering back up after power-save shutdown) */ |
5208 | iwl3945_write_prph(priv, BSM_WR_CTRL_REG, | 5208 | iwl_write_prph(priv, BSM_WR_CTRL_REG, |
5209 | BSM_WR_CTRL_REG_BIT_START_EN); | 5209 | BSM_WR_CTRL_REG_BIT_START_EN); |
5210 | 5210 | ||
5211 | iwl3945_release_nic_access(priv); | 5211 | iwl_release_nic_access(priv); |
5212 | 5212 | ||
5213 | return 0; | 5213 | return 0; |
5214 | } | 5214 | } |
@@ -5216,7 +5216,7 @@ static int iwl3945_load_bsm(struct iwl_priv *priv) | |||
5216 | static void iwl3945_nic_start(struct iwl_priv *priv) | 5216 | static void iwl3945_nic_start(struct iwl_priv *priv) |
5217 | { | 5217 | { |
5218 | /* Remove all resets to allow NIC to operate */ | 5218 | /* Remove all resets to allow NIC to operate */ |
5219 | iwl3945_write32(priv, CSR_RESET, 0); | 5219 | iwl_write32(priv, CSR_RESET, 0); |
5220 | } | 5220 | } |
5221 | 5221 | ||
5222 | /** | 5222 | /** |
@@ -5477,24 +5477,24 @@ static int iwl3945_set_ucode_ptrs(struct iwl_priv *priv) | |||
5477 | pdata = priv->ucode_data_backup.p_addr; | 5477 | pdata = priv->ucode_data_backup.p_addr; |
5478 | 5478 | ||
5479 | spin_lock_irqsave(&priv->lock, flags); | 5479 | spin_lock_irqsave(&priv->lock, flags); |
5480 | rc = iwl3945_grab_nic_access(priv); | 5480 | rc = iwl_grab_nic_access(priv); |
5481 | if (rc) { | 5481 | if (rc) { |
5482 | spin_unlock_irqrestore(&priv->lock, flags); | 5482 | spin_unlock_irqrestore(&priv->lock, flags); |
5483 | return rc; | 5483 | return rc; |
5484 | } | 5484 | } |
5485 | 5485 | ||
5486 | /* Tell bootstrap uCode where to find image to load */ | 5486 | /* Tell bootstrap uCode where to find image to load */ |
5487 | iwl3945_write_prph(priv, BSM_DRAM_INST_PTR_REG, pinst); | 5487 | iwl_write_prph(priv, BSM_DRAM_INST_PTR_REG, pinst); |
5488 | iwl3945_write_prph(priv, BSM_DRAM_DATA_PTR_REG, pdata); | 5488 | iwl_write_prph(priv, BSM_DRAM_DATA_PTR_REG, pdata); |
5489 | iwl3945_write_prph(priv, BSM_DRAM_DATA_BYTECOUNT_REG, | 5489 | iwl_write_prph(priv, BSM_DRAM_DATA_BYTECOUNT_REG, |
5490 | priv->ucode_data.len); | 5490 | priv->ucode_data.len); |
5491 | 5491 | ||
5492 | /* Inst byte count must be last to set up, bit 31 signals uCode | 5492 | /* Inst byte count must be last to set up, bit 31 signals uCode |
5493 | * that all new ptr/size info is in place */ | 5493 | * that all new ptr/size info is in place */ |
5494 | iwl3945_write_prph(priv, BSM_DRAM_INST_BYTECOUNT_REG, | 5494 | iwl_write_prph(priv, BSM_DRAM_INST_BYTECOUNT_REG, |
5495 | priv->ucode_code.len | BSM_DRAM_INST_LOAD); | 5495 | priv->ucode_code.len | BSM_DRAM_INST_LOAD); |
5496 | 5496 | ||
5497 | iwl3945_release_nic_access(priv); | 5497 | iwl_release_nic_access(priv); |
5498 | 5498 | ||
5499 | spin_unlock_irqrestore(&priv->lock, flags); | 5499 | spin_unlock_irqrestore(&priv->lock, flags); |
5500 | 5500 | ||
@@ -5583,15 +5583,15 @@ static void iwl3945_alive_start(struct iwl_priv *priv) | |||
5583 | 5583 | ||
5584 | iwl3945_clear_stations_table(priv); | 5584 | iwl3945_clear_stations_table(priv); |
5585 | 5585 | ||
5586 | rc = iwl3945_grab_nic_access(priv); | 5586 | rc = iwl_grab_nic_access(priv); |
5587 | if (rc) { | 5587 | if (rc) { |
5588 | IWL_WARNING("Can not read RFKILL status from adapter\n"); | 5588 | IWL_WARNING("Can not read RFKILL status from adapter\n"); |
5589 | return; | 5589 | return; |
5590 | } | 5590 | } |
5591 | 5591 | ||
5592 | rfkill = iwl3945_read_prph(priv, APMG_RFKILL_REG); | 5592 | rfkill = iwl_read_prph(priv, APMG_RFKILL_REG); |
5593 | IWL_DEBUG_INFO("RFKILL status: 0x%x\n", rfkill); | 5593 | IWL_DEBUG_INFO("RFKILL status: 0x%x\n", rfkill); |
5594 | iwl3945_release_nic_access(priv); | 5594 | iwl_release_nic_access(priv); |
5595 | 5595 | ||
5596 | if (rfkill & 0x1) { | 5596 | if (rfkill & 0x1) { |
5597 | clear_bit(STATUS_RF_KILL_HW, &priv->status); | 5597 | clear_bit(STATUS_RF_KILL_HW, &priv->status); |
@@ -5695,7 +5695,7 @@ static void __iwl3945_down(struct iwl_priv *priv) | |||
5695 | clear_bit(STATUS_EXIT_PENDING, &priv->status); | 5695 | clear_bit(STATUS_EXIT_PENDING, &priv->status); |
5696 | 5696 | ||
5697 | /* stop and reset the on-board processor */ | 5697 | /* stop and reset the on-board processor */ |
5698 | iwl3945_write32(priv, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET); | 5698 | iwl_write32(priv, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET); |
5699 | 5699 | ||
5700 | /* tell the device to stop sending interrupts */ | 5700 | /* tell the device to stop sending interrupts */ |
5701 | spin_lock_irqsave(&priv->lock, flags); | 5701 | spin_lock_irqsave(&priv->lock, flags); |
@@ -5738,24 +5738,24 @@ static void __iwl3945_down(struct iwl_priv *priv) | |||
5738 | STATUS_EXIT_PENDING; | 5738 | STATUS_EXIT_PENDING; |
5739 | 5739 | ||
5740 | spin_lock_irqsave(&priv->lock, flags); | 5740 | spin_lock_irqsave(&priv->lock, flags); |
5741 | iwl3945_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); | 5741 | iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); |
5742 | spin_unlock_irqrestore(&priv->lock, flags); | 5742 | spin_unlock_irqrestore(&priv->lock, flags); |
5743 | 5743 | ||
5744 | iwl3945_hw_txq_ctx_stop(priv); | 5744 | iwl3945_hw_txq_ctx_stop(priv); |
5745 | iwl3945_hw_rxq_stop(priv); | 5745 | iwl3945_hw_rxq_stop(priv); |
5746 | 5746 | ||
5747 | spin_lock_irqsave(&priv->lock, flags); | 5747 | spin_lock_irqsave(&priv->lock, flags); |
5748 | if (!iwl3945_grab_nic_access(priv)) { | 5748 | if (!iwl_grab_nic_access(priv)) { |
5749 | iwl3945_write_prph(priv, APMG_CLK_DIS_REG, | 5749 | iwl_write_prph(priv, APMG_CLK_DIS_REG, |
5750 | APMG_CLK_VAL_DMA_CLK_RQT); | 5750 | APMG_CLK_VAL_DMA_CLK_RQT); |
5751 | iwl3945_release_nic_access(priv); | 5751 | iwl_release_nic_access(priv); |
5752 | } | 5752 | } |
5753 | spin_unlock_irqrestore(&priv->lock, flags); | 5753 | spin_unlock_irqrestore(&priv->lock, flags); |
5754 | 5754 | ||
5755 | udelay(5); | 5755 | udelay(5); |
5756 | 5756 | ||
5757 | iwl3945_hw_nic_stop_master(priv); | 5757 | iwl3945_hw_nic_stop_master(priv); |
5758 | iwl3945_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET); | 5758 | iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET); |
5759 | iwl3945_hw_nic_reset(priv); | 5759 | iwl3945_hw_nic_reset(priv); |
5760 | 5760 | ||
5761 | exit: | 5761 | exit: |
@@ -5801,7 +5801,7 @@ static int __iwl3945_up(struct iwl_priv *priv) | |||
5801 | } | 5801 | } |
5802 | 5802 | ||
5803 | /* If platform's RF_KILL switch is NOT set to KILL */ | 5803 | /* If platform's RF_KILL switch is NOT set to KILL */ |
5804 | if (iwl3945_read32(priv, CSR_GP_CNTRL) & | 5804 | if (iwl_read32(priv, CSR_GP_CNTRL) & |
5805 | CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) | 5805 | CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW) |
5806 | clear_bit(STATUS_RF_KILL_HW, &priv->status); | 5806 | clear_bit(STATUS_RF_KILL_HW, &priv->status); |
5807 | else { | 5807 | else { |
@@ -5812,7 +5812,7 @@ static int __iwl3945_up(struct iwl_priv *priv) | |||
5812 | } | 5812 | } |
5813 | } | 5813 | } |
5814 | 5814 | ||
5815 | iwl3945_write32(priv, CSR_INT, 0xFFFFFFFF); | 5815 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); |
5816 | 5816 | ||
5817 | rc = iwl3945_hw_nic_init(priv); | 5817 | rc = iwl3945_hw_nic_init(priv); |
5818 | if (rc) { | 5818 | if (rc) { |
@@ -5821,17 +5821,17 @@ static int __iwl3945_up(struct iwl_priv *priv) | |||
5821 | } | 5821 | } |
5822 | 5822 | ||
5823 | /* make sure rfkill handshake bits are cleared */ | 5823 | /* make sure rfkill handshake bits are cleared */ |
5824 | iwl3945_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); | 5824 | iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); |
5825 | iwl3945_write32(priv, CSR_UCODE_DRV_GP1_CLR, | 5825 | iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, |
5826 | CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); | 5826 | CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED); |
5827 | 5827 | ||
5828 | /* clear (again), then enable host interrupts */ | 5828 | /* clear (again), then enable host interrupts */ |
5829 | iwl3945_write32(priv, CSR_INT, 0xFFFFFFFF); | 5829 | iwl_write32(priv, CSR_INT, 0xFFFFFFFF); |
5830 | iwl3945_enable_interrupts(priv); | 5830 | iwl3945_enable_interrupts(priv); |
5831 | 5831 | ||
5832 | /* really make sure rfkill handshake bits are cleared */ | 5832 | /* really make sure rfkill handshake bits are cleared */ |
5833 | iwl3945_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); | 5833 | iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); |
5834 | iwl3945_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); | 5834 | iwl_write32(priv, CSR_UCODE_DRV_GP1_CLR, CSR_UCODE_SW_BIT_RFKILL); |
5835 | 5835 | ||
5836 | /* Copy original ucode data image from disk into backup cache. | 5836 | /* Copy original ucode data image from disk into backup cache. |
5837 | * This will be used to initialize the on-board processor's | 5837 | * This will be used to initialize the on-board processor's |
@@ -7819,11 +7819,11 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
7819 | pci_write_config_byte(pdev, 0x41, 0x00); | 7819 | pci_write_config_byte(pdev, 0x41, 0x00); |
7820 | 7820 | ||
7821 | /* nic init */ | 7821 | /* nic init */ |
7822 | iwl3945_set_bit(priv, CSR_GIO_CHICKEN_BITS, | 7822 | iwl_set_bit(priv, CSR_GIO_CHICKEN_BITS, |
7823 | CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER); | 7823 | CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER); |
7824 | 7824 | ||
7825 | iwl3945_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); | 7825 | iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); |
7826 | err = iwl3945_poll_direct_bit(priv, CSR_GP_CNTRL, | 7826 | err = iwl_poll_direct_bit(priv, CSR_GP_CNTRL, |
7827 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); | 7827 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); |
7828 | if (err < 0) { | 7828 | if (err < 0) { |
7829 | IWL_DEBUG_INFO("Failed to init the card\n"); | 7829 | IWL_DEBUG_INFO("Failed to init the card\n"); |