x86/mm/pat: Don't report PAT on CPUs that don't support it
[linux/fpc-iii.git] / drivers / staging / vt6655 / upc.h
blob9806b5989014fa147705a7417a77a3f554c401c9
1 /*
2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3 * All rights reserved.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * File: upc.h
17 * Purpose: Macros to access device
19 * Author: Tevin Chen
21 * Date: Mar 17, 1997
25 #ifndef __UPC_H__
26 #define __UPC_H__
28 #include "device.h"
30 /*--------------------- Export Definitions -------------------------*/
33 /* For memory mapped IO */
36 #define VNSvInPortB(dwIOAddress, pbyData) \
37 (*(pbyData) = ioread8(dwIOAddress))
39 #define VNSvInPortW(dwIOAddress, pwData) \
40 (*(pwData) = ioread16(dwIOAddress))
42 #define VNSvInPortD(dwIOAddress, pdwData) \
43 (*(pdwData) = ioread32(dwIOAddress))
45 #define VNSvOutPortB(dwIOAddress, byData) \
46 iowrite8((u8)(byData), dwIOAddress)
48 #define VNSvOutPortW(dwIOAddress, wData) \
49 iowrite16((u16)(wData), dwIOAddress)
51 #define VNSvOutPortD(dwIOAddress, dwData) \
52 iowrite32((u32)(dwData), dwIOAddress)
54 #define PCAvDelayByIO(uDelayUnit) \
55 do { \
56 unsigned char byData; \
57 unsigned long ii; \
59 if (uDelayUnit <= 50) { \
60 udelay(uDelayUnit); \
61 } else { \
62 for (ii = 0; ii < (uDelayUnit); ii++) \
63 byData = inb(0x61); \
64 } \
65 } while (0)
67 /*--------------------- Export Classes ----------------------------*/
69 /*--------------------- Export Variables --------------------------*/
71 /*--------------------- Export Functions --------------------------*/
73 #endif /* __UPC_H__ */