]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/linux/goldfish.h
regulator: ab8500: Remove AB8505 USB regulator
[mirror_ubuntu-bionic-kernel.git] / include / linux / goldfish.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
425f3740
A
2#ifndef __LINUX_GOLDFISH_H
3#define __LINUX_GOLDFISH_H
4
5/* Helpers for Goldfish virtual platform */
6
07d783fd
PST
7static inline void gf_write_ptr(const void *ptr, void __iomem *portl,
8 void __iomem *porth)
425f3740 9{
07d783fd 10 writel((u32)(unsigned long)ptr, portl);
8d9e9857 11#ifdef CONFIG_64BIT
07d783fd 12 writel((unsigned long)ptr >> 32, porth);
425f3740
A
13#endif
14}
15
07d783fd
PST
16static inline void gf_write_dma_addr(const dma_addr_t addr,
17 void __iomem *portl,
18 void __iomem *porth)
19{
20 writel((u32)addr, portl);
21#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
22 writel(addr >> 32, porth);
23#endif
24}
25
26
425f3740 27#endif /* __LINUX_GOLDFISH_H */