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 | |
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')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-hw.h | 66 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965-hw.h | 78 |
2 files changed, 97 insertions, 47 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) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h index f0371ad0a37f..e7bce8239357 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-hw.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965-hw.h | |||
@@ -64,7 +64,12 @@ | |||
64 | #ifndef __iwl_4965_hw_h__ | 64 | #ifndef __iwl_4965_hw_h__ |
65 | #define __iwl_4965_hw_h__ | 65 | #define __iwl_4965_hw_h__ |
66 | 66 | ||
67 | /* uCode queue management definitions */ | 67 | /* |
68 | * uCode queue management definitions ... | ||
69 | * Queue #4 is the command queue for 3945 and 4965; map it to Tx FIFO chnl 4. | ||
70 | * The first queue used for block-ack aggregation is #7 (4965 only). | ||
71 | * All block-ack aggregation queues should map to Tx DMA/FIFO channel 7. | ||
72 | */ | ||
68 | #define IWL_CMD_QUEUE_NUM 4 | 73 | #define IWL_CMD_QUEUE_NUM 4 |
69 | #define IWL_CMD_FIFO_NUM 4 | 74 | #define IWL_CMD_FIFO_NUM 4 |
70 | #define IWL_BACK_QUEUE_FIRST_ID 7 | 75 | #define IWL_BACK_QUEUE_FIRST_ID 7 |
@@ -444,7 +449,20 @@ struct iwl4965_eeprom { | |||
444 | #define CSR_GPIO_IN (CSR_BASE+0x018) /* read external chip pins */ | 449 | #define CSR_GPIO_IN (CSR_BASE+0x018) /* read external chip pins */ |
445 | #define CSR_RESET (CSR_BASE+0x020) /* busmaster enable, NMI, etc*/ | 450 | #define CSR_RESET (CSR_BASE+0x020) /* busmaster enable, NMI, etc*/ |
446 | #define CSR_GP_CNTRL (CSR_BASE+0x024) | 451 | #define CSR_GP_CNTRL (CSR_BASE+0x024) |
452 | |||
453 | /* | ||
454 | * Hardware revision info | ||
455 | * Bit fields: | ||
456 | * 31-8: Reserved | ||
457 | * 7-4: Type of device: 0x0 = 4965, 0xd = 3945 | ||
458 | * 3-2: Revision step: 0 = A, 1 = B, 2 = C, 3 = D | ||
459 | * 1-0: "Dash" value, as in A-1, etc. | ||
460 | * | ||
461 | * NOTE: Revision step affects calculation of CCK txpower for 4965. | ||
462 | */ | ||
447 | #define CSR_HW_REV (CSR_BASE+0x028) | 463 | #define CSR_HW_REV (CSR_BASE+0x028) |
464 | |||
465 | /* EEPROM reads */ | ||
448 | #define CSR_EEPROM_REG (CSR_BASE+0x02c) | 466 | #define CSR_EEPROM_REG (CSR_BASE+0x02c) |
449 | #define CSR_EEPROM_GP (CSR_BASE+0x030) | 467 | #define CSR_EEPROM_GP (CSR_BASE+0x030) |
450 | #define CSR_GP_UCODE (CSR_BASE+0x044) | 468 | #define CSR_GP_UCODE (CSR_BASE+0x044) |
@@ -452,10 +470,13 @@ struct iwl4965_eeprom { | |||
452 | #define CSR_UCODE_DRV_GP1_SET (CSR_BASE+0x058) | 470 | #define CSR_UCODE_DRV_GP1_SET (CSR_BASE+0x058) |
453 | #define CSR_UCODE_DRV_GP1_CLR (CSR_BASE+0x05c) | 471 | #define CSR_UCODE_DRV_GP1_CLR (CSR_BASE+0x05c) |
454 | #define CSR_UCODE_DRV_GP2 (CSR_BASE+0x060) | 472 | #define CSR_UCODE_DRV_GP2 (CSR_BASE+0x060) |
455 | #define CSR_LED_REG (CSR_BASE+0x094) | ||
456 | #define CSR_DRAM_INT_TBL_CTL (CSR_BASE+0x0A0) | ||
457 | #define CSR_GIO_CHICKEN_BITS (CSR_BASE+0x100) | 473 | #define CSR_GIO_CHICKEN_BITS (CSR_BASE+0x100) |
458 | #define CSR_ANA_PLL_CFG (CSR_BASE+0x20c) | 474 | |
475 | /* | ||
476 | * Indicates hardware rev, to determine CCK backoff for txpower calculation. | ||
477 | * Bit fields: | ||
478 | * 3-2: 0 = A, 1 = B, 2 = C, 3 = D step | ||
479 | */ | ||
459 | #define CSR_HW_REV_WA_REG (CSR_BASE+0x22C) | 480 | #define CSR_HW_REV_WA_REG (CSR_BASE+0x22C) |
460 | 481 | ||
461 | /* HW I/F configuration */ | 482 | /* HW I/F configuration */ |
@@ -554,44 +575,47 @@ struct iwl4965_eeprom { | |||
554 | #define CSR_GIO_CHICKEN_BITS_REG_BIT_L1A_NO_L0S_RX (0x00800000) | 575 | #define CSR_GIO_CHICKEN_BITS_REG_BIT_L1A_NO_L0S_RX (0x00800000) |
555 | #define CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER (0x20000000) | 576 | #define CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER (0x20000000) |
556 | 577 | ||
557 | /* CSR_ANA_PLL_CFG */ | ||
558 | #define CSR_ANA_PLL_CFG_SH (0x00880300) | ||
559 | |||
560 | #define CSR_LED_REG_TRUN_ON (0x00000078) | ||
561 | #define CSR_LED_REG_TRUN_OFF (0x00000038) | ||
562 | #define CSR_LED_BSM_CTRL_MSK (0xFFFFFFDF) | ||
563 | |||
564 | /* DRAM_INT_TBL_CTRL */ | ||
565 | #define CSR_DRAM_INT_TBL_CTRL_EN (1<<31) | ||
566 | #define CSR_DRAM_INT_TBL_CTRL_WRAP_CHK (1<<27) | ||
567 | |||
568 | /*=== HBUS (Host-side Bus) ===*/ | 578 | /*=== HBUS (Host-side Bus) ===*/ |
569 | #define HBUS_BASE (0x400) | 579 | #define HBUS_BASE (0x400) |
570 | 580 | ||
581 | /* | ||
582 | * Registers for accessing device's internal SRAM memory (e.g. SCD SRAM | ||
583 | * structures, error log, event log, verifying uCode load). | ||
584 | * First write to address register, then read from or write to data register | ||
585 | * to complete the job. Once the address register is set up, accesses to | ||
586 | * data registers auto-increment the address by one dword. | ||
587 | * Bit usage for address registers (read or write): | ||
588 | * 0-31: memory address within device | ||
589 | */ | ||
571 | #define HBUS_TARG_MEM_RADDR (HBUS_BASE+0x00c) | 590 | #define HBUS_TARG_MEM_RADDR (HBUS_BASE+0x00c) |
572 | #define HBUS_TARG_MEM_WADDR (HBUS_BASE+0x010) | 591 | #define HBUS_TARG_MEM_WADDR (HBUS_BASE+0x010) |
573 | #define HBUS_TARG_MEM_WDAT (HBUS_BASE+0x018) | 592 | #define HBUS_TARG_MEM_WDAT (HBUS_BASE+0x018) |
574 | #define HBUS_TARG_MEM_RDAT (HBUS_BASE+0x01c) | 593 | #define HBUS_TARG_MEM_RDAT (HBUS_BASE+0x01c) |
594 | |||
595 | /* | ||
596 | * Registers for accessing device's internal peripheral registers | ||
597 | * (e.g. SCD, BSM, etc.). First write to address register, | ||
598 | * then read from or write to data register to complete the job. | ||
599 | * Bit usage for address registers (read or write): | ||
600 | * 0-15: register address (offset) within device | ||
601 | * 24-25: (# bytes - 1) to read or write (e.g. 3 for dword) | ||
602 | */ | ||
575 | #define HBUS_TARG_PRPH_WADDR (HBUS_BASE+0x044) | 603 | #define HBUS_TARG_PRPH_WADDR (HBUS_BASE+0x044) |
576 | #define HBUS_TARG_PRPH_RADDR (HBUS_BASE+0x048) | 604 | #define HBUS_TARG_PRPH_RADDR (HBUS_BASE+0x048) |
577 | #define HBUS_TARG_PRPH_WDAT (HBUS_BASE+0x04c) | 605 | #define HBUS_TARG_PRPH_WDAT (HBUS_BASE+0x04c) |
578 | #define HBUS_TARG_PRPH_RDAT (HBUS_BASE+0x050) | 606 | #define HBUS_TARG_PRPH_RDAT (HBUS_BASE+0x050) |
607 | |||
608 | /* | ||
609 | * Per-Tx-queue write pointer (index, really!) (3945 and 4965). | ||
610 | * Indicates index to next TFD that driver will fill (1 past latest filled). | ||
611 | * Bit usage: | ||
612 | * 0-7: queue write index (0-255) | ||
613 | * 11-8: queue selector (0-15) | ||
614 | */ | ||
579 | #define HBUS_TARG_WRPTR (HBUS_BASE+0x060) | 615 | #define HBUS_TARG_WRPTR (HBUS_BASE+0x060) |
580 | 616 | ||
581 | #define HBUS_TARG_MBX_C (HBUS_BASE+0x030) | 617 | #define HBUS_TARG_MBX_C (HBUS_BASE+0x030) |
582 | 618 | ||
583 | |||
584 | /* SCD (Scheduler) */ | ||
585 | #define SCD_BASE (CSR_BASE + 0x2E00) | ||
586 | |||
587 | #define SCD_MODE_REG (SCD_BASE + 0x000) | ||
588 | #define SCD_ARASTAT_REG (SCD_BASE + 0x004) | ||
589 | #define SCD_TXFACT_REG (SCD_BASE + 0x010) | ||
590 | #define SCD_TXF4MF_REG (SCD_BASE + 0x014) | ||
591 | #define SCD_TXF5MF_REG (SCD_BASE + 0x020) | ||
592 | #define SCD_SBYP_MODE_1_REG (SCD_BASE + 0x02C) | ||
593 | #define SCD_SBYP_MODE_2_REG (SCD_BASE + 0x030) | ||
594 | |||
595 | /*=== FH (data Flow Handler) ===*/ | 619 | /*=== FH (data Flow Handler) ===*/ |
596 | #define FH_BASE (0x800) | 620 | #define FH_BASE (0x800) |
597 | 621 | ||