diff options
author | Ben Cahill <ben.m.cahill@intel.com> | 2007-11-28 22:09:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:05:21 -0500 |
commit | 1fea8e8838d009545d94588ac41037d8f20f969d (patch) | |
tree | 576fbe812e443171701f8633fd44a630d4a4aa27 /drivers/net/wireless/iwlwifi/iwl-3945-hw.h | |
parent | f7d09d7c453f197d802c50172b27170a43e1a816 (diff) |
iwlwifi: Partially clean-up, add comments to iwl-*-hw.h
Partially clean-up, add comments to iwl-XXXX-hw.h
Signed-off-by: Ben Cahill <ben.m.cahill@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/iwl-3945-hw.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-hw.h | 66 |
1 files changed, 46 insertions, 20 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h b/drivers/net/wireless/iwlwifi/iwl-3945-hw.h index 2c9f884be032..97bffb1a029b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-hw.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945-hw.h | |||
@@ -64,10 +64,11 @@ | |||
64 | #ifndef __iwl_3945_hw__ | 64 | #ifndef __iwl_3945_hw__ |
65 | #define __iwl_3945_hw__ | 65 | #define __iwl_3945_hw__ |
66 | 66 | ||
67 | /* uCode queue management definitions */ | 67 | /* |
68 | * uCode queue management definitions ... | ||
69 | * Queue #4 is the command queue for 3945 and 4965. | ||
70 | */ | ||
68 | #define IWL_CMD_QUEUE_NUM 4 | 71 | #define IWL_CMD_QUEUE_NUM 4 |
69 | #define IWL_CMD_FIFO_NUM 4 | ||
70 | #define IWL_BACK_QUEUE_FIRST_ID 7 | ||
71 | 72 | ||
72 | /* Tx rates */ | 73 | /* Tx rates */ |
73 | #define IWL_CCK_RATES 4 | 74 | #define IWL_CCK_RATES 4 |
@@ -314,7 +315,6 @@ struct iwl3945_eeprom { | |||
314 | 315 | ||
315 | u8 reserved9[194]; | 316 | u8 reserved9[194]; |
316 | 317 | ||
317 | |||
318 | /* | 318 | /* |
319 | * 3945 Txpower calibration data. | 319 | * 3945 Txpower calibration data. |
320 | */ | 320 | */ |
@@ -355,7 +355,18 @@ struct iwl3945_eeprom { | |||
355 | #define CSR_GPIO_IN (CSR_BASE+0x018) /* read external chip pins */ | 355 | #define CSR_GPIO_IN (CSR_BASE+0x018) /* read external chip pins */ |
356 | #define CSR_RESET (CSR_BASE+0x020) /* busmaster enable, NMI, etc*/ | 356 | #define CSR_RESET (CSR_BASE+0x020) /* busmaster enable, NMI, etc*/ |
357 | #define CSR_GP_CNTRL (CSR_BASE+0x024) | 357 | #define CSR_GP_CNTRL (CSR_BASE+0x024) |
358 | |||
359 | /* | ||
360 | * Hardware revision info | ||
361 | * Bit fields: | ||
362 | * 31-8: Reserved | ||
363 | * 7-4: Type of device: 0x0 = 4965, 0xd = 3945 | ||
364 | * 3-2: Revision step: 0 = A, 1 = B, 2 = C, 3 = D | ||
365 | * 1-0: "Dash" value, as in A-1, etc. | ||
366 | */ | ||
358 | #define CSR_HW_REV (CSR_BASE+0x028) | 367 | #define CSR_HW_REV (CSR_BASE+0x028) |
368 | |||
369 | /* EEPROM reads */ | ||
359 | #define CSR_EEPROM_REG (CSR_BASE+0x02c) | 370 | #define CSR_EEPROM_REG (CSR_BASE+0x02c) |
360 | #define CSR_EEPROM_GP (CSR_BASE+0x030) | 371 | #define CSR_EEPROM_GP (CSR_BASE+0x030) |
361 | #define CSR_GP_UCODE (CSR_BASE+0x044) | 372 | #define CSR_GP_UCODE (CSR_BASE+0x044) |
@@ -363,13 +374,13 @@ struct iwl3945_eeprom { | |||
363 | #define CSR_UCODE_DRV_GP1_SET (CSR_BASE+0x058) | 374 | #define CSR_UCODE_DRV_GP1_SET (CSR_BASE+0x058) |
364 | #define CSR_UCODE_DRV_GP1_CLR (CSR_BASE+0x05c) | 375 | #define CSR_UCODE_DRV_GP1_CLR (CSR_BASE+0x05c) |
365 | #define CSR_UCODE_DRV_GP2 (CSR_BASE+0x060) | 376 | #define CSR_UCODE_DRV_GP2 (CSR_BASE+0x060) |
366 | #define CSR_LED_REG (CSR_BASE+0x094) | ||
367 | #define CSR_DRAM_INT_TBL_CTL (CSR_BASE+0x0A0) | ||
368 | #define CSR_GIO_CHICKEN_BITS (CSR_BASE+0x100) | 377 | #define CSR_GIO_CHICKEN_BITS (CSR_BASE+0x100) |
378 | |||
379 | /* Analog phase-lock-loop configuration (3945 only) | ||
380 | * Set bit 24. */ | ||
369 | #define CSR_ANA_PLL_CFG (CSR_BASE+0x20c) | 381 | #define CSR_ANA_PLL_CFG (CSR_BASE+0x20c) |
370 | #define CSR_HW_REV_WA_REG (CSR_BASE+0x22C) | ||
371 | 382 | ||
372 | /* HW I/F configuration */ | 383 | /* Bits for CSR_HW_IF_CONFIG_REG */ |
373 | #define CSR_HW_IF_CONFIG_REG_BIT_ALMAGOR_MB (0x00000100) | 384 | #define CSR_HW_IF_CONFIG_REG_BIT_ALMAGOR_MB (0x00000100) |
374 | #define CSR_HW_IF_CONFIG_REG_BIT_ALMAGOR_MM (0x00000200) | 385 | #define CSR_HW_IF_CONFIG_REG_BIT_ALMAGOR_MM (0x00000200) |
375 | #define CSR_HW_IF_CONFIG_REG_BIT_SKU_MRC (0x00000400) | 386 | #define CSR_HW_IF_CONFIG_REG_BIT_SKU_MRC (0x00000400) |
@@ -468,31 +479,46 @@ struct iwl3945_eeprom { | |||
468 | /* CSR_ANA_PLL_CFG */ | 479 | /* CSR_ANA_PLL_CFG */ |
469 | #define CSR_ANA_PLL_CFG_SH (0x00880300) | 480 | #define CSR_ANA_PLL_CFG_SH (0x00880300) |
470 | 481 | ||
471 | #define CSR_LED_REG_TRUN_ON (0x00000078) | ||
472 | #define CSR_LED_REG_TRUN_OFF (0x00000038) | ||
473 | #define CSR_LED_BSM_CTRL_MSK (0xFFFFFFDF) | ||
474 | |||
475 | /* DRAM_INT_TBL_CTRL */ | ||
476 | #define CSR_DRAM_INT_TBL_CTRL_EN (1<<31) | ||
477 | #define CSR_DRAM_INT_TBL_CTRL_WRAP_CHK (1<<27) | ||
478 | |||
479 | /*=== HBUS (Host-side Bus) ===*/ | 482 | /*=== HBUS (Host-side Bus) ===*/ |
480 | #define HBUS_BASE (0x400) | 483 | #define HBUS_BASE (0x400) |
481 | 484 | ||
485 | /* | ||
486 | * Registers for accessing device's internal SRAM memory (e.g. SCD SRAM | ||
487 | * structures, error log, event log, verifying uCode load). | ||
488 | * First write to address register, then read from or write to data register | ||
489 | * to complete the job. Once the address register is set up, accesses to | ||
490 | * data registers auto-increment the address by one dword. | ||
491 | * Bit usage for address registers (read or write): | ||
492 | * 0-31: memory address within device | ||
493 | */ | ||
482 | #define HBUS_TARG_MEM_RADDR (HBUS_BASE+0x00c) | 494 | #define HBUS_TARG_MEM_RADDR (HBUS_BASE+0x00c) |
483 | #define HBUS_TARG_MEM_WADDR (HBUS_BASE+0x010) | 495 | #define HBUS_TARG_MEM_WADDR (HBUS_BASE+0x010) |
484 | #define HBUS_TARG_MEM_WDAT (HBUS_BASE+0x018) | 496 | #define HBUS_TARG_MEM_WDAT (HBUS_BASE+0x018) |
485 | #define HBUS_TARG_MEM_RDAT (HBUS_BASE+0x01c) | 497 | #define HBUS_TARG_MEM_RDAT (HBUS_BASE+0x01c) |
498 | |||
499 | /* | ||
500 | * Registers for accessing device's internal peripheral registers | ||
501 | * (e.g. SCD, BSM, etc.). First write to address register, | ||
502 | * then read from or write to data register to complete the job. | ||
503 | * Bit usage for address registers (read or write): | ||
504 | * 0-15: register address (offset) within device | ||
505 | * 24-25: (# bytes - 1) to read or write (e.g. 3 for dword) | ||
506 | */ | ||
486 | #define HBUS_TARG_PRPH_WADDR (HBUS_BASE+0x044) | 507 | #define HBUS_TARG_PRPH_WADDR (HBUS_BASE+0x044) |
487 | #define HBUS_TARG_PRPH_RADDR (HBUS_BASE+0x048) | 508 | #define HBUS_TARG_PRPH_RADDR (HBUS_BASE+0x048) |
488 | #define HBUS_TARG_PRPH_WDAT (HBUS_BASE+0x04c) | 509 | #define HBUS_TARG_PRPH_WDAT (HBUS_BASE+0x04c) |
489 | #define HBUS_TARG_PRPH_RDAT (HBUS_BASE+0x050) | 510 | #define HBUS_TARG_PRPH_RDAT (HBUS_BASE+0x050) |
490 | #define HBUS_TARG_WRPTR (HBUS_BASE+0x060) | ||
491 | |||
492 | #define HBUS_TARG_MBX_C (HBUS_BASE+0x030) | ||
493 | 511 | ||
512 | /* | ||
513 | * Per-Tx-queue write pointer (index, really!) (3945 and 4965). | ||
514 | * Indicates index to next TFD that driver will fill (1 past latest filled). | ||
515 | * Bit usage: | ||
516 | * 0-7: queue write index | ||
517 | * 11-8: queue selector | ||
518 | */ | ||
519 | #define HBUS_TARG_WRPTR (HBUS_BASE+0x060) | ||
494 | 520 | ||
495 | /* SCD (Scheduler) */ | 521 | /* SCD (3945 Tx Frame Scheduler) */ |
496 | #define SCD_BASE (CSR_BASE + 0x2E00) | 522 | #define SCD_BASE (CSR_BASE + 0x2E00) |
497 | 523 | ||
498 | #define SCD_MODE_REG (SCD_BASE + 0x000) | 524 | #define SCD_MODE_REG (SCD_BASE + 0x000) |