goldfish: Add a 64bit write helper
authorAlan <alan@linux.intel.com>
Mon, 28 Apr 2014 19:47:36 +0000 (20:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 May 2014 23:47:18 +0000 (19:47 -0400)
The base code imported from the Google tree is ifdef heaven. Prepare to fix
this by adding a helper function.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/goldfish.h [new file with mode: 0644]

diff --git a/include/linux/goldfish.h b/include/linux/goldfish.h
new file mode 100644 (file)
index 0000000..9cc2890
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef __LINUX_GOLDFISH_H
+#define __LINUX_GOLDFISH_H
+
+/* Helpers for Goldfish virtual platform */
+
+static inline void gf_write64(unsigned long data,
+               void __iomem *portl, void __iomem *porth)
+{
+       writel((u32)data, portl);
+#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
+       writel(data>>32, porth);
+#endif
+}
+
+#endif /* __LINUX_GOLDFISH_H */