Browse Source

goldfish: Add a 64bit write helper

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>
Alan 11 years ago
parent
commit
425f3740cf
1 changed files with 15 additions and 0 deletions
  1. 15 0
      include/linux/goldfish.h

+ 15 - 0
include/linux/goldfish.h

@@ -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 */