• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef __NOUVEAU_OS_H__
2 #define __NOUVEAU_OS_H__
3 
4 #include <linux/types.h>
5 #include <linux/slab.h>
6 #include <linux/mutex.h>
7 #include <linux/pci.h>
8 #include <linux/printk.h>
9 #include <linux/bitops.h>
10 #include <linux/firmware.h>
11 #include <linux/module.h>
12 #include <linux/i2c.h>
13 #include <linux/i2c-algo-bit.h>
14 #include <linux/delay.h>
15 #include <linux/io-mapping.h>
16 #include <linux/vmalloc.h>
17 #include <linux/acpi.h>
18 #include <linux/dmi.h>
19 #include <linux/reboot.h>
20 #include <linux/interrupt.h>
21 
22 #include <asm/unaligned.h>
23 
24 static inline int
ffsll(u64 mask)25 ffsll(u64 mask)
26 {
27 	int i;
28 	for (i = 0; i < 64; i++) {
29 		if (mask & (1ULL << i))
30 			return i + 1;
31 	}
32 	return 0;
33 }
34 
35 #ifndef ioread32_native
36 #ifdef __BIG_ENDIAN
37 #define ioread16_native ioread16be
38 #define iowrite16_native iowrite16be
39 #define ioread32_native  ioread32be
40 #define iowrite32_native iowrite32be
41 #else /* def __BIG_ENDIAN */
42 #define ioread16_native ioread16
43 #define iowrite16_native iowrite16
44 #define ioread32_native  ioread32
45 #define iowrite32_native iowrite32
46 #endif /* def __BIG_ENDIAN else */
47 #endif /* !ioread32_native */
48 
49 #endif
50