2014-04-29 02:47:36 +07:00
|
|
|
#ifndef __LINUX_GOLDFISH_H
|
|
|
|
#define __LINUX_GOLDFISH_H
|
|
|
|
|
|
|
|
/* Helpers for Goldfish virtual platform */
|
|
|
|
|
2015-05-19 16:44:46 +07:00
|
|
|
static inline void gf_write_ptr(const void *ptr, void __iomem *portl,
|
|
|
|
void __iomem *porth)
|
2014-04-29 02:47:36 +07:00
|
|
|
{
|
2015-05-19 16:44:46 +07:00
|
|
|
writel((u32)(unsigned long)ptr, portl);
|
2014-05-19 20:34:09 +07:00
|
|
|
#ifdef CONFIG_64BIT
|
2015-05-19 16:44:46 +07:00
|
|
|
writel((unsigned long)ptr >> 32, porth);
|
2014-04-29 02:47:36 +07:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2015-05-19 16:44:46 +07: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-29 02:47:36 +07:00
|
|
|
#endif /* __LINUX_GOLDFISH_H */
|