aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rt2860/common/ee_prom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/rt2860/common/ee_prom.c')
-rw-r--r--drivers/staging/rt2860/common/ee_prom.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/staging/rt2860/common/ee_prom.c b/drivers/staging/rt2860/common/ee_prom.c
index b5be6f07ce75..fa3f2311f3c5 100644
--- a/drivers/staging/rt2860/common/ee_prom.c
+++ b/drivers/staging/rt2860/common/ee_prom.c
@@ -37,15 +37,15 @@
#include "../rt_config.h"
-// IRQL = PASSIVE_LEVEL
+/* IRQL = PASSIVE_LEVEL */
static inline VOID RaiseClock(IN PRTMP_ADAPTER pAd, IN UINT32 * x)
{
*x = *x | EESK;
RTMP_IO_WRITE32(pAd, E2PROM_CSR, *x);
- RTMPusecDelay(1); // Max frequency = 1MHz in Spec. definition
+ RTMPusecDelay(1); /* Max frequency = 1MHz in Spec. definition */
}
-// IRQL = PASSIVE_LEVEL
+/* IRQL = PASSIVE_LEVEL */
static inline VOID LowerClock(IN PRTMP_ADAPTER pAd, IN UINT32 * x)
{
*x = *x & ~EESK;
@@ -53,7 +53,7 @@ static inline VOID LowerClock(IN PRTMP_ADAPTER pAd, IN UINT32 * x)
RTMPusecDelay(1);
}
-// IRQL = PASSIVE_LEVEL
+/* IRQL = PASSIVE_LEVEL */
static inline USHORT ShiftInBits(IN PRTMP_ADAPTER pAd)
{
UINT32 x, i;
@@ -68,7 +68,7 @@ static inline USHORT ShiftInBits(IN PRTMP_ADAPTER pAd)
RaiseClock(pAd, &x);
RTMP_IO_READ32(pAd, E2PROM_CSR, &x);
- LowerClock(pAd, &x); //prevent read failed
+ LowerClock(pAd, &x); /*prevent read failed */
x &= ~(EEDI);
if (x & EEDO)
@@ -78,7 +78,7 @@ static inline USHORT ShiftInBits(IN PRTMP_ADAPTER pAd)
return data;
}
-// IRQL = PASSIVE_LEVEL
+/* IRQL = PASSIVE_LEVEL */
static inline VOID ShiftOutBits(IN PRTMP_ADAPTER pAd,
IN USHORT data, IN USHORT count)
{
@@ -106,7 +106,7 @@ static inline VOID ShiftOutBits(IN PRTMP_ADAPTER pAd,
RTMP_IO_WRITE32(pAd, E2PROM_CSR, x);
}
-// IRQL = PASSIVE_LEVEL
+/* IRQL = PASSIVE_LEVEL */
static inline VOID EEpromCleanup(IN PRTMP_ADAPTER pAd)
{
UINT32 x;
@@ -124,17 +124,17 @@ static inline VOID EWEN(IN PRTMP_ADAPTER pAd)
{
UINT32 x;
- // reset bits and set EECS
+ /* reset bits and set EECS */
RTMP_IO_READ32(pAd, E2PROM_CSR, &x);
x &= ~(EEDI | EEDO | EESK);
x |= EECS;
RTMP_IO_WRITE32(pAd, E2PROM_CSR, x);
- // kick a pulse
+ /* kick a pulse */
RaiseClock(pAd, &x);
LowerClock(pAd, &x);
- // output the read_opcode and six pulse in that order
+ /* output the read_opcode and six pulse in that order */
ShiftOutBits(pAd, EEPROM_EWEN_OPCODE, 5);
ShiftOutBits(pAd, 0, 6);
@@ -145,24 +145,24 @@ static inline VOID EWDS(IN PRTMP_ADAPTER pAd)
{
UINT32 x;
- // reset bits and set EECS
+ /* reset bits and set EECS */
RTMP_IO_READ32(pAd, E2PROM_CSR, &x);
x &= ~(EEDI | EEDO | EESK);
x |= EECS;
RTMP_IO_WRITE32(pAd, E2PROM_CSR, x);
- // kick a pulse
+ /* kick a pulse */
RaiseClock(pAd, &x);
LowerClock(pAd, &x);
- // output the read_opcode and six pulse in that order
+ /* output the read_opcode and six pulse in that order */
ShiftOutBits(pAd, EEPROM_EWDS_OPCODE, 5);
ShiftOutBits(pAd, 0, 6);
EEpromCleanup(pAd);
}
-// IRQL = PASSIVE_LEVEL
+/* IRQL = PASSIVE_LEVEL */
int rtmp_ee_prom_read16(IN PRTMP_ADAPTER pAd,
IN USHORT Offset, OUT USHORT * pValue)
{
@@ -170,23 +170,23 @@ int rtmp_ee_prom_read16(IN PRTMP_ADAPTER pAd,
USHORT data;
Offset /= 2;
- // reset bits and set EECS
+ /* reset bits and set EECS */
RTMP_IO_READ32(pAd, E2PROM_CSR, &x);
x &= ~(EEDI | EEDO | EESK);
x |= EECS;
RTMP_IO_WRITE32(pAd, E2PROM_CSR, x);
- // patch can not access e-Fuse issue
+ /* patch can not access e-Fuse issue */
if (!(IS_RT3090(pAd) || IS_RT3572(pAd) || IS_RT3390(pAd))) {
- // kick a pulse
+ /* kick a pulse */
RaiseClock(pAd, &x);
LowerClock(pAd, &x);
}
- // output the read_opcode and register number in that order
+ /* output the read_opcode and register number in that order */
ShiftOutBits(pAd, EEPROM_READ_OPCODE, 3);
ShiftOutBits(pAd, Offset, pAd->EEPROMAddressNum);
- // Now read the data (16 bits) in from the selected EEPROM word
+ /* Now read the data (16 bits) in from the selected EEPROM word */
data = ShiftInBits(pAd);
EEpromCleanup(pAd);