2014-04-28 23:47:36 +04:00
|
|
|
#ifndef __LINUX_GOLDFISH_H
|
|
|
|
#define __LINUX_GOLDFISH_H
|
|
|
|
|
|
|
|
/* Helpers for Goldfish virtual platform */
|
|
|
|
|
2015-05-19 12:44:46 +03:00
|
|
|
static inline void gf_write_ptr(const void *ptr, void __iomem *portl,
|
|
|
|
void __iomem *porth)
|
2014-04-28 23:47:36 +04:00
|
|
|
{
|
2015-05-19 12:44:46 +03:00
|
|
|
writel((u32)(unsigned long)ptr, portl);
|
2014-05-19 17:34:09 +04:00
|
|
|
#ifdef CONFIG_64BIT
|
2015-05-19 12:44:46 +03:00
|
|
|
writel((unsigned long)ptr >> 32, porth);
|
2014-04-28 23:47:36 +04:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2015-05-19 12:44:46 +03:00
|
|
|
static inline void gf_write_dma_addr(const dma_addr_t addr,
|
|
|
|
void __iomem *portl,
|
|
|
|
void __iomem *porth)
|
|
|
|
{
|
|
|
|
writel((u32)addr, portl);
|
|
|
|
#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
|
|
|
|
writel(addr >> 32, porth);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-04-28 23:47:36 +04:00
|
|
|
#endif /* __LINUX_GOLDFISH_H */
|