11da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* sbuslib.h: SBUS fb helper library interfaces */
21da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifndef _SBUSLIB_H
31da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define _SBUSLIB_H
41da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
51da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct sbus_mmap_map {
61da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	unsigned long voff;
71da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	unsigned long poff;
81da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds	unsigned long size;
91da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SBUS_MMAP_FBSIZE(n) (-n)
121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SBUS_MMAP_EMPTY	0x80000000
131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
146cd5a86b56ec8fc8651c043bdb05ea0c662fb704Robert Reifextern void sbusfb_fill_var(struct fb_var_screeninfo *var,
156cd5a86b56ec8fc8651c043bdb05ea0c662fb704Robert Reif			    struct device_node *dp, int bpp);
161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct vm_area_struct;
171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsextern int sbusfb_mmap_helper(struct sbus_mmap_map *map,
181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds			      unsigned long physbase, unsigned long fbsize,
191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds			      unsigned long iospace,
201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds			      struct vm_area_struct *vma);
211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsint sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds			struct fb_info *info,
231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds			int type, int fb_depth, unsigned long fb_size);
24c7006638a50cbf16bb420fa91e5af2dd22d28621David S. Millerint sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
256cd5a86b56ec8fc8651c043bdb05ea0c662fb704Robert Reif			unsigned long arg);
261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif /* _SBUSLIB_H */
28