diff options
Diffstat (limited to 'drivers/staging/vt6655/upc.h')
-rw-r--r-- | drivers/staging/vt6655/upc.h | 52 |
1 files changed, 6 insertions, 46 deletions
diff --git a/drivers/staging/vt6655/upc.h b/drivers/staging/vt6655/upc.h index 155e66439073..e262f1b00e66 100644 --- a/drivers/staging/vt6655/upc.h +++ b/drivers/staging/vt6655/upc.h @@ -35,79 +35,39 @@ /*--------------------- Export Definitions -------------------------*/ // -// For IO mapped -// - -#ifdef IO_MAP - -#define VNSvInPortB(dwIOAddress, pbyData) \ -do { \ - *(pbyData) = inb(dwIOAddress); \ -} while (0) - -#define VNSvInPortW(dwIOAddress, pwData) \ -do { \ - *(pwData) = inw(dwIOAddress); \ -} while (0) - -#define VNSvInPortD(dwIOAddress, pdwData) \ -do { \ - *(pdwData) = inl(dwIOAddress); \ -} while (0) - -#define VNSvOutPortB(dwIOAddress, byData) \ - outb(byData, dwIOAddress) - -#define VNSvOutPortW(dwIOAddress, wData) \ - outw(wData, dwIOAddress) - -#define VNSvOutPortD(dwIOAddress, dwData) \ - outl(dwData, dwIOAddress) - -#else - -// // For memory mapped IO // #define VNSvInPortB(dwIOAddress, pbyData) \ do { \ - volatile unsigned char *pbyAddr = (unsigned char *)(dwIOAddress); \ - *(pbyData) = readb(pbyAddr); \ + *(pbyData) = readb(dwIOAddress); \ } while (0) #define VNSvInPortW(dwIOAddress, pwData) \ do { \ - volatile unsigned short *pwAddr = (unsigned short *)(dwIOAddress); \ - *(pwData) = readw(pwAddr); \ + *(pwData) = readw(dwIOAddress); \ } while (0) #define VNSvInPortD(dwIOAddress, pdwData) \ do { \ - volatile unsigned long *pdwAddr = (unsigned long *)(dwIOAddress); \ - *(pdwData) = readl(pdwAddr); \ + *(pdwData) = readl(dwIOAddress); \ } while (0) #define VNSvOutPortB(dwIOAddress, byData) \ do { \ - volatile unsigned char *pbyAddr = (unsigned char *)(dwIOAddress); \ - writeb((unsigned char)byData, pbyAddr); \ + writeb((unsigned char)byData, dwIOAddress); \ } while (0) #define VNSvOutPortW(dwIOAddress, wData) \ do { \ - volatile unsigned short *pwAddr = ((unsigned short *)(dwIOAddress)); \ - writew((unsigned short)wData, pwAddr); \ + writew((unsigned short)wData, dwIOAddress); \ } while (0) #define VNSvOutPortD(dwIOAddress, dwData) \ do { \ - volatile unsigned long *pdwAddr = (unsigned long *)(dwIOAddress); \ - writel((unsigned long)dwData, pdwAddr); \ + writel((unsigned long)dwData, dwIOAddress); \ } while (0) -#endif - // // ALWAYS IO-Mapped IO when in 16-bit/32-bit environment // |