diff options
author | Alan Cox <alan@linux.intel.com> | 2009-08-27 06:02:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 15:02:29 -0400 |
commit | e266b2022209a2bc389c1cd6b809395c67671a92 (patch) | |
tree | e12551b52605310a9f8dbd4fa8a620452ebd324f /drivers | |
parent | b8c4cc46541d864b37497d0047b81b62a5d4e073 (diff) |
Staging: et131x: kill MSI type
Kill off the MSI structure
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 | 24 | ||||
-rw-r--r-- | drivers/staging/et131x/et131x_initpci.c | 42 |
2 files changed, 26 insertions, 40 deletions
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 6dea0d91110b..1a2c73acdec6 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h | |||
@@ -132,25 +132,11 @@ | |||
132 | */ | 132 | */ |
133 | 133 | ||
134 | /* | 134 | /* |
135 | * structure for MSI Configuration reg in global address map | 135 | * MSI Configuration reg at address 0x0030 |
136 | * located at address 0x0030 | ||
137 | */ | 136 | */ |
138 | typedef union _MSI_CONFIG_t { | 137 | |
139 | u32 value; | 138 | #define ET_MSI_VECTOR 0x0000001F |
140 | struct { | 139 | #define ET_MSI_TC 0x00070000 |
141 | #ifdef _BIT_FIELDS_HTOL | ||
142 | u32 unused1:13; /* bits 19-31 */ | ||
143 | u32 msi_tc:3; /* bits 16-18 */ | ||
144 | u32 unused2:11; /* bits 5-15 */ | ||
145 | u32 msi_vector:5; /* bits 0-4 */ | ||
146 | #else | ||
147 | u32 msi_vector:5; /* bits 0-4 */ | ||
148 | u32 unused2:11; /* bits 5-15 */ | ||
149 | u32 msi_tc:3; /* bits 16-18 */ | ||
150 | u32 unused1:13; /* bits 19-31 */ | ||
151 | #endif | ||
152 | } bits; | ||
153 | } MSI_CONFIG_t, *PMSI_CONFIG_t; | ||
154 | 140 | ||
155 | /* | 141 | /* |
156 | * structure for Loopback reg in global address map | 142 | * structure for Loopback reg in global address map |
@@ -188,7 +174,7 @@ typedef struct _GLOBAL_t { /* Location: */ | |||
188 | u32 int_status_alias; /* 0x0024 */ | 174 | u32 int_status_alias; /* 0x0024 */ |
189 | u32 sw_reset; /* 0x0028 */ | 175 | u32 sw_reset; /* 0x0028 */ |
190 | u32 slv_timer; /* 0x002C */ | 176 | u32 slv_timer; /* 0x002C */ |
191 | MSI_CONFIG_t msi_config; /* 0x0030 */ | 177 | u32 msi_config; /* 0x0030 */ |
192 | LOOPBACK_t loopback; /* 0x0034 */ | 178 | LOOPBACK_t loopback; /* 0x0034 */ |
193 | u32 watchdog_timer; /* 0x0038 */ | 179 | u32 watchdog_timer; /* 0x0038 */ |
194 | } GLOBAL_t, *PGLOBAL_t; | 180 | } GLOBAL_t, *PGLOBAL_t; |
diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c index 936e5e6c8a88..33f49959ea7c 100644 --- a/drivers/staging/et131x/et131x_initpci.c +++ b/drivers/staging/et131x/et131x_initpci.c | |||
@@ -539,7 +539,7 @@ void et131x_link_detection_handler(unsigned long data) | |||
539 | */ | 539 | */ |
540 | void ConfigGlobalRegs(struct et131x_adapter *etdev) | 540 | void ConfigGlobalRegs(struct et131x_adapter *etdev) |
541 | { | 541 | { |
542 | struct _GLOBAL_t __iomem *pGbl = &etdev->regs->global; | 542 | struct _GLOBAL_t __iomem *regs = &etdev->regs->global; |
543 | 543 | ||
544 | DBG_ENTER(et131x_dbginfo); | 544 | DBG_ENTER(et131x_dbginfo); |
545 | 545 | ||
@@ -550,52 +550,52 @@ void ConfigGlobalRegs(struct et131x_adapter *etdev) | |||
550 | * and Rx as it desires. Our default is to split it | 550 | * and Rx as it desires. Our default is to split it |
551 | * 50/50: | 551 | * 50/50: |
552 | */ | 552 | */ |
553 | writel(0, &pGbl->rxq_start_addr); | 553 | writel(0, ®s->rxq_start_addr); |
554 | writel(PARM_RX_MEM_END_DEF, &pGbl->rxq_end_addr); | 554 | writel(PARM_RX_MEM_END_DEF, ®s->rxq_end_addr); |
555 | writel(PARM_RX_MEM_END_DEF + 1, &pGbl->txq_start_addr); | 555 | writel(PARM_RX_MEM_END_DEF + 1, ®s->txq_start_addr); |
556 | writel(INTERNAL_MEM_SIZE - 1, &pGbl->txq_end_addr); | 556 | writel(INTERNAL_MEM_SIZE - 1, ®s->txq_end_addr); |
557 | } else if (etdev->RegistryJumboPacket < 8192) { | 557 | } else if (etdev->RegistryJumboPacket < 8192) { |
558 | /* For jumbo packets > 2k but < 8k, split 50-50. */ | 558 | /* For jumbo packets > 2k but < 8k, split 50-50. */ |
559 | writel(0, &pGbl->rxq_start_addr); | 559 | writel(0, ®s->rxq_start_addr); |
560 | writel(INTERNAL_MEM_RX_OFFSET, &pGbl->rxq_end_addr); | 560 | writel(INTERNAL_MEM_RX_OFFSET, ®s->rxq_end_addr); |
561 | writel(INTERNAL_MEM_RX_OFFSET + 1, &pGbl->txq_start_addr); | 561 | writel(INTERNAL_MEM_RX_OFFSET + 1, ®s->txq_start_addr); |
562 | writel(INTERNAL_MEM_SIZE - 1, &pGbl->txq_end_addr); | 562 | writel(INTERNAL_MEM_SIZE - 1, ®s->txq_end_addr); |
563 | } else { | 563 | } else { |
564 | /* 9216 is the only packet size greater than 8k that | 564 | /* 9216 is the only packet size greater than 8k that |
565 | * is available. The Tx buffer has to be big enough | 565 | * is available. The Tx buffer has to be big enough |
566 | * for one whole packet on the Tx side. We'll make | 566 | * for one whole packet on the Tx side. We'll make |
567 | * the Tx 9408, and give the rest to Rx | 567 | * the Tx 9408, and give the rest to Rx |
568 | */ | 568 | */ |
569 | writel(0x0000, &pGbl->rxq_start_addr); | 569 | writel(0x0000, ®s->rxq_start_addr); |
570 | writel(0x01b3, &pGbl->rxq_end_addr); | 570 | writel(0x01b3, ®s->rxq_end_addr); |
571 | writel(0x01b4, &pGbl->txq_start_addr); | 571 | writel(0x01b4, ®s->txq_start_addr); |
572 | writel(INTERNAL_MEM_SIZE - 1,&pGbl->txq_end_addr); | 572 | writel(INTERNAL_MEM_SIZE - 1,®s->txq_end_addr); |
573 | } | 573 | } |
574 | 574 | ||
575 | /* Initialize the loopback register. Disable all loopbacks. */ | 575 | /* Initialize the loopback register. Disable all loopbacks. */ |
576 | writel(0, &pGbl->loopback.value); | 576 | writel(0, ®s->loopback.value); |
577 | } else { | 577 | } else { |
578 | /* For PHY Line loopback, the memory is configured as if Tx | 578 | /* For PHY Line loopback, the memory is configured as if Tx |
579 | * and Rx both have all the memory. This is because the | 579 | * and Rx both have all the memory. This is because the |
580 | * RxMAC will write data into the space, and the TxMAC will | 580 | * RxMAC will write data into the space, and the TxMAC will |
581 | * read it out. | 581 | * read it out. |
582 | */ | 582 | */ |
583 | writel(0, &pGbl->rxq_start_addr); | 583 | writel(0, ®s->rxq_start_addr); |
584 | writel(INTERNAL_MEM_SIZE - 1, &pGbl->rxq_end_addr); | 584 | writel(INTERNAL_MEM_SIZE - 1, ®s->rxq_end_addr); |
585 | writel(0, &pGbl->txq_start_addr); | 585 | writel(0, ®s->txq_start_addr); |
586 | writel(INTERNAL_MEM_SIZE - 1, &pGbl->txq_end_addr); | 586 | writel(INTERNAL_MEM_SIZE - 1, ®s->txq_end_addr); |
587 | 587 | ||
588 | /* Initialize the loopback register (MAC loopback). */ | 588 | /* Initialize the loopback register (MAC loopback). */ |
589 | writel(1, &pGbl->loopback); | 589 | writel(1, ®s->loopback); |
590 | } | 590 | } |
591 | 591 | ||
592 | /* MSI Register */ | 592 | /* MSI Register */ |
593 | writel(0, &pGbl->msi_config.value); | 593 | writel(0, ®s->msi_config); |
594 | 594 | ||
595 | /* By default, disable the watchdog timer. It will be enabled when | 595 | /* By default, disable the watchdog timer. It will be enabled when |
596 | * a packet is queued. | 596 | * a packet is queued. |
597 | */ | 597 | */ |
598 | writel(0, &pGbl->watchdog_timer); | 598 | writel(0, ®s->watchdog_timer); |
599 | 599 | ||
600 | DBG_LEAVE(et131x_dbginfo); | 600 | DBG_LEAVE(et131x_dbginfo); |
601 | } | 601 | } |