diff options
author | Alan Cox <alan@linux.intel.com> | 2009-10-06 10:50:39 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 15:23:08 -0500 |
commit | eccdd88fa00ec30fa15a7555b5e010e178c35e2a (patch) | |
tree | 26fc7371fa17e4156a26f1403c894377104f650a /drivers | |
parent | c2f6118a3009b3606cc6e77b474a46ce4075b0a2 (diff) |
Staging: et131x: Clean up the MII_MGMT type
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/et131x/et1310_address_map.h | 29 | ||||
-rw-r--r-- | drivers/staging/et131x/et1310_mac.c | 7 |
2 files changed, 9 insertions, 27 deletions
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 3ef4260b4f7..423030f1df8 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h | |||
@@ -1452,27 +1452,14 @@ typedef union _MAC_TEST_t { | |||
1452 | /* | 1452 | /* |
1453 | * structure for MII Management Configuration reg in mac address map. | 1453 | * structure for MII Management Configuration reg in mac address map. |
1454 | * located at address 0x5020 | 1454 | * located at address 0x5020 |
1455 | * | ||
1456 | * 31: reset MII mgmt | ||
1457 | * 30-6: unused | ||
1458 | * 5: scan auto increment | ||
1459 | * 4: preamble supress | ||
1460 | * 3: undefined | ||
1461 | * 2-0: mgmt clock reset | ||
1455 | */ | 1462 | */ |
1456 | typedef union _MII_MGMT_CFG_t { | ||
1457 | u32 value; | ||
1458 | struct { | ||
1459 | #ifdef _BIT_FIELDS_HTOL | ||
1460 | u32 reset_mii_mgmt:1; /* bit 31 */ | ||
1461 | u32 reserved:25; /* bits 6-30 */ | ||
1462 | u32 scan_auto_incremt:1; /* bit 5 */ | ||
1463 | u32 preamble_suppress:1; /* bit 4 */ | ||
1464 | u32 undefined:1; /* bit 3 */ | ||
1465 | u32 mgmt_clk_reset:3; /* bits 0-2 */ | ||
1466 | #else | ||
1467 | u32 mgmt_clk_reset:3; /* bits 0-2 */ | ||
1468 | u32 undefined:1; /* bit 3 */ | ||
1469 | u32 preamble_suppress:1; /* bit 4 */ | ||
1470 | u32 scan_auto_incremt:1; /* bit 5 */ | ||
1471 | u32 reserved:25; /* bits 6-30 */ | ||
1472 | u32 reset_mii_mgmt:1; /* bit 31 */ | ||
1473 | #endif | ||
1474 | } bits; | ||
1475 | } MII_MGMT_CFG_t, *PMII_MGMT_CFG_t; | ||
1476 | 1463 | ||
1477 | /* | 1464 | /* |
1478 | * structure for MII Management Command reg in mac address map. | 1465 | * structure for MII Management Command reg in mac address map. |
@@ -1703,7 +1690,7 @@ typedef struct _MAC_t { /* Location: */ | |||
1703 | u32 rsv1; /* 0x5014 */ | 1690 | u32 rsv1; /* 0x5014 */ |
1704 | u32 rsv2; /* 0x5018 */ | 1691 | u32 rsv2; /* 0x5018 */ |
1705 | MAC_TEST_t mac_test; /* 0x501C */ | 1692 | MAC_TEST_t mac_test; /* 0x501C */ |
1706 | MII_MGMT_CFG_t mii_mgmt_cfg; /* 0x5020 */ | 1693 | u32 mii_mgmt_cfg; /* 0x5020 */ |
1707 | MII_MGMT_CMD_t mii_mgmt_cmd; /* 0x5024 */ | 1694 | MII_MGMT_CMD_t mii_mgmt_cmd; /* 0x5024 */ |
1708 | MII_MGMT_ADDR_t mii_mgmt_addr; /* 0x5028 */ | 1695 | MII_MGMT_ADDR_t mii_mgmt_addr; /* 0x5028 */ |
1709 | MII_MGMT_CTRL_t mii_mgmt_ctrl; /* 0x502C */ | 1696 | MII_MGMT_CTRL_t mii_mgmt_ctrl; /* 0x502C */ |
diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c index 7ac8209a686..712a49ed410 100644 --- a/drivers/staging/et131x/et1310_mac.c +++ b/drivers/staging/et131x/et1310_mac.c | |||
@@ -102,7 +102,6 @@ void ConfigMACRegs1(struct et131x_adapter *etdev) | |||
102 | MAC_STATION_ADDR1_t station1; | 102 | MAC_STATION_ADDR1_t station1; |
103 | MAC_STATION_ADDR2_t station2; | 103 | MAC_STATION_ADDR2_t station2; |
104 | u32 ipg; | 104 | u32 ipg; |
105 | MII_MGMT_CFG_t mii_mgmt_cfg; | ||
106 | 105 | ||
107 | /* First we need to reset everything. Write to MAC configuration | 106 | /* First we need to reset everything. Write to MAC configuration |
108 | * register 1 to perform reset. | 107 | * register 1 to perform reset. |
@@ -122,11 +121,7 @@ void ConfigMACRegs1(struct et131x_adapter *etdev) | |||
122 | writel(0, &pMac->if_ctrl.value); | 121 | writel(0, &pMac->if_ctrl.value); |
123 | 122 | ||
124 | /* Let's move on to setting up the mii management configuration */ | 123 | /* Let's move on to setting up the mii management configuration */ |
125 | mii_mgmt_cfg.bits.reset_mii_mgmt = 0; | 124 | writel(0x07, &pMac->mii_mgmt_cfg); /* Clock reset 0x7 */ |
126 | mii_mgmt_cfg.bits.scan_auto_incremt = 0; | ||
127 | mii_mgmt_cfg.bits.preamble_suppress = 0; | ||
128 | mii_mgmt_cfg.bits.mgmt_clk_reset = 0x7; | ||
129 | writel(mii_mgmt_cfg.value, &pMac->mii_mgmt_cfg.value); | ||
130 | 125 | ||
131 | /* Next lets configure the MAC Station Address register. These | 126 | /* Next lets configure the MAC Station Address register. These |
132 | * values are read from the EEPROM during initialization and stored | 127 | * values are read from the EEPROM during initialization and stored |