^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /* sbuslib.h: SBUS fb helper library interfaces */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #ifndef _SBUSLIB_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) #define _SBUSLIB_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) struct sbus_mmap_map {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) unsigned long voff;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) unsigned long poff;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) unsigned long size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define SBUS_MMAP_FBSIZE(n) (-n)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #define SBUS_MMAP_EMPTY 0x80000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) extern void sbusfb_fill_var(struct fb_var_screeninfo *var,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) struct device_node *dp, int bpp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) struct vm_area_struct;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) extern int sbusfb_mmap_helper(struct sbus_mmap_map *map,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) unsigned long physbase, unsigned long fbsize,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) unsigned long iospace,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) struct vm_area_struct *vma);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) struct fb_info *info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) int type, int fb_depth, unsigned long fb_size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) unsigned long arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #endif /* _SBUSLIB_H */