diff options
author | Alan Cox <alan@linux.intel.com> | 2010-01-18 18:35:30 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-04 03:42:52 +0300 |
commit | bd03d0d5bc253533a6d169a82f56626d552d9471 (patch) | |
tree | 32f3702ee27cdeae2bb5c613dc55a15f86cedbed /drivers/staging/et131x | |
parent | fef5ba3ae9760fdc2688b7160fa056e7ef2700bb (diff) | |
download | linux-bd03d0d5bc253533a6d169a82f56626d552d9471.tar.xz |
Staging: et131x: kill off the rxmac ctrl type
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/et131x')
-rw-r--r-- | drivers/staging/et131x/et1310_address_map.h | 35 | ||||
-rw-r--r-- | drivers/staging/et131x/et1310_mac.c | 4 | ||||
-rw-r--r-- | drivers/staging/et131x/et131x_isr.c | 2 | ||||
-rw-r--r-- | drivers/staging/et131x/et131x_netdev.c | 14 |
4 files changed, 20 insertions, 35 deletions
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 5f6a7b549677..1e0ffcd17886 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -655,31 +655,16 @@ struct txmac_regs { /* Location: */ /* * structure for rxmac control reg in rxmac address map * located at address 0x4000 + * + * 31-7: reserved + * 6: rxmac_int_disable + * 5: async_disable + * 4: mif_disable + * 3: wol_disable + * 2: pkt_filter_disable + * 1: mcif_disable + * 0: rxmac_en */ -typedef union _RXMAC_CTRL_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 reserved:25; /* bits 7-31 */ - u32 rxmac_int_disable:1; /* bit 6 */ - u32 async_disable:1; /* bit 5 */ - u32 mif_disable:1; /* bit 4 */ - u32 wol_disable:1; /* bit 3 */ - u32 pkt_filter_disable:1; /* bit 2 */ - u32 mcif_disable:1; /* bit 1 */ - u32 rxmac_en:1; /* bit 0 */ -#else - u32 rxmac_en:1; /* bit 0 */ - u32 mcif_disable:1; /* bit 1 */ - u32 pkt_filter_disable:1; /* bit 2 */ - u32 wol_disable:1; /* bit 3 */ - u32 mif_disable:1; /* bit 4 */ - u32 async_disable:1; /* bit 5 */ - u32 rxmac_int_disable:1; /* bit 6 */ - u32 reserved:25; /* bits 7-31 */ -#endif - } bits; -} RXMAC_CTRL_t, *PRXMAC_CTRL_t; /* * structure for Wake On Lan Control and CRC 0 reg in rxmac address map @@ -904,7 +889,7 @@ typedef union _RXMAC_UNI_PF_ADDR3_t { * Rx MAC Module of JAGCore Address Mapping */ typedef struct _RXMAC_t { /* Location: */ - RXMAC_CTRL_t ctrl; /* 0x4000 */ + u32 ctrl; /* 0x4000 */ u32 crc0; /* 0x4004 */ u32 crc12; /* 0x4008 */ u32 crc34; /* 0x400C */ diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c index a9f924dd6b0e..a292b1edc414 100644 --- a/drivers/staging/et131x/et1310_mac.c +++ b/drivers/staging/et131x/et1310_mac.c @@ -244,7 +244,7 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev) u32 pf_ctrl = 0; /* Disable the MAC while it is being configured (also disable WOL) */ - writel(0x8, &pRxMac->ctrl.value); + writel(0x8, &pRxMac->ctrl); /* Initialize WOL to disabled. */ writel(0, &pRxMac->crc0); @@ -363,7 +363,7 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev) * but we still leave the packet filter on. */ writel(pf_ctrl, &pRxMac->pf_ctrl); - writel(0x9, &pRxMac->ctrl.value); + writel(0x9, &pRxMac->ctrl); } void ConfigTxMacRegs(struct et131x_adapter *etdev) diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c index 87c8de636711..8b6e0b7ec568 100644 --- a/drivers/staging/et131x/et131x_isr.c +++ b/drivers/staging/et131x/et131x_isr.c @@ -445,7 +445,7 @@ void et131x_isr_handler(struct work_struct *work) dev_warn(&etdev->pdev->dev, "Enable 0x%08x, Diag 0x%08x\n", - readl(&iomem->rxmac.ctrl.value), + readl(&iomem->rxmac.ctrl), readl(&iomem->rxmac.rxq_diag)); /* diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c index 5cfebf0a2181..226641acd954 100644 --- a/drivers/staging/et131x/et131x_netdev.c +++ b/drivers/staging/et131x/et131x_netdev.c @@ -342,16 +342,16 @@ int et131x_set_packet_filter(struct et131x_adapter *adapter) { int status = 0; uint32_t filter = adapter->PacketFilter; - RXMAC_CTRL_t ctrl; + u32 ctrl; u32 pf_ctrl; - ctrl.value = readl(&adapter->regs->rxmac.ctrl.value); + ctrl = readl(&adapter->regs->rxmac.ctrl); pf_ctrl = readl(&adapter->regs->rxmac.pf_ctrl); /* Default to disabled packet filtering. Enable it in the individual * case statements that require the device to filter something */ - ctrl.bits.pkt_filter_disable = 1; + ctrl |= 0x04; /* Set us to be in promiscuous mode so we receive everything, this * is also true when we get a packet filter of 0 @@ -369,20 +369,20 @@ int et131x_set_packet_filter(struct et131x_adapter *adapter) else { SetupDeviceForMulticast(adapter); pf_ctrl |= 2; - ctrl.bits.pkt_filter_disable = 0; + ctrl &= ~0x04; } /* Set us up with Unicast packet filtering */ if (filter & ET131X_PACKET_TYPE_DIRECTED) { SetupDeviceForUnicast(adapter); pf_ctrl |= 4; - ctrl.bits.pkt_filter_disable = 0; + ctrl &= ~0x04; } /* Set us up with Broadcast packet filtering */ if (filter & ET131X_PACKET_TYPE_BROADCAST) { pf_ctrl |= 1; /* Broadcast filter bit */ - ctrl.bits.pkt_filter_disable = 0; + ctrl &= ~0x04; } else pf_ctrl &= ~1; @@ -391,7 +391,7 @@ int et131x_set_packet_filter(struct et131x_adapter *adapter) * in the control reg. */ writel(pf_ctrl, &adapter->regs->rxmac.pf_ctrl); - writel(ctrl.value, &adapter->regs->rxmac.ctrl.value); + writel(ctrl, &adapter->regs->rxmac.ctrl); } return status; } |