1 #ifndef __LINUX_GOLDFISH_H
2 #define __LINUX_GOLDFISH_H
3
4 #include <linux/types.h>
5
6 /* Helpers for Goldfish virtual platform */
7
gf_write_ptr(const void * ptr,void __iomem * portl,void __iomem * porth)8 static inline void gf_write_ptr(const void *ptr, void __iomem *portl,
9 void __iomem *porth)
10 {
11 writel((u32)(unsigned long)ptr, portl);
12 #ifdef CONFIG_64BIT
13 writel((unsigned long)ptr >> 32, porth);
14 #endif
15 }
16
gf_write_dma_addr(const dma_addr_t addr,void __iomem * portl,void __iomem * porth)17 static inline void gf_write_dma_addr(const dma_addr_t addr,
18 void __iomem *portl,
19 void __iomem *porth)
20 {
21 writel((u32)addr, portl);
22 #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
23 writel(addr >> 32, porth);
24 #endif
25 }
26
27
28 #endif /* __LINUX_GOLDFISH_H */
29