goldfish.h 566 B

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