mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
Staging: et131x: Kil the txmac type
Only used for one trivial thing so turn that into something trivial instead Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
69ea5fcb5e
commit
6720949d55
2 changed files with 16 additions and 32 deletions
|
@ -538,33 +538,18 @@ struct rxdma_regs { /* Location: */
|
||||||
/*
|
/*
|
||||||
* structure for control reg in txmac address map
|
* structure for control reg in txmac address map
|
||||||
* located at address 0x3000
|
* located at address 0x3000
|
||||||
|
*
|
||||||
|
* bits
|
||||||
|
* 31-8: unused
|
||||||
|
* 7: cklseg_disable
|
||||||
|
* 6: ckbcnt_disable
|
||||||
|
* 5: cksegnum
|
||||||
|
* 4: async_disable
|
||||||
|
* 3: fc_disable
|
||||||
|
* 2: mcif_disable
|
||||||
|
* 1: mif_disable
|
||||||
|
* 0: txmac_en
|
||||||
*/
|
*/
|
||||||
typedef union _TXMAC_CTL_t {
|
|
||||||
u32 value;
|
|
||||||
struct {
|
|
||||||
#ifdef _BIT_FIELDS_HTOL
|
|
||||||
u32 unused:24; /* bits 8-31 */
|
|
||||||
u32 cklseg_diable:1; /* bit 7 */
|
|
||||||
u32 ckbcnt_disable:1; /* bit 6 */
|
|
||||||
u32 cksegnum:1; /* bit 5 */
|
|
||||||
u32 async_disable:1; /* bit 4 */
|
|
||||||
u32 fc_disable:1; /* bit 3 */
|
|
||||||
u32 mcif_disable:1; /* bit 2 */
|
|
||||||
u32 mif_disable:1; /* bit 1 */
|
|
||||||
u32 txmac_en:1; /* bit 0 */
|
|
||||||
#else
|
|
||||||
u32 txmac_en:1; /* bit 0 */
|
|
||||||
u32 mif_disable:1; /* bit 1 mac interface */
|
|
||||||
u32 mcif_disable:1; /* bit 2 mem. contr. interface */
|
|
||||||
u32 fc_disable:1; /* bit 3 */
|
|
||||||
u32 async_disable:1; /* bit 4 */
|
|
||||||
u32 cksegnum:1; /* bit 5 */
|
|
||||||
u32 ckbcnt_disable:1; /* bit 6 */
|
|
||||||
u32 cklseg_diable:1; /* bit 7 */
|
|
||||||
u32 unused:24; /* bits 8-31 */
|
|
||||||
#endif
|
|
||||||
} bits;
|
|
||||||
} TXMAC_CTL_t, *PTXMAC_CTL_t;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* structure for shadow pointer reg in txmac address map
|
* structure for shadow pointer reg in txmac address map
|
||||||
|
@ -695,7 +680,7 @@ typedef union _TXMAC_ERR_INT_t {
|
||||||
* Tx MAC Module of JAGCore Address Mapping
|
* Tx MAC Module of JAGCore Address Mapping
|
||||||
*/
|
*/
|
||||||
typedef struct _TXMAC_t { /* Location: */
|
typedef struct _TXMAC_t { /* Location: */
|
||||||
TXMAC_CTL_t ctl; /* 0x3000 */
|
u32 ctl; /* 0x3000 */
|
||||||
u32 shadow_ptr; /* 0x3004 */
|
u32 shadow_ptr; /* 0x3004 */
|
||||||
TXMAC_ERR_CNT_t err_cnt; /* 0x3008 */
|
TXMAC_ERR_CNT_t err_cnt; /* 0x3008 */
|
||||||
u32 max_fill; /* 0x300C */
|
u32 max_fill; /* 0x300C */
|
||||||
|
|
|
@ -170,9 +170,9 @@ void ConfigMACRegs2(struct et131x_adapter *etdev)
|
||||||
u32 cfg1;
|
u32 cfg1;
|
||||||
u32 cfg2;
|
u32 cfg2;
|
||||||
u32 ifctrl;
|
u32 ifctrl;
|
||||||
TXMAC_CTL_t ctl;
|
u32 ctl;
|
||||||
|
|
||||||
ctl.value = readl(&etdev->regs->txmac.ctl.value);
|
ctl = readl(&etdev->regs->txmac.ctl);
|
||||||
cfg1 = readl(&pMac->cfg1);
|
cfg1 = readl(&pMac->cfg1);
|
||||||
cfg2 = readl(&pMac->cfg2);
|
cfg2 = readl(&pMac->cfg2);
|
||||||
ifctrl = readl(&pMac->if_ctrl);
|
ifctrl = readl(&pMac->if_ctrl);
|
||||||
|
@ -226,9 +226,8 @@ void ConfigMACRegs2(struct et131x_adapter *etdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable TXMAC */
|
/* Enable TXMAC */
|
||||||
ctl.bits.txmac_en = 0x1;
|
ctl |= 0x05; /* TX mac enable, FC disable */
|
||||||
ctl.bits.fc_disable = 0x1;
|
writel(ctl, &etdev->regs->txmac.ctl);
|
||||||
writel(ctl.value, &etdev->regs->txmac.ctl.value);
|
|
||||||
|
|
||||||
/* Ready to start the RXDMA/TXDMA engine */
|
/* Ready to start the RXDMA/TXDMA engine */
|
||||||
if (etdev->Flags & fMP_ADAPTER_LOWER_POWER) {
|
if (etdev->Flags & fMP_ADAPTER_LOWER_POWER) {
|
||||||
|
|
Loading…
Reference in a new issue