diff options
author | Eilon Greenstein <eilong@broadcom.com> | 2009-02-12 03:36:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-16 02:31:20 -0500 |
commit | 4acac6a53a3c9dfc604a9a8647f16b0242080e93 (patch) | |
tree | d21f2687f4d580f22e0aa018dc9eccaaa56de005 /drivers/net/bnx2x_reg.h | |
parent | 87942b467880fb65381af87a5ff61fdb7ede5eb3 (diff) |
bnx2x: GPIO accessories
A GPIO is used with the 8726 PHY. Adding the GPIO related functions in this
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_reg.h')
-rw-r--r-- | drivers/net/bnx2x_reg.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/net/bnx2x_reg.h b/drivers/net/bnx2x_reg.h index 713b5f9ea1e2..6fc1d0df9789 100644 --- a/drivers/net/bnx2x_reg.h +++ b/drivers/net/bnx2x_reg.h | |||
@@ -1438,6 +1438,29 @@ | |||
1438 | This is the result value of the pin; not the drive value. Writing these | 1438 | This is the result value of the pin; not the drive value. Writing these |
1439 | bits will have not effect. */ | 1439 | bits will have not effect. */ |
1440 | #define MISC_REG_GPIO 0xa490 | 1440 | #define MISC_REG_GPIO 0xa490 |
1441 | /* [RW 8] These bits enable the GPIO_INTs to signals event to the | ||
1442 | IGU/MCP.according to the following map: [0] p0_gpio_0; [1] p0_gpio_1; [2] | ||
1443 | p0_gpio_2; [3] p0_gpio_3; [4] p1_gpio_0; [5] p1_gpio_1; [6] p1_gpio_2; | ||
1444 | [7] p1_gpio_3; */ | ||
1445 | #define MISC_REG_GPIO_EVENT_EN 0xa2bc | ||
1446 | /* [RW 32] GPIO INT. [31-28] OLD_CLR port1; [27-24] OLD_CLR port0; Writing a | ||
1447 | '1' to these bit clears the corresponding bit in the #OLD_VALUE register. | ||
1448 | This will acknowledge an interrupt on the falling edge of corresponding | ||
1449 | GPIO input (reset value 0). [23-16] OLD_SET [23-16] port1; OLD_SET port0; | ||
1450 | Writing a '1' to these bit sets the corresponding bit in the #OLD_VALUE | ||
1451 | register. This will acknowledge an interrupt on the rising edge of | ||
1452 | corresponding SPIO input (reset value 0). [15-12] OLD_VALUE [11-8] port1; | ||
1453 | OLD_VALUE port0; RO; These bits indicate the old value of the GPIO input | ||
1454 | value. When the ~INT_STATE bit is set; this bit indicates the OLD value | ||
1455 | of the pin such that if ~INT_STATE is set and this bit is '0'; then the | ||
1456 | interrupt is due to a low to high edge. If ~INT_STATE is set and this bit | ||
1457 | is '1'; then the interrupt is due to a high to low edge (reset value 0). | ||
1458 | [7-4] INT_STATE port1; [3-0] INT_STATE RO port0; These bits indicate the | ||
1459 | current GPIO interrupt state for each GPIO pin. This bit is cleared when | ||
1460 | the appropriate #OLD_SET or #OLD_CLR command bit is written. This bit is | ||
1461 | set when the GPIO input does not match the current value in #OLD_VALUE | ||
1462 | (reset value 0). */ | ||
1463 | #define MISC_REG_GPIO_INT 0xa494 | ||
1441 | /* [R 28] this field hold the last information that caused reserved | 1464 | /* [R 28] this field hold the last information that caused reserved |
1442 | attention. bits [19:0] - address; [22:20] function; [23] reserved; | 1465 | attention. bits [19:0] - address; [22:20] function; [23] reserved; |
1443 | [27:24] the master that caused the attention - according to the following | 1466 | [27:24] the master that caused the attention - according to the following |
@@ -5162,6 +5185,10 @@ | |||
5162 | #define MISC_REGISTERS_GPIO_FLOAT_POS 24 | 5185 | #define MISC_REGISTERS_GPIO_FLOAT_POS 24 |
5163 | #define MISC_REGISTERS_GPIO_HIGH 1 | 5186 | #define MISC_REGISTERS_GPIO_HIGH 1 |
5164 | #define MISC_REGISTERS_GPIO_INPUT_HI_Z 2 | 5187 | #define MISC_REGISTERS_GPIO_INPUT_HI_Z 2 |
5188 | #define MISC_REGISTERS_GPIO_INT_CLR_POS 24 | ||
5189 | #define MISC_REGISTERS_GPIO_INT_OUTPUT_CLR 0 | ||
5190 | #define MISC_REGISTERS_GPIO_INT_OUTPUT_SET 1 | ||
5191 | #define MISC_REGISTERS_GPIO_INT_SET_POS 16 | ||
5165 | #define MISC_REGISTERS_GPIO_LOW 0 | 5192 | #define MISC_REGISTERS_GPIO_LOW 0 |
5166 | #define MISC_REGISTERS_GPIO_OUTPUT_HIGH 1 | 5193 | #define MISC_REGISTERS_GPIO_OUTPUT_HIGH 1 |
5167 | #define MISC_REGISTERS_GPIO_OUTPUT_LOW 0 | 5194 | #define MISC_REGISTERS_GPIO_OUTPUT_LOW 0 |
@@ -5220,6 +5247,8 @@ | |||
5220 | #define AEU_INPUTS_ATTN_BITS_DMAE_HW_INTERRUPT (1<<11) | 5247 | #define AEU_INPUTS_ATTN_BITS_DMAE_HW_INTERRUPT (1<<11) |
5221 | #define AEU_INPUTS_ATTN_BITS_DOORBELLQ_HW_INTERRUPT (1<<13) | 5248 | #define AEU_INPUTS_ATTN_BITS_DOORBELLQ_HW_INTERRUPT (1<<13) |
5222 | #define AEU_INPUTS_ATTN_BITS_DOORBELLQ_PARITY_ERROR (1<<12) | 5249 | #define AEU_INPUTS_ATTN_BITS_DOORBELLQ_PARITY_ERROR (1<<12) |
5250 | #define AEU_INPUTS_ATTN_BITS_GPIO3_FUNCTION_0 (1<<5) | ||
5251 | #define AEU_INPUTS_ATTN_BITS_GPIO3_FUNCTION_1 (1<<9) | ||
5223 | #define AEU_INPUTS_ATTN_BITS_IGU_PARITY_ERROR (1<<12) | 5252 | #define AEU_INPUTS_ATTN_BITS_IGU_PARITY_ERROR (1<<12) |
5224 | #define AEU_INPUTS_ATTN_BITS_MISC_HW_INTERRUPT (1<<15) | 5253 | #define AEU_INPUTS_ATTN_BITS_MISC_HW_INTERRUPT (1<<15) |
5225 | #define AEU_INPUTS_ATTN_BITS_MISC_PARITY_ERROR (1<<14) | 5254 | #define AEU_INPUTS_ATTN_BITS_MISC_PARITY_ERROR (1<<14) |