diff options
author | Alan Cox <alan@linux.intel.com> | 2009-11-18 09:07:29 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 15:23:21 -0500 |
commit | cfc52eb676a88721221bd89e94222483f681ffe6 (patch) | |
tree | 82831b3a50e5aaf5d2b05b4b9aecb42e18cc549f | |
parent | 42a03e98d1a691bb66bd9fde021aa9c95bce1cd6 (diff) |
Staging: et131x: Another typedef solely used to write 0 to a register
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/et131x/et1310_address_map.h | 20 | ||||
-rw-r--r-- | drivers/staging/et131x/et131x_isr.c | 13 |
2 files changed, 9 insertions, 24 deletions
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 8b514a0acc1c..f751022b36d3 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h | |||
@@ -803,21 +803,11 @@ typedef union _TXMAC_ERR_INT_t { | |||
803 | /* | 803 | /* |
804 | * structure for error interrupt reg in txmac address map | 804 | * structure for error interrupt reg in txmac address map |
805 | * located at address 0x3020 | 805 | * located at address 0x3020 |
806 | * | ||
807 | * 31-2: unused | ||
808 | * 1: bp_req | ||
809 | * 0: bp_xonxoff | ||
806 | */ | 810 | */ |
807 | typedef union _TXMAC_CP_CTRL_t { | ||
808 | u32 value; | ||
809 | struct { | ||
810 | #ifdef _BIT_FIELDS_HTOL | ||
811 | u32 unused:30; /* bits 2-31 */ | ||
812 | u32 bp_req:1; /* bit 1 */ | ||
813 | u32 bp_xonxoff:1; /* bit 0 */ | ||
814 | #else | ||
815 | u32 bp_xonxoff:1; /* bit 0 */ | ||
816 | u32 bp_req:1; /* bit 1 */ | ||
817 | u32 unused:30; /* bits 2-31 */ | ||
818 | #endif | ||
819 | } bits; | ||
820 | } TXMAC_BP_CTRL_t, *PTXMAC_BP_CTRL_t; | ||
821 | 811 | ||
822 | /* | 812 | /* |
823 | * Tx MAC Module of JAGCore Address Mapping | 813 | * Tx MAC Module of JAGCore Address Mapping |
@@ -831,7 +821,7 @@ typedef struct _TXMAC_t { /* Location: */ | |||
831 | u32 tx_test; /* 0x3014 */ | 821 | u32 tx_test; /* 0x3014 */ |
832 | TXMAC_ERR_t err; /* 0x3018 */ | 822 | TXMAC_ERR_t err; /* 0x3018 */ |
833 | TXMAC_ERR_INT_t err_int; /* 0x301C */ | 823 | TXMAC_ERR_INT_t err_int; /* 0x301C */ |
834 | TXMAC_BP_CTRL_t bp_ctrl; /* 0x3020 */ | 824 | u32 bp_ctrl; /* 0x3020 */ |
835 | } TXMAC_t, *PTXMAC_t; | 825 | } TXMAC_t, *PTXMAC_t; |
836 | 826 | ||
837 | /* END OF TXMAC REGISTER ADDRESS MAP */ | 827 | /* END OF TXMAC REGISTER ADDRESS MAP */ |
diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c index 3aeac7b92281..f6d452dd14e2 100644 --- a/drivers/staging/et131x/et131x_isr.c +++ b/drivers/staging/et131x/et131x_isr.c | |||
@@ -287,17 +287,12 @@ void et131x_isr_handler(struct work_struct *work) | |||
287 | u32 pm_csr; | 287 | u32 pm_csr; |
288 | 288 | ||
289 | /* Tell the device to send a pause packet via | 289 | /* Tell the device to send a pause packet via |
290 | * the back pressure register | 290 | * the back pressure register (bp req and |
291 | * bp xon/xoff) | ||
291 | */ | 292 | */ |
292 | pm_csr = readl(&iomem->global.pm_csr); | 293 | pm_csr = readl(&iomem->global.pm_csr); |
293 | if ((pm_csr & ET_PM_PHY_SW_COMA) == 0) { | 294 | if ((pm_csr & ET_PM_PHY_SW_COMA) == 0) |
294 | TXMAC_BP_CTRL_t bp_ctrl = { 0 }; | 295 | writel(3, &iomem->txmac.bp_ctrl); |
295 | |||
296 | bp_ctrl.bits.bp_req = 1; | ||
297 | bp_ctrl.bits.bp_xonxoff = 1; | ||
298 | writel(bp_ctrl.value, | ||
299 | &iomem->txmac.bp_ctrl.value); | ||
300 | } | ||
301 | } | 296 | } |
302 | } | 297 | } |
303 | 298 | ||