staging: vt6655: Replace VNSvInPortD with ioread32

Replace macro VNSvInPortD with ioread32 and as it was
the only user, it can now be removed.
The name of macro and the arguments use CamelCase which
is not accepted by checkpatch.pl

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/3945d32053898e5f9771d6f742ae118ca56943ce.1651431640.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Philipp Hortmann 2022-05-01 21:12:23 +02:00 committed by Greg Kroah-Hartman
parent 72b901c1aa
commit 79ffde57de
5 changed files with 17 additions and 18 deletions

View File

@ -744,6 +744,7 @@ bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *pqwCurrTSF)
void __iomem *iobase = priv->port_offset; void __iomem *iobase = priv->port_offset;
unsigned short ww; unsigned short ww;
unsigned char data; unsigned char data;
u32 low, high;
MACvRegBitsOn(iobase, MAC_REG_TFTCTL, TFTCTL_TSFCNTRRD); MACvRegBitsOn(iobase, MAC_REG_TFTCTL, TFTCTL_TSFCNTRRD);
for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
@ -753,8 +754,9 @@ bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *pqwCurrTSF)
} }
if (ww == W_MAX_TIMEOUT) if (ww == W_MAX_TIMEOUT)
return false; return false;
VNSvInPortD(iobase + MAC_REG_TSFCNTR, (u32 *)pqwCurrTSF); low = ioread32(iobase + MAC_REG_TSFCNTR);
VNSvInPortD(iobase + MAC_REG_TSFCNTR + 4, (u32 *)pqwCurrTSF + 1); high = ioread32(iobase + MAC_REG_TSFCNTR + 4);
*pqwCurrTSF = low + ((u64)high << 32);
return true; return true;
} }

View File

@ -1029,7 +1029,7 @@ static void vnt_interrupt_process(struct vnt_private *priv)
u32 isr; u32 isr;
unsigned long flags; unsigned long flags;
VNSvInPortD(priv->port_offset + MAC_REG_ISR, &isr); isr = ioread32(priv->port_offset + MAC_REG_ISR);
if (isr == 0) if (isr == 0)
return; return;
@ -1042,7 +1042,7 @@ static void vnt_interrupt_process(struct vnt_private *priv)
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
/* Read low level stats */ /* Read low level stats */
VNSvInPortD(priv->port_offset + MAC_REG_MIBCNTR, &mib_counter); mib_counter = ioread32(priv->port_offset + MAC_REG_MIBCNTR);
low_stats->dot11RTSSuccessCount += mib_counter & 0xff; low_stats->dot11RTSSuccessCount += mib_counter & 0xff;
low_stats->dot11RTSFailureCount += (mib_counter >> 8) & 0xff; low_stats->dot11RTSFailureCount += (mib_counter >> 8) & 0xff;
@ -1116,7 +1116,7 @@ static void vnt_interrupt_process(struct vnt_private *priv)
ieee80211_queue_stopped(priv->hw, 0)) ieee80211_queue_stopped(priv->hw, 0))
ieee80211_wake_queues(priv->hw); ieee80211_wake_queues(priv->hw);
VNSvInPortD(priv->port_offset + MAC_REG_ISR, &isr); isr = ioread32(priv->port_offset + MAC_REG_ISR);
MACvReceive0(priv->port_offset); MACvReceive0(priv->port_offset);
MACvReceive1(priv->port_offset); MACvReceive1(priv->port_offset);

View File

