Go to the documentation of this file.
50 #ifndef __NV_LOCAL_H__
51 #define __NV_LOCAL_H__
62 #define NV_WR08(p,i,d) (__raw_writeb((d), (void __iomem *)(p) + (i)))
63 #define NV_RD08(p,i) (__raw_readb((void __iomem *)(p) + (i)))
64 #define NV_WR16(p,i,d) (__raw_writew((d), (void __iomem *)(p) + (i)))
65 #define NV_RD16(p,i) (__raw_readw((void __iomem *)(p) + (i)))
66 #define NV_WR32(p,i,d) (__raw_writel((d), (void __iomem *)(p) + (i)))
67 #define NV_RD32(p,i) (__raw_readl((void __iomem *)(p) + (i)))
70 #define VGA_WR08(p,i,d) (writeb((d), (void __iomem *)(p) + (i)))
71 #define VGA_RD08(p,i) (readb((void __iomem *)(p) + (i)))
73 #define NVDmaNext(par, data) \
74 NV_WR32(&(par)->dmaBase[(par)->dmaCurrent++], 0, (data))
76 #define NVDmaStart(info, par, tag, size) { \
77 if((par)->dmaFree <= (size)) \
78 NVDmaWait(info, size); \
79 NVDmaNext(par, ((size) << 18) | (tag)); \
80 (par)->dmaFree -= ((size) + 1); \
84 #define _NV_FENCE() outb(0, 0x3D0);
86 #define _NV_FENCE() mb();
89 #define WRITE_PUT(par, data) { \
91 NV_RD08((par)->FbStart, 0); \
92 NV_WR32(&(par)->FIFO[0x0010], 0, (data) << 2); \
96 #define READ_GET(par) (NV_RD32(&(par)->FIFO[0x0011], 0) >> 2)
98 #ifdef __LITTLE_ENDIAN
102 #define reverse_order(l) \
105 a[0] = bitrev8(a[0]); \
106 a[1] = bitrev8(a[1]); \
107 a[2] = bitrev8(a[2]); \
108 a[3] = bitrev8(a[3]); \
111 #define reverse_order(l) do { } while(0)