aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/falcon.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-28 00:36:12 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-29 02:58:55 -0500
commit0228f5cdb03f6656247cf2876f9f4f8fc213ffd6 (patch)
treea8541286a79b2172dbf3543796e94d0f395d671f /drivers/net/sfc/falcon.c
parentdaeda6309e1382819a8f8bab548560742ac26cc2 (diff)
sfc: Move descriptor cache base addresses to struct efx_nic_type
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon.c')
-rw-r--r--drivers/net/sfc/falcon.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c
index 7c9c9c935957..539d0223b434 100644
--- a/drivers/net/sfc/falcon.c
+++ b/drivers/net/sfc/falcon.c
@@ -45,11 +45,9 @@
45 */ 45 */
46#define TX_DC_ENTRIES 16 46#define TX_DC_ENTRIES 16
47#define TX_DC_ENTRIES_ORDER 1 47#define TX_DC_ENTRIES_ORDER 1
48#define TX_DC_BASE 0x130000
49 48
50#define RX_DC_ENTRIES 64 49#define RX_DC_ENTRIES 64
51#define RX_DC_ENTRIES_ORDER 3 50#define RX_DC_ENTRIES_ORDER 3
52#define RX_DC_BASE 0x100000
53 51
54static const unsigned int 52static const unsigned int
55/* "Large" EEPROM device: Atmel AT25640 or similar 53/* "Large" EEPROM device: Atmel AT25640 or similar
@@ -3043,9 +3041,11 @@ int falcon_init_nic(struct efx_nic *efx)
3043 return rc; 3041 return rc;
3044 3042
3045 /* Set positions of descriptor caches in SRAM. */ 3043 /* Set positions of descriptor caches in SRAM. */
3046 EFX_POPULATE_OWORD_1(temp, FRF_AZ_SRM_TX_DC_BASE_ADR, TX_DC_BASE / 8); 3044 EFX_POPULATE_OWORD_1(temp, FRF_AZ_SRM_TX_DC_BASE_ADR,
3045 efx->type->tx_dc_base / 8);
3047 efx_writeo(efx, &temp, FR_AZ_SRM_TX_DC_CFG); 3046 efx_writeo(efx, &temp, FR_AZ_SRM_TX_DC_CFG);
3048 EFX_POPULATE_OWORD_1(temp, FRF_AZ_SRM_RX_DC_BASE_ADR, RX_DC_BASE / 8); 3047 EFX_POPULATE_OWORD_1(temp, FRF_AZ_SRM_RX_DC_BASE_ADR,
3048 efx->type->rx_dc_base / 8);
3049 efx_writeo(efx, &temp, FR_AZ_SRM_RX_DC_CFG); 3049 efx_writeo(efx, &temp, FR_AZ_SRM_RX_DC_CFG);
3050 3050
3051 /* Set TX descriptor cache size. */ 3051 /* Set TX descriptor cache size. */
@@ -3248,6 +3248,8 @@ struct efx_nic_type falcon_a1_nic_type = {
3248 .rx_buffer_padding = 0x24, 3248 .rx_buffer_padding = 0x24,
3249 .max_interrupt_mode = EFX_INT_MODE_MSI, 3249 .max_interrupt_mode = EFX_INT_MODE_MSI,
3250 .phys_addr_channels = 4, 3250 .phys_addr_channels = 4,
3251 .tx_dc_base = 0x130000,
3252 .rx_dc_base = 0x100000,
3251}; 3253};
3252 3254
3253struct efx_nic_type falcon_b0_nic_type = { 3255struct efx_nic_type falcon_b0_nic_type = {
@@ -3271,5 +3273,7 @@ struct efx_nic_type falcon_b0_nic_type = {
3271 .phys_addr_channels = 32, /* Hardware limit is 64, but the legacy 3273 .phys_addr_channels = 32, /* Hardware limit is 64, but the legacy
3272 * interrupt handler only supports 32 3274 * interrupt handler only supports 32
3273 * channels */ 3275 * channels */
3276 .tx_dc_base = 0x130000,
3277 .rx_dc_base = 0x100000,
3274}; 3278};
3275 3279