unsigned char byTestBits)
{
void __iomem *io_base = priv->PortOffset;
- unsigned char byData;
- VNSvInPortB(io_base + byRegOfs, &byData);
- return (byData & byTestBits) == byTestBits;
+ return (ioread8(io_base + byRegOfs) & byTestBits) == byTestBits;
}
/*
unsigned char byTestBits)
{
void __iomem *io_base = priv->PortOffset;
- unsigned char byData;
- VNSvInPortB(io_base + byRegOfs, &byData);
- return !(byData & byTestBits);
+ return !(ioread8(io_base + byRegOfs) & byTestBits);
}
/*
bool MACbSoftwareReset(struct vnt_private *priv)
{
void __iomem *io_base = priv->PortOffset;
- unsigned char byData;
unsigned short ww;
/* turn on HOSTCR_SOFTRST, just write 0x01 to reset */
VNSvOutPortB(io_base + MAC_REG_HOSTCR, 0x01);
for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
- VNSvInPortB(io_base + MAC_REG_HOSTCR, &byData);
- if (!(byData & HOSTCR_SOFTRST))
+ if (!(ioread8(io_base + MAC_REG_HOSTCR) & HOSTCR_SOFTRST))
break;
}
if (ww == W_MAX_TIMEOUT)
void __iomem *io_base = priv->PortOffset;
unsigned short ww;
unsigned long dwData;
- unsigned char byData;
/* turn off wow temp for turn off Rx safely */
MACvRegBitsOff(io_base, MAC_REG_HOSTCR, HOSTCR_RXON);
/* W_MAX_TIMEOUT is the timeout period */
for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
- VNSvInPortB(io_base + MAC_REG_HOSTCR, &byData);
- if (!(byData & HOSTCR_RXONST))
+ if (!(ioread8(io_base + MAC_REG_HOSTCR) & HOSTCR_RXONST))
break;
}
if (ww == W_MAX_TIMEOUT) {
void __iomem *io_base = priv->PortOffset;
unsigned short ww;
unsigned long dwData;
- unsigned char byData;
/* Clear TX DMA */
/* Tx0 */
/* W_MAX_TIMEOUT is the timeout period */
for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
- VNSvInPortB(io_base + MAC_REG_HOSTCR, &byData);
- if (!(byData & HOSTCR_TXONST))
+ if (!(ioread8(io_base + MAC_REG_HOSTCR) & HOSTCR_TXONST))
break;
}
if (ww == W_MAX_TIMEOUT) {
{
void __iomem *io_base = priv->PortOffset;
unsigned short ww;
- unsigned char byData;
unsigned char byOrgDMACtl;
VNSvInPortB(io_base + MAC_REG_RXDMACTL0, &byOrgDMACtl);
VNSvOutPortB(io_base + MAC_REG_RXDMACTL0+2, DMACTL_RUN);
for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
- VNSvInPortB(io_base + MAC_REG_RXDMACTL0, &byData);
- if (!(byData & DMACTL_RUN))
+ if (!(ioread8(io_base + MAC_REG_RXDMACTL0) & DMACTL_RUN))
break;
}
{
void __iomem *io_base = priv->PortOffset;
unsigned short ww;
- unsigned char byData;
unsigned char byOrgDMACtl;
VNSvInPortB(io_base + MAC_REG_RXDMACTL1, &byOrgDMACtl);
VNSvOutPortB(io_base + MAC_REG_RXDMACTL1+2, DMACTL_RUN);
for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
- VNSvInPortB(io_base + MAC_REG_RXDMACTL1, &byData);
- if (!(byData & DMACTL_RUN))
+ if (!(ioread8(io_base + MAC_REG_RXDMACTL1) & DMACTL_RUN))
break;
}
{
void __iomem *io_base = priv->PortOffset;
unsigned short ww;
- unsigned char byData;
unsigned char byOrgDMACtl;
VNSvInPortB(io_base + MAC_REG_TXDMACTL0, &byOrgDMACtl);
VNSvOutPortB(io_base + MAC_REG_TXDMACTL0+2, DMACTL_RUN);
for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
- VNSvInPortB(io_base + MAC_REG_TXDMACTL0, &byData);
- if (!(byData & DMACTL_RUN))
+ if (!(ioread8(io_base + MAC_REG_TXDMACTL0) & DMACTL_RUN))
break;
}
{
void __iomem *io_base = priv->PortOffset;
unsigned short ww;
- unsigned char byData;
unsigned char byOrgDMACtl;
VNSvInPortB(io_base + MAC_REG_AC0DMACTL, &byOrgDMACtl);
VNSvOutPortB(io_base + MAC_REG_AC0DMACTL+2, DMACTL_RUN);
for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
- VNSvInPortB(io_base + MAC_REG_AC0DMACTL, &byData);
- if (!(byData & DMACTL_RUN))
+ if (!(ioread8(io_base + MAC_REG_AC0DMACTL) & DMACTL_RUN))
break;
}
if (ww == W_MAX_TIMEOUT)