diff options
author | Dave Mitchell <dmitchell@appliedmicro.com> | 2009-10-08 02:32:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-09 01:54:56 -0400 |
commit | 3201fce0b2b12e4dc9e26dcf09bdb0652ff522db (patch) | |
tree | bd3b40f65d9d7222b161bd9b7adf34b78c559d77 | |
parent | efd7d2619f2e5da222ad34fef3e8f47730cd8f2c (diff) |
ibm_newemac: Added 16K Tx FIFO size support for EMAC4
Some of the EMAC V4 implementations support 16K Tx FIFOs. This
patch adds support for this functionality and fixes typos in the
Tx FIFO size error messages.
Signed-off-by: Dave Mitchell <dmitchell@appliedmicro.com>
Acked-by: Prodyut Hazarika <phazarika@appliedmicro.com>
Acked-by: Victor Gallardo <vgallardo@appliedmicro.com>
Acked-by: Loc Ho <lho@appliedmicro.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ibm_newemac/core.c | 7 | ||||
-rw-r--r-- | drivers/net/ibm_newemac/emac.h | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 89c82c5e63e4..c6591cb0aae0 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -443,7 +443,7 @@ static u32 __emac_calc_base_mr1(struct emac_instance *dev, int tx_size, int rx_s | |||
443 | ret |= EMAC_MR1_TFS_2K; | 443 | ret |= EMAC_MR1_TFS_2K; |
444 | break; | 444 | break; |
445 | default: | 445 | default: |
446 | printk(KERN_WARNING "%s: Unknown Rx FIFO size %d\n", | 446 | printk(KERN_WARNING "%s: Unknown Tx FIFO size %d\n", |
447 | dev->ndev->name, tx_size); | 447 | dev->ndev->name, tx_size); |
448 | } | 448 | } |
449 | 449 | ||
@@ -470,6 +470,9 @@ static u32 __emac4_calc_base_mr1(struct emac_instance *dev, int tx_size, int rx_ | |||
470 | DBG2(dev, "__emac4_calc_base_mr1" NL); | 470 | DBG2(dev, "__emac4_calc_base_mr1" NL); |
471 | 471 | ||
472 | switch(tx_size) { | 472 | switch(tx_size) { |
473 | case 16384: | ||
474 | ret |= EMAC4_MR1_TFS_16K; | ||
475 | break; | ||
473 | case 4096: | 476 | case 4096: |
474 | ret |= EMAC4_MR1_TFS_4K; | 477 | ret |= EMAC4_MR1_TFS_4K; |
475 | break; | 478 | break; |
@@ -477,7 +480,7 @@ static u32 __emac4_calc_base_mr1(struct emac_instance *dev, int tx_size, int rx_ | |||
477 | ret |= EMAC4_MR1_TFS_2K; | 480 | ret |= EMAC4_MR1_TFS_2K; |
478 | break; | 481 | break; |
479 | default: | 482 | default: |
480 | printk(KERN_WARNING "%s: Unknown Rx FIFO size %d\n", | 483 | printk(KERN_WARNING "%s: Unknown Tx FIFO size %d\n", |
481 | dev->ndev->name, tx_size); | 484 | dev->ndev->name, tx_size); |
482 | } | 485 | } |
483 | 486 | ||
diff --git a/drivers/net/ibm_newemac/emac.h b/drivers/net/ibm_newemac/emac.h index 0afc2cf5c52b..d34adf99fc6a 100644 --- a/drivers/net/ibm_newemac/emac.h +++ b/drivers/net/ibm_newemac/emac.h | |||
@@ -153,6 +153,7 @@ struct emac_regs { | |||
153 | #define EMAC4_MR1_RFS_16K 0x00280000 | 153 | #define EMAC4_MR1_RFS_16K 0x00280000 |
154 | #define EMAC4_MR1_TFS_2K 0x00020000 | 154 | #define EMAC4_MR1_TFS_2K 0x00020000 |
155 | #define EMAC4_MR1_TFS_4K 0x00030000 | 155 | #define EMAC4_MR1_TFS_4K 0x00030000 |
156 | #define EMAC4_MR1_TFS_16K 0x00050000 | ||
156 | #define EMAC4_MR1_TR 0x00008000 | 157 | #define EMAC4_MR1_TR 0x00008000 |
157 | #define EMAC4_MR1_MWSW_001 0x00001000 | 158 | #define EMAC4_MR1_MWSW_001 0x00001000 |
158 | #define EMAC4_MR1_JPSM 0x00000800 | 159 | #define EMAC4_MR1_JPSM 0x00000800 |