www.pudn.com > PlxSdk.rar > PlxChipFn.c
/*******************************************************************************
* Copyright (c) 2007 PLX Technology, Inc.
*
* PLX Technology Inc. licenses this software under specific terms and
* conditions. Use of any of the software or derviatives thereof in any
* product without a PLX Technology chip is strictly prohibited.
*
* PLX Technology, Inc. provides this software AS IS, WITHOUT ANY WARRANTY,
* EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTY OF
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. PLX makes no guarantee
* or representations regarding the use of, or the results of the use of,
* the software and documentation in terms of correctness, accuracy,
* reliability, currentness, or otherwise; and you rely on the software,
* documentation and results solely at your own risk.
*
* IN NO EVENT SHALL PLX BE LIABLE FOR ANY LOSS OF USE, LOSS OF BUSINESS,
* LOSS OF PROFITS, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES
* OF ANY KIND. IN NO EVENT SHALL PLX'S TOTAL LIABILITY EXCEED THE SUM
* PAID TO PLX FOR THE PRODUCT LICENSED HEREUNDER.
*
******************************************************************************/
/******************************************************************************
*
* File Name:
*
* PlxChipFn.c
*
* Description:
*
* Contains PLX chip-specific support functions
*
* Revision History:
*
* 02-01-07 : PLX SDK v5.00
*
******************************************************************************/
#include "DriverDefs.h"
#include "PciSupport.h"
#include "PlxInterrupt.h"
#include "SupportFunc.h"
/******************************************************************************
*
* Function : PlxChipInterruptsEnable
*
* Description: Globally enables PLX chip interrupts
*
*****************************************************************************/
BOOLEAN
PlxChipInterruptsEnable(
DEVICE_EXTENSION *pdx
)
{
U32 RegValue;
// Enable upstream doorbell interrupts
PLX_PCI_REG_READ(
pdx,
0xc4,
&RegValue
);
RegValue |= 0xFFFF;
PLX_PCI_REG_WRITE(
pdx,
0xc4,
RegValue
);
// Enable Message, S_RSTIN, S_PME, & GPIO interrupts
PLX_PCI_REG_WRITE(
pdx,
0xc8,
0xFF000000
);
return TRUE;
}
/******************************************************************************
*
* Function : PlxChipInterruptsDisable
*
* Description: Globally disables PLX chip interrupts
*
*****************************************************************************/
BOOLEAN
PlxChipInterruptsDisable(
DEVICE_EXTENSION *pdx
)
{
U32 RegValue;
// Disable upstream doorbell interrupts
PLX_PCI_REG_READ(
pdx,
0xc4,
&RegValue
);
RegValue &= ~0xFFFF;
PLX_PCI_REG_WRITE(
pdx,
0xc4,
RegValue
);
// Disable Message, S_RSTIN, S_PME, & GPIO interrupts
PLX_PCI_REG_WRITE(
pdx,
0xc8,
0x00000000
);
return TRUE;
}