summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-11-18 14:07:09 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 12:23:20 -0800
commitf838cabdb27a7f3c28c186360865cf5118c469a6 (patch)
tree4fca90af8cf94f8a2710523ef51a4c0a1707a8b0 /drivers/staging
parent74f38633f2827451e5f8a44a3508b467ccfad5af (diff)
downloadtalos-op-linux-f838cabdb27a7f3c28c186360865cf5118c469a6.tar.gz
talos-op-linux-f838cabdb27a7f3c28c186360865cf5118c469a6.zip
Staging: et131x: kill TXTEST and TXFILL, clean up CF_PARAM
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/et131x/et1310_address_map.h57
-rw-r--r--drivers/staging/et131x/et1310_mac.c12
-rw-r--r--drivers/staging/et131x/et131x_adapter.h2
-rw-r--r--drivers/staging/et131x/et131x_isr.c5
4 files changed, 19 insertions, 57 deletions
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index 1f9c207c3859..9fa8628f81f5 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -727,59 +727,26 @@ typedef union _TXMAC_ERR_CNT_t {
/*
* structure for max fill reg in txmac address map
* located at address 0x300C
+ * 31-12: unused
+ * 11-0: max fill
*/
-typedef union _TXMAC_MAX_FILL_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 unused:20; /* bits 12-31 */
- u32 max_fill:12; /* bits 0-11 */
-#else
- u32 max_fill:12; /* bits 0-11 */
- u32 unused:20; /* bits 12-31 */
-#endif
- } bits;
-} TXMAC_MAX_FILL_t, *PTXMAC_MAX_FILL_t;
/*
* structure for cf parameter reg in txmac address map
* located at address 0x3010
+ * 31-16: cfep
+ * 15-0: cfpt
*/
-typedef union _TXMAC_CF_PARAM_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 cfep:16; /* bits 16-31 */
- u32 cfpt:16; /* bits 0-15 */
-#else
- u32 cfpt:16; /* bits 0-15 */
- u32 cfep:16; /* bits 16-31 */
-#endif
- } bits;
-} TXMAC_CF_PARAM_t, *PTXMAC_CF_PARAM_t;
/*
* structure for tx test reg in txmac address map
* located at address 0x3014
+ * 31-17: unused
+ * 16: reserved1
+ * 15: txtest_en
+ * 14-11: unused
+ * 10-0: txq test pointer
*/
-typedef union _TXMAC_TXTEST_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 unused2:15; /* bits 17-31 */
- u32 reserved1:1; /* bit 16 */
- u32 txtest_en:1; /* bit 15 */
- u32 unused1:4; /* bits 11-14 */
- u32 txqtest_ptr:11; /* bits 0-11 */
-#else
- u32 txqtest_ptr:11; /* bits 0-10 */
- u32 unused1:4; /* bits 11-14 */
- u32 txtest_en:1; /* bit 15 */
- u32 reserved1:1; /* bit 16 */
- u32 unused2:15; /* bits 17-31 */
-#endif
- } bits;
-} TXMAC_TXTEST_t, *PTXMAC_TXTEST_t;
/*
* structure for error reg in txmac address map
@@ -869,9 +836,9 @@ typedef struct _TXMAC_t { /* Location: */
TXMAC_CTL_t ctl; /* 0x3000 */
TXMAC_SHADOW_PTR_t shadow_ptr; /* 0x3004 */
TXMAC_ERR_CNT_t err_cnt; /* 0x3008 */
- TXMAC_MAX_FILL_t max_fill; /* 0x300C */
- TXMAC_CF_PARAM_t cf_param; /* 0x3010 */
- TXMAC_TXTEST_t tx_test; /* 0x3014 */
+ u32 max_fill; /* 0x300C */
+ u32 cf_param; /* 0x3010 */
+ u32 tx_test; /* 0x3014 */
TXMAC_ERR_t err; /* 0x3018 */
TXMAC_ERR_INT_t err_int; /* 0x301C */
TXMAC_BP_CTRL_t bp_ctrl; /* 0x3020 */
diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c
index 6563b7d9162a..b8a1f2037314 100644
--- a/drivers/staging/et131x/et1310_mac.c
+++ b/drivers/staging/et131x/et1310_mac.c
@@ -371,19 +371,15 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev)
void ConfigTxMacRegs(struct et131x_adapter *etdev)
{
struct _TXMAC_t __iomem *pTxMac = &etdev->regs->txmac;
- TXMAC_CF_PARAM_t Local;
/* We need to update the Control Frame Parameters
* cfpt - control frame pause timer set to 64 (0x40)
* cfep - control frame extended pause timer set to 0x0
*/
- if (etdev->FlowControl == None) {
- writel(0, &pTxMac->cf_param.value);
- } else {
- Local.bits.cfpt = 0x40;
- Local.bits.cfep = 0x0;
- writel(Local.value, &pTxMac->cf_param.value);
- }
+ if (etdev->FlowControl == None)
+ writel(0, &pTxMac->cf_param);
+ else
+ writel(0x40, &pTxMac->cf_param);
}
void ConfigMacStatRegs(struct et131x_adapter *etdev)
diff --git a/drivers/staging/et131x/et131x_adapter.h b/drivers/staging/et131x/et131x_adapter.h
index 81109b302cf5..ed35f8afdd41 100644
--- a/drivers/staging/et131x/et131x_adapter.h
+++ b/drivers/staging/et131x/et131x_adapter.h
@@ -214,7 +214,7 @@ struct et131x_adapter {
u8 MCList[NIC_MAX_MCAST_LIST][ETH_ALEN];
/* MAC test */
- TXMAC_TXTEST_t TxMacTest;
+ u32 TxMacTest;
/* Pointer to the device's PCI register space */
ADDRESS_MAP_t __iomem *regs;
diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c
index ccd9bc22e185..486abe47dfc7 100644
--- a/drivers/staging/et131x/et131x_isr.c
+++ b/drivers/staging/et131x/et131x_isr.c
@@ -337,11 +337,10 @@ void et131x_isr_handler(struct work_struct *work)
*/
/* TRAP();*/
- etdev->TxMacTest.value =
- readl(&iomem->txmac.tx_test.value);
+ etdev->TxMacTest = readl(&iomem->txmac.tx_test);
dev_warn(&etdev->pdev->dev,
"RxDMA_ERR interrupt, error %x\n",
- etdev->TxMacTest.value);
+ etdev->TxMacTest);
}
/* Handle the Wake on LAN Event */
OpenPOWER on IntegriCloud