1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __LINUX_GOLDFISH_H
3 #define __LINUX_GOLDFISH_H
5 #include <linux/kernel.h>
6 #include <linux/types.h>
9 /* Helpers for Goldfish virtual platform */
11 static inline void gf_write_ptr(const void *ptr, void __iomem *portl,
14 const unsigned long addr = (unsigned long)ptr;
16 __raw_writel(lower_32_bits(addr), portl);
18 __raw_writel(upper_32_bits(addr), porth);
22 static inline void gf_write_dma_addr(const dma_addr_t addr,
26 __raw_writel(lower_32_bits(addr), portl);
27 #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
28 __raw_writel(upper_32_bits(addr), porth);
33 #endif /* __LINUX_GOLDFISH_H */