aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/et131x/et131x_initpci.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-08-27 11:01:49 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 12:02:28 -0700
commitf2c98d27b8e88cd17bb3e77f8fccf70f8d2ebd2f (patch)
treefbc73db3537306610e6f2e08b19d9c028616c373 /drivers/staging/et131x/et131x_initpci.c
parentStaging: et131x: kill the Q_ADDR struct (diff)
downloadlinux-dev-f2c98d27b8e88cd17bb3e77f8fccf70f8d2ebd2f.tar.xz
linux-dev-f2c98d27b8e88cd17bb3e77f8fccf70f8d2ebd2f.zip
Staging: et131x: clean up PM_CSR_t
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/et131x/et131x_initpci.c')
-rw-r--r--drivers/staging/et131x/et131x_initpci.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c
index bea9918d1686..d7a1b34550aa 100644
--- a/drivers/staging/et131x/et131x_initpci.c
+++ b/drivers/staging/et131x/et131x_initpci.c
@@ -474,16 +474,16 @@ int et131x_find_adapter(struct et131x_adapter *adapter, struct pci_dev *pdev)
void et131x_error_timer_handler(unsigned long data)
{
struct et131x_adapter *etdev = (struct et131x_adapter *) data;
- PM_CSR_t pm_csr;
+ u32 pm_csr;
- pm_csr.value = readl(&etdev->regs->global.pm_csr.value);
+ pm_csr = readl(&etdev->regs->global.pm_csr);
- if (pm_csr.bits.pm_phy_sw_coma == 0)
+ if ((pm_csr & ET_PM_PHY_SW_COMA) == 0)
UpdateMacStatHostCounters(etdev);
else
DBG_VERBOSE(et131x_dbginfo,
"No interrupts, in PHY coma, pm_csr = 0x%x\n",
- pm_csr.value);
+ pm_csr);
if (!etdev->Bmsr.bits.link_status &&
etdev->RegistryPhyComa &&
@@ -494,7 +494,7 @@ void et131x_error_timer_handler(unsigned long data)
if (etdev->PoMgmt.TransPhyComaModeOnBoot == 10) {
if (!etdev->Bmsr.bits.link_status
&& etdev->RegistryPhyComa) {
- if (pm_csr.bits.pm_phy_sw_coma == 0) {
+ if ((pm_csr & ET_PM_PHY_SW_COMA) == 0) {
/* NOTE - This was originally a 'sync with
* interrupt'. How to do that under Linux?
*/
@@ -1002,15 +1002,7 @@ int __devinit et131x_pci_setup(struct pci_dev *pdev,
/* Perform device-specific initialization here (See code below) */
/* If Phy COMA mode was enabled when we went down, disable it here. */
- {
- PM_CSR_t GlobalPmCSR = { 0 };
-
- GlobalPmCSR.bits.pm_sysclk_gate = 1;
- GlobalPmCSR.bits.pm_txclk_gate = 1;
- GlobalPmCSR.bits.pm_rxclk_gate = 1;
- writel(GlobalPmCSR.value,
- &adapter->regs->global.pm_csr.value);
- }
+ writel(ET_PMCSR_INIT, &adapter->regs->global.pm_csr);
/* Issue a global reset to the et1310 */
DBG_TRACE(et131x_dbginfo, "Issuing soft reset...\n");