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