18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/* sbuslib.h: SBUS fb helper library interfaces */
38c2ecf20Sopenharmony_ci#ifndef _SBUSLIB_H
48c2ecf20Sopenharmony_ci#define _SBUSLIB_H
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_cistruct sbus_mmap_map {
78c2ecf20Sopenharmony_ci	unsigned long voff;
88c2ecf20Sopenharmony_ci	unsigned long poff;
98c2ecf20Sopenharmony_ci	unsigned long size;
108c2ecf20Sopenharmony_ci};
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#define SBUS_MMAP_FBSIZE(n) (-n)
138c2ecf20Sopenharmony_ci#define SBUS_MMAP_EMPTY	0x80000000
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciextern void sbusfb_fill_var(struct fb_var_screeninfo *var,
168c2ecf20Sopenharmony_ci			    struct device_node *dp, int bpp);
178c2ecf20Sopenharmony_cistruct vm_area_struct;
188c2ecf20Sopenharmony_ciextern int sbusfb_mmap_helper(struct sbus_mmap_map *map,
198c2ecf20Sopenharmony_ci			      unsigned long physbase, unsigned long fbsize,
208c2ecf20Sopenharmony_ci			      unsigned long iospace,
218c2ecf20Sopenharmony_ci			      struct vm_area_struct *vma);
228c2ecf20Sopenharmony_ciint sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
238c2ecf20Sopenharmony_ci			struct fb_info *info,
248c2ecf20Sopenharmony_ci			int type, int fb_depth, unsigned long fb_size);
258c2ecf20Sopenharmony_ciint sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
268c2ecf20Sopenharmony_ci			unsigned long arg);
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci#endif /* _SBUSLIB_H */
29