Commit 16834405 authored by Guillaume Clement's avatar Guillaume Clement Committed by Greg Kroah-Hartman

staging: vt6655: change type of PortOffset to void __iomem *

PortOffset was an unsigned long, but used as an pointer to io
memory. Sometimes it was not properly cast before use, which caused
many warning by sparse.

By updating its type to void __iomem *, and reflecting the changes
where it is needed, this removes most of those warnings.
Signed-off-by: default avatarGuillaume Clement <gclement@baobob.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c49d4b96
...@@ -1987,7 +1987,7 @@ BBvCalculateParameter( ...@@ -1987,7 +1987,7 @@ BBvCalculateParameter(
* Return Value: true if succeeded; false if failed. * Return Value: true if succeeded; false if failed.
* *
*/ */
bool BBbReadEmbedded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char *pbyData) bool BBbReadEmbedded(void __iomem *dwIoBase, unsigned char byBBAddr, unsigned char *pbyData)
{ {
unsigned short ww; unsigned short ww;
unsigned char byValue; unsigned char byValue;
...@@ -2029,7 +2029,7 @@ bool BBbReadEmbedded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch ...@@ -2029,7 +2029,7 @@ bool BBbReadEmbedded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch
* Return Value: true if succeeded; false if failed. * Return Value: true if succeeded; false if failed.
* *
*/ */
bool BBbWriteEmbedded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byData) bool BBbWriteEmbedded(void __iomem *dwIoBase, unsigned char byBBAddr, unsigned char byData)
{ {
unsigned short ww; unsigned short ww;
unsigned char byValue; unsigned char byValue;
...@@ -2070,7 +2070,7 @@ bool BBbWriteEmbedded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned c ...@@ -2070,7 +2070,7 @@ bool BBbWriteEmbedded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned c
* Return Value: true if all TestBits are set; false otherwise. * Return Value: true if all TestBits are set; false otherwise.
* *
*/ */
bool BBbIsRegBitsOn(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits) bool BBbIsRegBitsOn(void __iomem *dwIoBase, unsigned char byBBAddr, unsigned char byTestBits)
{ {
unsigned char byOrgData; unsigned char byOrgData;
...@@ -2092,7 +2092,7 @@ bool BBbIsRegBitsOn(unsigned long dwIoBase, unsigned char byBBAddr, unsigned cha ...@@ -2092,7 +2092,7 @@ bool BBbIsRegBitsOn(unsigned long dwIoBase, unsigned char byBBAddr, unsigned cha
* Return Value: true if all TestBits are clear; false otherwise. * Return Value: true if all TestBits are clear; false otherwise.
* *
*/ */
bool BBbIsRegBitsOff(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits) bool BBbIsRegBitsOff(void __iomem *dwIoBase, unsigned char byBBAddr, unsigned char byTestBits)
{ {
unsigned char byOrgData; unsigned char byOrgData;
...@@ -2119,7 +2119,7 @@ bool BBbVT3253Init(PSDevice pDevice) ...@@ -2119,7 +2119,7 @@ bool BBbVT3253Init(PSDevice pDevice)
{ {
bool bResult = true; bool bResult = true;
int ii; int ii;
unsigned long dwIoBase = pDevice->PortOffset; void __iomem *dwIoBase = pDevice->PortOffset;
unsigned char byRFType = pDevice->byRFType; unsigned char byRFType = pDevice->byRFType;
unsigned char byLocalID = pDevice->byLocalID; unsigned char byLocalID = pDevice->byLocalID;
...@@ -2285,7 +2285,7 @@ bool BBbVT3253Init(PSDevice pDevice) ...@@ -2285,7 +2285,7 @@ bool BBbVT3253Init(PSDevice pDevice)
* Return Value: none * Return Value: none
* *
*/ */
void BBvReadAllRegs(unsigned long dwIoBase, unsigned char *pbyBBRegs) void BBvReadAllRegs(void __iomem *dwIoBase, unsigned char *pbyBBRegs)
{ {
int ii; int ii;
unsigned char byBase = 1; unsigned char byBase = 1;
...@@ -2312,7 +2312,7 @@ void BBvReadAllRegs(unsigned long dwIoBase, unsigned char *pbyBBRegs) ...@@ -2312,7 +2312,7 @@ void BBvReadAllRegs(unsigned long dwIoBase, unsigned char *pbyBBRegs)
void BBvLoopbackOn(PSDevice pDevice) void BBvLoopbackOn(PSDevice pDevice)
{ {
unsigned char byData; unsigned char byData;
unsigned long dwIoBase = pDevice->PortOffset; void __iomem *dwIoBase = pDevice->PortOffset;
/* CR C9 = 0x00 */ /* CR C9 = 0x00 */
BBbReadEmbedded(dwIoBase, 0xC9, &pDevice->byBBCRc9); /* CR201 */ BBbReadEmbedded(dwIoBase, 0xC9, &pDevice->byBBCRc9); /* CR201 */
...@@ -2365,7 +2365,7 @@ void BBvLoopbackOn(PSDevice pDevice) ...@@ -2365,7 +2365,7 @@ void BBvLoopbackOn(PSDevice pDevice)
void BBvLoopbackOff(PSDevice pDevice) void BBvLoopbackOff(PSDevice pDevice)
{ {
unsigned char byData; unsigned char byData;
unsigned long dwIoBase = pDevice->PortOffset; void __iomem *dwIoBase = pDevice->PortOffset;
BBbWriteEmbedded(dwIoBase, 0xC9, pDevice->byBBCRc9); /* CR201 */ BBbWriteEmbedded(dwIoBase, 0xC9, pDevice->byBBCRc9); /* CR201 */
BBbWriteEmbedded(dwIoBase, 0x88, pDevice->byBBCR88); /* CR136 */ BBbWriteEmbedded(dwIoBase, 0x88, pDevice->byBBCR88); /* CR136 */
...@@ -2448,7 +2448,7 @@ void BBvSetVGAGainOffset(PSDevice pDevice, unsigned char byData) ...@@ -2448,7 +2448,7 @@ void BBvSetVGAGainOffset(PSDevice pDevice, unsigned char byData)
* *
*/ */
void void
BBvSoftwareReset(unsigned long dwIoBase) BBvSoftwareReset(void __iomem *dwIoBase)
{ {
BBbWriteEmbedded(dwIoBase, 0x50, 0x40); BBbWriteEmbedded(dwIoBase, 0x50, 0x40);
BBbWriteEmbedded(dwIoBase, 0x50, 0); BBbWriteEmbedded(dwIoBase, 0x50, 0);
...@@ -2469,7 +2469,7 @@ BBvSoftwareReset(unsigned long dwIoBase) ...@@ -2469,7 +2469,7 @@ BBvSoftwareReset(unsigned long dwIoBase)
* *
*/ */
void void
BBvPowerSaveModeON(unsigned long dwIoBase) BBvPowerSaveModeON(void __iomem *dwIoBase)
{ {
unsigned char byOrgData; unsigned char byOrgData;
...@@ -2491,7 +2491,7 @@ BBvPowerSaveModeON(unsigned long dwIoBase) ...@@ -2491,7 +2491,7 @@ BBvPowerSaveModeON(unsigned long dwIoBase)
* *
*/ */
void void
BBvPowerSaveModeOFF(unsigned long dwIoBase) BBvPowerSaveModeOFF(void __iomem *dwIoBase)
{ {
unsigned char byOrgData; unsigned char byOrgData;
...@@ -2515,7 +2515,7 @@ BBvPowerSaveModeOFF(unsigned long dwIoBase) ...@@ -2515,7 +2515,7 @@ BBvPowerSaveModeOFF(unsigned long dwIoBase)
*/ */
void void
BBvSetTxAntennaMode(unsigned long dwIoBase, unsigned char byAntennaMode) BBvSetTxAntennaMode(void __iomem *dwIoBase, unsigned char byAntennaMode)
{ {
unsigned char byBBTxConf; unsigned char byBBTxConf;
...@@ -2548,7 +2548,7 @@ BBvSetTxAntennaMode(unsigned long dwIoBase, unsigned char byAntennaMode) ...@@ -2548,7 +2548,7 @@ BBvSetTxAntennaMode(unsigned long dwIoBase, unsigned char byAntennaMode)
*/ */
void void
BBvSetRxAntennaMode(unsigned long dwIoBase, unsigned char byAntennaMode) BBvSetRxAntennaMode(void __iomem *dwIoBase, unsigned char byAntennaMode)
{ {
unsigned char byBBRxConf; unsigned char byBBRxConf;
...@@ -2578,14 +2578,14 @@ BBvSetRxAntennaMode(unsigned long dwIoBase, unsigned char byAntennaMode) ...@@ -2578,14 +2578,14 @@ BBvSetRxAntennaMode(unsigned long dwIoBase, unsigned char byAntennaMode)
* *
*/ */
void void
BBvSetDeepSleep(unsigned long dwIoBase, unsigned char byLocalID) BBvSetDeepSleep(void __iomem *dwIoBase, unsigned char byLocalID)
{ {
BBbWriteEmbedded(dwIoBase, 0x0C, 0x17); /* CR12 */ BBbWriteEmbedded(dwIoBase, 0x0C, 0x17); /* CR12 */
BBbWriteEmbedded(dwIoBase, 0x0D, 0xB9); /* CR13 */ BBbWriteEmbedded(dwIoBase, 0x0D, 0xB9); /* CR13 */
} }
void void
BBvExitDeepSleep(unsigned long dwIoBase, unsigned char byLocalID) BBvExitDeepSleep(void __iomem *dwIoBase, unsigned char byLocalID)
{ {
BBbWriteEmbedded(dwIoBase, 0x0C, 0x00); /* CR12 */ BBbWriteEmbedded(dwIoBase, 0x0C, 0x00); /* CR12 */
BBbWriteEmbedded(dwIoBase, 0x0D, 0x01); /* CR13 */ BBbWriteEmbedded(dwIoBase, 0x0D, 0x01); /* CR13 */
......
...@@ -99,26 +99,26 @@ BBvCalculateParameter( ...@@ -99,26 +99,26 @@ BBvCalculateParameter(
unsigned char *pbyPhySgn unsigned char *pbyPhySgn
); );
bool BBbReadEmbedded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char *pbyData); bool BBbReadEmbedded(void __iomem *dwIoBase, unsigned char byBBAddr, unsigned char *pbyData);
bool BBbWriteEmbedded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byData); bool BBbWriteEmbedded(void __iomem *dwIoBase, unsigned char byBBAddr, unsigned char byData);
void BBvReadAllRegs(unsigned long dwIoBase, unsigned char *pbyBBRegs); void BBvReadAllRegs(void __iomem *dwIoBase, unsigned char *pbyBBRegs);
void BBvLoopbackOn(PSDevice pDevice); void BBvLoopbackOn(PSDevice pDevice);
void BBvLoopbackOff(PSDevice pDevice); void BBvLoopbackOff(PSDevice pDevice);
void BBvSetShortSlotTime(PSDevice pDevice); void BBvSetShortSlotTime(PSDevice pDevice);
bool BBbIsRegBitsOn(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits); bool BBbIsRegBitsOn(void __iomem *dwIoBase, unsigned char byBBAddr, unsigned char byTestBits);
bool BBbIsRegBitsOff(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits); bool BBbIsRegBitsOff(void __iomem *dwIoBase, unsigned char byBBAddr, unsigned char byTestBits);
void BBvSetVGAGainOffset(PSDevice pDevice, unsigned char byData); void BBvSetVGAGainOffset(PSDevice pDevice, unsigned char byData);
// VT3253 Baseband // VT3253 Baseband
bool BBbVT3253Init(PSDevice pDevice); bool BBbVT3253Init(PSDevice pDevice);
void BBvSoftwareReset(unsigned long dwIoBase); void BBvSoftwareReset(void __iomem *dwIoBase);
void BBvPowerSaveModeON(unsigned long dwIoBase); void BBvPowerSaveModeON(void __iomem *dwIoBase);
void BBvPowerSaveModeOFF(unsigned long dwIoBase); void BBvPowerSaveModeOFF(void __iomem *dwIoBase);
void BBvSetTxAntennaMode(unsigned long dwIoBase, unsigned char byAntennaMode); void BBvSetTxAntennaMode(void __iomem *dwIoBase, unsigned char byAntennaMode);
void BBvSetRxAntennaMode(unsigned long dwIoBase, unsigned char byAntennaMode); void BBvSetRxAntennaMode(void __iomem *dwIoBase, unsigned char byAntennaMode);
void BBvSetDeepSleep(unsigned long dwIoBase, unsigned char byLocalID); void BBvSetDeepSleep(void __iomem *dwIoBase, unsigned char byLocalID);
void BBvExitDeepSleep(unsigned long dwIoBase, unsigned char byLocalID); void BBvExitDeepSleep(void __iomem *dwIoBase, unsigned char byLocalID);
// timer for antenna diversity // timer for antenna diversity
......
...@@ -1891,7 +1891,7 @@ unsigned char CARDbyGetPktType(void *pDeviceHandler) ...@@ -1891,7 +1891,7 @@ unsigned char CARDbyGetPktType(void *pDeviceHandler)
* Return Value: none * Return Value: none
* *
*/ */
void CARDvSetLoopbackMode(unsigned long dwIoBase, unsigned short wLoopbackMode) void CARDvSetLoopbackMode(void __iomem *dwIoBase, unsigned short wLoopbackMode)
{ {
switch (wLoopbackMode) { switch (wLoopbackMode) {
case CARD_LB_NONE: case CARD_LB_NONE:
...@@ -1980,7 +1980,7 @@ QWORD CARDqGetTSFOffset(unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2) ...@@ -1980,7 +1980,7 @@ QWORD CARDqGetTSFOffset(unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2)
* Return Value: true if success; otherwise false * Return Value: true if success; otherwise false
* *
*/ */
bool CARDbGetCurrentTSF(unsigned long dwIoBase, PQWORD pqwCurrTSF) bool CARDbGetCurrentTSF(void __iomem *dwIoBase, PQWORD pqwCurrTSF)
{ {
unsigned short ww; unsigned short ww;
unsigned char byData; unsigned char byData;
...@@ -2053,7 +2053,7 @@ QWORD CARDqGetNextTBTT(QWORD qwTSF, unsigned short wBeaconInterval) ...@@ -2053,7 +2053,7 @@ QWORD CARDqGetNextTBTT(QWORD qwTSF, unsigned short wBeaconInterval)
* Return Value: none * Return Value: none
* *
*/ */
void CARDvSetFirstNextTBTT(unsigned long dwIoBase, unsigned short wBeaconInterval) void CARDvSetFirstNextTBTT(void __iomem *dwIoBase, unsigned short wBeaconInterval)
{ {
QWORD qwNextTBTT; QWORD qwNextTBTT;
...@@ -2084,7 +2084,7 @@ void CARDvSetFirstNextTBTT(unsigned long dwIoBase, unsigned short wBeaconInterva ...@@ -2084,7 +2084,7 @@ void CARDvSetFirstNextTBTT(unsigned long dwIoBase, unsigned short wBeaconInterva
* Return Value: none * Return Value: none
* *
*/ */
void CARDvUpdateNextTBTT(unsigned long dwIoBase, QWORD qwTSF, unsigned short wBeaconInterval) void CARDvUpdateNextTBTT(void __iomem *dwIoBase, QWORD qwTSF, unsigned short wBeaconInterval)
{ {
qwTSF = CARDqGetNextTBTT(qwTSF, wBeaconInterval); qwTSF = CARDqGetNextTBTT(qwTSF, wBeaconInterval);
// Set NextTBTT // Set NextTBTT
......
...@@ -89,11 +89,11 @@ void vUpdateIFS(void *pDeviceHandler); ...@@ -89,11 +89,11 @@ void vUpdateIFS(void *pDeviceHandler);
void CARDvUpdateBasicTopRate(void *pDeviceHandler); void CARDvUpdateBasicTopRate(void *pDeviceHandler);
bool CARDbAddBasicRate(void *pDeviceHandler, unsigned short wRateIdx); bool CARDbAddBasicRate(void *pDeviceHandler, unsigned short wRateIdx);
bool CARDbIsOFDMinBasicRate(void *pDeviceHandler); bool CARDbIsOFDMinBasicRate(void *pDeviceHandler);
void CARDvSetLoopbackMode(unsigned long dwIoBase, unsigned short wLoopbackMode); void CARDvSetLoopbackMode(void __iomem *dwIoBase, unsigned short wLoopbackMode);
bool CARDbSoftwareReset(void *pDeviceHandler); bool CARDbSoftwareReset(void *pDeviceHandler);
void CARDvSetFirstNextTBTT(unsigned long dwIoBase, unsigned short wBeaconInterval); void CARDvSetFirstNextTBTT(void __iomem *dwIoBase, unsigned short wBeaconInterval);
void CARDvUpdateNextTBTT(unsigned long dwIoBase, QWORD qwTSF, unsigned short wBeaconInterval); void CARDvUpdateNextTBTT(void __iomem *dwIoBase, QWORD qwTSF, unsigned short wBeaconInterval);
bool CARDbGetCurrentTSF(unsigned long dwIoBase, PQWORD pqwCurrTSF); bool CARDbGetCurrentTSF(void __iomem *dwIoBase, PQWORD pqwCurrTSF);
QWORD CARDqGetNextTBTT(QWORD qwTSF, unsigned short wBeaconInterval); QWORD CARDqGetNextTBTT(QWORD qwTSF, unsigned short wBeaconInterval);
QWORD CARDqGetTSFOffset(unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2); QWORD CARDqGetTSFOffset(unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2);
bool CARDbSetTxPower(void *pDeviceHandler, unsigned long ulTxPower); bool CARDbSetTxPower(void *pDeviceHandler, unsigned long ulTxPower);
......
...@@ -391,7 +391,7 @@ typedef struct __device_info { ...@@ -391,7 +391,7 @@ typedef struct __device_info {
CHIP_TYPE chip_id; CHIP_TYPE chip_id;
unsigned long PortOffset; void __iomem *PortOffset;
unsigned long dwIsr; unsigned long dwIsr;
u32 memaddr; u32 memaddr;
u32 ioaddr; u32 ioaddr;
......
...@@ -891,9 +891,9 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent) ...@@ -891,9 +891,9 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
#endif #endif
pDevice->PortOffset = (unsigned long)ioremap(pDevice->memaddr & PCI_BASE_ADDRESS_MEM_MASK, pDevice->io_size); pDevice->PortOffset = ioremap(pDevice->memaddr & PCI_BASE_ADDRESS_MEM_MASK, pDevice->io_size);
if (pDevice->PortOffset == 0) { if (pDevice->PortOffset == NULL) {
printk(KERN_ERR DEVICE_NAME ": Failed to IO remapping ..\n"); printk(KERN_ERR DEVICE_NAME ": Failed to IO remapping ..\n");
device_free_info(pDevice); device_free_info(pDevice);
return -ENODEV; return -ENODEV;
...@@ -1079,7 +1079,7 @@ static void device_free_info(PSDevice pDevice) { ...@@ -1079,7 +1079,7 @@ static void device_free_info(PSDevice pDevice) {
unregister_netdev(dev); unregister_netdev(dev);
if (pDevice->PortOffset) if (pDevice->PortOffset)
iounmap((void *)pDevice->PortOffset); iounmap(pDevice->PortOffset);
if (pDevice->pcid) if (pDevice->pcid)
pci_release_regions(pDevice->pcid); pci_release_regions(pDevice->pcid);
......
...@@ -58,7 +58,7 @@ static int msglevel = MSG_LEVEL_INFO; ...@@ -58,7 +58,7 @@ static int msglevel = MSG_LEVEL_INFO;
/*--------------------- Static Functions --------------------------*/ /*--------------------- Static Functions --------------------------*/
static void static void
s_vCheckKeyTableValid(PSKeyManagement pTable, unsigned long dwIoBase) s_vCheckKeyTableValid(PSKeyManagement pTable, void __iomem *dwIoBase)
{ {
int i; int i;
...@@ -91,7 +91,7 @@ s_vCheckKeyTableValid(PSKeyManagement pTable, unsigned long dwIoBase) ...@@ -91,7 +91,7 @@ s_vCheckKeyTableValid(PSKeyManagement pTable, unsigned long dwIoBase)
* Return Value: none * Return Value: none
* *
*/ */
void KeyvInitTable(PSKeyManagement pTable, unsigned long dwIoBase) void KeyvInitTable(PSKeyManagement pTable, void __iomem *dwIoBase)
{ {
int i; int i;
int jj; int jj;
...@@ -187,7 +187,7 @@ bool KeybSetKey( ...@@ -187,7 +187,7 @@ bool KeybSetKey(
PQWORD pKeyRSC, PQWORD pKeyRSC,
unsigned char *pbyKey, unsigned char *pbyKey,
unsigned char byKeyDecMode, unsigned char byKeyDecMode,
unsigned long dwIoBase, void __iomem *dwIoBase,
unsigned char byLocalID unsigned char byLocalID
) )
{ {
...@@ -351,7 +351,7 @@ bool KeybRemoveKey( ...@@ -351,7 +351,7 @@ bool KeybRemoveKey(
PSKeyManagement pTable, PSKeyManagement pTable,
unsigned char *pbyBSSID, unsigned char *pbyBSSID,
unsigned long dwKeyIndex, unsigned long dwKeyIndex,
unsigned long dwIoBase void __iomem *dwIoBase
) )
{ {
int i; int i;
...@@ -418,7 +418,7 @@ bool KeybRemoveKey( ...@@ -418,7 +418,7 @@ bool KeybRemoveKey(
bool KeybRemoveAllKey( bool KeybRemoveAllKey(
PSKeyManagement pTable, PSKeyManagement pTable,
unsigned char *pbyBSSID, unsigned char *pbyBSSID,
unsigned long dwIoBase void __iomem *dwIoBase
) )
{ {
int i, u; int i, u;
...@@ -453,7 +453,7 @@ bool KeybRemoveAllKey( ...@@ -453,7 +453,7 @@ bool KeybRemoveAllKey(
void KeyvRemoveWEPKey( void KeyvRemoveWEPKey(
PSKeyManagement pTable, PSKeyManagement pTable,
unsigned long dwKeyIndex, unsigned long dwKeyIndex,
unsigned long dwIoBase void __iomem *dwIoBase
) )
{ {
if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) { if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
...@@ -473,7 +473,7 @@ void KeyvRemoveWEPKey( ...@@ -473,7 +473,7 @@ void KeyvRemoveWEPKey(
void KeyvRemoveAllWEPKey( void KeyvRemoveAllWEPKey(
PSKeyManagement pTable, PSKeyManagement pTable,
unsigned long dwIoBase void __iomem *dwIoBase
) )
{ {
int i; int i;
...@@ -610,7 +610,7 @@ bool KeybSetDefaultKey( ...@@ -610,7 +610,7 @@ bool KeybSetDefaultKey(
PQWORD pKeyRSC, PQWORD pKeyRSC,
unsigned char *pbyKey, unsigned char *pbyKey,
unsigned char byKeyDecMode, unsigned char byKeyDecMode,
unsigned long dwIoBase, void __iomem *dwIoBase,
unsigned char byLocalID unsigned char byLocalID
) )
{ {
...@@ -716,7 +716,7 @@ bool KeybSetAllGroupKey( ...@@ -716,7 +716,7 @@ bool KeybSetAllGroupKey(
PQWORD pKeyRSC, PQWORD pKeyRSC,
unsigned char *pbyKey, unsigned char *pbyKey,
unsigned char byKeyDecMode, unsigned char byKeyDecMode,
unsigned long dwIoBase, void __iomem *dwIoBase,
unsigned char byLocalID unsigned char byLocalID
) )
{ {
......
...@@ -97,7 +97,7 @@ typedef struct tagSKeyManagement ...@@ -97,7 +97,7 @@ typedef struct tagSKeyManagement
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
void KeyvInitTable(PSKeyManagement pTable, unsigned long dwIoBase); void KeyvInitTable(PSKeyManagement pTable, void __iomem *dwIoBase);
bool KeybGetKey( bool KeybGetKey(
PSKeyManagement pTable, PSKeyManagement pTable,
...@@ -114,7 +114,7 @@ bool KeybSetKey( ...@@ -114,7 +114,7 @@ bool KeybSetKey(
PQWORD pKeyRSC, PQWORD pKeyRSC,
unsigned char *pbyKey, unsigned char *pbyKey,
unsigned char byKeyDecMode, unsigned char byKeyDecMode,
unsigned long dwIoBase, void __iomem *dwIoBase,
unsigned char byLocalID unsigned char byLocalID
); );
...@@ -125,7 +125,7 @@ bool KeybSetDefaultKey( ...@@ -125,7 +125,7 @@ bool KeybSetDefaultKey(
PQWORD pKeyRSC, PQWORD pKeyRSC,
unsigned char *pbyKey, unsigned char *pbyKey,
unsigned char byKeyDecMode, unsigned char byKeyDecMode,
unsigned long dwIoBase, void __iomem *dwIoBase,
unsigned char byLocalID unsigned char byLocalID
); );
...@@ -133,7 +133,7 @@ bool KeybRemoveKey( ...@@ -133,7 +133,7 @@ bool KeybRemoveKey(
PSKeyManagement pTable, PSKeyManagement pTable,
unsigned char *pbyBSSID, unsigned char *pbyBSSID,
unsigned long dwKeyIndex, unsigned long dwKeyIndex,
unsigned long dwIoBase void __iomem *dwIoBase
); );
bool KeybGetTransmitKey( bool KeybGetTransmitKey(
...@@ -151,18 +151,18 @@ bool KeybCheckPairewiseKey( ...@@ -151,18 +151,18 @@ bool KeybCheckPairewiseKey(
bool KeybRemoveAllKey( bool KeybRemoveAllKey(
PSKeyManagement pTable, PSKeyManagement pTable,
unsigned char *pbyBSSID, unsigned char *pbyBSSID,
unsigned long dwIoBase void __iomem *dwIoBase
); );
void KeyvRemoveWEPKey( void KeyvRemoveWEPKey(
PSKeyManagement pTable, PSKeyManagement pTable,
unsigned long dwKeyIndex, unsigned long dwKeyIndex,
unsigned long dwIoBase void __iomem *dwIoBase
); );
void KeyvRemoveAllWEPKey( void KeyvRemoveAllWEPKey(
PSKeyManagement pTable, PSKeyManagement pTable,
unsigned long dwIoBase void __iomem *dwIoBase
); );
bool KeybSetAllGroupKey( bool KeybSetAllGroupKey(
...@@ -172,7 +172,7 @@ bool KeybSetAllGroupKey( ...@@ -172,7 +172,7 @@ bool KeybSetAllGroupKey(
PQWORD pKeyRSC, PQWORD pKeyRSC,
unsigned char *pbyKey, unsigned char *pbyKey,
unsigned char byKeyDecMode, unsigned char byKeyDecMode,
unsigned long dwIoBase, void __iomem *dwIoBase,
unsigned char byLocalID unsigned char byLocalID
); );
......
This diff is collapsed.
...@@ -973,78 +973,78 @@ do { \ ...@@ -973,78 +973,78 @@ do { \
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
extern unsigned short TxRate_iwconfig;//2008-5-8 <add> by chester extern unsigned short TxRate_iwconfig;//2008-5-8 <add> by chester
void MACvReadAllRegs(unsigned long dwIoBase, unsigned char *pbyMacRegs); void MACvReadAllRegs(void __iomem *dwIoBase, unsigned char *pbyMacRegs);
bool MACbIsRegBitsOn(unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits); bool MACbIsRegBitsOn(void __iomem *dwIoBase, unsigned char byRegOfs, unsigned char byTestBits);
bool MACbIsRegBitsOff(unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits); bool MACbIsRegBitsOff(void __iomem *dwIoBase, unsigned char byRegOfs, unsigned char byTestBits);
bool MACbIsIntDisable(unsigned long dwIoBase); bool MACbIsIntDisable(void __iomem *dwIoBase);
unsigned char MACbyReadMultiAddr(unsigned long dwIoBase, unsigned int uByteIdx); unsigned char MACbyReadMultiAddr(void __iomem *dwIoBase, unsigned int uByteIdx);
void MACvWriteMultiAddr(unsigned long dwIoBase, unsigned int uByteIdx, unsigned char byData); void MACvWriteMultiAddr(void __iomem *dwIoBase, unsigned int uByteIdx, unsigned char byData);
void MACvSetMultiAddrByHash(unsigned long dwIoBase, unsigned char byHashIdx); void MACvSetMultiAddrByHash(void __iomem *dwIoBase, unsigned char byHashIdx);
void MACvResetMultiAddrByHash(unsigned long dwIoBase, unsigned char byHashIdx); void MACvResetMultiAddrByHash(void __iomem *dwIoBase, unsigned char byHashIdx);
void MACvSetRxThreshold(unsigned long dwIoBase, unsigned char byThreshold); void MACvSetRxThreshold(void __iomem *dwIoBase, unsigned char byThreshold);
void MACvGetRxThreshold(unsigned long dwIoBase, unsigned char *pbyThreshold); void MACvGetRxThreshold(void __iomem *dwIoBase, unsigned char *pbyThreshold);
void MACvSetTxThreshold(unsigned long dwIoBase, unsigned char byThreshold); void MACvSetTxThreshold(void __iomem *dwIoBase, unsigned char byThreshold);
void MACvGetTxThreshold(unsigned long dwIoBase, unsigned char *pbyThreshold); void MACvGetTxThreshold(void __iomem *dwIoBase, unsigned char *pbyThreshold);
void MACvSetDmaLength(unsigned long dwIoBase, unsigned char byDmaLength); void MACvSetDmaLength(void __iomem *dwIoBase, unsigned char byDmaLength);
void MACvGetDmaLength(unsigned long dwIoBase, unsigned char *pbyDmaLength); void MACvGetDmaLength(void __iomem *dwIoBase, unsigned char *pbyDmaLength);
void MACvSetShortRetryLimit(unsigned long dwIoBase, unsigned char byRetryLimit); void MACvSetShortRetryLimit(void __iomem *dwIoBase, unsigned char byRetryLimit);
void MACvGetShortRetryLimit(unsigned long dwIoBase, unsigned char *pbyRetryLimit); void MACvGetShortRetryLimit(void __iomem *dwIoBase, unsigned char *pbyRetryLimit);
void MACvSetLongRetryLimit(unsigned long dwIoBase, unsigned char byRetryLimit); void MACvSetLongRetryLimit(void __iomem *dwIoBase, unsigned char byRetryLimit);
void MACvGetLongRetryLimit(unsigned long dwIoBase, unsigned char *pbyRetryLimit); void MACvGetLongRetryLimit(void __iomem *dwIoBase, unsigned char *pbyRetryLimit);
void MACvSetLoopbackMode(unsigned long dwIoBase, unsigned char byLoopbackMode); void MACvSetLoopbackMode(void __iomem *dwIoBase, unsigned char byLoopbackMode);
bool MACbIsInLoopbackMode(unsigned long dwIoBase); bool MACbIsInLoopbackMode(void __iomem *dwIoBase);
void MACvSetPacketFilter(unsigned long dwIoBase, unsigned short wFilterType); void MACvSetPacketFilter(void __iomem *dwIoBase, unsigned short wFilterType);
void MACvSaveContext(unsigned long dwIoBase, unsigned char *pbyCxtBuf); void MACvSaveContext(void __iomem *dwIoBase, unsigned char *pbyCxtBuf);
void MACvRestoreContext(unsigned long dwIoBase, unsigned char *pbyCxtBuf); void MACvRestoreContext(void __iomem *dwIoBase, unsigned char *pbyCxtBuf);
bool MACbCompareContext(unsigned long dwIoBase, unsigned char *pbyCxtBuf); bool MACbCompareContext(void __iomem *dwIoBase, unsigned char *pbyCxtBuf);
bool MACbSoftwareReset(unsigned long dwIoBase); bool MACbSoftwareReset(void __iomem *dwIoBase);
bool MACbSafeSoftwareReset(unsigned long dwIoBase); bool MACbSafeSoftwareReset(void __iomem *dwIoBase);
bool MACbSafeRxOff(unsigned long dwIoBase); bool MACbSafeRxOff(void __iomem *dwIoBase);
bool MACbSafeTxOff(unsigned long dwIoBase); bool MACbSafeTxOff(void __iomem *dwIoBase);
bool MACbSafeStop(unsigned long dwIoBase); bool MACbSafeStop(void __iomem *dwIoBase);
bool MACbShutdown(unsigned long dwIoBase); bool MACbShutdown(void __iomem *dwIoBase);
void MACvInitialize(unsigned long dwIoBase); void MACvInitialize(void __iomem *dwIoBase);
void MACvSetCurrRx0DescAddr(unsigned long dwIoBase, unsigned long dwCurrDescAddr); void MACvSetCurrRx0DescAddr(void __iomem *dwIoBase, unsigned long dwCurrDescAddr);
void MACvSetCurrRx1DescAddr(unsigned long dwIoBase, unsigned long dwCurrDescAddr); void MACvSetCurrRx1DescAddr(void __iomem *dwIoBase, unsigned long dwCurrDescAddr);
void MACvSetCurrTXDescAddr(int iTxType, unsigned long dwIoBase, unsigned long dwCurrDescAddr); void MACvSetCurrTXDescAddr(int iTxType, void __iomem *dwIoBase, unsigned long dwCurrDescAddr);
void MACvSetCurrTx0DescAddrEx(unsigned long dwIoBase, unsigned long dwCurrDescAddr); void MACvSetCurrTx0DescAddrEx(void __iomem *dwIoBase, unsigned long dwCurrDescAddr);
void MACvSetCurrAC0DescAddrEx(unsigned long dwIoBase, unsigned long dwCurrDescAddr); void MACvSetCurrAC0DescAddrEx(void __iomem *dwIoBase, unsigned long dwCurrDescAddr);
void MACvSetCurrSyncDescAddrEx(unsigned long dwIoBase, unsigned long dwCurrDescAddr); void MACvSetCurrSyncDescAddrEx(void __iomem *dwIoBase, unsigned long dwCurrDescAddr);
void MACvSetCurrATIMDescAddrEx(unsigned long dwIoBase, unsigned long dwCurrDescAddr); void MACvSetCurrATIMDescAddrEx(void __iomem *dwIoBase, unsigned long dwCurrDescAddr);
void MACvTimer0MicroSDelay(unsigned long dwIoBase, unsigned int uDelay); void MACvTimer0MicroSDelay(void __iomem *dwIoBase, unsigned int uDelay);
void MACvOneShotTimer0MicroSec(unsigned long dwIoBase, unsigned int uDelayTime); void MACvOneShotTimer0MicroSec(void __iomem *dwIoBase, unsigned int uDelayTime);
void MACvOneShotTimer1MicroSec(unsigned long dwIoBase, unsigned int uDelayTime); void MACvOneShotTimer1MicroSec(void __iomem *dwIoBase, unsigned int uDelayTime);
void MACvSetMISCFifo(unsigned long dwIoBase, unsigned short wOffset, unsigned long dwData); void MACvSetMISCFifo(void __iomem *dwIoBase, unsigned short wOffset, unsigned long dwData);
bool MACbTxDMAOff(unsigned long dwIoBase, unsigned int idx); bool MACbTxDMAOff(void __iomem *dwIoBase, unsigned int idx);
void MACvClearBusSusInd(unsigned long dwIoBase); void MACvClearBusSusInd(void __iomem *dwIoBase);
void MACvEnableBusSusEn(unsigned long dwIoBase); void MACvEnableBusSusEn(void __iomem *dwIoBase);
bool MACbFlushSYNCFifo(unsigned long dwIoBase); bool MACbFlushSYNCFifo(void __iomem *dwIoBase);
bool MACbPSWakeup(unsigned long dwIoBase); bool MACbPSWakeup(void __iomem *dwIoBase);
void MACvSetKeyEntry(unsigned long dwIoBase, unsigned short wKeyCtl, unsigned int uEntryIdx, void MACvSetKeyEntry(void __iomem *dwIoBase, unsigned short wKeyCtl, unsigned int uEntryIdx,
unsigned int uKeyIdx, unsigned char *pbyAddr, u32 *pdwKey, unsigned char byLocalID); unsigned int uKeyIdx, unsigned char *pbyAddr, u32 *pdwKey, unsigned char byLocalID);
void MACvDisableKeyEntry(unsigned long dwIoBase, unsigned int uEntryIdx); void MACvDisableKeyEntry(void __iomem *dwIoBase, unsigned int uEntryIdx);
void MACvSetDefaultKeyEntry(unsigned long dwIoBase, unsigned int uKeyLen, void MACvSetDefaultKeyEntry(void __iomem *dwIoBase, unsigned int uKeyLen,
unsigned int uKeyIdx, unsigned long *pdwKey, unsigned char byLocalID); unsigned int uKeyIdx, unsigned long *pdwKey, unsigned char byLocalID);
void MACvDisableDefaultKey(unsigned long dwIoBase); void MACvDisableDefaultKey(void __iomem *dwIoBase);
void MACvSetDefaultTKIPKeyEntry(unsigned long dwIoBase, unsigned int uKeyLen, void MACvSetDefaultTKIPKeyEntry(void __iomem *dwIoBase, unsigned int uKeyLen,
unsigned int uKeyIdx, unsigned long *pdwKey, unsigned char byLocalID); unsigned int uKeyIdx, unsigned long *pdwKey, unsigned char byLocalID);
void MACvSetDefaultKeyCtl(unsigned long dwIoBase, unsigned short wKeyCtl, unsigned int uEntryIdx, unsigned char byLocalID); void MACvSetDefaultKeyCtl(void __iomem *dwIoBase, unsigned short wKeyCtl, unsigned int uEntryIdx, unsigned char byLocalID);
#endif // __MAC_H__ #endif // __MAC_H__
...@@ -424,7 +424,7 @@ static const unsigned long dwAL7230ChannelTable2[CB_MAX_CHANNEL] = { ...@@ -424,7 +424,7 @@ static const unsigned long dwAL7230ChannelTable2[CB_MAX_CHANNEL] = {
* Return Value: true if succeeded; false if failed. * Return Value: true if succeeded; false if failed.
* *
*/ */
static bool s_bAL7230Init(unsigned long dwIoBase) static bool s_bAL7230Init(void __iomem *dwIoBase)
{ {
int ii; int ii;
bool bResult; bool bResult;
...@@ -467,7 +467,7 @@ static bool s_bAL7230Init(unsigned long dwIoBase) ...@@ -467,7 +467,7 @@ static bool s_bAL7230Init(unsigned long dwIoBase)
} }
// Need to Pull PLLON low when writing channel registers through 3-wire interface // Need to Pull PLLON low when writing channel registers through 3-wire interface
static bool s_bAL7230SelectChannel(unsigned long dwIoBase, unsigned char byChannel) static bool s_bAL7230SelectChannel(void __iomem *dwIoBase, unsigned char byChannel)
{ {
bool bResult; bool bResult;
...@@ -567,7 +567,7 @@ static bool s_bAL7230SelectChannel(unsigned long dwIoBase, unsigned char byChann ...@@ -567,7 +567,7 @@ static bool s_bAL7230SelectChannel(unsigned long dwIoBase, unsigned char byChann
* Return Value: true if succeeded; false if failed. * Return Value: true if succeeded; false if failed.
* *
*/ */
bool IFRFbWriteEmbedded(unsigned long dwIoBase, unsigned long dwData) bool IFRFbWriteEmbedded(void __iomem *dwIoBase, unsigned long dwData)
{ {
unsigned short ww; unsigned short ww;
unsigned long dwValue; unsigned long dwValue;
...@@ -626,7 +626,7 @@ bool IFRFbWriteEmbedded(unsigned long dwIoBase, unsigned long dwData) ...@@ -626,7 +626,7 @@ bool IFRFbWriteEmbedded(unsigned long dwIoBase, unsigned long dwData)
* Return Value: true if succeeded; false if failed. * Return Value: true if succeeded; false if failed.
* *
*/ */
static bool RFbAL2230Init(unsigned long dwIoBase) static bool RFbAL2230Init(void __iomem *dwIoBase)
{ {
int ii; int ii;
bool bResult; bool bResult;
...@@ -673,7 +673,7 @@ static bool RFbAL2230Init(unsigned long dwIoBase) ...@@ -673,7 +673,7 @@ static bool RFbAL2230Init(unsigned long dwIoBase)
return bResult; return bResult;
} }
static bool RFbAL2230SelectChannel(unsigned long dwIoBase, unsigned char byChannel) static bool RFbAL2230SelectChannel(void __iomem *dwIoBase, unsigned char byChannel)
{ {
bool bResult; bool bResult;
...@@ -783,7 +783,7 @@ bool RFbInit( ...@@ -783,7 +783,7 @@ bool RFbInit(
* Return Value: true if succeeded; false if failed. * Return Value: true if succeeded; false if failed.
* *
*/ */
bool RFbSelectChannel(unsigned long dwIoBase, unsigned char byRFType, unsigned char byChannel) bool RFbSelectChannel(void __iomem *dwIoBase, unsigned char byRFType, unsigned char byChannel)
{ {
bool bResult = true; bool bResult = true;
switch (byRFType) { switch (byRFType) {
...@@ -818,7 +818,7 @@ bool RFbSelectChannel(unsigned long dwIoBase, unsigned char byRFType, unsigned c ...@@ -818,7 +818,7 @@ bool RFbSelectChannel(unsigned long dwIoBase, unsigned char byRFType, unsigned c
* Return Value: None. * Return Value: None.
* *
*/ */
bool RFvWriteWakeProgSyn(unsigned long dwIoBase, unsigned char byRFType, unsigned int uChannel) bool RFvWriteWakeProgSyn(void __iomem *dwIoBase, unsigned char byRFType, unsigned int uChannel)
{ {
int ii; int ii;
unsigned char byInitCount = 0; unsigned char byInitCount = 0;
...@@ -1070,7 +1070,7 @@ RFvRSSITodBm( ...@@ -1070,7 +1070,7 @@ RFvRSSITodBm(
// Post processing for the 11b/g and 11a. // Post processing for the 11b/g and 11a.
// for save time on changing Reg2,3,5,7,10,12,15 // for save time on changing Reg2,3,5,7,10,12,15
bool RFbAL7230SelectChannelPostProcess(unsigned long dwIoBase, unsigned char byOldChannel, unsigned char byNewChannel) bool RFbAL7230SelectChannelPostProcess(void __iomem *dwIoBase, unsigned char byOldChannel, unsigned char byNewChannel)
{ {
bool bResult; bool bResult;
......
...@@ -74,12 +74,12 @@ ...@@ -74,12 +74,12 @@
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
bool IFRFbWriteEmbedded(unsigned long dwIoBase, unsigned long dwData); bool IFRFbWriteEmbedded(void __iomem *dwIoBase, unsigned long dwData);
bool RFbSelectChannel(unsigned long dwIoBase, unsigned char byRFType, unsigned char byChannel); bool RFbSelectChannel(void __iomem *dwIoBase, unsigned char byRFType, unsigned char byChannel);
bool RFbInit( bool RFbInit(
PSDevice pDevice PSDevice pDevice
); );
bool RFvWriteWakeProgSyn(unsigned long dwIoBase, unsigned char byRFType, unsigned int uChannel); bool RFvWriteWakeProgSyn(void __iomem *dwIoBase, unsigned char byRFType, unsigned int uChannel);
bool RFbSetPower(PSDevice pDevice, unsigned int uRATE, unsigned int uCH); bool RFbSetPower(PSDevice pDevice, unsigned int uRATE, unsigned int uCH);
bool RFbRawSetPower( bool RFbRawSetPower(
PSDevice pDevice, PSDevice pDevice,
...@@ -95,7 +95,7 @@ RFvRSSITodBm( ...@@ -95,7 +95,7 @@ RFvRSSITodBm(
); );
//{{ RobertYu: 20050104 //{{ RobertYu: 20050104
bool RFbAL7230SelectChannelPostProcess(unsigned long dwIoBase, unsigned char byOldChannel, unsigned char byNewChannel); bool RFbAL7230SelectChannelPostProcess(void __iomem *dwIoBase, unsigned char byOldChannel, unsigned char byNewChannel);
//}} RobertYu //}} RobertYu
#endif // __RF_H__ #endif // __RF_H__
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
* Return Value: data read * Return Value: data read
* *
*/ */
unsigned char SROMbyReadEmbedded(unsigned long dwIoBase, unsigned char byContntOffset) unsigned char SROMbyReadEmbedded(void __iomem *dwIoBase, unsigned char byContntOffset)
{ {
unsigned short wDelay, wNoACK; unsigned short wDelay, wNoACK;
unsigned char byWait; unsigned char byWait;
...@@ -121,7 +121,7 @@ unsigned char SROMbyReadEmbedded(unsigned long dwIoBase, unsigned char byContntO ...@@ -121,7 +121,7 @@ unsigned char SROMbyReadEmbedded(unsigned long dwIoBase, unsigned char byContntO
* Return Value: true if succeeded; false if failed. * Return Value: true if succeeded; false if failed.
* *
*/ */
bool SROMbWriteEmbedded(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byData) bool SROMbWriteEmbedded(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byData)
{ {
unsigned short wDelay, wNoACK; unsigned short wDelay, wNoACK;
unsigned char byWait; unsigned char byWait;
...@@ -173,7 +173,7 @@ bool SROMbWriteEmbedded(unsigned long dwIoBase, unsigned char byContntOffset, un ...@@ -173,7 +173,7 @@ bool SROMbWriteEmbedded(unsigned long dwIoBase, unsigned char byContntOffset, un
* Return Value: none * Return Value: none
* *
*/ */
void SROMvRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byBits) void SROMvRegBitsOn(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byBits)
{ {
unsigned char byOrgData; unsigned char byOrgData;
...@@ -193,7 +193,7 @@ void SROMvRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsign ...@@ -193,7 +193,7 @@ void SROMvRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsign
* none * none
* *
*/ */
void SROMvRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byBits) void SROMvRegBitsOff(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byBits)
{ {
unsigned char byOrgData; unsigned char byOrgData;
...@@ -215,7 +215,7 @@ void SROMvRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsig ...@@ -215,7 +215,7 @@ void SROMvRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsig
* Return Value: true if all test bits on; otherwise false * Return Value: true if all test bits on; otherwise false
* *
*/ */
bool SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits) bool SROMbIsRegBitsOn(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byTestBits)
{ {
unsigned char byOrgData; unsigned char byOrgData;
...@@ -237,7 +237,7 @@ bool SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsi ...@@ -237,7 +237,7 @@ bool SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsi
* Return Value: true if all test bits off; otherwise false * Return Value: true if all test bits off; otherwise false
* *
*/ */
bool SROMbIsRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits) bool SROMbIsRegBitsOff(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byTestBits)
{ {
unsigned char byOrgData; unsigned char byOrgData;
...@@ -257,7 +257,7 @@ bool SROMbIsRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, uns ...@@ -257,7 +257,7 @@ bool SROMbIsRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, uns
* Return Value: none * Return Value: none
* *
*/ */
void SROMvReadAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs) void SROMvReadAllContents(void __iomem *dwIoBase, unsigned char *pbyEepromRegs)
{ {
int ii; int ii;
...@@ -281,7 +281,7 @@ void SROMvReadAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs) ...@@ -281,7 +281,7 @@ void SROMvReadAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs)
* Return Value: none * Return Value: none
* *
*/ */
void SROMvWriteAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs) void SROMvWriteAllContents(void __iomem *dwIoBase, unsigned char *pbyEepromRegs)
{ {
int ii; int ii;
...@@ -304,7 +304,7 @@ void SROMvWriteAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs) ...@@ -304,7 +304,7 @@ void SROMvWriteAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs)
* Return Value: none * Return Value: none
* *
*/ */
void SROMvReadEtherAddress(unsigned long dwIoBase, unsigned char *pbyEtherAddress) void SROMvReadEtherAddress(void __iomem *dwIoBase, unsigned char *pbyEtherAddress)
{ {
unsigned char ii; unsigned char ii;
...@@ -328,7 +328,7 @@ void SROMvReadEtherAddress(unsigned long dwIoBase, unsigned char *pbyEtherAddres ...@@ -328,7 +328,7 @@ void SROMvReadEtherAddress(unsigned long dwIoBase, unsigned char *pbyEtherAddres
* Return Value: none * Return Value: none
* *
*/ */
void SROMvWriteEtherAddress(unsigned long dwIoBase, unsigned char *pbyEtherAddress) void SROMvWriteEtherAddress(void __iomem *dwIoBase, unsigned char *pbyEtherAddress)
{ {
unsigned char ii; unsigned char ii;
...@@ -351,7 +351,7 @@ void SROMvWriteEtherAddress(unsigned long dwIoBase, unsigned char *pbyEtherAddre ...@@ -351,7 +351,7 @@ void SROMvWriteEtherAddress(unsigned long dwIoBase, unsigned char *pbyEtherAddre
* Return Value: none * Return Value: none
* *
*/ */
void SROMvReadSubSysVenId(unsigned long dwIoBase, unsigned long *pdwSubSysVenId) void SROMvReadSubSysVenId(void __iomem *dwIoBase, unsigned long *pdwSubSysVenId)
{ {
unsigned char *pbyData; unsigned char *pbyData;
...@@ -376,7 +376,7 @@ void SROMvReadSubSysVenId(unsigned long dwIoBase, unsigned long *pdwSubSysVenId) ...@@ -376,7 +376,7 @@ void SROMvReadSubSysVenId(unsigned long dwIoBase, unsigned long *pdwSubSysVenId)
* Return Value: true if success; otherwise false * Return Value: true if success; otherwise false
* *
*/ */
bool SROMbAutoLoad(unsigned long dwIoBase) bool SROMbAutoLoad(void __iomem *dwIoBase)
{ {
unsigned char byWait; unsigned char byWait;
int ii; int ii;
......
...@@ -133,23 +133,23 @@ typedef struct tagSSromReg { ...@@ -133,23 +133,23 @@ typedef struct tagSSromReg {
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
unsigned char SROMbyReadEmbedded(unsigned long dwIoBase, unsigned char byContntOffset); unsigned char SROMbyReadEmbedded(void __iomem *dwIoBase, unsigned char byContntOffset);
bool SROMbWriteEmbedded(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byData); bool SROMbWriteEmbedded(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byData);
void SROMvRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byBits); void SROMvRegBitsOn(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byBits);
void SROMvRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byBits); void SROMvRegBitsOff(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byBits);
bool SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits); bool SROMbIsRegBitsOn(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byTestBits);
bool SROMbIsRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits); bool SROMbIsRegBitsOff(void __iomem *dwIoBase, unsigned char byContntOffset, unsigned char byTestBits);
void SROMvReadAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs); void SROMvReadAllContents(void __iomem *dwIoBase, unsigned char *pbyEepromRegs);
void SROMvWriteAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs); void SROMvWriteAllContents(void __iomem *dwIoBase, unsigned char *pbyEepromRegs);
void SROMvReadEtherAddress(unsigned long dwIoBase, unsigned char *pbyEtherAddress); void SROMvReadEtherAddress(void __iomem *dwIoBase, unsigned char *pbyEtherAddress);
void SROMvWriteEtherAddress(unsigned long dwIoBase, unsigned char *pbyEtherAddress); void SROMvWriteEtherAddress(void __iomem *dwIoBase, unsigned char *pbyEtherAddress);
void SROMvReadSubSysVenId(unsigned long dwIoBase, unsigned long *pdwSubSysVenId); void SROMvReadSubSysVenId(void __iomem *dwIoBase, unsigned long *pdwSubSysVenId);
bool SROMbAutoLoad(unsigned long dwIoBase); bool SROMbAutoLoad(void __iomem *dwIoBase);
#endif // __EEPROM_H__ #endif // __EEPROM_H__
...@@ -72,38 +72,32 @@ do { \ ...@@ -72,38 +72,32 @@ do { \
#define VNSvInPortB(dwIOAddress, pbyData) \ #define VNSvInPortB(dwIOAddress, pbyData) \
do { \ do { \
volatile unsigned char *pbyAddr = (unsigned char *)(dwIOAddress); \ *(pbyData) = readb(dwIOAddress); \
*(pbyData) = readb(pbyAddr); \
} while (0) } while (0)
#define VNSvInPortW(dwIOAddress, pwData) \ #define VNSvInPortW(dwIOAddress, pwData) \
do { \ do { \
volatile unsigned short *pwAddr = (unsigned short *)(dwIOAddress); \ *(pwData) = readw(dwIOAddress); \
*(pwData) = readw(pwAddr); \
} while (0) } while (0)
#define VNSvInPortD(dwIOAddress, pdwData) \ #define VNSvInPortD(dwIOAddress, pdwData) \
do { \ do { \
volatile unsigned long *pdwAddr = (unsigned long *)(dwIOAddress); \ *(pdwData) = readl(dwIOAddress); \
*(pdwData) = readl(pdwAddr); \
} while (0) } while (0)
#define VNSvOutPortB(dwIOAddress, byData) \ #define VNSvOutPortB(dwIOAddress, byData) \
do { \ do { \
volatile unsigned char *pbyAddr = (unsigned char *)(dwIOAddress); \ writeb((unsigned char)byData, dwIOAddress); \
writeb((unsigned char)byData, pbyAddr); \
} while (0) } while (0)
#define VNSvOutPortW(dwIOAddress, wData) \ #define VNSvOutPortW(dwIOAddress, wData) \
do { \ do { \
volatile unsigned short *pwAddr = ((unsigned short *)(dwIOAddress)); \ writew((unsigned short)wData, dwIOAddress); \
writew((unsigned short)wData, pwAddr); \
} while (0) } while (0)
#define VNSvOutPortD(dwIOAddress, dwData) \ #define VNSvOutPortD(dwIOAddress, dwData) \
do { \ do { \
volatile unsigned long *pdwAddr = (unsigned long *)(dwIOAddress); \ writel((unsigned long)dwData, dwIOAddress); \
writel((unsigned long)dwData, pdwAddr); \
} while (0) } while (0)
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment