1 /* SPDX-License-Identifier: MIT */ 2 #ifndef __NOUVEAU_OS_H__ 3 #define __NOUVEAU_OS_H__ 4 5 #include <linux/types.h> 6 #include <linux/slab.h> 7 #include <linux/mutex.h> 8 #include <linux/pci.h> 9 #include <linux/platform_device.h> 10 #include <linux/printk.h> 11 #include <linux/bitops.h> 12 #include <linux/firmware.h> 13 #include <linux/module.h> 14 #include <linux/i2c.h> 15 #include <linux/i2c-algo-bit.h> 16 #include <linux/delay.h> 17 #include <linux/io-mapping.h> 18 #include <linux/acpi.h> 19 #include <linux/vmalloc.h> 20 #include <linux/dmi.h> 21 #include <linux/reboot.h> 22 #include <linux/interrupt.h> 23 #include <linux/log2.h> 24 #include <linux/pm_runtime.h> 25 #include <linux/power_supply.h> 26 #include <linux/clk.h> 27 #include <linux/regulator/consumer.h> 28 #include <linux/agp_backend.h> 29 #include <linux/reset.h> 30 #include <linux/iommu.h> 31 #include <linux/of_device.h> 32 33 #include <linux/unaligned.h> 34 35 #include <soc/tegra/fuse.h> 36 #include <soc/tegra/pmc.h> 37 38 #ifdef __BIG_ENDIAN 39 #define ioread16_native ioread16be 40 #define iowrite16_native iowrite16be 41 #define ioread32_native ioread32be 42 #define iowrite32_native iowrite32be 43 #else 44 #define ioread16_native ioread16 45 #define iowrite16_native iowrite16 46 #define ioread32_native ioread32 47 #define iowrite32_native iowrite32 48 #endif 49 50 #define iowrite64_native(v,p) do { \ 51 u32 __iomem *_p = (u32 __iomem *)(p); \ 52 u64 _v = (v); \ 53 iowrite32_native(lower_32_bits(_v), &_p[0]); \ 54 iowrite32_native(upper_32_bits(_v), &_p[1]); \ 55 } while(0) 56 #endif 57