@ -618,7 +618,7 @@ do { \
#define MACvReceive0(iobase) \ #define MACvReceive0(iobase) \
do { \ do { \
unsigned long dwData; \ unsigned long dwData; \
VNSvInPortD(iobase + MAC_REG_RXDMACTL0, &dwData); \ dwData = ioread32(iobase + MAC_REG_RXDMACTL0); \
if (dwData & DMACTL_RUN) \ if (dwData & DMACTL_RUN) \
VNSvOutPortD(iobase + MAC_REG_RXDMACTL0, DMACTL_WAKE); \ VNSvOutPortD(iobase + MAC_REG_RXDMACTL0, DMACTL_WAKE); \
else \ else \
@ -628,7 +628,7 @@ do { \
#define MACvReceive1(iobase) \ #define MACvReceive1(iobase) \
do { \ do { \
unsigned long dwData; \ unsigned long dwData; \
VNSvInPortD(iobase + MAC_REG_RXDMACTL1, &dwData); \ dwData = ioread32(iobase + MAC_REG_RXDMACTL1); \
if (dwData & DMACTL_RUN) \ if (dwData & DMACTL_RUN) \
VNSvOutPortD(iobase + MAC_REG_RXDMACTL1, DMACTL_WAKE); \ VNSvOutPortD(iobase + MAC_REG_RXDMACTL1, DMACTL_WAKE); \
else \ else \
@ -638,7 +638,7 @@ do { \
#define MACvTransmit0(iobase) \ #define MACvTransmit0(iobase) \
do { \ do { \
unsigned long dwData; \ unsigned long dwData; \
VNSvInPortD(iobase + MAC_REG_TXDMACTL0, &dwData); \ dwData = ioread32(iobase + MAC_REG_TXDMACTL0); \
if (dwData & DMACTL_RUN) \ if (dwData & DMACTL_RUN) \
VNSvOutPortD(iobase + MAC_REG_TXDMACTL0, DMACTL_WAKE); \ VNSvOutPortD(iobase + MAC_REG_TXDMACTL0, DMACTL_WAKE); \
else \ else \
@ -648,7 +648,7 @@ do { \
#define MACvTransmitAC0(iobase) \ #define MACvTransmitAC0(iobase) \
do { \ do { \
unsigned long dwData; \ unsigned long dwData; \
VNSvInPortD(iobase + MAC_REG_AC0DMACTL, &dwData); \ dwData = ioread32(iobase + MAC_REG_AC0DMACTL); \
if (dwData & DMACTL_RUN) \ if (dwData & DMACTL_RUN) \
VNSvOutPortD(iobase + MAC_REG_AC0DMACTL, DMACTL_WAKE); \ VNSvOutPortD(iobase + MAC_REG_AC0DMACTL, DMACTL_WAKE); \
else \ else \
@ -684,7 +684,7 @@ do { \
#define MACvEnableProtectMD(iobase) \ #define MACvEnableProtectMD(iobase) \
do { \ do { \
unsigned long dwOrgValue; \ unsigned long dwOrgValue; \
VNSvInPortD(iobase + MAC_REG_ENCFG, &dwOrgValue); \ dwOrgValue = ioread32(iobase + MAC_REG_ENCFG); \
dwOrgValue = dwOrgValue | ENCFG_PROTECTMD; \ dwOrgValue = dwOrgValue | ENCFG_PROTECTMD; \
VNSvOutPortD(iobase + MAC_REG_ENCFG, dwOrgValue); \ VNSvOutPortD(iobase + MAC_REG_ENCFG, dwOrgValue); \
} while (0) } while (0)
@ -692,7 +692,7 @@ do { \
#define MACvDisableProtectMD(iobase) \ #define MACvDisableProtectMD(iobase) \
do { \ do { \
unsigned long dwOrgValue; \ unsigned long dwOrgValue; \
VNSvInPortD(iobase + MAC_REG_ENCFG, &dwOrgValue); \ dwOrgValue = ioread32(iobase + MAC_REG_ENCFG); \
dwOrgValue = dwOrgValue & ~ENCFG_PROTECTMD; \ dwOrgValue = dwOrgValue & ~ENCFG_PROTECTMD; \
VNSvOutPortD(iobase + MAC_REG_ENCFG, dwOrgValue); \ VNSvOutPortD(iobase + MAC_REG_ENCFG, dwOrgValue); \
} while (0) } while (0)
@ -700,7 +700,7 @@ do { \
#define MACvEnableBarkerPreambleMd(iobase) \ #define MACvEnableBarkerPreambleMd(iobase) \
do { \ do { \
unsigned long dwOrgValue; \ unsigned long dwOrgValue; \
VNSvInPortD(iobase + MAC_REG_ENCFG, &dwOrgValue); \ dwOrgValue = ioread32(iobase + MAC_REG_ENCFG); \
dwOrgValue = dwOrgValue | ENCFG_BARKERPREAM; \ dwOrgValue = dwOrgValue | ENCFG_BARKERPREAM; \
VNSvOutPortD(iobase + MAC_REG_ENCFG, dwOrgValue); \ VNSvOutPortD(iobase + MAC_REG_ENCFG, dwOrgValue); \
} while (0) } while (0)
@ -708,7 +708,7 @@ do { \
#define MACvDisableBarkerPreambleMd(iobase) \ #define MACvDisableBarkerPreambleMd(iobase) \
do { \ do { \
unsigned long dwOrgValue; \ unsigned long dwOrgValue; \
VNSvInPortD(iobase + MAC_REG_ENCFG, &dwOrgValue); \ dwOrgValue = ioread32(iobase + MAC_REG_ENCFG); \
dwOrgValue = dwOrgValue & ~ENCFG_BARKERPREAM; \ dwOrgValue = dwOrgValue & ~ENCFG_BARKERPREAM; \
VNSvOutPortD(iobase + MAC_REG_ENCFG, dwOrgValue); \ VNSvOutPortD(iobase + MAC_REG_ENCFG, dwOrgValue); \
} while (0) } while (0)
@ -716,7 +716,7 @@ do { \
#define MACvSetBBType(iobase, byTyp) \ #define MACvSetBBType(iobase, byTyp) \
do { \ do { \
unsigned long dwOrgValue; \ unsigned long dwOrgValue; \
VNSvInPortD(iobase + MAC_REG_ENCFG, &dwOrgValue); \ dwOrgValue = ioread32(iobase + MAC_REG_ENCFG); \
dwOrgValue = dwOrgValue & ~ENCFG_BBTYPE_MASK; \ dwOrgValue = dwOrgValue & ~ENCFG_BBTYPE_MASK; \
dwOrgValue = dwOrgValue | (unsigned long)byTyp; \ dwOrgValue = dwOrgValue | (unsigned long)byTyp; \
VNSvOutPortD(iobase + MAC_REG_ENCFG, dwOrgValue); \ VNSvOutPortD(iobase + MAC_REG_ENCFG, dwOrgValue); \

View File

@ -175,7 +175,7 @@ bool IFRFbWriteEmbedded(struct vnt_private *priv, unsigned long dwData)
/* W_MAX_TIMEOUT is the timeout period */ /* W_MAX_TIMEOUT is the timeout period */
for (ww = 0; ww < W_MAX_TIMEOUT; ww++) { for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
VNSvInPortD(iobase + MAC_REG_IFREGCTL, &dwValue); dwValue = ioread32(iobase + MAC_REG_IFREGCTL);
if (dwValue & IFREGCTL_DONE) if (dwValue & IFREGCTL_DONE)
break; break;
} }

View File

@ -20,9 +20,6 @@
/* For memory mapped IO */ /* For memory mapped IO */
#define VNSvInPortD(dwIOAddress, pdwData) \
(*(pdwData) = ioread32(dwIOAddress))
#define VNSvOutPortB(dwIOAddress, byData) \ #define VNSvOutPortB(dwIOAddress, byData) \
iowrite8((u8)(byData), dwIOAddress) iowrite8((u8)(byData), dwIOAddress)