162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef _SPARC_FB_H_
362306a36Sopenharmony_ci#define _SPARC_FB_H_
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#include <linux/io.h>
662306a36Sopenharmony_ci
762306a36Sopenharmony_cistruct fb_info;
862306a36Sopenharmony_cistruct file;
962306a36Sopenharmony_cistruct vm_area_struct;
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#ifdef CONFIG_SPARC32
1262306a36Sopenharmony_cistatic inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
1362306a36Sopenharmony_ci				unsigned long off)
1462306a36Sopenharmony_ci{ }
1562306a36Sopenharmony_ci#define fb_pgprotect fb_pgprotect
1662306a36Sopenharmony_ci#endif
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ciint fb_is_primary_device(struct fb_info *info);
1962306a36Sopenharmony_ci#define fb_is_primary_device fb_is_primary_device
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_cistatic inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n)
2262306a36Sopenharmony_ci{
2362306a36Sopenharmony_ci	sbus_memcpy_fromio(to, from, n);
2462306a36Sopenharmony_ci}
2562306a36Sopenharmony_ci#define fb_memcpy_fromio fb_memcpy_fromio
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_cistatic inline void fb_memcpy_toio(volatile void __iomem *to, const void *from, size_t n)
2862306a36Sopenharmony_ci{
2962306a36Sopenharmony_ci	sbus_memcpy_toio(to, from, n);
3062306a36Sopenharmony_ci}
3162306a36Sopenharmony_ci#define fb_memcpy_toio fb_memcpy_toio
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_cistatic inline void fb_memset_io(volatile void __iomem *addr, int c, size_t n)
3462306a36Sopenharmony_ci{
3562306a36Sopenharmony_ci	sbus_memset_io(addr, c, n);
3662306a36Sopenharmony_ci}
3762306a36Sopenharmony_ci#define fb_memset fb_memset_io
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci#include <asm-generic/fb.h>
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci#endif /* _SPARC_FB_H_ */
42