Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175152
b: refs/heads/master
c: eccdd88
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent 565e427 commit 2d20657
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 28 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: c2f6118a3009b3606cc6e77b474a46ce4075b0a2
refs/heads/master: eccdd88fa00ec30fa15a7555b5e010e178c35e2a
29 changes: 8 additions & 21 deletions trunk/drivers/staging/et131x/et1310_address_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -1452,27 +1452,14 @@ typedef union _MAC_TEST_t {
/*
* structure for MII Management Configuration reg in mac address map.
* located at address 0x5020
*
* 31: reset MII mgmt
* 30-6: unused
* 5: scan auto increment
* 4: preamble supress
* 3: undefined
* 2-0: mgmt clock reset
*/
typedef union _MII_MGMT_CFG_t {
u32 value;
struct {
#ifdef _BIT_FIELDS_HTOL
u32 reset_mii_mgmt:1; /* bit 31 */
u32 reserved:25; /* bits 6-30 */
u32 scan_auto_incremt:1; /* bit 5 */
u32 preamble_suppress:1; /* bit 4 */
u32 undefined:1; /* bit 3 */
u32 mgmt_clk_reset:3; /* bits 0-2 */
#else
u32 mgmt_clk_reset:3; /* bits 0-2 */
u32 undefined:1; /* bit 3 */
u32 preamble_suppress:1; /* bit 4 */
u32 scan_auto_incremt:1; /* bit 5 */
u32 reserved:25; /* bits 6-30 */
u32 reset_mii_mgmt:1; /* bit 31 */
#endif
} bits;
} MII_MGMT_CFG_t, *PMII_MGMT_CFG_t;

/*
* structure for MII Management Command reg in mac address map.
Expand Down Expand Up @@ -1703,7 +1690,7 @@ typedef struct _MAC_t { /* Location: */
u32 rsv1; /* 0x5014 */
u32 rsv2; /* 0x5018 */
MAC_TEST_t mac_test; /* 0x501C */
MII_MGMT_CFG_t mii_mgmt_cfg; /* 0x5020 */
u32 mii_mgmt_cfg; /* 0x5020 */
MII_MGMT_CMD_t mii_mgmt_cmd; /* 0x5024 */
MII_MGMT_ADDR_t mii_mgmt_addr; /* 0x5028 */
MII_MGMT_CTRL_t mii_mgmt_ctrl; /* 0x502C */
Expand Down
7 changes: 1 addition & 6 deletions trunk/drivers/staging/et131x/et1310_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ void ConfigMACRegs1(struct et131x_adapter *etdev)
MAC_STATION_ADDR1_t station1;
MAC_STATION_ADDR2_t station2;
u32 ipg;
MII_MGMT_CFG_t mii_mgmt_cfg;

/* First we need to reset everything. Write to MAC configuration
* register 1 to perform reset.
Expand All @@ -122,11 +121,7 @@ void ConfigMACRegs1(struct et131x_adapter *etdev)
writel(0, &pMac->if_ctrl.value);

/* Let's move on to setting up the mii management configuration */
mii_mgmt_cfg.bits.reset_mii_mgmt = 0;
mii_mgmt_cfg.bits.scan_auto_incremt = 0;
mii_mgmt_cfg.bits.preamble_suppress = 0;
mii_mgmt_cfg.bits.mgmt_clk_reset = 0x7;
writel(mii_mgmt_cfg.value, &pMac->mii_mgmt_cfg.value);
writel(0x07, &pMac->mii_mgmt_cfg); /* Clock reset 0x7 */

/* Next lets configure the MAC Station Address register. These
* values are read from the EEPROM during initialization and stored
Expand Down

0 comments on commit 2d20657

Please sign in to comment.