Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73610
b: refs/heads/master
c: aa6c91f
h: refs/heads/master
v: v3
  • Loading branch information
Matt Carlson authored and David S. Miller committed Nov 13, 2007
1 parent 99bd1fc commit 1e3ab30
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f60891b80f1a0f0a0015b084f4838ae8b9637c7
refs/heads/master: aa6c91fe5913faa2cd2a62de993a3130799412b1
16 changes: 16 additions & 0 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -3154,6 +3154,22 @@ static int tg3_setup_phy(struct tg3 *tp, int force_reset)
err = tg3_setup_copper_phy(tp, force_reset);
}

if (tp->pci_chip_rev_id == CHIPREV_ID_5784_A0) {
u32 val, scale;

val = tr32(TG3_CPMU_CLCK_STAT) & CPMU_CLCK_STAT_MAC_CLCK_MASK;
if (val == CPMU_CLCK_STAT_MAC_CLCK_62_5)
scale = 65;
else if (val == CPMU_CLCK_STAT_MAC_CLCK_6_25)
scale = 6;
else
scale = 12;

val = tr32(GRC_MISC_CFG) & ~GRC_MISC_CFG_PRESCALAR_MASK;
val |= (scale << GRC_MISC_CFG_PRESCALAR_SHIFT);
tw32(GRC_MISC_CFG, val);
}

if (tp->link_config.active_speed == SPEED_1000 &&
tp->link_config.active_duplex == DUPLEX_HALF)
tw32(MAC_TX_LENGTHS,
Expand Down
9 changes: 8 additions & 1 deletion trunk/drivers/net/tg3.h
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,14 @@
#define TG3_CPMU_HST_ACC 0x0000361c
#define CPMU_HST_ACC_MACCLK_MASK 0x001f0000
#define CPMU_HST_ACC_MACCLK_6_25 0x00130000
/* 0x3620 --> 0x365c unused */
/* 0x3620 --> 0x3630 unused */

#define TG3_CPMU_CLCK_STAT 0x00003630
#define CPMU_CLCK_STAT_MAC_CLCK_MASK 0x001f0000
#define CPMU_CLCK_STAT_MAC_CLCK_62_5 0x00000000
#define CPMU_CLCK_STAT_MAC_CLCK_12_5 0x00110000
#define CPMU_CLCK_STAT_MAC_CLCK_6_25 0x00130000
/* 0x3634 --> 0x365c unused */

#define TG3_CPMU_MUTEX_REQ 0x0000365c
#define CPMU_MUTEX_REQ_DRIVER 0x00001000
Expand Down

0 comments on commit 1e3ab30

Please sign in to comment.